72 integer :: n_stats = 7
99 type(
coef_t),
target :: coef
100 type(
field_t),
target,
intent(in) :: u, v, w
101 character(*),
intent(in),
optional :: nut_field
110 if (
present(nut_field))
then
118 call this%stats_work%init(this%u%dof,
'stats')
121 call this%nut_mean%init(this%nut)
123 call this%uu_sgs%init(this%stats_work,
'uu_sgs')
124 call this%vv_sgs%init(this%stats_work,
'vv_sgs')
125 call this%ww_sgs%init(this%stats_work,
'ww_sgs')
126 call this%uv_sgs%init(this%stats_work,
'uv_sgs')
127 call this%uw_sgs%init(this%stats_work,
'uw_sgs')
128 call this%vw_sgs%init(this%stats_work,
'vw_sgs')
130 allocate(this%stat_fields%items(this%n_stats))
132 call this%stat_fields%assign_to_field(1, this%nut_mean%mf)
134 call this%stat_fields%assign_to_field(2, this%uu_sgs%mf)
135 call this%stat_fields%assign_to_field(3, this%vv_sgs%mf)
136 call this%stat_fields%assign_to_field(4, this%ww_sgs%mf)
137 call this%stat_fields%assign_to_field(5, this%uv_sgs%mf)
138 call this%stat_fields%assign_to_field(6, this%uw_sgs%mf)
139 call this%stat_fields%assign_to_field(7, this%vw_sgs%mf)
147 real(kind=
rp),
intent(in) :: k
148 type(
field_t),
pointer :: s11, s22, s33
149 type(
field_t),
pointer :: s12, s13, s23
150 integer :: temp_indices(6)
159 call this%nut_mean%update(k)
162 this%u, this%v, this%w, this%coef)
172 associate(stats_work => this%stats_work)
174 call this%uu_sgs%update(k)
176 call this%vv_sgs%update(k)
178 call this%ww_sgs%update(k)
180 call this%uv_sgs%update(k)
182 call this%uw_sgs%update(k)
184 call this%vw_sgs%update(k)
196 call this%stats_work%free()
198 call this%nut_mean%free()
200 call this%uu_sgs%free()
201 call this%vv_sgs%free()
202 call this%ww_sgs%free()
203 call this%uv_sgs%free()
204 call this%uw_sgs%free()
205 call this%vw_sgs%free()
213 call this%stat_fields%free()
221 call this%nut_mean%reset()
223 call this%uu_sgs%reset()
224 call this%vv_sgs%reset()
225 call this%ww_sgs%reset()
226 call this%uv_sgs%reset()
227 call this%uw_sgs%reset()
228 call this%vw_sgs%reset()
Compute the strain rate tensor of a vector field.
subroutine, public field_col3(a, b, c, n)
Vector multiplication with 3 vectors .
subroutine, public field_cmult(a, c, n)
Multiplication by constant c .
Computes the subgrid-scale contributions for Reynolds stresses. We use the Reynolds decomposition for...
subroutine fluid_sgs_stats_update(this, k)
Updates all fields with a new sample.
subroutine fluid_sgs_stats_free(this)
Destructor.
subroutine fluid_sgs_stats_init(this, coef, u, v, w, nut_field)
Constructor. Initialize the fields associated with fluid_sgs_stats.
subroutine fluid_sgs_stats_reset(this)
Resets all the computed means values and sampling times to zero.
integer, parameter, public rp
Global precision used in computations.
Defines a registry for storing solution fields.
type(registry_t), target, public neko_registry
Global field registry.
Defines a registry for storing and requesting temporary objects This can be used when you have a func...
type(scratch_registry_t), target, public neko_scratch_registry
Global scratch registry.
Defines a statistical quantity.
Coefficients defined on a given (mesh, ) tuple. Arrays use indices (i,j,k,e): element e,...
field_list_t, To be able to group fields together
Computes the temporal mean of a field.
Abstract type defining a statistical quantity.