Neko 1.99.3
A portable framework for high-order spectral element flow simulations
Loading...
Searching...
No Matches
hpfrt_source_term::hpfrt_source_term_t Type Referenceabstract

High-pass filter relaxation source term. More...

Inheritance diagram for hpfrt_source_term::hpfrt_source_term_t:
Collaboration diagram for hpfrt_source_term::hpfrt_source_term_t:

Public Member Functions

procedure, pass(thisinit (this, json, fields, coef, variable_name)
 The common constructor using a JSON object.
 
procedure, pass(thisinit_from_components (this, fields, coef, filter_weight, filter_modes, start_time, end_time, field_name)
 The constructor from type components.
 
procedure, pass(thisfree (this)
 Destructor.
 
procedure, pass(thiscompute_ (this, time)
 Computes the source term and adds the result to fields.
 
procedure, pass(thisinit_base (this, fields, coef, start_time, end_time)
 Constructor for the source_term_t (base) type.
 
procedure, pass(thisfree_base (this)
 Destructor for the source_term_t (base) type.
 
procedure, pass(thiscompute (this, time)
 Executes compute_ based on time conditions.
 
procedure(source_term_init), deferred, pass init (this, json, fields, coef, variable_name)
 The common constructor using a JSON object.
 
procedure(source_term_free), deferred, pass free (this)
 Destructor.
 
procedure(source_term_compute), deferred, pass compute_ (this, time)
 Computes the source term and adds the result to fields.
 

Public Attributes

integer filter_modes = 0
 Number of high modes affected by the filter.
 
real(kind=rp) chi = 0.0_rp
 Damping coefficient, stored as a non-positive value.
 
type(elementwise_filter_tfilter
 Low-pass elementwise filter.
 
type(field_list_tsource_fields
 Fields to filter before adding to the source RHS.
 
type(field_list_tfields
 The fields to be updated with the source term values.
 
type(coef_t), pointer coef => null()
 Coefficients for the SEM.
 
real(kind=rp) start_time = 0.0_rp
 Start time for adding the source term.
 
real(kind=rp) end_time = huge(0.0_rp)
 End time for adding the source term.
 

Detailed Description

The low-pass filter is built from a one-dimensional modal transfer function. For filter_modes = \(k_f\) and \(n = lx\), let \(k_0 = n - k_f\). The modal transfer function is

\[ \sigma_k = \begin{cases} 1, & k \leq k_0,\\ 1 - \left(\frac{k-k_0}{k_f}\right)^2, & k_0 < k \leq n. \end{cases} \]

The source term adds \(\chi (I - F)\phi\), where \(\chi = -|\texttt{filter_weight}|\).

Definition at line 65 of file hpfrt_source_term.f90.

Member Function/Subroutine Documentation

◆ compute()

procedure, pass(this) source_term::source_term_t::compute ( class(source_term_t), intent(inout this,
type(time_state_t), intent(in time 
)
inherited
Parameters
timeTime state.

Definition at line 59 of file source_term.f90.

◆ compute_() [1/2]

procedure, pass(this) hpfrt_source_term::hpfrt_source_term_t::compute_ ( class(hpfrt_source_term_t), intent(inout this,
type(time_state_t), intent(in time 
)
Parameters
timeThe time state.

Definition at line 83 of file hpfrt_source_term.f90.

◆ compute_() [2/2]

procedure(source_term_compute), deferred, pass source_term::source_term_t::compute_ ( class(source_term_t), intent(inout this,
type(time_state_t), intent(in time 
)
pure virtualinherited

Definition at line 65 of file source_term.f90.

◆ free() [1/2]

procedure, pass(this) hpfrt_source_term::hpfrt_source_term_t::free ( class(hpfrt_source_term_t), intent(inout this)

Definition at line 81 of file hpfrt_source_term.f90.

◆ free() [2/2]

procedure(source_term_free), deferred, pass source_term::source_term_t::free ( class(source_term_t), intent(inout this)
pure virtualinherited

Definition at line 63 of file source_term.f90.

◆ free_base()

procedure, pass(this) source_term::source_term_t::free_base ( class(source_term_t), intent(inout this)
inherited

Definition at line 57 of file source_term.f90.

◆ init() [1/2]

procedure, pass(this) hpfrt_source_term::hpfrt_source_term_t::init ( class(hpfrt_source_term_t), intent(inout this,
type(json_file), intent(inout json,
type(field_list_t), intent(in), target  fields,
type(coef_t), intent(in), target  coef,
character(len=*), intent(in variable_name 
)
Parameters
jsonThe JSON object for the source.
fieldsA list of fields for adding the source values.
coefThe SEM coeffs.
variable_nameThe name of the variable where the source term acts.

Definition at line 76 of file hpfrt_source_term.f90.

◆ init() [2/2]

procedure(source_term_init), deferred, pass source_term::source_term_t::init ( class(source_term_t), intent(inout this,
type(json_file), intent(inout json,
type(field_list_t), intent(in), target  fields,
type(coef_t), intent(in), target  coef,
character(len=*), intent(in variable_name 
)
pure virtualinherited

Definition at line 61 of file source_term.f90.

◆ init_base()

procedure, pass(this) source_term::source_term_t::init_base ( class(source_term_t), intent(inout this,
type(field_list_t fields,
type(coef_t), intent(in), target  coef,
real(kind=rp), intent(in start_time,
real(kind=rp), intent(in end_time 
)
inherited
Parameters
fieldsA list of pointers to fields to be updated by the source term.
coefSEM coefs.
start_timeWhen to start adding the source term.
end_timeWhen to stop adding the source term.

Definition at line 55 of file source_term.f90.

◆ init_from_components()

procedure, pass(this) hpfrt_source_term::hpfrt_source_term_t::init_from_components ( class(hpfrt_source_term_t), intent(inout this,
class(field_list_t), intent(in), target  fields,
type(coef_t), intent(in), target  coef,
real(kind=rp), intent(in filter_weight,
integer, intent(in filter_modes,
real(kind=rp), intent(in start_time,
real(kind=rp), intent(in end_time,
character(len=*), intent(in field_name 
)
Parameters
fieldsA list of fields for adding the source values.
coefThe SEM coeffs.
filter_weightThe positive damping coefficient magnitude.
filter_modesNumber of high modes affected by the filter.
start_timeWhen to start adding the source term.
end_timeWhen to stop adding the source term.
field_nameName of the scalar field for scalar source terms.

Definition at line 78 of file hpfrt_source_term.f90.

Member Data Documentation

◆ chi

real(kind=rp) hpfrt_source_term::hpfrt_source_term_t::chi = 0.0_rp

Definition at line 69 of file hpfrt_source_term.f90.

◆ coef

type(coef_t), pointer source_term::source_term_t::coef => null()
inherited

Definition at line 48 of file source_term.f90.

◆ end_time

real(kind=rp) source_term::source_term_t::end_time = huge(0.0_rp)
inherited

Definition at line 52 of file source_term.f90.

◆ fields

type(field_list_t) source_term::source_term_t::fields
inherited

Definition at line 46 of file source_term.f90.

◆ filter

type(elementwise_filter_t) hpfrt_source_term::hpfrt_source_term_t::filter

Definition at line 71 of file hpfrt_source_term.f90.

◆ filter_modes

integer hpfrt_source_term::hpfrt_source_term_t::filter_modes = 0

Definition at line 67 of file hpfrt_source_term.f90.

◆ source_fields

type(field_list_t) hpfrt_source_term::hpfrt_source_term_t::source_fields

Definition at line 73 of file hpfrt_source_term.f90.

◆ start_time

real(kind=rp) source_term::source_term_t::start_time = 0.0_rp
inherited

Definition at line 50 of file source_term.f90.


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