982 Commits

Author SHA1 Message Date
ec7d12260e FORCING: Adjust forcing modes for domain smaller than unity.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2022-11-16 13:41:43 -03:00
22104fb867 FORCING: Fix region of turbulence driving.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2022-11-07 19:56:47 -03:00
caa0a1bcdb STATISTICS: Fix averaging of the boundary fluxes.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2022-10-24 10:06:36 -03:00
5c8d13f385 STATISTICS: Remove unused variables.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2022-10-24 08:54:03 -03:00
fbfc1983e6 STATISTICS: Implement mass and energy conservation terms calculation.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2022-10-23 22:42:17 -03:00
296da6a63e STATISTICS: Introduce flags to enable/disable statistics collection.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2022-10-17 12:37:20 -03:00
336a04377b BOUNDARIES: Remove unused variables.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2022-10-17 11:29:58 -03:00
64c58bb4bd EQUATIONS: Make compiler happy with imported variables.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2022-10-17 11:26:19 -03:00
cd0e6ea675 USEWR_PROBLEM: Fix identation in setup_user_problem().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2022-09-30 19:12:01 -03:00
cd9b909333 USER_PROBLEM: Correct arguments for update_user_sources().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2022-09-30 19:09:59 -03:00
8e4bd1712d EVOLUTION: Change safety factor to 0.91.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2022-06-11 00:22:56 -03:00
4af6e99ca8 EVOLUTION: Do not repeat if tolerance reached in embedded methods.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2022-06-09 18:04:53 -03:00
7c4f5660fa SYSTEM: Rewrite progress printing in evolve_system().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2022-06-04 15:25:00 -03:00
8d2edeed12 IO: Fix storing and restroring the forcing coefficients.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2022-05-31 19:30:51 -03:00
0f104bd033 EQUATIONS: Print the location just once in correct_unphysical_states().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2022-05-27 11:59:35 -03:00
cb56db7880 HELPERS: Introduce two print_message variants.
One prints the location, another one just the message.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2022-05-27 11:58:06 -03:00
e50e83bb1c EQUATIONS: Adapt unphysical cell info for 2D and 3D.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2022-05-27 11:54:32 -03:00
edb3924499 EQUATION: Correct formatting in correct_unphysical_states().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2022-05-26 22:34:47 -03:00
aa99145260 EQUATIONS: Print the location of unphysical cell.
Also slightly rewrite and simplify the arguments of
correct_unphysical_states().

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2022-05-26 22:21:02 -03:00
2696d5dffb EVOLUTION: Rewrite the handling of unimplemented methods.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2022-05-24 19:20:57 -03:00
94ea7d171d SCHEMES: Remove redundant empty line.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2022-05-24 19:02:56 -03:00
1033b4ede7 INTERPOLATIONS: Rewrite the handling of unimplemented methods.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2022-05-24 18:48:01 -03:00
74737b71f5 SCHEMES: Rewrite the handling of unimplemented Riemann solvers.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2022-05-24 18:32:02 -03:00
b0e221e2f3 HELPERS: Print all messages in two lines.
The first line shows the location from which the message was called, and
the second one shows the actual message.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2022-05-24 18:19:57 -03:00
d02c46e6d8 HELPERS: Add function to change the string case.
New functions uppercase() and lowercase() change the input string to the
upper case and lower case, respectively.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2022-05-24 18:17:55 -03:00
4f68d94827 FORCING: Implement driving region for in non-periodic directions.
This allows to control in which region the turbulence perturbation
should be injected.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2022-04-07 10:33:30 -03:00
fbc04e4996 EVOLUTION: Mark updated blocks as physical in update_variables().
Otherwise, these blocks are considered as non-physical if the
fix_unphysical_cells is on.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2022-02-19 15:40:26 -03:00
95d117cd1a EVOLUTION: Quit update_variables() in case of problems.
The possible failure could take place in the boundary update or
conversion to the conservative variables. In case of a failure, jump
directly to the end part of subroutine in which the %boundary flag is
cleared.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2022-02-19 13:39:58 -03:00
a4890bb240 EQUATIONS: Rewrite slightly correct_unphysical_states().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2022-02-19 13:34:31 -03:00
571e352e5b EVOLUTION: Remove unused variable from check_variables().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2022-02-19 13:12:30 -03:00
9aa74d2343 EVOLUTION: Rewrite update_variables().
After the boundary update, all respective blocks modified by the mesh or
boundary update are required to update their primitive variables. If a
data block contains a non-physical cell, it is corrected by
correct_unphysical_states(), if fix_unphysical_cells is switched on.
As the last steps, the shapes are updated if they are switched on.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2022-02-19 13:07:17 -03:00
ef1dff58f7 BLOCKS: Add field %physical to data block structure.
This field should be set to .true. if all block cells are physical,
otherwise it should be set to .false..

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2022-02-19 12:54:57 -03:00
1e1c39da1a EQUATIONS: Process all cells in update_primitive_variables().
If cons2prim() returns status indicating the existence of non-physical
cell, just update the subroutine status and continue with the variable
conversion.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2022-02-19 12:52:04 -03:00
06103eca50 EQUATIONS: Rewrite cons2prim() subroutines.
Do not quit immediately if a negative density or pressure is
encountered. Just mark the status flag non-zero and continue. The
non-physical cell can be corrected later.

Also, if the compilation flag DEBUG is present, print the conservative
variables for the non-physical cell.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2022-02-19 12:46:46 -03:00
2db9062683 MESH: Avoid very large MPI tags.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2022-02-15 19:21:20 -03:00
dbb4ad6c55 AMUN: Fix compilation for Intel compiler.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2022-02-14 18:48:10 -03:00
a3a140b572 BLOCKS, BOUNDARIES, EVOLUTION: Fix block variable update.
When the block has been (de)refined, its field %update is set in order
to update its primitive variables. However, the block which are
neighbors of the (de)refined blocks, since their boundaries are updated
too, were not selected for the primitive variable update.

Fix this by adding a new meta block field %boundary, which indicates
that a block boundary has been updated, and update the corresponding
data block primitive variables either if the %update or %boundary flags
are set.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2022-02-11 22:37:46 -03:00
6f23ae962e BOUNDARIES: Prepare primitive variables for specific boundaries.
The specific boundaries (open, outflow, reflective, custom, etc.) work
on the primitive variables. Since the boundaries are updated using the
conservative variables, we have to update the primitive variables in the
block to which the specific boundary is applied. Then, the conservative
variables are update at the ghost zone where the specific boundary
condition was applied.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2022-02-09 19:25:18 -03:00
47ebb9703c BOUNDARIES: Process boundary prolongation from minlev to maxlev.
Since the update of boundaries using prolongation depends on the
neighboring cells, make sure it is applied for blocks at the same level,
from the minimum to maximum level.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2022-02-09 16:49:26 -03:00
6ba8d5d34f SOURCES: Reduce the number of arguments to update_sources().
Pointer pdata already has a reference to the increment array dU(), so
remove the redundant argument du.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2022-02-09 16:25:07 -03:00
d74cc0b6af BOUNDARIES: Fix boundaries_face_prolong() to include the internal edge.
Four child blocks at higher levels do not have internal edge neighbors.
Therefore, the face prolongation from the lower level neighbor of these
four blocks has to include the internal edges.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2022-02-09 16:00:04 -03:00
87daca8d55 BOUNDARIES: Fix boundaries_edge_prolong() to include the internal corner.
Two child blocks at higher levels do not have internal corner neighbor.
Therefore, the edge prolongation from the lower level neighbor of these
two blocks has to include the internal corner.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2022-02-09 15:59:29 -03:00
eea8c036b4 EVOLUTION: It is sufficient to update primitive variables once.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2022-02-08 18:33:18 -03:00
be47092f3c BOUNDARIES: Work with the conservative variables for the boundary update.
In this way the restricted or prolongated boundaries preserve the
conserved variables.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2022-02-08 17:45:26 -03:00
d188045d96 BOUNDARIES: Reorganize the specific boundaries.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2022-02-08 17:13:05 -03:00
de587766b6 BOUNDARIES: Correct fluxes dimension by dimension in boundary_fluxes().
This solver the problem of updating the fluxes in an inconsistent way
for the same run with a different number of MPI processes.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2022-02-08 16:15:51 -03:00
43499e930f BOUNDARIES: Organize importing of variables from other modules.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2022-02-08 09:59:42 -03:00
76d768246d BOUNDARIES: Handle all direction at once in boundaries_face_prolong().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2022-02-07 15:37:23 -03:00
7e5d0a4a0d BOUNDARIES: Handle all direction at once in boundaries_face_restrict().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2022-02-07 15:25:21 -03:00
7eb4276751 BOUNDARIES: Handle all direction at once in boundaries_face_copy().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2022-02-07 15:11:51 -03:00