Initializes a nodalArray according to a user specified function block.
out
(string vector, required)There are no additional parameters for this kind of Updater
The following code block specificies the initial condition for a magnetized shock tube for a two temperature plasma:
<Updater init>
kind = initialize1d
onGrid = domain
out = [q]
<Function func>
kind = exprFunc
pr = 1.0
pl = 0.1
rhor = 1.0
rhol = 0.125
mu0 = MU0
gas_gamma = GAMMA
preExprs = [ \
"rho = if (x > 0.0, rhol, rhor)", \
"P = if(x > 0.0, pl, pr)", \
"bx = 0.75*sqrt(mu0)", \
"by = if(x>0.0, -1.0*sqrt(mu0), 1.0*sqrt(mu0))", \
"bz = 0.0",\
"phi = 0.0",\
]
exprs = ["rho", "0.0", "0.0", "0.0", \
"P/(gas_gamma-1)+(0.5/mu0)*(bx*bx+by*by)",\
"bx","by","bz","phi","0.5*P/(gas_gamma-1)"]
</Function>
</Updater>