WARPXM v1.10.0
Loading...
Searching...
No Matches
examples.dg.diffusion.diffusion Namespace Reference

Variables

str torder = 'SSPRK3'
 
str sorder = 'thirdOrder'
 
float diffusivity = 1.0
 
int n = 1
 
float cfl = 1.0
 
int x_min = 0;
 
float x_max = 2.0 * pi
 
int elems = 20
 
tuple hmin = ((x_max-x_min)/elems)
 
str gradient_method = "ip"
 
None penalty_beta = None
 
float penalty_eta = +1.0
 
bool periodic_boundary_conditions = False
 
warpy mesh
 
warpy fluid = warpy.variable(name='fluid',components=['rho'],basis_array_set=sorder)
 
warpy fluid_gradient = warpy.variable(name='fluid_gradient',components=['rho_x','rho_y','rho_z'],basis_array_set=sorder,explodable=False)
 
warpy fluid_gradient2 = warpy.variable(name='fluid_gradient2',components=['rho_x','rho_y','rho_z'],basis_array_set=sorder,explodable=False)
 
warpy fluid_ic = warpy.functions.fourier(name='fluid_ic',sine_amplitudes=[1.0],sine_frequencies=[1.0])
 
list applicators = [warpy.applicator(spatial_order=sorder,fun=fluid_ic,var=fluid,spatial_scheme='Nodal')]
 
list apps
 
list bc_apps = []
 
list variable_adjusters = []
 
warpy writer = warpy.host_actions.writer(name='writer',ReadVars=[fluid, fluid_gradient, fluid_gradient2])
 
 else :
 
warpy dg
 
warpy temporal_solver = warpy.host_actions.erk(name='rk', scheme=torder,spatial_solvers=[dg],variable_adjusters=variable_adjusters)
 
int dt = 1e-4
 
warpy dt_controller = warpy.dt_calc.fixed_dt(dt)
 
int nout = 100
 
warpy sim
 
datetime now = datetime.datetime.now()
 
 local_path
 
 gen_xdmf
 
 True
 
 detect_nonscalar
 

Variable Documentation

◆ applicators

list examples.dg.diffusion.diffusion.applicators = [warpy.applicator(spatial_order=sorder,fun=fluid_ic,var=fluid,spatial_scheme='Nodal')]

◆ apps

list examples.dg.diffusion.diffusion.apps
Initial value:
1= [warpy.apps.diffusion(name='diffusion',
2 gradient_method=gradient_method,
3 variable=fluid,
4 gradient_variable=fluid_gradient,
5 gradient_variable_interior_penalty_internal_approximation=fluid_gradient2,
6 diffusivity = diffusivity)]
Diffusion.
Definition: simple.py:47

◆ bc_apps

list examples.dg.diffusion.diffusion.bc_apps = []

◆ cfl

float examples.dg.diffusion.diffusion.cfl = 1.0

◆ detect_nonscalar

examples.dg.diffusion.diffusion.detect_nonscalar

◆ dg

warpy examples.dg.diffusion.diffusion.dg
Initial value:
1= warpy.spatial_solvers.dg(
2 name='dg', spatial_order=sorder, applications=apps, penalty_beta=penalty_beta, penalty_eta=penalty_eta,cfl=cfl)

◆ diffusivity

float examples.dg.diffusion.diffusion.diffusivity = 1.0

◆ dt

int examples.dg.diffusion.diffusion.dt = 1e-4

◆ dt_controller

warpy examples.dg.diffusion.diffusion.dt_controller = warpy.dt_calc.fixed_dt(dt)

◆ elems

int examples.dg.diffusion.diffusion.elems = 20

◆ else

examples.dg.diffusion.diffusion.else :

◆ fluid

warpy examples.dg.diffusion.diffusion.fluid = warpy.variable(name='fluid',components=['rho'],basis_array_set=sorder)

◆ fluid_gradient

warpy examples.dg.diffusion.diffusion.fluid_gradient = warpy.variable(name='fluid_gradient',components=['rho_x','rho_y','rho_z'],basis_array_set=sorder,explodable=False)

◆ fluid_gradient2

warpy examples.dg.diffusion.diffusion.fluid_gradient2 = warpy.variable(name='fluid_gradient2',components=['rho_x','rho_y','rho_z'],basis_array_set=sorder,explodable=False)

◆ fluid_ic

warpy examples.dg.diffusion.diffusion.fluid_ic = warpy.functions.fourier(name='fluid_ic',sine_amplitudes=[1.0],sine_frequencies=[1.0])

◆ gen_xdmf

examples.dg.diffusion.diffusion.gen_xdmf

◆ gradient_method

str examples.dg.diffusion.diffusion.gradient_method = "ip"

◆ hmin

tuple examples.dg.diffusion.diffusion.hmin = ((x_max-x_min)/elems)

◆ local_path

examples.dg.diffusion.diffusion.local_path

◆ mesh

warpy examples.dg.diffusion.diffusion.mesh
Initial value:
1= warpy.mesh.block(Bounds=[x_min, x_max],
2 # NumCells=[20],
3 NumCells=[elems],
4 NodeSets=['Left', 'Right'],
5 NumLayers=1,
6 PeriodicBoundaries=['Left','Right'] if periodic_boundary_conditions else None,
7 basis_array_set=sorder)
block mesh generator
Definition: mesh.py:87

◆ n

int examples.dg.diffusion.diffusion.n = 1

◆ nout

int examples.dg.diffusion.diffusion.nout = 100

◆ now

datetime examples.dg.diffusion.diffusion.now = datetime.datetime.now()

◆ penalty_beta

float examples.dg.diffusion.diffusion.penalty_beta = None

◆ penalty_eta

float examples.dg.diffusion.diffusion.penalty_eta = +1.0

◆ periodic_boundary_conditions

bool examples.dg.diffusion.diffusion.periodic_boundary_conditions = False

◆ sim

warpy examples.dg.diffusion.diffusion.sim
Initial value:
1= warpy.dg_sim(name='diffusion',
2 meshes=[mesh],
3 initial_conditions=applicators,
4 temporal_solvers=[temporal_solver],
5 writers=[writer],
6 time=[0,1.],
7 dt_controller=dt_controller,
8 write_steps=nout,
9 verbosity='info')
Discontinuous finite element RK simulation.
Definition: dg_sim.py:11

◆ sorder

str examples.dg.diffusion.diffusion.sorder = 'thirdOrder'

◆ temporal_solver

warpy examples.dg.diffusion.diffusion.temporal_solver = warpy.host_actions.erk(name='rk', scheme=torder,spatial_solvers=[dg],variable_adjusters=variable_adjusters)

◆ torder

str examples.dg.diffusion.diffusion.torder = 'SSPRK3'

◆ True

examples.dg.diffusion.diffusion.True

◆ variable_adjusters

list examples.dg.diffusion.diffusion.variable_adjusters = []

◆ writer

warpy examples.dg.diffusion.diffusion.writer = warpy.host_actions.writer(name='writer',ReadVars=[fluid, fluid_gradient, fluid_gradient2])

◆ x_max

float examples.dg.diffusion.diffusion.x_max = 2.0 * pi

◆ x_min

int examples.dg.diffusion.diffusion.x_min = 0;