Neko 1.99.9
A portable framework for high-order spectral element flow simulations
Loading...
Searching...
No Matches
entropy_viscosity::entropy_viscosity_t Type Referenceabstract

Entropy-based artificial viscosity model for compressible flow. More...

Inheritance diagram for entropy_viscosity::entropy_viscosity_t:
Collaboration diagram for entropy_viscosity::entropy_viscosity_t:

Public Member Functions

procedure, pass(this) init (this, case, json)
 Initialize the entropy viscosity model.
 
procedure, pass(this) free (this)
 Free the entropy viscosity model.
 
procedure, pass(this) preprocess (this, time)
 Compute viscosity before advancing the time step.
 
procedure, pass(this) compute (this, time)
 Advance the entropy history after the time step.
 
procedure, pass(this) restart (this, time)
 Reconstruct entropy history after restart.
 
procedure, pass(this) compute_h (this)
 Compute the local characteristic mesh size.
 
procedure, pass(this) set_fields (this, p, rho, u, v, w, max_wave_speed, msh, xh, gs, gamma)
 Associate the compressible flow fields.
 
procedure, pass(this) compute_entropy (this)
 Compute entropy from pressure and density.
 
procedure, pass(this) init_base (this, dof, coef, reg_coeff_name)
 Constructor for the avm_t (base) class.
 
procedure, pass(this) free_base (this)
 Destructor for the avm_t (base) class.
 
procedure(avm_init), deferred, pass init (this, case, json)
 The common constructor.
 
procedure(avm_free), deferred, pass free (this)
 Destructor.
 
procedure(avm_preprocess), deferred, pass preprocess (this, time)
 Perform artificial viscosity related computations before the time step.
 
procedure(avm_compute), deferred, pass compute (this, time)
 Perform artificial viscosity related computations after the time step.
 
procedure, pass(this) restart (this, time)
 Restore model state after loading a checkpoint.
 

Public Attributes

real(kind=rp) c_avisc_entropy
 Entropy viscosity coefficient.
 
real(kind=rp) c_avisc_low
 Low-order viscosity coefficient.
 
real(kind=rp) gamma
 Ratio of specific heats.
 
type(field_t) entropy_residual
 Entropy residual field.
 
type(field_series_t) s_lag
 Entropy history used by the BDF residual.
 
type(field_t), pointer s => null()
 Current entropy field.
 
type(field_t), pointer p => null()
 Pressure field.
 
type(field_t), pointer rho => null()
 Density field.
 
type(field_t), pointer u => null()
 First velocity component.
 
type(field_t), pointer v => null()
 Second velocity component.
 
type(field_t), pointer w => null()
 Third velocity component.
 
type(field_t) h
 Local characteristic mesh size.
 
type(field_t), pointer max_wave_speed => null()
 Maximum local characteristic wave speed.
 
type(mesh_t), pointer msh => null()
 Computational mesh.
 
type(space_t), pointer xh => null()
 Function space.
 
type(gs_t), pointer gs => null()
 Gather-scatter operator for the function space.
 
type(field_t), pointer reg_coeff => null()
 Artificial viscosity.
 
type(coef_t), pointer coef => null()
 SEM coefficients.
 
type(dofmap_t), pointer dof => null()
 SEM dofmap.
 
integer les_model_registry_size = 0
 Number of custom artificial viscosity model allocators.
 

Private Member Functions

procedure, pass, private compute_residual (this, tstep, dt, dt_lag)
 Compute the entropy residual.
 
procedure, pass, private compute_viscosity (this, tstep)
 Compute the entropy viscosity coefficient.
 
procedure, pass, private smooth_viscosity (this)
 Smooth viscosity across element interfaces.
 
procedure, pass, private apply_element_max (this)
 Replace nodal values by each element maximum.
 
procedure, pass, private low_order_viscosity (this, i)
 Evaluate the low-order viscosity at a point.
 

Detailed Description

Definition at line 78 of file entropy_viscosity.f90.

Member Function/Subroutine Documentation

◆ apply_element_max()

procedure, pass, private entropy_viscosity::entropy_viscosity_t::apply_element_max ( class(entropy_viscosity_t), intent(inout)  this)
private
Parameters
thisThe entropy viscosity model.

Definition at line 139 of file entropy_viscosity.f90.

◆ compute() [1/2]

procedure(avm_compute), deferred, pass artificial_viscosity_model::avm_t::compute ( class(avm_t), intent(inout)  this,
type(time_state_t), intent(in)  time 
)
pure virtualinherited

Definition at line 69 of file avm.f90.

◆ compute() [2/2]

procedure, pass(this) entropy_viscosity::entropy_viscosity_t::compute ( class(entropy_viscosity_t), intent(inout)  this,
type(time_state_t), intent(in)  time 
)
Parameters
thisThe entropy viscosity model.
timeThe current time state.

Definition at line 119 of file entropy_viscosity.f90.

◆ compute_entropy()

procedure, pass(this) entropy_viscosity::entropy_viscosity_t::compute_entropy ( class(entropy_viscosity_t), intent(inout)  this)
Parameters
thisThe entropy viscosity model.

Definition at line 127 of file entropy_viscosity.f90.

◆ compute_h()

procedure, pass(this) entropy_viscosity::entropy_viscosity_t::compute_h ( class(entropy_viscosity_t), intent(inout)  this)
Todo:
Move this operation to a shared module.
Parameters
thisThe entropy viscosity model.

Definition at line 123 of file entropy_viscosity.f90.

◆ compute_residual()

procedure, pass, private entropy_viscosity::entropy_viscosity_t::compute_residual ( class(entropy_viscosity_t), intent(inout)  this,
integer, intent(in)  tstep,
real(kind=rp), intent(in)  dt,
real(kind=rp), dimension(10), intent(in)  dt_lag 
)
private
Parameters
thisThe entropy viscosity model.
tstepThe current time-step index.
dtThe current time-step size.
dt_lagPrevious time-step sizes.

Definition at line 130 of file entropy_viscosity.f90.

◆ compute_viscosity()

procedure, pass, private entropy_viscosity::entropy_viscosity_t::compute_viscosity ( class(entropy_viscosity_t), intent(inout)  this,
integer, intent(in)  tstep 
)
private
Parameters
thisThe entropy viscosity model.
tstepThe current time-step index.

Definition at line 133 of file entropy_viscosity.f90.

◆ free() [1/2]

procedure(avm_free), deferred, pass artificial_viscosity_model::avm_t::free ( class(avm_t), intent(inout)  this)
pure virtualinherited

Definition at line 65 of file avm.f90.

◆ free() [2/2]

procedure, pass(this) entropy_viscosity::entropy_viscosity_t::free ( class(entropy_viscosity_t), intent(inout)  this)
Parameters
thisThe entropy viscosity model.

Definition at line 115 of file entropy_viscosity.f90.

◆ free_base()

procedure, pass(this) artificial_viscosity_model::avm_t::free_base ( class(avm_t), intent(inout)  this)
inherited
Parameters
thisThe artificial viscosity model.

Definition at line 61 of file avm.f90.

◆ init() [1/2]

procedure(avm_init), deferred, pass artificial_viscosity_model::avm_t::init ( class(avm_t), intent(inout)  this,
class(case_t), intent(inout), target  case,
type(json_file), intent(inout)  json 
)
pure virtualinherited

Definition at line 63 of file avm.f90.

◆ init() [2/2]

procedure, pass(this) entropy_viscosity::entropy_viscosity_t::init ( class(entropy_viscosity_t), intent(inout)  this,
class(case_t), intent(inout), target  case,
type(json_file), intent(inout)  json 
)
Parameters
thisThe entropy viscosity model.
caseThe compressible-flow case.
jsonThe model configuration.

Definition at line 113 of file entropy_viscosity.f90.

◆ init_base()

procedure, pass(this) artificial_viscosity_model::avm_t::init_base ( class(avm_t), intent(inout)  this,
class(dofmap_t), intent(in), target  dof,
class(coef_t), intent(in), target  coef,
character(len=*), intent(in)  reg_coeff_name 
)
inherited
Parameters
objectThe object to be allocated.
type_nameThe name of the artificial viscosity model.
caseThe case_t object.
jsonA dictionary with parameters. Constructor for the avm_t (base) class.
thisThe artificial viscosity model.
dofMap of degrees of freedom.
coefThe SEM coefficients.
reg_coeff_nameThe name of the artificial viscosity field.

Definition at line 59 of file avm.f90.

◆ low_order_viscosity()

procedure, pass, private entropy_viscosity::entropy_viscosity_t::low_order_viscosity ( class(entropy_viscosity_t), intent(in)  this,
integer, intent(in)  i 
)
private
Parameters
thisThe entropy viscosity model.
iThe point index.
Returns
The low-order viscosity.

Definition at line 142 of file entropy_viscosity.f90.

◆ preprocess() [1/2]

procedure(avm_preprocess), deferred, pass artificial_viscosity_model::avm_t::preprocess ( class(avm_t), intent(inout)  this,
type(time_state_t), intent(in)  time 
)
pure virtualinherited

Definition at line 67 of file avm.f90.

◆ preprocess() [2/2]

procedure, pass(this) entropy_viscosity::entropy_viscosity_t::preprocess ( class(entropy_viscosity_t), intent(inout)  this,
type(time_state_t), intent(in)  time 
)
Parameters
thisThe entropy viscosity model.
timeThe current time state.

Definition at line 117 of file entropy_viscosity.f90.

◆ restart() [1/2]

procedure, pass(this) artificial_viscosity_model::avm_t::restart ( class(avm_t), intent(inout)  this,
type(time_state_t), intent(in)  time 
)
inherited
Parameters
thisThe artificial viscosity model.
timeThe restored time state.

Definition at line 71 of file avm.f90.

◆ restart() [2/2]

procedure, pass(this) entropy_viscosity::entropy_viscosity_t::restart ( class(entropy_viscosity_t), intent(inout)  this,
type(time_state_t), intent(in)  time 
)
Parameters
thisThe entropy viscosity model.
timeThe restored time state.

Definition at line 121 of file entropy_viscosity.f90.

◆ set_fields()

procedure, pass(this) entropy_viscosity::entropy_viscosity_t::set_fields ( class(entropy_viscosity_t), intent(inout)  this,
type(field_t), intent(in), target  p,
type(field_t), intent(in), target  rho,
type(field_t), intent(in), target  u,
type(field_t), intent(in), target  v,
type(field_t), intent(in), target  w,
type(field_t), intent(in), target  max_wave_speed,
type(mesh_t), intent(in), target  msh,
type(space_t), intent(in), target  xh,
type(gs_t), intent(in), target  gs,
real(kind=rp), intent(in)  gamma 
)
Parameters
thisThe entropy viscosity model.
pThe pressure field.
rhoThe density field.
uThe first velocity component.
vThe second velocity component.
wThe third velocity component.
max_wave_speedThe maximum characteristic wave speed.
mshThe computational mesh.
XhThe function space.
gsThe gather-scatter operator.
gammaThe ratio of specific heats.

Definition at line 125 of file entropy_viscosity.f90.

◆ smooth_viscosity()

procedure, pass, private entropy_viscosity::entropy_viscosity_t::smooth_viscosity ( class(entropy_viscosity_t), intent(inout)  this)
private
Parameters
thisThe entropy viscosity model.

Definition at line 136 of file entropy_viscosity.f90.

Member Data Documentation

◆ c_avisc_entropy

real(kind=rp) entropy_viscosity::entropy_viscosity_t::c_avisc_entropy

Definition at line 80 of file entropy_viscosity.f90.

◆ c_avisc_low

real(kind=rp) entropy_viscosity::entropy_viscosity_t::c_avisc_low

Definition at line 82 of file entropy_viscosity.f90.

◆ coef

type(coef_t), pointer artificial_viscosity_model::avm_t::coef => null()
inherited

Definition at line 52 of file avm.f90.

◆ dof

type(dofmap_t), pointer artificial_viscosity_model::avm_t::dof => null()
inherited

Definition at line 54 of file avm.f90.

◆ entropy_residual

type(field_t) entropy_viscosity::entropy_viscosity_t::entropy_residual

Definition at line 86 of file entropy_viscosity.f90.

◆ gamma

real(kind=rp) entropy_viscosity::entropy_viscosity_t::gamma

Definition at line 84 of file entropy_viscosity.f90.

◆ gs

type(gs_t), pointer entropy_viscosity::entropy_viscosity_t::gs => null()

Definition at line 110 of file entropy_viscosity.f90.

◆ h

type(field_t) entropy_viscosity::entropy_viscosity_t::h

Definition at line 102 of file entropy_viscosity.f90.

◆ les_model_registry_size

integer artificial_viscosity_model::avm_t::les_model_registry_size = 0
inherited

Definition at line 56 of file avm.f90.

◆ max_wave_speed

type(field_t), pointer entropy_viscosity::entropy_viscosity_t::max_wave_speed => null()

Definition at line 104 of file entropy_viscosity.f90.

◆ msh

type(mesh_t), pointer entropy_viscosity::entropy_viscosity_t::msh => null()

Definition at line 106 of file entropy_viscosity.f90.

◆ p

type(field_t), pointer entropy_viscosity::entropy_viscosity_t::p => null()

Definition at line 92 of file entropy_viscosity.f90.

◆ reg_coeff

type(field_t), pointer artificial_viscosity_model::avm_t::reg_coeff => null()
inherited

Definition at line 50 of file avm.f90.

◆ rho

type(field_t), pointer entropy_viscosity::entropy_viscosity_t::rho => null()

Definition at line 94 of file entropy_viscosity.f90.

◆ s

type(field_t), pointer entropy_viscosity::entropy_viscosity_t::s => null()

Definition at line 90 of file entropy_viscosity.f90.

◆ s_lag

type(field_series_t) entropy_viscosity::entropy_viscosity_t::s_lag

Definition at line 88 of file entropy_viscosity.f90.

◆ u

type(field_t), pointer entropy_viscosity::entropy_viscosity_t::u => null()

Definition at line 96 of file entropy_viscosity.f90.

◆ v

type(field_t), pointer entropy_viscosity::entropy_viscosity_t::v => null()

Definition at line 98 of file entropy_viscosity.f90.

◆ w

type(field_t), pointer entropy_viscosity::entropy_viscosity_t::w => null()

Definition at line 100 of file entropy_viscosity.f90.

◆ xh

type(space_t), pointer entropy_viscosity::entropy_viscosity_t::xh => null()

Definition at line 108 of file entropy_viscosity.f90.


The documentation for this type was generated from the following file: