1555 Commits

Author SHA1 Message Date
84dabc30d5 EQUATIONS: Add subroutine to find the initial brackets and guess.
The new subroutine finds the initial brackets and estimates the root
value of the enthalpy which are used in the primitive variables solver
for SRMHD.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-04-27 18:42:43 -03:00
4c7e526a4b EQUATIONS: Fix calculation of the fluxes in SRMHD.
The fluxes of the momenta had the second terms wrongly calculated. The
new calculation uses equations from Mignone & Bodo (2006).

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-04-25 17:13:39 -03:00
8aa56efe21 EQUATIONS: Correct the interface in the Riemann problem.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-04-25 13:11:37 -03:00
c7f52cec15 PROBLEMS: Implement general 1D Riemann test problem.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-04-25 13:02:45 -03:00
945bf1cc16 EQUATIONS: Set the boundary values from the parameter file.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-04-25 12:14:58 -03:00
434420f33a EQUATIONS: Add array to store boundary values.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-04-25 11:49:51 -03:00
5363c0a722 Merge branch 'master' into srmhd
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>

Conflicts:
	src/makefile
2015-04-24 10:27:36 -03:00
dad7d7bafe Makefile: Remove option to create archive.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-04-23 13:11:37 -03:00
53738e00e3 EQUATIONS: Implement SRMHD 2D(W,u²) variable solver.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-02-28 14:22:00 -03:00
0edc75a884 EQUATIONS: Improve brackets for SRHD variable solvers.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-02-27 18:19:40 -03:00
fd4416d673 EQUATIONS: Fix SRMHD 1D(W) variable solver.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-02-27 17:57:29 -03:00
9ae335cd39 EQUATIONS: Implement brackets for SRMHD variable solvers.
This change implements the initial bracketing the enthalpy. The minimum
enthalpy is found by solving the pressure positivity equation, which
guarantees also the physicality of velocity. The upper bracket is found
from the energy equation. Then, the brackets are shifted up until the
root region is found.

The 1D and 2D Newton-Raphson methods have been slightly improved as
well. The 1Dw method use the information about brackets to limit the
next step. If the solution shoots out of the brackets, the bisection
method is applied. In the 2Dwv method, we print warnings when the
variables become unphysical.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-02-27 17:08:12 -03:00
d4962b7393 EQUATIONS: Print more info in case variable solvers fail.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-02-22 20:55:47 -03:00
072e822391 EQUATIONS: Remove unneeded function calculation in bracket estimation.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-02-22 19:38:06 -03:00
62fb668053 EQUATIONS: Print error if the physical variables cannot be found.
If the primitive variable solvers cannot find the physical solution,
print an error message together with the values of the conservative
variables for a problematic cell.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-02-22 19:31:28 -03:00
e077a985ea EQUATIONS: Print warning in the case of the unphysical variables.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-02-22 19:14:40 -03:00
d9d73e2cf6 EQUATIONS: Add return flag indicating if the Newton-Raphson succeeded.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-02-22 13:39:50 -03:00
c3b7539fb0 EQUATIONS: Remove unused argument from variable solvers.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-02-22 13:09:03 -03:00
6d46480932 EQUATIONS: Use provided nr_function_srhd_adi_1d() in SRHD 1D(w) method.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-02-22 13:07:09 -03:00
64c60c3fec EQUATIONS: Use better lower bracket for SRHD.
The new lower bracket for W guarantees that both pressure and velocity
are physical. We also make sure, that the upper bracket is always larger
than the lower one.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-02-22 12:48:43 -03:00
c577c1a71e EQUATIONS: Change parameter names for Newton-Raphson methods.
The maximum number of iterations, and the number of extra iterations are
called nrmax, and nrext, respectively.

The can be changed by setting parameters "nr_maxit" and "nr_extra" in
the parameter file.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-02-20 13:39:33 -02:00
2194082761 EQUATIONS: Correct the Newton-Raphson method names in messages.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-02-20 13:35:32 -02:00
035220eb11 EQUATIONS: Correct names of the SRMHD Newton-Raphson subroutines.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-02-20 13:32:47 -02:00
8c7d891a4d EQUATIONS: Prepare the initial guess in the Newton-Raphson subroutines.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-02-20 13:29:48 -02:00
22a8711259 EQUATIONS: Descrease the maximum Lorentz factor.
This is required in order to avoid numerical problems.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-02-20 13:27:05 -02:00
1bb881c9f9 EQUATIONS: Improve description of nr_iterate_srmhd_adi_1dw().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-02-20 11:17:53 -02:00
0df9f15af5 EQUATIONS: Update the description of nr_iterate_srhd_adi_1dw().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-02-20 10:54:55 -02:00
f2beae3fea EQUATIONS: More optimizations in SRHD 2D(W,v²) variable solver.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-02-20 10:17:35 -02:00
d30f5a6f20 EQUATIONS: Correct comments in SRHD variable solvers.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-02-20 09:42:33 -02:00
1b37e6dc47 EQUATIONS: Optimize SRHD 2D(W,u²) variable solver even more.
This optimizations incorporate pressure directly into the F(W,u²)
function, while allows to reduce a few operations more.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-02-20 09:28:31 -02:00
a9c56ff1b1 EQUATIONS: Print method name in the failed convergence messages.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-02-20 07:14:52 -02:00
f8cdeaeffd EQUATIONS: Fix Jacobian calculation in SRHD 2D(W,u²) variable solver.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-02-19 22:23:05 -02:00
c9c4f88f61 EQUATIONS: Bisect if W is out of brackets in SRHD 1D(W) variable solver.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-02-19 20:14:03 -02:00
5240cad7b3 EQUATIONS: Add initial brackets and guess for all SRHD variable solvers.
Before we perform Newton-Raphson step to find the roots W, we can use
some estimates of the brackets, and from them we can calculate the
initial guess for W.

This change implements this step for all special relativity HD primitive
variable solvers.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-02-19 19:00:23 -02:00
017c98dca0 EQUATIONS: Add parameter for the maximum allowed Lorentz factor.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-02-19 18:57:42 -02:00
8c0a574b80 EQUATIONS: Add additional names to SRHD variable solvers.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-02-19 17:44:14 -02:00
8f59203036 EQUATIONS: Micro optimize SRHD 2D(W,v²) primitive variable solver.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-02-19 17:38:47 -02:00
a470a2a874 EQUATIONS: Fix and optimize SRHD 2D(W,u²) primitive variable solver.
One of the derivative was calculated in a wrong way. This patch also
incorporates the pressure derivatives directly in the derivatives of
functions F(W,u²) and G(W,u²), which allows to some microoptimizations.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-02-19 17:17:38 -02:00
28badcb066 EQUATIONS: Implement SRHD 2D(W,u²) primitive variable solver.
The solver approximates the root by searching for W and u² at the same
time.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-02-19 12:35:03 -02:00
01e6d799aa EQUATIONS: Rename nr_iterate_srhd_adi_2d() to nr_iterate_srhd_adi_2dwv().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-02-19 11:38:16 -02:00
56da64d935 EQUATIONS: Improve the guess in SRHD primitive variables solver.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-02-19 11:35:34 -02:00
f46981fb03 EQUATIONS: Avoid division errors in nr_iterate_srhd_adi_2d().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-02-19 10:01:05 -02:00
020142137d EQUATIONS: Get the W guess from previous step in SRHD and SRMHD.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-02-18 15:36:01 -02:00
6448ad40e8 SHAPES: Reorder variables in update_shapes_jet().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-02-17 18:34:48 -02:00
3010c36cbd EQUATIONS: Implement 2D primitive variable solver for SRMHD.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-02-17 18:15:11 -02:00
49c141a2c5 EQUATIONS: Fix some comments.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-02-17 17:29:05 -02:00
dc58f6686d PROBLEMS: Separate jet and ambient magnetic fields in jet problem.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-02-17 17:16:37 -02:00
0d62c46535 EQUATIONS: Simplify some expressions in nr_iterate_srmhd_adi_1dw().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-02-17 12:46:22 -02:00
cd6608de0e EQUATIONS: Remove dependence on nr_function() in SRMHD equations.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-02-17 12:35:52 -02:00
e2406e10e7 EQUATIONS: Remove dependence on ww_to_v() in SRMHD subroutines.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-02-17 12:23:42 -02:00