Add example using evalexpr

This commit is contained in:
Magnus Ulimoen 2021-06-29 21:34:59 +02:00
parent f6f70fe79a
commit ea90bb8655
1 changed files with 29 additions and 0 deletions

View File

@ -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
}