1531 Commits

Author SHA1 Message Date
c507f5b2ad INTERPOLATIONS: Rewrite 5th order Compact MP method.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2017-05-03 11:57:36 -03:00
39981f5667 INTERPOLATIONS: Fix di coefficients in CRMP5LD method.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2017-05-03 11:53:38 -03:00
b862c8f1af INTERPOLATIONS: Rewrite 5th order Compact Low Dissipation MP method.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2017-05-03 11:50:27 -03:00
4321e40657 INTERPOLATIONS: Implement 7th order Compact MP reconstruction.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2017-05-03 11:35:31 -03:00
17000df285 INTERPOLATIONS: Implement subroutine for MP limiting.
The monotonicity preserving (MP) limiter can be applied to various
reconstruction methods, therefore it is good to put it in a separate
subroutine.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2017-05-03 11:32:28 -03:00
8210267074 SCHEMES: Fix SRHD HLLC solver after modifying the quadratic() function.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2017-05-02 13:36:09 -03:00
3d4beabc36 ALGEBRA: Make the roots of function quadratic() consistent.
If there are two roots, make sure that x(1) corresponds to the formula
with '-' sign, and x(2) corresponds to the formula with '+' sign, i.e.

 Δ  = a₁² - 4 a₂ a₀
 x₁ = - (a₁ - sqrt(Δ)) / (2 a₂)
 x₂ = - (a₁ + sqrt(Δ)) / (2 a₂)

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2017-05-02 13:30:30 -03:00
0c7034c5e8 INTERPOLATION: Limit all cells in MLP limiting.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2017-04-28 13:26:10 -03:00
d4312eff68 PROBLEMS, SHAPES: Remove jet problem from default test problems.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2017-04-28 10:58:55 -03:00
e10baf5453 INTERPOLATIONS: Slightly improve MGP reconstruction.
Subtract the cell value from the stencil and add it back after the
interpolated values once the interpolation is done. This significantly
decreases the interpolation errors in uniform areas where the variables
are different from zero.

Check the monotonicity by comparing to eps and not to zero. This does
not force the interpolation to go back to the TVD one if the difference
between the interpolated value and cell centered one is of the order of
numerical error.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2017-04-19 07:19:56 -03:00
e84f1c9db0 INTERPOLATIONS: Improve one-dimensional GP reconstruction.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2017-04-18 14:37:21 -03:00
64a08b1ef7 INTERPOLATIONS: Fix compilation when NDIMS == 3.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2017-04-13 21:58:50 -03:00
da2f2a1bf0 SCHEMES: Fix adiabatic HLLD solver for weak Bx.
If the parallel component of magnetic field is too small, the
intermediate states might produce numerical instabilities, since they
are obtained by the division by a small factor.

In order to remove this situation, we apply full HLLD solver for strong
enough Alfvén wave. If it is weak, the HLLC solver is applied.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2017-04-10 08:03:50 -03:00
8dc157620c SCHEMES: Fix isothermal HLLD-M solver for weak Bx.
If the parallel component of magnetic field is too small, the
intermediate states might produce numerical instabilities, since they
are obtained by the division by a small factor.

In order to remove this situation, we apply full HLLD solver for strong
enough Alfvén wave. If it is weak, the HLL solver is applied.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2017-04-10 08:02:05 -03:00
a6490f31bb SCHEMES: Fix isothermal HLLD solver for weak Bx.
If the parallel component of magnetic field is too small, the
intermediate states might produce numerical instabilities, since they
are obtained by the division by a small factor.

In order to remove this situation, we apply full HLLD solver for strong
enough Alfvén wave. If it is weak, the HLL solver is applied.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2017-04-10 07:56:49 -03:00
3a6090499a SCHEMES: Fix adiabatic HLLD solver for MHD.
For one of the degenerate situations the state vector was not
calculated. This introduced numerical instabilities. This change fixes
it.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2017-04-07 08:34:44 -03:00
b41b5a000b INTERPOLATIONS: Fix MLP limiting.
We should take half of the TVD limited derivatives in order to compare
properly with the high order interpolated derivative. Fix it.

Also, TVD limit both states if the high order interpolation of any of
them overshoot.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2017-04-05 10:23:15 -03:00
b4b72a783d SCHEMES: A small fix for isothermal HLLD when Bx = 0.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2017-04-05 07:23:38 -03:00
3cd24e3b0f SOURCES: Fix calculation of η J² term.
In the sum of the J² we used Fortran subroutine sum() and the sum was
done along the 2nd index. However, the interpretation of this index is
uncertain when the first array rank is 1.

Therefore, instead of using subroutine sum(), the calculation is done
directly.

After this change there are no strange effects appearing on the
boundaries of the blocks.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2017-03-29 10:40:31 -03:00
aad62c9c51 INTERPOLATIONS: Implement Multi-dimensional Limiting Process.
This additional multi-dimensional limiting can be applied to any
reconstruction method. It is controlled by the parameter 'mlp_limiting'
by setting 'on' or 'off'.

The implementation is based on Gerlinger (2012).

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2017-03-16 09:50:10 -03:00
b092c80aae INTERPOLATIONS: Fix misspelling.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2017-03-15 10:18:39 -03:00
a1875b1af2 Merge branch 'master' of ssh://bitbucket.org/amunteam/amun-code
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2017-03-10 12:07:31 -03:00
5213004734 IO: Account time for disk operations (for snapshots).
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2017-03-10 12:04:42 -03:00
fe0e43b095 IO: Reset iret in read_restart_snapshot() and write_restart_snapshot().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2017-03-09 16:31:16 -03:00
31bf3006b7 GRAVITY: Reset acc in gacc_none().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2017-03-09 16:28:30 -03:00
322b8a141b USER_PROBLEM: Reset acc in gravitational_acceleration_user().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2017-03-09 16:28:10 -03:00
063a6b1db4 Update README.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2017-03-09 08:39:54 -03:00
76c6f3c67c DRIVER: Initialize USE_PROBLEM after COORDINATES.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2017-03-08 13:43:26 -03:00
e0a0c816f3 USER_PROBLEM: Clean up unused variables.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2017-03-08 13:02:41 -03:00
aeab9f9fe7 MAKEFILE: Organize order of dependencies.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2017-03-08 12:59:56 -03:00
08cca6647e BOUNDARIES, USER_PROBLEM: Add user specific boundary conditions.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2017-03-08 11:46:41 -03:00
dad181b23a USER_PROBLEM, SOURCES: Add user defined source terms.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2017-03-08 11:10:22 -03:00
d57b5aed69 USER_PROBLEM: Add user interface to define its problem.
In this way the user can define his problem, i.e. the initial setup, the
shape update, the gravitational acceleration profile, in one module.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2017-03-08 11:02:59 -03:00
c5b3501744 PROBLEMS: Adopt Rayleigh-Taylor problem for isothermal case.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2017-03-07 17:46:24 -03:00
0c0e98a3cd BOUNDARIES: Implement isothermal hydrostatic boundary conditions.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2017-03-07 17:30:14 -03:00
837ec0b8d7 BOUNDARIES: Implement adiabatic hydrostatic boundary conditions.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2017-03-07 17:14:58 -03:00
f1b4af2a37 BOUNDARIES: Pass t, dt, and coordinates to block_boundary_specific().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2017-03-07 16:20:11 -03:00
88141891c3 BOUNDARIES: Prepare block coordinates in boundaries_specific().
If specific boundary condition depends on the position, it would be good
to pass the coordinates to them in order to update the data block.

Also, if boundary conditions are time dependent, we should pass time and
the time increment too.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2017-03-07 16:16:05 -03:00
e503c4fc0a BOUNDARIES: Pass t and dt to boundaries_specific().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2017-03-07 16:06:33 -03:00
334252c83d SOURCES: Correct argument description in update_sources().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2017-03-07 16:04:03 -03:00
2a202605b0 BOUNDARIES: Pass time and dt to boundary_variables().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2017-03-07 16:02:01 -03:00
42dcce439f GRAVITY, SOURCES: Pass time and dt to gravitational acceleration module.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2017-03-07 15:47:22 -03:00
d63d6bbe6f EVOLUTION, SOURCES: Pass tm and dtm to update_sources().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2017-03-07 15:41:10 -03:00
5786b7f457 EVOLUTION: Move tm and dtm calculation befor applying source terms.
If we have time dependent source terms, we should pass tm and dtm to
subroutine update_sources().

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2017-03-07 15:36:51 -03:00
270cc68414 Add Rayleigh-Taylor problem parameter file.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2017-03-07 12:09:56 -03:00
bf9efe14df GRAVITY: Correct the acceleration in gacc_rayleigh_taylor().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2017-03-06 12:24:04 -03:00
dbdb5b3b4a PROBLEMS: Simplify the Rayleigh-Taylor problem setup.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2017-03-06 12:23:17 -03:00
251ac66fde PROBLEMS: Read value of gacc in Rayleigh-Teylor problem setup.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2017-03-06 11:52:08 -03:00
b6dae2abe1 GRAVITY: Implement acceleration for Rayleigh-Taylor problem.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2017-03-06 11:50:48 -03:00
0a789a3be7 PROBLEMS: Add the Rayleigh-Taylor instability setup.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2017-03-06 11:37:57 -03:00