78 integer :: n_stats = 7
105 type(
coef_t),
target :: coef
106 type(
field_t),
target,
intent(in) :: u, v, w
107 character(*),
intent(in),
optional :: nut_field
116 if (
present(nut_field))
then
124 call this%stats_work%init(this%u%dof,
'stats')
127 call this%nut_mean%init(this%nut)
129 call this%uu_sgs%init(this%stats_work,
'uu_sgs')
130 call this%vv_sgs%init(this%stats_work,
'vv_sgs')
131 call this%ww_sgs%init(this%stats_work,
'ww_sgs')
132 call this%uv_sgs%init(this%stats_work,
'uv_sgs')
133 call this%uw_sgs%init(this%stats_work,
'uw_sgs')
134 call this%vw_sgs%init(this%stats_work,
'vw_sgs')
136 allocate(this%stat_fields%items(this%n_stats))
138 call this%stat_fields%assign_to_field(1, this%nut_mean%mf)
140 call this%stat_fields%assign_to_field(2, this%uu_sgs%mf)
141 call this%stat_fields%assign_to_field(3, this%vv_sgs%mf)
142 call this%stat_fields%assign_to_field(4, this%ww_sgs%mf)
143 call this%stat_fields%assign_to_field(5, this%uv_sgs%mf)
144 call this%stat_fields%assign_to_field(6, this%uw_sgs%mf)
145 call this%stat_fields%assign_to_field(7, this%vw_sgs%mf)
153 real(kind=
rp),
intent(in) :: k
155 integer :: temp_indices(6)
157 associate(stats_work => this%stats_work)
158 n = stats_work%dof%size()
161 temp_indices(1), .false.)
163 temp_indices(2), .false.)
165 temp_indices(3), .false.)
167 temp_indices(4), .false.)
169 temp_indices(5), .false.)
171 temp_indices(6), .false.)
173 call this%nut_mean%update(k)
180 this%s23_work%x, this%u, this%v, this%w, this%coef)
190 call field_col3(stats_work, this%nut, this%s11_work)
191 call this%uu_sgs%update(k)
192 call field_col3(stats_work, this%nut, this%s22_work)
193 call this%vv_sgs%update(k)
194 call field_col3(stats_work, this%nut, this%s33_work)
195 call this%ww_sgs%update(k)
196 call field_col3(stats_work, this%nut, this%s12_work)
197 call this%uv_sgs%update(k)
198 call field_col3(stats_work, this%nut, this%s13_work)
199 call this%uw_sgs%update(k)
200 call field_col3(stats_work, this%nut, this%s23_work)
201 call this%vw_sgs%update(k)
213 call this%stats_work%free()
215 call this%nut_mean%free()
217 call this%uu_sgs%free()
218 call this%vv_sgs%free()
219 call this%ww_sgs%free()
220 call this%uv_sgs%free()
221 call this%uw_sgs%free()
222 call this%vw_sgs%free()
230 call this%stat_fields%free()
238 call this%nut_mean%reset()
240 call this%uu_sgs%reset()
241 call this%vv_sgs%reset()
242 call this%ww_sgs%reset()
243 call this%uv_sgs%reset()
244 call this%uw_sgs%reset()
245 call this%vw_sgs%reset()
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.
subroutine, public strain_rate(s11, s22, s33, s12, s13, s23, u, v, w, coef)
Compute the strain rate tensor, i.e 0.5 * du_i/dx_j + du_j/dx_i.
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.