Copyright (C) 2020 Andreas Kloeckner
NB: This note book uses the Maxima-Jupyter kernel to interface with Maxima, an open-source computer algebra system. I have found that the Docker image is a fairly convenient way of using this kernel.
Some Maxima version info for reproducibility:
build_info();
Load some packages:
kill(all);
load("itensor");
assert(condition):=if not condition then error("Assertion violated") else true$
norm_2_squared(v):=v.v;
crossfunc(f):=makelist(
sum(sum(
levi_civita([i,j,k])*f(j,k),
j,1,3),k,1,3),i,1,3)$
crossprod(a,b):=crossfunc(lambda([j,k], a[j]*b[k]));
REDEFINITION-WITH-DEFMACRO: redefining MAXIMA::IFNOT in DEFMACRO REDEFINITION-WITH-DEFMACRO: redefining MAXIMA::M+OR*OR^P in DEFMACRO REDEFINITION-WITH-DEFUN: redefining MAXIMA::$IDUMMY-IMPL in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::$IDUMMY in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::ISPROD in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::DERAT in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::PLUSI in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::MINUSI in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::COVI in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::CONTI in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::DERI in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::NAME in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::$COVI-IMPL in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::$COVI in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::$CONTI-IMPL in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::$CONTI in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::$DERI-IMPL in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::$DERI in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::$NAME-IMPL in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::$NAME in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::$DEFCON in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::GETCON in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::RPOBJ in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::$IMETRIC-IMPL in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::$IMETRIC in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::MYSUBST0 in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::COV in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::CONTR in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::DIFFCOV in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::$ICHR1 in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::$ICHR2 in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::$ICURVATURE-IMPL in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::$ICURVATURE in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::COVSUBST in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::CONSUBST in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::DERSUBST in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::DIFFOP in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::$COVDIFF in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::COVDIFF in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::COVDIFFTIMES in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::VECDIFF in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::LIEDIFF in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::$LIEDIFF-IMPL in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::$LIEDIFF in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::$REDIFF-IMPL in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::$REDIFF in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::$EVUNDIFF-IMPL in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::$EVUNDIFF in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::$UNDIFF-IMPL in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::$UNDIFF in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::PUTINONES in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::$LORENTZ_GAUGE in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::LORENTZ in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::LESS in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::$CONTRACT-IMPL in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::$CONTRACT in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::CONTRACT4A in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::CONTRACT5 in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::HEAD in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::FIRSTINTERSECT in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::CONTRACT2 in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::SETDIFF in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::CONTRACT3 in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::CONTRACT4 in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::$RENORM-IMPL in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::$RENORM in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::NEGLIST in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::ABNORM in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::SUBSTLIST in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::REMOVENOTIN in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::REMOVENOTINM in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::CONTRACTINSIDE in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::CONTRACT1 in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::$KDELTA-IMPL in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::$KDELS-IMPL in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::$KDELS in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::DELTA in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::$ISHOW-IMPL in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::$ISHOW in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::ISHOW in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::SPLICE in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::SPLICE1 in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::SPLICE2 in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::DERIV in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::CHAINRULE1 in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::DIFFEXPT1 in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::SDIFF in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::IDIFFMAP in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::IDIFFTIMES in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::IDIFFEXPT1 in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::IDIFFEXPT in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::IDIFFINT in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::IDIFFINT1 in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::IDIFF%DERIV in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::IDERIV in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::IDIFFNCEXPT in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::IDIFFSUMPROD in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::IDIFFGRAD in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::$IDIFF-IMPL in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::$IDIFF in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::IDIFF in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::DIFFRPOBJ in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::$LC0-IMPL in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::$LC0 in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::$LEVI_CIVITA-IMPL in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::$LC_L in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::$LC_U in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::NONUMBER in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::REMOVEINDEX in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::INDICES in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::$INDICES-IMPL in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::$INDICES in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::SAMELISTS in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::$FLUSH in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::$FLUSHD in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::FLUSH in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::$FLUSHND-IMPL in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::$FLUSHND in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::$RENAME in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::RENAME in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::REORDER in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::ITENSOR-CLEANUP in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::CLEANUP1 in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::ITENSOR-SORT in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::$REMCOMPS-IMPL in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::$REMCOMPS in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::$INDEXED_TENSOR-IMPL in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::$INDEXED_TENSOR in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::ALLFIXED in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::TENSOREVAL in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::$COMPONENTS-IMPL in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::$COMPONENTS in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::SELECT in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::$ENTERTENSOR in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::CHECKINDEX in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::MEMBERL in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::CONSMLIST in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::$INDICES2-IMPL in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::$INDICES2 in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::$CHANGENAME-IMPL in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::$CHANGENAME in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::CHANGENAME in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::$COORD in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::$REMCOORD-IMPL in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::$REMCOORD in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::$LISTOFTENS-IMPL in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::$LISTOFTENS in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::LISTOFTENS in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::NUMLIST in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::$SHOWCOMPS-IMPL in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::$SHOWCOMPS in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::$HODGE-IMPL in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::$HODGE in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::REMSYM in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::$IDIM-IMPL in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::$IDIM in DEFUN REDEFINITION-WITH-DEFUN: redefining MAXIMA::I-$DEPENDENCIES in DEFUN
These function simplify expressions coming from the (symbolic) simultaneous diagonalization, by letting Maxima realize that $n \cdot n =1$.
/* ------------------------------------------------------------------------- */
/* Simplification for expressions stemming from hyperbolic systems */
/* ------------------------------------------------------------------------- */
hypsimp(x):=ratsimp(ratsubst(1,n.n,x))$
fullhypsimp(x):=hypsimp(
ratsubst(
last(n)^2,
1-sum(n[i]^2,i,1,length(n)-1),
x)
)$
/* ------------------------------------------------------------------------- */
/* diagonalize a given hyperbolic operator A */
/* ------------------------------------------------------------------------- */
hypdiagonalize(A):=block([evA, V, invV,D],
evA:hypsimp(apply(append, eigenvectors(A)[2])),
V:transpose(apply(matrix, evA)),
invV:hypsimp(invert(V)),
assert(hypsimp(V.invV)=ident(length(A))),
D:hypsimp(invV.A.V),
[V, D, invV])$
/* redefine this to change dimensionality: */
n:[nx,ny];
dims:length(n);
assume(c>0);
if dims = 1 then n:[1];
Define the flux jacobian for the first-order form of the wave-equation:
$$ \begin{align*} \partial_t u &= \nabla \cdot \boldsymbol v\\ \partial_t \boldsymbol v &= \nabla u \end{align*} $$projected onto a line with normal n
:
esymmatrix(n, v, i,j):=ematrix(n,n,v,i,j)+ematrix(n,n,v,j,i);
wave_A:sum(n[i]*esymmatrix(dims+1, -c, 1+i,1),i,1,dims);
Find the eigenvalues of the flux Jacobian:
[wave_V, wave_D, wave_invV]:hypdiagonalize(wave_A);
This function sets up a system of Rankine-Hugoniot conditions across the flux fan and solves for the stagnation state:
/* ------------------------------------------------------------------------- */
/* compute upwind flux for a given operator with eigenvalues evs, sorted
* in ascending order.
* Sign assumptions for all variables occuring in evs must be in place.
*/
/* ------------------------------------------------------------------------- */
hyp_upwind_flux(evs, D):=block([evvars, Dp, Dm, n, midstates, states, unknowns],
evvars:listofvars(evs),
add_evvars_suffix(suffix, x):=subst(makelist(v=concat(''v, suffix), v, evvars), x),
evsm:add_evvars_suffix(m, evs),
evsp:add_evvars_suffix(p, evs),
Dm:add_evvars_suffix(m, D),
Dp:add_evvars_suffix(p, D),
midstates:makelist(makelist(concat(s,state,i), i, 1, length(D)),
state, 1, length(evs)-1),
states:append(
[makelist(concat(sm, i), i, 1, length(D))],
midstates,
[makelist(concat(sp,i), i, 1, length(D))]),
unknowns:apply(append, midstates),
result:if member(0, evs) then
block([biasedD, veceqns, eqns, soln],
biasedD:makelist(
if evs[i] = 0 then [Dp,Dm]
else if evs[i] > 0 then [Dp,Dp]
else [Dm,Dm],
i, 1, length(evs)),
veceqns:apply(append, makelist(
-(if evs[i] > 0 then evsp[i] else evsm[i]) *(states[i+1]-states[i])
+(biasedD[i][1].states[i+1]-biasedD[i][2].states[i]),
i,1,length(evs))),
eqns:makelist(veceqns[i,1], i, 1, length(veceqns)),
soln:solve(eqns, unknowns),
assert(length(soln)=1),
for i: 1 thru length(evs) do
if evs[i] = 0 then return(Dp.subst(soln[1], midstates[i]))
)
else
block([straddle_idx, Dstates, veceqns, eqns, soln],
straddle_idx:for i: 1 thru length(evs)-1 do
if (evs[i] < 0) and (evs[i+1] > 0) then return(i),
flux:makelist(concat(flux,i),i,1,length(D)),
unknowns:append(unknowns, flux),
Dstates:append(
[Dm.first(states)],
makelist(
if i = straddle_idx then flux
else if evs[i] > 0 then Dp.midstates[i]
else Dm.midstates[i],
i, 1, length(midstates)),
[Dp.last(states)]),
veceqns:apply(append, makelist(
-(if evs[i] > 0 then evsp[i] else evsm[i]) *(states[i+1]-states[i])
+(Dstates[i+1]-Dstates[i]),
i,1,length(evs))),
eqns:makelist(veceqns[i,1], i, 1, length(veceqns)),
print(covect(eqns)),
soln:solve(eqns, unknowns),
assert(length(soln)=1),
subst(soln[1], flux)
),
subst(
append(
makelist(concat(sm, i)=sm[i,1], i, 1, length(D)),
makelist(concat(sp, i)=sp[i,1], i, 1, length(D))
),
result)
)$
Find an expression for the flux in characteristic variables.
Note the p
and m
suffixes for the $+$ and $-$ sides of the interface.
wave_eigenvalues:makelist(wave_D[i,i], i, 1, length(wave_D));
if member(0, wave_eigenvalues) then
wave_sflux:hyp_upwind_flux([-c,0,c], wave_D)
else
wave_sflux:hyp_upwind_flux([-c,c], wave_D);
solve: dependent equations eliminated: (1 6 8)
Convert back to conserved variables:
wave_wflux:ratsimp(wave_V.ev(wave_sflux, [sm=wave_sminw,sp=wave_spinw]));
First, set up some parameter assumptions:
assume(c>0);
assume(mu>0);
assume(epsilon>0);
assume(epsinv>0);
assume(muinv>0);
Some helper functions for matrix creation:
/* A hyperbolic system matrix resulting from a curl */
curlmat(coord):=genmatrix(
lambda ([i,j], levi_civita([coord,j,i])),
3,3)$
vstack:append$
hstack(a,b):=transpose(append(transpose(a),transpose(b)))$
blockmat(a11,a12,a21,a22):=vstack(hstack(a11,a12),hstack(a21,a22))$
n:[nx,ny,nz];
Next, write down the flux Jacobian on a line with normal n
:
max_submat(i):=blockmat(
zeromatrix(3,3),
-epsinv*curlmat(i), /* epsinv = 1/epsilon */
muinv*curlmat(i), /* muinv = 1/mu */
zeromatrix(3,3)
)$
max_Asimp:sum(n[i]*max_submat(i),i,1,3);
max_A:subst([epsinv=1/epsilon,muinv=1/mu], max_Asimp);
Next, diagonalize to obtain the transformation to/from characteristic variables:
max_invsubst(x):=subst([epsinv=1/epsilon, muinv=1/mu], x)$
[max_V, max_D, max_invV]:max_invsubst(hypdiagonalize(max_Asimp));
Now find the flux in characteristic variables:
max_Dinc:subst([1/(sqrt(epsilon)*sqrt(mu))=c], max_D);
max_sflux:hyp_upwind_flux([-c,0,c], max_Dinc);
/* FIXME: max_V should not depend on epsilon and mu, but it does
For now, make cp and cm equal. */
max_sflux:subst(
[cp=1/(sqrt(epsilon)*sqrt(mu)), cm=1/(sqrt(epsilon)*sqrt(mu))],
max_sflux);
solve: dependent equations eliminated: (1 2 11 16 15 12)
And in conserved variables:
max_Em:makelist(Em[i],i,1,3)$
max_Ep:makelist(Ep[i],i,1,3)$
max_Hm:makelist(Hm[i],i,1,3)$
max_Hp:makelist(Hp[i],i,1,3)$
max_wm:vstack(max_Em,max_Hm)$
max_wp:vstack(max_Ep,max_Hp)$
max_sminw:hypsimp(max_invV.max_wm)$
max_spinw:hypsimp(max_invV.max_wp)$
max_wflux:fullhypsimp(max_V.ev(max_sflux, [sm=max_sminw,sp=max_spinw]));
max_stronglocalpart:max_A.max_wm;
max_strongwflux:max_stronglocalpart-max_wflux;
Check against value from the literature90199-U):
max_Z:sqrt(mu/epsilon)$
max_Y:sqrt(epsilon/mu)$
max_knownstrongwflux:ratsimp(vstack(
-1/(2*epsilon)
*(crossprod(n,(max_Hm-max_Hp)-1/max_Z*crossprod(n,max_Em-max_Ep))),
1/(2*mu)
*(crossprod(n,(max_Em-max_Ep)+1/max_Y*crossprod(n,max_Hm-max_Hp)))
));
assert(norm_2_squared(hypsimp(
(max_strongwflux)
-max_knownstrongwflux))=0);