50 Commits

Author SHA1 Message Date
Grzegorz Kowal
2682d37d20 Update the copyright information. 2011-02-27 22:45:54 -03:00
Grzegorz Kowal
15c31f92a1 SCHEME: small corrections in subroutine hll(). 2010-12-12 21:54:29 -02:00
Grzegorz Kowal
3c022bd80f SCHEME: remove subroutine emf(). 2010-12-12 21:41:26 -02:00
Grzegorz Kowal
623ddc73b6 SCHEME: correct flux calculation for magnetic field. 2010-12-11 19:26:33 -02:00
Grzegorz Kowal
29b000c75f SCHEME: slightly rewrite subroutine update(). 2010-12-11 14:38:34 -02:00
Grzegorz Kowal
9f361b4175 SCHEME: slightly rewrite subroutine hll(). 2010-12-11 14:32:38 -02:00
Grzegorz Kowal
e89c705ca5 RESISTIVITY: implement resistivity in Riemann solvers.
- implement the resistive term (with uniform resistivity) in the HLL
   and HLLD solvers;
2010-12-10 17:14:26 -02:00
Grzegorz Kowal
91521184cd INTERPOLATION: pass dx to the reconstruction.
- the spacial increment is required by some interpolation methods, so
   pass it to the subroutine reconstruct();
2010-12-06 16:27:49 -02:00
Grzegorz Kowal
41e44779e5 Revert "INTERPOLATION: pass the spacial increment to reconstruct()."
This reverts commit d92ae5d3a62743b66e97c42be4aa5f31ef5993d1.
2010-12-06 16:20:49 -02:00
Grzegorz Kowal
d92ae5d3a6 INTERPOLATION: pass the spacial increment to reconstruct().
- pass the spacial increment to the reconstruction subroutine since
   some interpolation methods require it; in addition, move obtaining
   the spacial interval and its inversion to the subroutine update();
2010-12-06 16:09:09 -02:00
Grzegorz Kowal
2cc3489123 SCHEME: clean up code after removal indices icx, icy, icz. 2010-12-05 09:27:19 -02:00
Grzegorz Kowal
c6f935a616 SCHEME: remove FIELDCT and FLUXCT parts. 2010-12-05 09:17:13 -02:00
Grzegorz Kowal
5fc6eb70c4 SCHEME: rewrite the HLLC Riemann solver.
- rewrite the HLLC hydrodynamic Riemann solver;
 - also add more conditions for compilation flags;
2010-12-03 16:29:28 -02:00
Grzegorz Kowal
7630328406 SCHEME: small fixes in the adiabatic HLLD solver. 2010-12-03 12:27:53 -02:00
Grzegorz Kowal
91cd15c0de SCHEME: implement the adiabatic HLLD Riemann solver.
- the HLLD approximate solver calculates the numerical fluxes for the
   adiabatic equation of states for the MHD equations;
2010-12-02 17:54:15 -02:00
Grzegorz Kowal
f6c78bb258 SCHEME: implement the isothermal HLLD Riemann solver.
- the HLLD approximate solver calculates the numerical fluxes for the
   isothermal equation of states for the MHD equations;
2010-12-02 12:07:01 -02:00
Grzegorz Kowal
3a1b56860d SCHEME: remove argument 'd' from the Riemann solvers.
- this flag specifies if to return the flux or its spatial derivative;
   this is not used in the GLM-MHD approach;
2010-12-02 10:14:39 -02:00
Grzegorz Kowal
1b995390c5 SCHEME: remove subroutine numerical_flux().
- subroutine numerical_flux() is not used in the GLM-MHD approach, so
   remove it; later, during the implementation of GALERKIN methods, it
   may be reintroduced;
2010-12-02 10:10:40 -02:00
Grzegorz Kowal
fe5cade684 GLM-MHD: obtain the states for Bx and Psi.
- in the GLM-MHD set of equations variables Bx and Psi are couples,
   thus find their values and substitute to the left and right states
   before entering the approximate Riemann solver;
2010-12-01 13:27:01 -02:00
Grzegorz Kowal
c220a578b0 SCHEME: move cmax parameter from module 'evolution' to 'scheme'. 2010-12-01 13:13:27 -02:00
Grzegorz Kowal
db40c6253c SCHEME: fix iteration for reconstruction in HLL.
- fix the index for reconstruction of magnetic field components in the
   subroutine HLL;
2010-12-01 12:39:56 -02:00
Grzegorz Kowal
e58967b9a4 GLM-MHD: copy Psi between primitive and conserved variables.
- update subroutines cons2prim() and prim2cons() to convert the scalar
   potential between primitive and conserved variables;
2010-12-01 10:22:00 -02:00
Grzegorz Kowal
010c49556e GLM-MHD: calculate physical fluxes for B and Psi.
- calculate physical fluxes for the magnetic field components and
   scalar potential in subroutine fluxspeed();
2010-12-01 10:17:10 -02:00
Grzegorz Kowal
4e212d73b9 GLM-MHD: fix the preprocessor flag. 2010-12-01 10:07:06 -02:00
Grzegorz Kowal
6e2e07d9c9 GLM-MHD: update the numerical fluxes in HLL solver.
- reconstruct the states for the magnetic field components and scalar
   potential just like other fluid variables;
 - calculate the numerical fluxes for the magnetic field components and
   scalar potential;
2010-12-01 10:03:00 -02:00
Grzegorz Kowal
0b255858bb GLM_MHD: update magnetic field and potential increment.
- update the magnetic field component and the scalar potential Psi
   increments in the subroutine update();
2010-12-01 09:51:12 -02:00
Grzegorz Kowal
226c2a3fe9 Move variable indices to new module 'variables'.
VARIABLES

 - create new module 'variables' which stores references to variable
   indices; we gonna store dofferent objects related to variables in
   this module;
2010-12-01 09:25:30 -02:00
Grzegorz Kowal
aab8831bbf Update the copyright info and fix the length of separating lines. 2010-10-13 03:32:10 -03:00
Grzegorz Kowal
7b48386610 Remove flux calculation from the subroutine update().
SCHEME

 - remove the flux calculation from the subroutine update() and all dependent
   subroutines;
2010-09-19 00:08:20 +02:00
Grzegorz Kowal
b6dc6095ac Make GNU compiler happy and fix indexing of emf. 2010-09-18 11:42:09 +02:00
Grzegorz Kowal
ed88bc2526 First step of implementation of time advance using new method.
BLOCK STRUCTURE

 - add new array to the data block structure to store the electromotive
   force components; these components are located at the centers of cell
   edges, in this way the CT update of the staggered magnetic field
   component will be easier;

EVOLUTION

 - add new subroutine advance() which performs several steps in order to
   advance the solution in time by one-step update; the substeps are the
   updates of the numerical flux, the flux boundary, the advance in time
   the solution, the updates of mesh structure, and the boundaries of
   conserved variables, and finally the new time step estimation;

 - add new subroutine update_flux() to update the numerical fluxes
   stored in the data blocks;

SCHEME

 - add new subroutine numerical_flux() to calculate fluxes at the proper
   locations;

 - add new logical argument to HLL and HLLC in order to specify if the
   flux should be returned as a numerical flux or its derivative;
2010-07-27 19:26:15 -03:00
Grzegorz Kowal
0b62ce8c35 Update the array of fluxes and send it out of the update.
EVOLUTION

 - add new output argument returning the updated fluxes for each block;

SCHEME

 - update the fluxes from the one dimensional fluxes returned by the
   Riemann solver;
2010-07-26 21:12:40 -03:00
Grzegorz Kowal
4dea14df91 Fix compilation when EOS=ISO.
IO

 - obtain indices ipr and ien only when we use adiabatic equation of
   state;

PROBLEM

 - obtain indices ien and ipr only when EOS=ADI;
 - in the case of isothermal EOS define initial star as an increase of
   density instead of pressure;
 - in checking the refirement criterion use only density gradient when
   EOS=ISO;

SCHEME

 - obtain indices ipr and ien only when we use adiabatic EOS;
 - in function maxspeed() obtain parameter csnd2 in the case of
   isothermal equation of state;
2010-03-30 23:23:49 -03:00
Grzegorz Kowal
f035771f28 Fix divergence free prolongation and boundary conditions.
BOUNDARY CONDITIONS

 - update boundary conditions starting from the block with the maximum
   refinement level and stepping down; this fixes update of the
   boundary conditions in the corners;

INTERPOLATION

 - fix divergence free prolongation of the staggered magnetic field;
2010-03-21 19:05:29 -03:00
Grzegorz Kowal
88761c9622 Implement FLUXCT integration of the induction equation.
SCHEME

  - implement Flux-CT scheme for the staggered magnetic field
    integration;

BLOCK STRUCTURE

  - use more space efficient storage of the variables, which means
    storing only staggered components of magnetic field; cell-centered
    components are calculated only when necessary;

EVOLUTION

  - remove loops in the field updates; operations are performed on the
    arrays;

BOUNDARY CONDITIONS

  - remove loops in the bnd_copy; operations are calculated on the whole
    array now;

INTERPOLATION

  - subroutine magtocen() has been rewritten to avoid problems with the
    array allocation; now as an argument we enter the array of all
    variables; subroutine uses indices for the face-centered and
    cell-centered magnetic field components internally;

MAKE

  - add flag defining Flux-CT scheme;

PROBLEM

  - use predefined array variables instead of allocated;
2010-02-28 18:35:57 -03:00
Grzegorz Kowal
cab66e8fc3 Implement FIELD-CD scheme for magnetic field evolution. 2010-02-22 16:21:20 -03:00
Grzegorz Kowal
98849f3369 Prepare code for central differencing scheme for magnetic field. 2010-02-22 12:01:58 -03:00
Grzegorz Kowal
bbf998e4a0 Boundaries, interpolation, indices.
Rewritten boundaries allow for a proper handling boundaries between
blocks at different refinement levels. Prolongation and restriction of
the boundaries are improved now.

Rewritten interpolation for prolongation and restriction.

References to the variable indices are assigned more properly.
2010-02-11 23:30:46 -02:00
Grzegorz Kowal
beee9ee2d4 Initial support for the MHD equations.
VARIABLES

 - add indices for the magnetic field components, both face and cell
   centered

SOLVER, MHD

 - add support for the magnetohydrodynamic (MHD) equations to the
   subroutines cons2prim(), prim2cons()

 - add MHD flux and the fastest speed calculation in the subroutine
   fluxspeed()

 - include magnetosonic speed in the calculation of the maximum speed in
   the system required for estimation of the new time step

 - extend the HLL solver in subroutine hll() to support MHD

 - calculate the magnetic field update according to a CT scheme in the
   subroutine update()

INTERPOLATION

 - add subroutine magtocen() to interpolate cell centered magnetic field

EVOLUTION

 - add evolution of the magnetic field components in the evolve_euler()
   and evolve_rk2() time integration subroutines

 - also call the subroutine magtocen() in the right places

BOUNDARY CONDITIONS

 - support for magnetic field boundary update only in the case of blocks
   with the same level so far; later we need to include proper
   restriction and prolongation for the magnetic field to keep its
   divergence equal zero

PROBLEMS, BLAST

 - extend the blast problem to include the initial magnetic field

IO, HDF5

 - write down in a HDF5 file magnetic field components
2009-10-28 00:12:18 -02:00
Grzegorz Kowal
30bdd1cef9 HLLC solver implemented.
The HLLC solver is implemented now. It resolves contact discontinuities
properly. A small adjustment to the criterion has been done too.
2008-12-16 14:38:04 -06:00
Grzegorz Kowal
b39673bf85 Fixed generation of dx, dy, and dz.
The generation of dx, dy, dz for each level didn't include the base
grid, i.e. they were 2 times larger. Now it is fixed. Also plenty of
minor corrections in different places.
2008-12-13 21:05:51 -06:00
Grzegorz Kowal
d77dc8079e A few bugs fixed. Some reorganization of dimension variables. 2008-12-09 22:28:29 -06:00
Grzegorz Kowal
6d38fe6476 Added CFL condition and calculation of the new time step.
The function to calculate the maximum speed in the block has been added.
This function is used to determine the maximum speed globally, which is
next used to estimate the next time step.
2008-12-09 14:51:33 -06:00
Grzegorz Kowal
1756a144d4 Updated comments in the scheme module. 2008-12-08 21:04:20 -06:00
Grzegorz Kowal
5e611587e1 New module for interpolation.
This new module contains subroutines used to different kind of
interpolation. So far it is implemented only one subroutine used for
reconstruction of the left and right states from center values. This
interpolation has TVD property.
2008-12-08 20:53:29 -06:00
Grzegorz Kowal
9b946cb209 Added two subroutines to convert between variables.
Two subroutines, cons2prim and prim2cons, to convert between
conservative and primitive variables have been added.

New parameters, gammam1 and gammam1i have been added to the
configuration file. Both are derivation of gamma, first is gamma-1, the
secons 1/(gamma-1).
2008-12-08 20:38:46 -06:00
Grzegorz Kowal
b3eaa7b37e Subroutine to calculate fluxes and speeds implemented.
This subroutine calculates fluxes and speeds for hydrodynamic case only.
Adiabatic and isothermal equations of state are supported. I also added
new parameters, gamma and csnd to the config module.
2008-12-08 20:29:13 -06:00
Grzegorz Kowal
7be60a6788 Implement HLL flux approximation.
The most general HLL flux approximation has been implemented.
2008-12-08 20:16:37 -06:00
Grzegorz Kowal
c48f30bd20 Update sweeps over direction calculating dU.
We compute dFdx contribution along each direction and update total dU.
Apart from that I've added generation of coordinate variables, like dx,
dxi, etc. in the mesh module. The next step is to implement the HLL
solver.
2008-12-08 20:03:01 -06:00
Grzegorz Kowal
8faac24a86 New module 'scheme' for calculating dU increment.
This new module contains subroutines to calculate state vector update
using an approximate Riemann solver. The initial version contains only
a draft subroutine calculating the state vector increment dU.
2008-12-08 19:07:42 -06:00