WARPXM v1.10.0
Loading...
Searching...
No Matches
examples.dg.plasma.pinch.z_pinch_5moment Namespace Reference

Variables

bool use_phmaxwell = False
 
bool use_pcmaxwell = False
 
None nu_p_tau = None
 
float cfl = 0.8
 
bool use_limiters = True
 
bool use_interspecies_collisions = False
 
str torder = "TVDRK2"
 
str sorder = "secondOrder"
 
argparse parser = argparse.ArgumentParser(description='Gem Challenge')
 
 type
 
 str
 
 nargs
 
 help
 
 default
 
argparse args = parser.parse_args()
 
argparse dimension = args.dimension
 
float n0 = 1.0*1
 
float n_inf = 0.2
 
float B0 = 1.0*1
 
float perturbation = 0.1*1
 
list names = ["ions", "electrons"]
 
list A = [1., 1.]
 
list Z = [1., -1.]
 
math Ti_Te = math.sqrt(A[0]/A[1])
 
float skin_depth_norm = 1.0
 
float omega_p_tau = 20.0
 
int di_L = 1.
 
float sheet_width = 0.5
 
float Te = B0**2/2.0/n0/(Ti_Te + 1.0)
 
math Ti = Ti_Te * Te
 
list T = [Ti, Te]
 
float chi = 1.0
 
float phchi = 2.0
 
int gamma = 5./3.
 
int Lx = 8*math.pi*di_L
 
int Ly = 4*math.pi*di_L
 
len N = len(names)
 
warpy mesh = warpy.mesh.block(Bounds=[-Lx/2.,Lx/2., -Ly/2.,Ly/2.],NumCells=[16,8],NodeSets=['Left','Right', 'Lower','Upper'],NumLayers=1,basis_array_set=sorder,PeriodicBoundaries=['Left','Right'],block_type="symmetric")
 
list component_names = ['rho', 'px', 'py', 'pz', 'e']
 
list field_component_names = ['Ex', 'Ey', 'Ez', 'Bx', 'By', 'Bz']
 
warpy field = warpy.variable(name='field',components=field_component_names,basis_array_set=sorder)
 
list fluids = [warpy.variable(name=name,components=component_names,basis_array_set=sorder) for name in names]
 
warpy field_gradient = warpy.variable(name='field_gradient',components=[prefix + "_" + suffix for prefix in field.components() for suffix in ['x','y','z']],basis_array_set=sorder)
 
list fluid_gradients = [warpy.variable(name=name+'_gradient',components=[prefix + "_" + suffix for prefix in component_names for suffix in ['x','y','z']],basis_array_set=sorder) for name in names]
 
list fluid_functions = [warpy.functions.gem_5moment_new(name='ic_'+names[i], gamma=gamma, skin_depth_norm=skin_depth_norm, mass=A[i], charge=Z[i], B0=B0, temperature=T[i], sheet_width=sheet_width, number_density=n0, number_density_infinity=n_inf) for i in range(N)]
 
warpy field_function = warpy.functions.gem_field(name='ic_field', Bx=B0, sheet_width=sheet_width, perturbation = perturbation)
 
list applicators = [warpy.applicator(spatial_order=sorder,fun=fluid_functions[i],var=fluids[i],spatial_scheme='Nodal') for i in range(N)]
 
list apps = []
 
list dirichlet_apps = []
 
list neumann_apps = []
 
 else :
 
list write_vars = fluids + [field]
 
tuple has_gradients = (nu_p_tau != None) or use_pcmaxwell
 
list gradient_input_variables = []
 
list gradient_output_variables = []
 
warpy writer = warpy.host_actions.writer(name='writer',ReadVars=write_vars)
 
warpy spatial_solver = warpy.spatial_solvers.dg(name="dg", spatial_order=sorder, applications=apps, cfl=cfl)
 
list variable_adjusters = []
 
warpy time_integrator = warpy.host_actions.erk(name="ti", scheme=torder, spatial_solvers=[spatial_solver], variable_adjusters=variable_adjusters)
 
warpy dt_controller = warpy.dt_calc.stability_dt(init_dt=0.025)
 

Variable Documentation

◆ A

list examples.dg.plasma.pinch.z_pinch_5moment.A = [1., 1.]

◆ applicators

list examples.dg.plasma.pinch.z_pinch_5moment.applicators = [warpy.applicator(spatial_order=sorder,fun=fluid_functions[i],var=fluids[i],spatial_scheme='Nodal') for i in range(N)]

◆ apps

list examples.dg.plasma.pinch.z_pinch_5moment.apps = []

◆ args

argparse examples.dg.plasma.pinch.z_pinch_5moment.args = parser.parse_args()

◆ B0

float examples.dg.plasma.pinch.z_pinch_5moment.B0 = 1.0*1

◆ cfl

float examples.dg.plasma.pinch.z_pinch_5moment.cfl = 0.8

◆ chi

float examples.dg.plasma.pinch.z_pinch_5moment.chi = 1.0

◆ component_names

list examples.dg.plasma.pinch.z_pinch_5moment.component_names = ['rho', 'px', 'py', 'pz', 'e']

◆ default

examples.dg.plasma.pinch.z_pinch_5moment.default

◆ di_L

int examples.dg.plasma.pinch.z_pinch_5moment.di_L = 1.

◆ dimension

argparse examples.dg.plasma.pinch.z_pinch_5moment.dimension = args.dimension

◆ dirichlet_apps

list examples.dg.plasma.pinch.z_pinch_5moment.dirichlet_apps = []

◆ dt_controller

warpy examples.dg.plasma.pinch.z_pinch_5moment.dt_controller = warpy.dt_calc.stability_dt(init_dt=0.025)

◆ else

examples.dg.plasma.pinch.z_pinch_5moment.else :

◆ field

warpy examples.dg.plasma.pinch.z_pinch_5moment.field = warpy.variable(name='field',components=field_component_names,basis_array_set=sorder)

◆ field_component_names

list examples.dg.plasma.pinch.z_pinch_5moment.field_component_names = ['Ex', 'Ey', 'Ez', 'Bx', 'By', 'Bz']

◆ field_function

warpy examples.dg.plasma.pinch.z_pinch_5moment.field_function = warpy.functions.gem_field(name='ic_field', Bx=B0, sheet_width=sheet_width, perturbation = perturbation)

◆ field_gradient

warpy examples.dg.plasma.pinch.z_pinch_5moment.field_gradient = warpy.variable(name='field_gradient',components=[prefix + "_" + suffix for prefix in field.components() for suffix in ['x','y','z']],basis_array_set=sorder)

◆ fluid_functions

list examples.dg.plasma.pinch.z_pinch_5moment.fluid_functions = [warpy.functions.gem_5moment_new(name='ic_'+names[i], gamma=gamma, skin_depth_norm=skin_depth_norm, mass=A[i], charge=Z[i], B0=B0, temperature=T[i], sheet_width=sheet_width, number_density=n0, number_density_infinity=n_inf) for i in range(N)]

◆ fluid_gradients

list examples.dg.plasma.pinch.z_pinch_5moment.fluid_gradients = [warpy.variable(name=name+'_gradient',components=[prefix + "_" + suffix for prefix in component_names for suffix in ['x','y','z']],basis_array_set=sorder) for name in names]

◆ fluids

list examples.dg.plasma.pinch.z_pinch_5moment.fluids = [warpy.variable(name=name,components=component_names,basis_array_set=sorder) for name in names]

◆ gamma

int examples.dg.plasma.pinch.z_pinch_5moment.gamma = 5./3.

◆ gradient_input_variables

list examples.dg.plasma.pinch.z_pinch_5moment.gradient_input_variables = []

◆ gradient_output_variables

list examples.dg.plasma.pinch.z_pinch_5moment.gradient_output_variables = []

◆ has_gradients

tuple examples.dg.plasma.pinch.z_pinch_5moment.has_gradients = (nu_p_tau != None) or use_pcmaxwell

◆ help

examples.dg.plasma.pinch.z_pinch_5moment.help

◆ Lx

int examples.dg.plasma.pinch.z_pinch_5moment.Lx = 8*math.pi*di_L

◆ Ly

int examples.dg.plasma.pinch.z_pinch_5moment.Ly = 4*math.pi*di_L

◆ mesh

warpy examples.dg.plasma.pinch.z_pinch_5moment.mesh = warpy.mesh.block(Bounds=[-Lx/2.,Lx/2., -Ly/2.,Ly/2.],NumCells=[16,8],NodeSets=['Left','Right', 'Lower','Upper'],NumLayers=1,basis_array_set=sorder,PeriodicBoundaries=['Left','Right'],block_type="symmetric")

◆ N

len examples.dg.plasma.pinch.z_pinch_5moment.N = len(names)

◆ n0

float examples.dg.plasma.pinch.z_pinch_5moment.n0 = 1.0*1

◆ n_inf

float examples.dg.plasma.pinch.z_pinch_5moment.n_inf = 0.2

◆ names

list examples.dg.plasma.pinch.z_pinch_5moment.names = ["ions", "electrons"]

◆ nargs

examples.dg.plasma.pinch.z_pinch_5moment.nargs

◆ neumann_apps

list examples.dg.plasma.pinch.z_pinch_5moment.neumann_apps = []

◆ nu_p_tau

None examples.dg.plasma.pinch.z_pinch_5moment.nu_p_tau = None

◆ omega_p_tau

float examples.dg.plasma.pinch.z_pinch_5moment.omega_p_tau = 20.0

◆ parser

argparse examples.dg.plasma.pinch.z_pinch_5moment.parser = argparse.ArgumentParser(description='Gem Challenge')

◆ perturbation

float examples.dg.plasma.pinch.z_pinch_5moment.perturbation = 0.1*1

◆ phchi

float examples.dg.plasma.pinch.z_pinch_5moment.phchi = 2.0

◆ sheet_width

float examples.dg.plasma.pinch.z_pinch_5moment.sheet_width = 0.5

◆ skin_depth_norm

float examples.dg.plasma.pinch.z_pinch_5moment.skin_depth_norm = 1.0

◆ sorder

str examples.dg.plasma.pinch.z_pinch_5moment.sorder = "secondOrder"

◆ spatial_solver

warpy examples.dg.plasma.pinch.z_pinch_5moment.spatial_solver = warpy.spatial_solvers.dg(name="dg", spatial_order=sorder, applications=apps, cfl=cfl)

◆ str

examples.dg.plasma.pinch.z_pinch_5moment.str

◆ T

list examples.dg.plasma.pinch.z_pinch_5moment.T = [Ti, Te]

◆ Te

float examples.dg.plasma.pinch.z_pinch_5moment.Te = B0**2/2.0/n0/(Ti_Te + 1.0)

◆ Ti

math examples.dg.plasma.pinch.z_pinch_5moment.Ti = Ti_Te * Te

◆ Ti_Te

math examples.dg.plasma.pinch.z_pinch_5moment.Ti_Te = math.sqrt(A[0]/A[1])

◆ time_integrator

warpy examples.dg.plasma.pinch.z_pinch_5moment.time_integrator = warpy.host_actions.erk(name="ti", scheme=torder, spatial_solvers=[spatial_solver], variable_adjusters=variable_adjusters)

◆ torder

str examples.dg.plasma.pinch.z_pinch_5moment.torder = "TVDRK2"

◆ type

examples.dg.plasma.pinch.z_pinch_5moment.type

◆ use_interspecies_collisions

bool examples.dg.plasma.pinch.z_pinch_5moment.use_interspecies_collisions = False

◆ use_limiters

bool examples.dg.plasma.pinch.z_pinch_5moment.use_limiters = True

◆ use_pcmaxwell

bool examples.dg.plasma.pinch.z_pinch_5moment.use_pcmaxwell = False

◆ use_phmaxwell

bool examples.dg.plasma.pinch.z_pinch_5moment.use_phmaxwell = False

◆ variable_adjusters

list examples.dg.plasma.pinch.z_pinch_5moment.variable_adjusters = []

◆ write_vars

list examples.dg.plasma.pinch.z_pinch_5moment.write_vars = fluids + [field]

◆ writer

warpy examples.dg.plasma.pinch.z_pinch_5moment.writer = warpy.host_actions.writer(name='writer',ReadVars=write_vars)

◆ Z

list examples.dg.plasma.pinch.z_pinch_5moment.Z = [1., -1.]