Add example using evalexpr
This commit is contained in:
parent
f6f70fe79a
commit
ea90bb8655
|
@ -0,0 +1,29 @@
|
||||||
|
{
|
||||||
|
"grids": {
|
||||||
|
"grid": {
|
||||||
|
"x": { "linspace": { "start": -5, "end": 5, "steps": 100 } },
|
||||||
|
"y": { "linspace": { "start": -5, "end": 5, "steps": 100 } },
|
||||||
|
"boundary_conditions": {
|
||||||
|
"south": "this",
|
||||||
|
"north": "this",
|
||||||
|
"east": "this",
|
||||||
|
"west": "this"
|
||||||
|
},
|
||||||
|
"operators": {
|
||||||
|
"xi": "upwind9",
|
||||||
|
"eta": "upwind9"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
"initial_conditions": {
|
||||||
|
"expressions": {
|
||||||
|
"globals": "uinf=1;vinf=0;beta=5;y0=0;x0=0;Tfactor=(GAMMA-1)*beta*beta/(8*GAMMA*PI*PI)",
|
||||||
|
"rho": "math::pow(1 - Tfactor*math::exp(1 - ((x-x0)*(x-x0) + (y-y0)*(y-y0))), 1.0/(GAMMA - 1))",
|
||||||
|
"u": "uinf + beta/(2*PI) * math::exp((1 - ((x-x0)*(x-x0) + (y-y0)*(y-y0)))/2)*(-(y-y0))",
|
||||||
|
"v": "vinf + beta/(2*PI) * math::exp((1 - ((x-x0)*(x-x0) + (y-y0)*(y-y0)))/2)*((x-x0))",
|
||||||
|
"p": "math::pow(rho, GAMMA)"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"integration_time": 2.0
|
||||||
|
}
|
Loading…
Reference in New Issue