physics module for 1D,2D and 3D isothermal Euler equations More...
Data Types | |
interface | cons2prim |
type | physics_eulerisotherm |
interface | prim2cons |
interface | setflux |
type | statevector_eulerisotherm |
Variables | |
integer, parameter | num_var = 3 |
character(len=32), parameter | problem_name = "Euler isotherm" |
Variables | |
subroutine | initphysics_eulerisotherm (this, Mesh, config, IO) |
Intialization of isothermal physics. More... | |
subroutine | printconfiguration_eulerisotherm (this) |
subroutine | enableoutput (this, Mesh, config, IO) |
Enables output of certain arrays defined in this class. More... | |
subroutine | new_statevector (this, new_sv, flavour, num) |
allocate an initialize new isothermal state vector More... | |
pure subroutine | setsoundspeeds_center (this, Mesh, bccsound) |
Sets soundspeeds at cell-centers. More... | |
pure subroutine | setsoundspeeds_faces (this, Mesh, fcsound) |
Sets soundspeeds at cell-faces. More... | |
pure subroutine | convert2primitive_all (this, cvar, pvar) |
Converts to primitives at cell centers using state vectors. More... | |
pure subroutine | convert2primitive_subset (this, i1, i2, j1, j2, k1, k2, cvar, pvar) |
Converts to primitives at cell centers using state vectors. More... | |
pure subroutine | convert2conservative_all (this, pvar, cvar) |
Converts primitive to conservative variables on the whole mesh. More... | |
pure subroutine | convert2conservative_subset (this, i1, i2, j1, j2, k1, k2, pvar, cvar) |
Converts to primitive to conservative variables on a subset of the data. More... | |
pure subroutine | calcwavespeeds_center (this, Mesh, pvar, minwav, maxwav) |
Calculates wave speeds at cell-centers. More... | |
pure subroutine | calcwavespeeds_faces (this, Mesh, prim, cons, minwav, maxwav) |
Calculates wave speeds at cell-faces. More... | |
pure subroutine | geometricalsources (this, Mesh, pvar, cvar, sterm) |
Calculates geometrical sources. More... | |
pure subroutine | calcfluxesx (this, Mesh, nmin, nmax, prim, cons, xfluxes) |
Calculate Fluxes in x-direction. More... | |
pure subroutine | calcfluxesy (this, Mesh, nmin, nmax, prim, cons, yfluxes) |
Calculate Fluxes in y-direction. More... | |
pure subroutine | calcfluxesz (this, Mesh, nmin, nmax, prim, cons, zfluxes) |
Calculate Fluxes in z-direction. More... | |
pure subroutine | viscositysources (this, Mesh, pvar, btxx, btxy, btxz, btyy, btyz, btzz, sterm) |
compute viscous source terms More... | |
pure subroutine | calcstresses (this, Mesh, pvar, dynvis, bulkvis, btxx, btxy, btxz, btyy, btyz, btzz) |
calculate components of the stress tensor More... | |
pure subroutine | externalsources (this, accel, pvar, cvar, sterm) |
compute momentum sources given an external force More... | |
pure subroutine | addbackgroundvelocityx (this, Mesh, w, pvar, cvar) |
pure subroutine | addbackgroundvelocityy (this, Mesh, w, pvar, cvar) |
pure subroutine | addbackgroundvelocityz (this, Mesh, w, pvar, cvar) |
pure subroutine | subtractbackgroundvelocityx (this, Mesh, w, pvar, cvar) |
pure subroutine | subtractbackgroundvelocityy (this, Mesh, w, pvar, cvar) |
pure subroutine | subtractbackgroundvelocityz (this, Mesh, w, pvar, cvar) |
pure subroutine | addfargosources (this, Mesh, w, pvar, cvar, sterm) |
sources terms for fargo advection More... | |
pure subroutine | reflectionmasks (this, Mesh, reflX, reflY, reflZ) |
return masks for reflecting boundaries More... | |
pure subroutine | axismasks (this, Mesh, reflX, reflY, reflZ) |
return masks for axis boundaries More... | |
pure subroutine | calculatecharsystemx (this, Mesh, i1, i2, pvar, lambda, xvar) |
pure subroutine | calculatecharsystemy (this, Mesh, j1, j2, pvar, lambda, xvar) |
pure subroutine | calculatecharsystemz (this, Mesh, k1, k2, pvar, lambda, xvar) |
pure subroutine | calculateboundarydatax (this, Mesh, i1, i2, xvar, pvar) |
pure subroutine | calculateboundarydatay (this, Mesh, j1, j2, xvar, pvar) |
pure subroutine | calculateboundarydataz (this, Mesh, k1, k2, xvar, pvar) |
subroutine | finalize (this) |
Destructor of the physics_eulerisotherm class. More... | |
type(statevector_eulerisotherm) function | createstatevector (Physics, flavour, num) |
Constructor of statevector_eulerisotherm. More... | |
subroutine, public | createstatevector_eulerisotherm (Physics, new_sv, flavour, num) |
subroutine | assignmarray_0 (this, ma) |
assigns one state vector to another state vector More... | |
elemental subroutine | setwavespeeds (cs, v, minwav, maxwav) |
set minimal and maximal wave speeds More... | |
elemental subroutine | seteigenvalues1d (cs, v, l1, l2) |
compute all eigenvalues More... | |
elemental subroutine | seteigenvalues2d (cs, v, l1, l2, l3) |
elemental subroutine | seteigenvalues3d (cs, v, l1, l2, l3, l4) |
elemental subroutine | setflux1d (cs, rho, u, mu, f1, f2) |
set mass and 1D momentum flux for transport along the 1st dimension More... | |
elemental subroutine | setflux2d (cs, rho, u, mu, mv, f1, f2, f3) |
set mass and 2D momentum flux for transport along the 1st dimension More... | |
elemental subroutine | setflux3d (cs, rho, u, mu, mv, mw, f1, f2, f3, f4) |
set mass and 3D momentum flux for transport along the 1st dimension More... | |
elemental subroutine | cons2prim1d (rho_in, mu, rho_out, u) |
Convert from 1D conservative to primitive variables. More... | |
elemental subroutine | cons2prim2d (rho_in, mu, mv, rho_out, u, v) |
Convert from 2D conservative to primitive variables. More... | |
elemental subroutine | cons2prim3d (rho_in, mu, mv, mw, rho_out, u, v, w) |
Convert from 3D conservative to primitive variables. More... | |
elemental subroutine | prim2cons1d (rho_in, u, rho_out, mu) |
Convert from 1D primitive to conservative variables. More... | |
elemental subroutine | prim2cons2d (rho_in, u, v, rho_out, mu, mv) |
Convert from 2D primitive to conservative variables. More... | |
elemental subroutine | prim2cons3d (rho_in, u, v, w, rho_out, mu, mv, mw) |
Convert from 3D primitive to conservative variables. More... | |
elemental subroutine | setcharvars1d (cs, rho1, rho2, u1, u2, xvar1, xvar2) |
compute characteristic variables using adjacent primitve states More... | |
elemental subroutine | setcharvars2d (cs, rho1, rho2, u1, u2, v1, v2, xvar1, xvar2, xvar3) |
compute characteristic variables using adjacent primitve states More... | |
elemental subroutine | setcharvars3d (cs, rho1, rho2, u1, u2, v1, v2, w1, w2, xvar1, xvar2, xvar3, xvar4) |
compute characteristic variables using adjacent primitve states More... | |
elemental subroutine | setboundarydata1d (delta, cs, rho1, u1, xvar1, xvar2, rho2, u2) |
extrapolate boundary values using primitve and characteristic variables More... | |
elemental subroutine | setboundarydata2d (delta, cs, rho1, u1, v1, xvar1, xvar2, xvar3, rho2, u2, v2) |
elemental subroutine | setboundarydata3d (delta, cs, rho1, u1, v1, w1, xvar1, xvar2, xvar3, xvar4, rho2, u2, v2, w2) |
elemental real function | getgeometricalsourcex (cxyx, cxzx, cyxy, czxz, vx, vy, vz, P, my, mz) |
geometrical momentum source terms P is the either isothermal pressure rho*cs**2 or the real pressure. More... | |
elemental real function | getgeometricalsourcey (cxyx, cyxy, cyzy, czyz, vx, vy, vz, P, mx, mz) |
y-momentum geometrical source term More... | |
elemental real function | getgeometricalsourcez (cxzx, cyzy, czxz, czyz, vx, vy, vz, P, mx, my) |
z-momentum geometrical source term More... | |
Detailed Description
physics module for 1D,2D and 3D isothermal Euler equations
Function/Subroutine Documentation
◆ addbackgroundvelocityx()
|
private |
Definition at line 1223 of file physics_eulerisotherm.f90.
◆ addbackgroundvelocityy()
|
private |
Definition at line 1256 of file physics_eulerisotherm.f90.
◆ addbackgroundvelocityz()
|
private |
Definition at line 1288 of file physics_eulerisotherm.f90.
◆ addfargosources()
pure subroutine physics_eulerisotherm_mod::addfargosources | ( | class(physics_eulerisotherm), intent(in) | this, |
class(mesh_base), intent(in) | Mesh, | ||
real, dimension(mesh%igmin:mesh%igmax,mesh%kgmin:mesh%kgmax), intent(in) | w, | ||
class(marray_compound), intent(inout) | pvar, | ||
class(marray_compound), intent(inout) | cvar, | ||
class(marray_compound), intent(inout) | sterm | ||
) |
sources terms for fargo advection
If the background velocity \(\vec{w}=w\,\hat{e}_\eta\) with \(w\) independent of \(\eta\) and \(t\) is subtracted from the overall velocity of the flow, an additional source term occurs in the \(\eta\)-momentum equation:
\[ S_\mathrm{Fargo} = -\varrho u_\xi \frac{1}{h_\xi} \partial_\xi \left(h_\xi w\right) = -\varrho u_\xi w \,\partial_\xi \left(\ln{|h_\xi w|}\right) \]
Definition at line 1428 of file physics_eulerisotherm.f90.
◆ assignmarray_0()
|
private |
assigns one state vector to another state vector
- Todo:
- make this more generic, i.e. this should not depend on the position in the list of compound items
Definition at line 2151 of file physics_eulerisotherm.f90.
◆ axismasks()
|
private |
return masks for axis boundaries
- Warning
- Not rigorously tested!
At axis boundaries we change the sign of normal velocities as in reflecting boundary conditions and in addition the sign of the tangential velocity in the plane perpendicular to the axis is changed.
Definition at line 1502 of file physics_eulerisotherm.f90.
◆ calcfluxesx()
|
private |
Calculate Fluxes in x-direction.
Definition at line 832 of file physics_eulerisotherm.f90.
◆ calcfluxesy()
|
private |
Calculate Fluxes in y-direction.
Definition at line 881 of file physics_eulerisotherm.f90.
◆ calcfluxesz()
|
private |
Calculate Fluxes in z-direction.
Definition at line 930 of file physics_eulerisotherm.f90.
◆ calcstresses()
|
private |
calculate components of the stress tensor
The components are computed at cell bary centers inside the computational domain including one slice of ghost cells.
Definition at line 1021 of file physics_eulerisotherm.f90.
◆ calculateboundarydatax()
|
private |
Definition at line 1828 of file physics_eulerisotherm.f90.
◆ calculateboundarydatay()
|
private |
Definition at line 1889 of file physics_eulerisotherm.f90.
◆ calculateboundarydataz()
|
private |
Definition at line 1961 of file physics_eulerisotherm.f90.
◆ calculatecharsystemx()
|
private |
Definition at line 1565 of file physics_eulerisotherm.f90.
◆ calculatecharsystemy()
|
private |
Definition at line 1653 of file physics_eulerisotherm.f90.
◆ calculatecharsystemz()
|
private |
Definition at line 1747 of file physics_eulerisotherm.f90.
◆ calcwavespeeds_center()
|
private |
Calculates wave speeds at cell-centers.
Definition at line 532 of file physics_eulerisotherm.f90.
◆ calcwavespeeds_faces()
|
private |
Calculates wave speeds at cell-faces.
Definition at line 557 of file physics_eulerisotherm.f90.
◆ cons2prim1d()
|
private |
Convert from 1D conservative to primitive variables.
Definition at line 2266 of file physics_eulerisotherm.f90.
◆ cons2prim2d()
|
private |
Convert from 2D conservative to primitive variables.
Definition at line 2277 of file physics_eulerisotherm.f90.
◆ cons2prim3d()
|
private |
Convert from 3D conservative to primitive variables.
Definition at line 2292 of file physics_eulerisotherm.f90.
◆ convert2conservative_all()
|
private |
Converts primitive to conservative variables on the whole mesh.
Definition at line 424 of file physics_eulerisotherm.f90.
◆ convert2conservative_subset()
|
private |
Converts to primitive to conservative variables on a subset of the data.
Definition at line 458 of file physics_eulerisotherm.f90.
◆ convert2primitive_all()
|
private |
Converts to primitives at cell centers using state vectors.
Definition at line 316 of file physics_eulerisotherm.f90.
◆ convert2primitive_subset()
|
private |
Converts to primitives at cell centers using state vectors.
Definition at line 350 of file physics_eulerisotherm.f90.
◆ createstatevector()
type(statevector_eulerisotherm) function physics_eulerisotherm_mod::createstatevector | ( | class(physics_eulerisotherm), intent(in) | Physics, |
integer, intent(in), optional | flavour, | ||
integer, intent(in), optional | num | ||
) |
Constructor of statevector_eulerisotherm.
- methods of class statevector_eulerisotherm This is not a class member itself, instead its an ordinary
- module procedure. The function name is overloaded with the class name.
Definition at line 2041 of file physics_eulerisotherm.f90.
◆ createstatevector_eulerisotherm()
subroutine, public physics_eulerisotherm_mod::createstatevector_eulerisotherm | ( | class(physics_eulerisotherm), intent(in) | Physics, |
type(statevector_eulerisotherm), intent(inout) | new_sv, | ||
integer, intent(in), optional | flavour, | ||
integer, intent(in), optional | num | ||
) |
Definition at line 2095 of file physics_eulerisotherm.f90.
◆ enableoutput()
|
private |
Enables output of certain arrays defined in this class.
Definition at line 254 of file physics_eulerisotherm.f90.
◆ externalsources()
|
private |
compute momentum sources given an external force
Definition at line 1198 of file physics_eulerisotherm.f90.
◆ finalize()
subroutine physics_eulerisotherm_mod::finalize | ( | class(physics_eulerisotherm), intent(inout) | this | ) |
Destructor of the physics_eulerisotherm class.
Definition at line 2022 of file physics_eulerisotherm.f90.
◆ geometricalsources()
|
private |
Calculates geometrical sources.
Definition at line 691 of file physics_eulerisotherm.f90.
◆ getgeometricalsourcex()
|
private |
geometrical momentum source terms P is the either isothermal pressure rho*cs**2 or the real pressure.
- Attention
- These elemental functions exist multiple times for performance reasons (inlining). Please keep this in mind for changes. Other modules with this function:
x-momentum geometrical source term
Definition at line 2426 of file physics_eulerisotherm.f90.
◆ getgeometricalsourcey()
|
private |
y-momentum geometrical source term
Definition at line 2437 of file physics_eulerisotherm.f90.
◆ getgeometricalsourcez()
|
private |
z-momentum geometrical source term
Definition at line 2448 of file physics_eulerisotherm.f90.
◆ initphysics_eulerisotherm()
|
private |
Intialization of isothermal physics.
- methods of class physics_eulerisotherm - calls intialization of base routines of physics
- set array indices, names and number of dimensions
- Todo:
- remove / improve in future version set array indices for 1st,2nd,3rd non-vanishing velocities this may actually not coincide with the x,y and z-velocities
Definition at line 160 of file physics_eulerisotherm.f90.
◆ new_statevector()
subroutine physics_eulerisotherm_mod::new_statevector | ( | class(physics_eulerisotherm), intent(in) | this, |
class(marray_compound), pointer | new_sv, | ||
integer, intent(in), optional | flavour, | ||
integer, intent(in), optional | num | ||
) |
allocate an initialize new isothermal state vector
Definition at line 276 of file physics_eulerisotherm.f90.
◆ prim2cons1d()
|
private |
Convert from 1D primitive to conservative variables.
Definition at line 2308 of file physics_eulerisotherm.f90.
◆ prim2cons2d()
|
private |
Convert from 2D primitive to conservative variables.
Definition at line 2319 of file physics_eulerisotherm.f90.
◆ prim2cons3d()
|
private |
Convert from 3D primitive to conservative variables.
Definition at line 2330 of file physics_eulerisotherm.f90.
◆ printconfiguration_eulerisotherm()
|
private |
Definition at line 245 of file physics_eulerisotherm.f90.
◆ reflectionmasks()
|
private |
return masks for reflecting boundaries
At axis boundaries we change the sign of normal velocities at each boundary.
Definition at line 1460 of file physics_eulerisotherm.f90.
◆ setboundarydata1d()
|
private |
extrapolate boundary values using primitve and characteristic variables
Definition at line 2382 of file physics_eulerisotherm.f90.
◆ setboundarydata2d()
|
private |
Definition at line 2394 of file physics_eulerisotherm.f90.
◆ setboundarydata3d()
|
private |
Definition at line 2406 of file physics_eulerisotherm.f90.
◆ setcharvars1d()
|
private |
compute characteristic variables using adjacent primitve states
Definition at line 2341 of file physics_eulerisotherm.f90.
◆ setcharvars2d()
|
private |
compute characteristic variables using adjacent primitve states
Definition at line 2357 of file physics_eulerisotherm.f90.
◆ setcharvars3d()
|
private |
compute characteristic variables using adjacent primitve states
Definition at line 2369 of file physics_eulerisotherm.f90.
◆ seteigenvalues1d()
|
private |
compute all eigenvalues
Definition at line 2199 of file physics_eulerisotherm.f90.
◆ seteigenvalues2d()
|
private |
Definition at line 2209 of file physics_eulerisotherm.f90.
◆ seteigenvalues3d()
|
private |
Definition at line 2220 of file physics_eulerisotherm.f90.
◆ setflux1d()
|
private |
set mass and 1D momentum flux for transport along the 1st dimension
Definition at line 2233 of file physics_eulerisotherm.f90.
◆ setflux2d()
|
private |
set mass and 2D momentum flux for transport along the 1st dimension
Definition at line 2244 of file physics_eulerisotherm.f90.
◆ setflux3d()
|
private |
set mass and 3D momentum flux for transport along the 1st dimension
Definition at line 2255 of file physics_eulerisotherm.f90.
◆ setsoundspeeds_center()
|
private |
Sets soundspeeds at cell-centers.
Definition at line 292 of file physics_eulerisotherm.f90.
◆ setsoundspeeds_faces()
|
private |
Sets soundspeeds at cell-faces.
Definition at line 304 of file physics_eulerisotherm.f90.
◆ setwavespeeds()
|
private |
set minimal and maximal wave speeds
- elemental non-class subroutines / functions
Definition at line 2188 of file physics_eulerisotherm.f90.
◆ subtractbackgroundvelocityx()
|
private |
Definition at line 1320 of file physics_eulerisotherm.f90.
◆ subtractbackgroundvelocityy()
|
private |
Definition at line 1352 of file physics_eulerisotherm.f90.
◆ subtractbackgroundvelocityz()
|
private |
Definition at line 1384 of file physics_eulerisotherm.f90.
◆ viscositysources()
|
private |
compute viscous source terms
Definition at line 979 of file physics_eulerisotherm.f90.
Variable Documentation
◆ num_var
|
private |
Definition at line 54 of file physics_eulerisotherm.f90.
◆ problem_name
|
private |
Definition at line 55 of file physics_eulerisotherm.f90.