3372 Commits

Author SHA1 Message Date
d140e34612 Merge branch 'master' into reconnection 2024-10-07 10:42:24 -03:00
3263a08ec0 BOUNDARIES, MESH: Implement PPM block prolongation.
Implement Colella and Woodward's Piecewise Parabolic Method (PPM) for
block prolongation. This method is also used for the prolongation of
boundaries from blocks at lower levels to higher levels.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2024-10-07 10:35:04 -03:00
b573ac4934 Merge branch 'master' into reconnection 2024-07-30 22:25:57 -03:00
7b1d7319c9 AMUN: Print more info about MPI nodes/processes.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2024-07-30 22:24:24 -03:00
336b9460e9 Merge branch 'master' into reconnection 2024-07-30 16:55:16 -03:00
a45a380d0c SOURCES: Consider -B.div(B) terms for isothermal KEPES too.
The -B.div(B) source term in the momentum equation was dropped for
the isothermal MHD case. Apparently, its lack causes some numerical
instabilities related to the accumulation of the divergence of B.
Therefore, take it into account for the isothermal case too.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2024-07-30 16:46:29 -03:00
e339cf15e8 SCHEMES: Add symmetry preserving optimizations to isothermal KEPES Riemann solver
- Update riemann_mhd_iso_kepes() subroutine to include missing symmetry
  preserving optimizations.
- Ensure consistency with the adiabatic version by adding and utilizing
  the ch variable.
- Correct the initialization and usage of transformation matrices (rm and tm).
- Adjust calculations to ensure symmetric properties, particularly in the handling
  of variables cs, ca, and cglm.
- Include appropriate sign functions for consistent behavior.
- Make changes to the calculation of intermediate variables to maintain symmetry
  and consistency.
- Adjusted flux calculation to correctly apply symmetry preserving
  terms.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2024-07-30 16:32:16 -03:00
34835bf849 Merge branch 'master' into reconnection 2024-07-19 10:07:36 -03:00
29f1e94e9c HELPERS: Add functions to enable/disable I/O flush and sync.
This change introduces the logical flag 'noflush' to control the flushing
and synchronization of I/O buffers. Subsequently, subroutines
'enable_flush_and_sync' and 'disable_flush_and_sync' were added to enable
and disable the flushing and synchronization, respectively.

The 'flush_and_sync' subroutine was modified to respect the noflush flag.

Additionally, this change updates 'statistics.F90' to read
the 'enable_io_flush' parameter and call the appropriate subroutine
('enable_flush_and_sync' or 'disable_flush_and_sync') based on its value.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2024-07-19 10:00:18 -03:00
f99a1fb0bf USER_PROBLEM: Rewrite initial perturbation to inject in all modes.
Add a flag to select only the perturbation modes which are stable for
tearing mode instability.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2024-07-18 11:58:08 -03:00
d4c692d09a Merge branch 'master' into reconnection 2024-07-10 20:56:49 -03:00
94ecb53bc4 EVOLUTION: Do not increase CFL coefficient in some SSPRK methods.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2024-07-10 20:54:55 -03:00
ad1d25c8bc Merge branch 'master' into reconnection 2024-07-03 22:37:04 -03:00
0e703cf9b5 STATISTICS: Calculate pressure for the isothermal case.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2024-07-03 22:36:02 -03:00
1c63d15b32 Merge branch 'master' into reconnection 2024-07-01 20:12:15 -03:00
b37f8997ea EVOLUTION: Introduce limiter for timestep jump.
To prevent solution instability caused by sudden increases in the
timestep, such as when the maximum refinement level decreases, a new
parameter 'dt_jump_factor' has been introduced. This parameter controls
the allowable increase in the timestep.

By default, 'dt_jump_factor' is set to 1.05, permitting a maximum
increase of 5% from the previous timestep.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2024-07-01 20:06:24 -03:00
77b28b7cde USER_PROBLEM: Normalize inflow speed by the inflow boundary area.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2024-06-19 17:31:41 -03:00
2c6e710d96 Merge branch 'master' into reconnection 2024-06-03 22:26:36 -03:00
2496b8f8cc EVOLUTION: Prevent overflow in initial time step estimation
Ensure tolerance calculation uses already normalized variables to avoid
potential overflow.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2024-06-03 22:20:43 -03:00
9fbe586803 Merge branch 'master' into reconnection 2024-06-01 23:41:28 -03:00
6d20a66b8b EVOLUTION: Ensure stable initial time step for embedded methods
Restricted initial time steps to values smaller than the CFL time step
to ensure numerical stability. This prevents instability issues that
may arise from excessively large initial steps.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2024-06-01 23:36:28 -03:00
898d8e7f8d USER_PROBLEM: Improve the precision of log_cosh() function.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2024-06-01 17:15:26 -03:00
f7a5b98cd3 Merge branch 'master' into reconnection 2024-05-25 13:22:04 -03:00
470bd03a93 INTERPOLATIONS: Generalize and extend 5th order WENO schemes.
This commit separates the smoothness indicator and weight calculations
for 5th order WENO methods into different subroutines. This allows
modification of only the weight factor calculations for different WENO methods.
It extends the 5th order methods to include WENO5-JS, WENO5-Z+, WENO5-ZC,
WENO5-ZC+, WENO5-Z+M, and WENO5-AT.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2024-05-25 13:15:26 -03:00
7d681df8eb Merge branch 'master' into reconnection 2024-05-24 19:03:03 -03:00
bca8681d96 FORCING: Make injected energy update atomic.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2024-05-24 19:01:08 -03:00
3013d57f9f Revert "FORCING: Normalize the injection power by the volume size."
This reverts commit 9376e09fdf036a072f21b1ec27938eebd9f9845b.
2024-05-24 18:55:43 -03:00
9376e09fdf FORCING: Normalize the injection power by the volume size.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2024-05-24 18:47:08 -03:00
9ae03a4998 STATISTICS: Fix bug in integrating the injected energy and rate.
The injected energy and rate were added to the global array within the
loop over the blocks, essentially multiplying the energy by the number
of blocks for each process. This fix moves the injected energy
accounting out of the loop over the blocks.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2024-05-24 18:28:49 -03:00
da0cd1b34e USER_PROBLEM: Fix amplitude calculation for one-mode perturbations.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2024-04-21 12:07:08 -03:00
9e45431c89 USER_PROBLEM: Correct a few comments.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2024-04-21 11:10:19 -03:00
a8be8f1710 Merge branch 'master' into reconnection 2024-04-20 18:02:17 -03:00
403a1e2f3f INTERPOLATION: kappa parameter should be >= 1.
The kappa parameter is calculated from CFL value. It is a decreasing
value with increasing CFL. However, to maintain the precision of MP
limiter, it should be kept above 1. Therefore, instead of taking the min
values between the user defined kappa and the one calculated from the
CFL value, take its maximum.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2024-04-20 17:47:19 -03:00
e14d929d3c Merge branch 'master' into reconnection 2024-04-13 11:25:03 -03:00
ebd7f3ef59 PROBLEMS: Update the parameter file for the current sheet problem.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2024-03-08 22:54:02 -03:00
3059b8904d Merge branch 'master' into reconnection 2024-03-08 22:40:58 -03:00
def5179c74 PROBLEMS: Rename and update the parameter file for the Kelvin-Helmholtz problem.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2024-03-07 17:26:02 -03:00
ff5cf0615c PROBLEMS: Add the parameter file for the Orszag-Tang problem.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2024-03-07 14:57:23 -03:00
40d8de12fa PROBLEMS: Update the parameter file for the tearing problem.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2024-03-07 11:01:47 -03:00
e76e875004 Update the copyright year to 2024.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2024-03-07 09:34:43 -03:00
fb25489487 SCHEMES: Fix ROE solvers for MHD.
The tearing test problem was numerically unstable in the adiabatic case.
Setting bty to 1 in the case of br beeing zero solved the issue. Make it
consistent for the isothermal ROE solver as well. Additionaly, one typo
was fixed in the calculation of the left eigenvectors.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2024-03-06 21:21:59 -03:00
b75d87dc7e Merge branch 'master' into reconnection 2023-12-31 17:47:14 -03:00
78e3b72889 STATISTICS: Parallelize statistics calculation with OpenMP.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2023-12-31 17:45:17 -03:00
5470bbd0da Merge branch 'master' into reconnection 2023-12-28 20:44:10 -03:00
659449669b EVOLUTION: Fix wrong import in update_errors_lmax().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2023-12-28 11:52:22 -03:00
60d13dff6c EVOLUTION: Update subroutine to calculate errors using Lmax-norm.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2023-12-28 11:14:34 -03:00
213879c9c4 EVOLUTION: Update subroutine to calculate errors using L2-norm.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2023-12-28 10:56:11 -03:00
de49eeedaa EVOLUTION: Add subroutine to calculate errors using the L1-norm.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2023-12-28 10:49:24 -03:00
b35d44da73 Merge branch 'master' into reconnection 2023-12-26 22:24:19 -03:00
7c292e7095 EVOLUTION: Fix possible overflow in update_errors_l2().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2023-12-26 22:20:24 -03:00