1147 Commits

Author SHA1 Message Date
cf7ee78e83 USER_PROBLEM: Fix plane selection for magnetic flux integration.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2024-10-09 17:00:39 -03:00
e615a1a341 USER_PROBLEM: Improve user refinement criterion.
Ensure that large blocks spanning beyond the `yref` parameter are
refined appropriately.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2024-10-09 16:28:48 -03:00
9dffcba230 Merge branch 'master' into flux-tubes 2024-10-07 10:42:09 -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
fd87018ebd USER_PROBLEM: Add user refinement criterion.
The criterion sets only those blocks for refinement that lie at
a distance specified by the parameter 'yref' from the current sheet.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2024-09-15 11:14:02 -03:00
4429843c95 USER_PROBLEM: Implement a few types of the initial perturbation.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2024-08-17 17:55:22 -03:00
b24ab38389 USER_PROBLEM: Normalize the magnetic flux by the X area.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2024-08-16 16:37:11 -03:00
ab481646b6 USER_PROBLEM: Adapt the sincos profile for the periodic box.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2024-08-16 16:30:31 -03:00
d62d29d0ed Merge branch 'master' into flux-tubes 2024-07-30 22:25:40 -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
7648240902 Merge branch 'master' into flux-tubes 2024-07-30 16:54:55 -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
5083bce795 Merge branch 'master' into flux-tubes 2024-07-19 10:07:20 -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
31a5b4975e Merge branch 'master' into flux-tubes 2024-07-10 20:56:32 -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
35826e398d Merge branch 'master' into flux-tubes 2024-07-03 22:36:49 -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
ed4c83c5f4 Merge branch 'master' into flux-tubes 2024-07-01 20:11:58 -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
2271b69255 Merge branch 'master' into flux-tubes 2024-06-03 22:26:20 -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
e6d4cc51cd Merge branch 'master' into flux-tubes 2024-06-01 23:41:46 -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
6a178661f5 Merge branch 'master' into flux-tubes 2024-05-25 13:21:46 -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
58937c4ad7 Merge branch 'master' into flux-tubes 2024-05-24 19:01:41 -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
5372208ba5 Merge branch 'master' into flux-tubes 2024-04-20 18:01:44 -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
db0a979057 Merge branch 'master' into flux-tubes 2024-03-07 18:21:03 -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
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
0d6f7a47ea Merge branch 'master' into flux-tubes 2023-12-31 17:46:56 -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
9e82eb3f6d Merge branch 'master' into flux-tubes 2023-12-28 20:43:52 -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
ce859bfdc1 Merge branch 'master' into flux-tubes 2023-12-26 22:22:31 -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
7ab1348259 STATISTICS: Get 'statistics_interval' on all processes.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2023-12-23 12:13:13 -03:00
68449d0ccc IO: Add ACTION and STATUS flags to OPEN statements.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2023-12-20 18:33:58 -03:00
04bc74bead Merge branch 'master' into flux-tubes 2023-12-19 16:04:24 -03:00