MPI-AMRVAC  2.2
The MPI - Adaptive Mesh Refinement - Versatile Advection Code
Functions/Subroutines | Variables
mod_viscosity Module Reference

The module add viscous source terms and check time step. More...

Functions/Subroutines

subroutine vc_params_read (files)
 Read this module"s parameters from a file. More...
 
subroutine viscosity_init (phys_wider_stencil, phys_req_diagonal)
 Initialize the module. More...
 
subroutine viscosity_add_source (qdt, ixIL, ixOL, wCT, w, x, energy, qsourcesplit, active)
 
subroutine viscosity_get_dt (w, ixIL, ixOL, dtnew, dxD, x)
 
subroutine, public visc_get_flux_prim (w, x, ixIL, ixOL, idim, f, energy)
 
subroutine get_crossgrad (ixIL, ixOL, x, w, idim, cross)
 
subroutine cart_cross_grad (ixIL, ixOL, x, w, idim, cross)
 yields d_i v_j + d_j v_i for a given i, OK in Cartesian and for some tensor terms in cylindrical (rr & rz) and in spherical (rr) More...
 
subroutine visc_add_source_geom (qdt, ixIL, ixOL, wCT, w, x)
 

Variables

double precision, public vc_mu = 1.d0
 Viscosity coefficient. More...
 
logical vc_4th_order = .false.
 fourth order More...
 
logical vc_split = .false.
 source split or not More...
 
logical viscindiv = .false.
 whether to compute the viscous terms as fluxes (ie in the div on the LHS), or not (by default) More...
 

Detailed Description

The module add viscous source terms and check time step.

Viscous forces in the momentum equations: d m_i/dt += - div (vc_mu * PI) !! Viscous work in the energy equation: !! de/dt += - div (v . vc_mu * PI) where the PI stress tensor is PI_i,j = - (dv_j/dx_i + dv_i/dx_j) + (2/3)*Sum_k dv_k/dx_k where vc_mu is the dynamic viscosity coefficient (g cm^-1 s^-1).

Function/Subroutine Documentation

◆ cart_cross_grad()

subroutine mod_viscosity::cart_cross_grad ( integer, intent(in)  ixI,
integer, intent(in)  L,
integer, intent(in)  ixO,
  L,
double precision, dimension(ixi^s, 1:^nd), intent(in)  x,
double precision, dimension(ixi^s, 1:nw), intent(in)  w,
integer, intent(in)  idim,
double precision, dimension(ixi^s,ndir), intent(out)  cross 
)

yields d_i v_j + d_j v_i for a given i, OK in Cartesian and for some tensor terms in cylindrical (rr & rz) and in spherical (rr)

Definition at line 461 of file mod_viscosity.t.

Here is the call graph for this function:

◆ get_crossgrad()

subroutine mod_viscosity::get_crossgrad ( integer, intent(in)  ixI,
integer, intent(in)  L,
integer, intent(in)  ixO,
  L,
double precision, dimension(ixi^s, 1:ndim), intent(in)  x,
double precision, dimension(ixi^s, 1:nw), intent(in)  w,
integer, intent(in)  idim,
double precision, dimension(ixi^s,ndir), intent(out)  cross 
)

Definition at line 309 of file mod_viscosity.t.

Here is the call graph for this function:

◆ vc_params_read()

subroutine mod_viscosity::vc_params_read ( character(len=*), dimension(:), intent(in)  files)

Read this module"s parameters from a file.

Definition at line 41 of file mod_viscosity.t.

◆ visc_add_source_geom()

subroutine mod_viscosity::visc_add_source_geom ( double precision, intent(in)  qdt,
integer, intent(in)  ixI,
integer, intent(in)  L,
integer, intent(in)  ixO,
  L,
double precision, dimension(ixi^s, 1:nw), intent(inout)  wCT,
double precision, dimension(ixi^s, 1:nw), intent(inout)  w,
double precision, dimension(ixi^s, 1:ndim), intent(in)  x 
)

Definition at line 483 of file mod_viscosity.t.

Here is the call graph for this function:

◆ visc_get_flux_prim()

subroutine, public mod_viscosity::visc_get_flux_prim ( double precision, dimension(ixi^s, 1:nw), intent(in)  w,
double precision, dimension(ixi^s, 1:^nd), intent(in)  x,
integer, intent(in)  ixI,
integer, intent(in)  L,
integer, intent(in)  ixO,
  L,
integer, intent(in)  idim,
double precision, dimension(ixi^s, nwflux), intent(inout)  f,
logical, intent(in)  energy 
)

Definition at line 275 of file mod_viscosity.t.

Here is the call graph for this function:

◆ viscosity_add_source()

subroutine mod_viscosity::viscosity_add_source ( double precision, intent(in)  qdt,
integer, intent(in)  ixI,
integer, intent(in)  L,
integer, intent(in)  ixO,
  L,
double precision, dimension(ixi^s,1:nw), intent(in)  wCT,
double precision, dimension(ixi^s,1:nw), intent(inout)  w,
double precision, dimension(ixi^s,1:ndim), intent(in)  x,
logical, intent(in)  energy,
logical, intent(in)  qsourcesplit,
logical, intent(inout)  active 
)

Definition at line 86 of file mod_viscosity.t.

Here is the call graph for this function:

◆ viscosity_get_dt()

subroutine mod_viscosity::viscosity_get_dt ( double precision, dimension(ixi^s,1:nw), intent(in)  w,
integer, intent(in)  ixI,
integer, intent(in)  L,
integer, intent(in)  ixO,
  L,
double precision, intent(inout)  dtnew,
double precision, intent(in)  dx,
double precision, intent(in)  D,
double precision, dimension(ixi^s,1:ndim), intent(in)  x 
)

Definition at line 243 of file mod_viscosity.t.

◆ viscosity_init()

subroutine mod_viscosity::viscosity_init ( integer, intent(inout)  phys_wider_stencil,
logical, intent(inout)  phys_req_diagonal 
)

Initialize the module.

Definition at line 57 of file mod_viscosity.t.

Here is the call graph for this function:

Variable Documentation

◆ vc_4th_order

logical mod_viscosity::vc_4th_order = .false.

fourth order

Definition at line 17 of file mod_viscosity.t.

◆ vc_mu

double precision, public mod_viscosity::vc_mu = 1.d0

Viscosity coefficient.

Definition at line 14 of file mod_viscosity.t.

◆ vc_split

logical mod_viscosity::vc_split = .false.

source split or not

Definition at line 20 of file mod_viscosity.t.

◆ viscindiv

logical mod_viscosity::viscindiv = .false.

whether to compute the viscous terms as fluxes (ie in the div on the LHS), or not (by default)

Definition at line 24 of file mod_viscosity.t.