wiki:AstroBearProjects/multiphysics

Version 1 (modified by Shule Li, 13 years ago) ( diff )

===================================

Viscosity and Resistivity in AstroBEAR

===================================

Viscosity

The viscosity term in the Navier-Stokes Equation can be separated as:


For the applications we are considering, the fluid is isotropic. Under this assumption, the tensor can be expressed as the following combination of two scalar dynamic viscosities and :



where I is the unit tensor.
It can be proven that the stress tensor should have zero trace, which leads to the following relation between and :



Combining these relations, we can write down the final form of the separated viscous equation:



Notice that this equation already counts the effect of all the elements in a viscosity tensor, assuming the fluid itself is isotropic.


Resistivity

The resistivity equation can be written as:


Here, the magnetic field are located at face centers. Using the face centered magnetic field, we can calculate the edge centered currents, which then give a source term.
The curl of the edge centered source term gives a face centered , which can then be applied to the face centered magnetic field.

===================================

Implementation

===================================

Viscosity

The viscous source term is calculated rigorously by first finding the tensor elements at the surrounding face centers of a cell center considered: The sources are naturally located at the cell centers, the sources however needs an averaging to obtain the cell centered velocity divergence.
Therefore the scheme requires a 20 point stencil in 3-D configuration, which makes the implicit scheme a bit complicated. The following graph shows such a stencil in 2-D setting:

http://www.pas.rochester.edu/~shuleli/vis_stencil.png

Using this stencil setting, one can get face centered velocity divergence for the cell considered, and then calculate the gradient components located at the cell center.
In the viscous plasma context, the physical viscosity can be calculated rigorously. The plasma viscosity is proportional to the product of ion mean free path and the ion thermal energy:



In our code, we offer the option to calculate the realistic viscosity using the following equation:



The ion mass and local temperature should be readily available, but a good estimate of ion diameter usually requires look up a ionic radius table.
As an estimate, one can use that of hydrogen, about 0.1~0.2 nm.
One can see that the viscosity itself is anisotropic and depends on the local temperature.
That is why we have both the and terms in our viscosity equation, and have to calculate face centered source terms before applying the final divergence.

The viscosity interface is as follows:
The viscosity source term can be turned on in astrobear by putting the viscosity flag to true:
lViscous = .true.
The second parameter VisType determines which type of viscosity one requires: 1 for constant viscosity; 2 for real physical viscosity.
The third parameter viscosity is the user defined constant viscosity.
The viscosity module is tested to be working compatibly with implicit thermal conduction module and uniform gravity module.


Resistivity

For each cell, the resistive source term is calculated by taking the curl of face centered magnetic field. This results in a 12 dimension array that stores the current source terms running over the 12 edges of a cell in 3-D. This array is then used to calculate the new face centered magnetic field. The stencil for this explicit solver is a 3 by 3 cube surrounding the cell we want to update. See the following diagram:

http://www.pas.rochester.edu/~shuleli/res_dia1.png

In cgs units, the real magnetic diffusivity can be written as:

where is the material conductivity which depends on the electron-ion collision rate which in term depends on the electron temperature .
The cross field diffusivity can thus be expressed as function of electron temperature

where is the Coulomb logarithm:



THe Coulomb logarithm for interested number density is plotted below:
http://www.pas.rochester.edu/~shuleli/CoulombLog.png


The parallel diffusivity however, is dependent on

For case, parallel diffusivity is about half of cross field diffusivity.

Currently in the code, the realistic resistivity gets calculated at each cell edges by averaging the temperatures surrounding that edge. So the temperature effect is taken into full consideration. But the Coulomb log is assigned as a constant, although it may change depending on the temperature and particle density.

The resistivity interface is as follows:
The resistive source term can be turned on in astrobear by putting the resistive flag to true:
lresistive = .true.
The second parameter ResType determines which type of resistivity one requires: 1 for constant computational resistivity; 2 for real physical resistivity.
The third parameter resistivity is the user defined constant resistivity.

===================================

Multiphysics Integration

===================================

Taking viscosity as an example. The goal for the multiphysics modules is to calculate a vdot inside a grid, using the known hydro vars. It will need the two ghost zone's as illustrated below:

This integration can be done before any hyperbolic updates.

Attachments (3)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.