Neko 1.99.11
A portable framework for high-order spectral element flow simulations
Loading...
Searching...
No Matches
entropy_viscosity Module Reference

Implements the entropy-based artificial viscosity model.

Data Types

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

Functions/Subroutines

subroutine entropy_viscosity_init (this, case, json)
 Initialize the entropy viscosity model from a case and JSON parameters.
subroutine entropy_viscosity_free (this)
 Free the entropy viscosity model.
subroutine entropy_viscosity_preprocess (this, time)
 Compute the artificial viscosity before a time step.
subroutine entropy_viscosity_compute_residual (this, tstep, dt, dt_lag)
 Compute the BDF entropy residual.
subroutine entropy_viscosity_compute_viscosity (this, tstep)
 Compute and limit the entropy viscosity coefficient.
subroutine entropy_viscosity_smooth_viscosity (this)
 Cross-element smoothing via gather-scatter averaging. Averages viscosity values at shared nodes between elements.
subroutine entropy_viscosity_apply_element_max (this)
 Replace nodal viscosity values by the maximum in each element.
subroutine entropy_viscosity_set_fields (this, p, rho, u, v, w, max_wave_speed, msh, xh, gs, gamma)
 Associate the fields and discretization used by the model.
subroutine entropy_viscosity_compute_entropy (this)
 Compute entropy from the current pressure and density.
subroutine entropy_viscosity_restart (this, time)
 Reinitialize entropy history from a restarted flow state.
subroutine entropy_viscosity_update_lag (this, time)
 Shift the entropy history and compute the new entropy.
subroutine entropy_viscosity_col3_vector_cpu (us, vs, ws, u, v, w, s, n)
 Multiply each velocity component by entropy on the CPU.
subroutine entropy_viscosity_abs_add_cpu (entropy_residual, div_field, n)
 Add the flux divergence to the residual and take its absolute value.
pure real(kind=rp) function entropy_viscosity_low_order (this, i)
 Compute low-order viscosity at one point.
subroutine entropy_viscosity_compute_h (this)
 Compute the characteristic mesh size. Adapted from les_model_compute_delta in les_model.f90.

Function/Subroutine Documentation

◆ entropy_viscosity_abs_add_cpu()

subroutine entropy_viscosity::entropy_viscosity_abs_add_cpu ( real(kind=rp), dimension(n), intent(inout) entropy_residual,
real(kind=rp), dimension(n), intent(in) div_field,
integer, intent(in) n )
private
Parameters
entropy_residualThe entropy residual to update.
div_fieldThe entropy-flux divergence.
nNumber of field entries.

Definition at line 538 of file entropy_viscosity.f90.

Here is the caller graph for this function:

◆ entropy_viscosity_apply_element_max()

subroutine entropy_viscosity::entropy_viscosity_apply_element_max ( class(entropy_viscosity_t), intent(inout) this)
private
Parameters
thisThe entropy viscosity model.

Definition at line 413 of file entropy_viscosity.f90.

Here is the call graph for this function:

◆ entropy_viscosity_col3_vector_cpu()

subroutine entropy_viscosity::entropy_viscosity_col3_vector_cpu ( real(kind=rp), dimension(n), intent(out) us,
real(kind=rp), dimension(n), intent(out) vs,
real(kind=rp), dimension(n), intent(out) ws,
real(kind=rp), dimension(n), intent(in) u,
real(kind=rp), dimension(n), intent(in) v,
real(kind=rp), dimension(n), intent(in) w,
real(kind=rp), dimension(n), intent(in) s,
integer, intent(in) n )
private
Parameters
usEntropy-weighted first velocity component.
vsEntropy-weighted second velocity component.
wsEntropy-weighted third velocity component.
uThe first velocity component.
vThe second velocity component.
wThe third velocity component.
SThe entropy field.
nNumber of field entries.

Definition at line 515 of file entropy_viscosity.f90.

Here is the caller graph for this function:

◆ entropy_viscosity_compute_entropy()

subroutine entropy_viscosity::entropy_viscosity_compute_entropy ( class(entropy_viscosity_t), intent(inout) this)
private
Parameters
thisThe entropy viscosity model.

Definition at line 465 of file entropy_viscosity.f90.

Here is the call graph for this function:

◆ entropy_viscosity_compute_h()

subroutine entropy_viscosity::entropy_viscosity_compute_h ( class(entropy_viscosity_t), intent(inout) this)
private
Todo
Move this operation to a shared module.
Parameters
thisThe entropy viscosity model.

Definition at line 573 of file entropy_viscosity.f90.

Here is the call graph for this function:

◆ entropy_viscosity_compute_residual()

subroutine entropy_viscosity::entropy_viscosity_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 233 of file entropy_viscosity.f90.

Here is the call graph for this function:

◆ entropy_viscosity_compute_viscosity()

subroutine entropy_viscosity::entropy_viscosity_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 309 of file entropy_viscosity.f90.

Here is the call graph for this function:

◆ entropy_viscosity_free()

subroutine entropy_viscosity::entropy_viscosity_free ( class(entropy_viscosity_t), intent(inout) this)
private
Parameters
thisThe entropy viscosity model.

Definition at line 192 of file entropy_viscosity.f90.

◆ entropy_viscosity_init()

subroutine entropy_viscosity::entropy_viscosity_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 152 of file entropy_viscosity.f90.

◆ entropy_viscosity_low_order()

pure real(kind=rp) function entropy_viscosity::entropy_viscosity_low_order ( 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 559 of file entropy_viscosity.f90.

◆ entropy_viscosity_preprocess()

subroutine entropy_viscosity::entropy_viscosity_preprocess ( class(entropy_viscosity_t), intent(inout) this,
type(time_state_t), intent(in) time )
private
Parameters
thisThe entropy viscosity model.
timeThe current time state.

Definition at line 216 of file entropy_viscosity.f90.

◆ entropy_viscosity_restart()

subroutine entropy_viscosity::entropy_viscosity_restart ( class(entropy_viscosity_t), intent(inout) this,
type(time_state_t), intent(in) time )
private
Parameters
thisThe entropy viscosity model.
timeThe restored time state.

Definition at line 484 of file entropy_viscosity.f90.

◆ entropy_viscosity_set_fields()

subroutine entropy_viscosity::entropy_viscosity_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 )
private
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 441 of file entropy_viscosity.f90.

◆ entropy_viscosity_smooth_viscosity()

subroutine entropy_viscosity::entropy_viscosity_smooth_viscosity ( class(entropy_viscosity_t), intent(inout) this)
private
Parameters
thisThe entropy viscosity model.

Definition at line 380 of file entropy_viscosity.f90.

Here is the call graph for this function:

◆ entropy_viscosity_update_lag()

subroutine entropy_viscosity::entropy_viscosity_update_lag ( class(entropy_viscosity_t), intent(inout) this,
type(time_state_t), intent(in) time )
private
Parameters
thisThe entropy viscosity model.
timeThe current time state.

Definition at line 496 of file entropy_viscosity.f90.