Neko 1.99.3
A portable framework for high-order spectral element flow simulations
Loading...
Searching...
No Matches
advection.f90
Go to the documentation of this file.
1! Copyright (c) 2021-2024, The Neko Authors
2! All rights reserved.
3!
4! Redistribution and use in source and binary forms, with or without
5! modification, are permitted provided that the following conditions
6! are met:
7!
8! * Redistributions of source code must retain the above copyright
9! notice, this list of conditions and the following disclaimer.
10!
11! * Redistributions in binary form must reproduce the above
12! copyright notice, this list of conditions and the following
13! disclaimer in the documentation and/or other materials provided
14! with the distribution.
15!
16! * Neither the name of the authors nor the names of its
17! contributors may be used to endorse or promote products derived
18! from this software without specific prior written permission.
19!
20! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21! "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22! LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
23! FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
24! COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
25! INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
26! BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
27! LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
28! CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29! LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
30! ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31! POSSIBILITY OF SUCH DAMAGE.
32!
35 use num_types, only : rp
36 use space, only : space_t
37 use field, only : field_t
38 use coefs, only : coef_t
39 use json_module, only : json_file
42 implicit none
43 private
44
46 type, public, abstract :: advection_t
47 contains
48 procedure(compute_adv), pass(this), deferred :: compute
49 procedure(compute_scalar_adv), pass(this), deferred :: compute_scalar
50 procedure(compute_ale_adv), pass(this), deferred :: compute_ale
51 procedure(advection_recompute_metrics), pass(this), &
52 deferred :: recompute_metrics
53 procedure(advection_free), pass(this), deferred :: free
54 end type advection_t
55
56 interface
57
70 module subroutine advection_factory(object, json, coef, &
71 ulag, vlag, wlag, dtlag, tlag, time_scheme, use_dummy, slag)
72 class(advection_t), allocatable, intent(inout) :: object
73 type(json_file), intent(inout) :: json
74 type(coef_t), intent(inout), target :: coef
75 type(field_series_t), intent(in), target :: ulag, vlag, wlag
76 real(kind=rp), intent(in), target :: dtlag(10)
77 real(kind=rp), intent(in), target :: tlag(10)
78 type(time_scheme_controller_t), intent(in), target :: time_scheme
79 logical, optional, intent(in) :: use_dummy
80 type(field_series_t), target, optional, intent(in) :: slag
81 end subroutine advection_factory
82 end interface
83
84 public :: advection_factory
85
86 abstract interface
87
99 subroutine compute_adv(this, vx, vy, vz, fx, fy, fz, Xh, coef, n, dt)
100 import :: advection_t
101 import :: coef_t
102 import :: space_t
103 import :: field_t
104 import :: rp
105 class(advection_t), intent(inout) :: this
106 type(space_t), intent(in) :: Xh
107 type(coef_t), intent(in) :: coef
108 type(field_t), intent(inout) :: vx, vy, vz
109 type(field_t), intent(inout) :: fx, fy, fz
110 integer, intent(in) :: n
111 real(kind=rp), intent(in), optional :: dt
112 end subroutine compute_adv
113 end interface
114
115 abstract interface
116
127 subroutine compute_scalar_adv(this, vx, vy, vz, s, fs, Xh, coef, n, dt)
128 import :: advection_t
129 import :: coef_t
130 import :: space_t
131 import :: field_t
132 import :: rp
133 class(advection_t), intent(inout) :: this
134 type(field_t), intent(inout) :: vx, vy, vz
135 type(field_t), intent(inout) :: s
136 type(field_t), intent(inout) :: fs
137 type(space_t), intent(in) :: Xh
138 type(coef_t), intent(in) :: coef
139 integer, intent(in) :: n
140 real(kind=rp), intent(in), optional :: dt
141 end subroutine compute_scalar_adv
142 end interface
143
144 abstract interface
145
160 subroutine compute_ale_adv(this, vx, vy, vz, wm_x, wm_y, wm_z, &
161 fx, fy, fz, Xh, coef, n, dt)
162 import :: advection_t
163 import :: coef_t
164 import :: space_t
165 import :: field_t
166 import :: rp
167 class(advection_t), intent(inout) :: this
168 type(field_t), intent(inout) :: vx, vy, vz
169 type(field_t), intent(inout) :: wm_x, wm_y, wm_z
170 type(field_t), intent(inout) :: fx, fy, fz
171 type(space_t), intent(in) :: Xh
172 type(coef_t), intent(in) :: coef
173 integer, intent(in) :: n
174 real(kind=rp), intent(in), optional :: dt
175 end subroutine compute_ale_adv
176 end interface
177
178 abstract interface
179
182 subroutine advection_recompute_metrics(this, coef, moving_boundary)
183 import :: advection_t
184 import :: coef_t
185 class(advection_t), intent(inout) :: this
186 type(coef_t), intent(in) :: coef
187 logical, intent(in) :: moving_boundary
188 end subroutine advection_recompute_metrics
189 end interface
190
191 abstract interface
192
193 subroutine advection_free(this)
194 import :: advection_t
195 class(advection_t), intent(inout) :: this
196 end subroutine advection_free
197 end interface
198
199end module advection
Update any geometry/metric data inside the advection object. For eg., in ALE, maps the coef_GLL to co...
A factory for advection_t decendants. Both creates and initializes the object.
Definition advection.f90:99
Add advection operator to the right-hand-side for moving mesh.
Add advection operator to the right-hand-side for a scalar.
Subroutines to add advection terms to the RHS of a transport equation.
Definition advection.f90:34
Coefficients.
Definition coef.f90:34
Contains the field_serties_t type.
Defines a field.
Definition field.f90:34
integer, parameter, public rp
Global precision used in computations.
Definition num_types.f90:12
Defines a function space.
Definition space.f90:34
Compound scheme for the advection and diffusion operators in a transport equation.
Base class for time integration schemes.
Base abstract type for computing the advection operator.
Definition advection.f90:46
Coefficients defined on a given (mesh, ) tuple. Arrays use indices (i,j,k,e): element e,...
Definition coef.f90:62
Stores a series (sequence) of fields, logically connected to a base field, and arranged according to ...
The function space for the SEM solution fields.
Definition space.f90:63
Implements the logic to compute the time coefficients for the advection and diffusion operators in a ...