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
c438f1f366
EQUATIONS: Remove lower limit for enthalpy in nr_function().
...
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-02-17 11:57:47 -02:00
9cc25b790e
EQUATIONS: Implement subroutines for special relativity MHD.
...
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-02-17 11:28:40 -02:00
e5e0d293cf
PROBLEMS: Add magnetic field to the jet problem.
...
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-02-17 10:25:52 -02:00
1930bda0cc
ALGEBRA: Add cubic and quartic solvers.
...
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-02-17 09:53:19 -02:00
b8fed51178
SCHEMES: Implement subroutines for special relativity MHD.
...
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-02-16 20:06:43 -02:00
a36dc4b638
SCHEMES: Cite the paper next to SRHD HLLC solver name.
...
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-02-16 12:56:26 -02:00
8e7d63a1d2
SCHEMES: Rewrite the HLLC solver for SRHD.
...
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-02-16 12:52:49 -02:00
18a8182c56
SCHEMES: Rename HLLC Riemann solver to HLLC-M.
...
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-02-16 10:56:46 -02:00
ba470d5ec9
EQUATIONS: Simplify the W guess and pressure in cons2prim_srhd_adi().
...
The initia guess for enthalphy can be estimated from the total energy
and minimum pressure. In the similar way, the pressure can be obtained
by subtracting the energy from enthalphy.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-02-15 08:17:51 -02:00
d203702254
SCHEMES: Implement HLLC Riemann solver for SRHD.
...
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-02-14 23:08:32 -02:00
fa5173547b
ALGEBRA: Add new module which provides algebra subroutines.
...
The initial module version provides the subroutines to solve quadratic
equation.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-02-14 20:47:04 -02:00