PLUTO  4.0
 All Data Structures Files Functions Variables Enumerations Macros Pages
Macros | Functions
fargo.h File Reference

FARGO-MHD module header file. More...

Go to the source code of this file.

Macros

#define FARGO_ORDER   3
 
#define FARGO_NSTEP_AVERAGE   10
 
#define FARGO_AVERAGE_VELOCITY   YES
 

Functions

void FARGO_AddVelocity (const Data *, Grid *)
 
void FARGO_ComputeVelocity (const Data *, Grid *)
 
double ** FARGO_GetVelocity (void)
 
void FARGO_SubtractVelocity (const Data *, Grid *)
 
void FARGO_ShiftSolution (Data_Arr, Data_Arr, Grid *)
 

Detailed Description

Contains contains basic definitions and declarations used by the FARGO-MHD module.

Authors
A. Mignone (migno.nosp@m.ne@p.nosp@m.h.uni.nosp@m.to.i.nosp@m.t)
G. Muscianisi (g.mus.nosp@m.cian.nosp@m.isi@c.nosp@m.inec.nosp@m.a.it)
Date
Sep 12, 2012
Todo:

Macro Definition Documentation

#define FARGO_AVERAGE_VELOCITY   YES

Average background velocity is computed by averaging the orbital velocity (YES) or by prescribing the velocity analytically exactly in the user-supplied function FARGO_SetVelocity

#define FARGO_NSTEP_AVERAGE   10

Set how often (in number of steps) the total azimuthal velocity should be averaged.

#define FARGO_ORDER   3

Set the order of interpolation during the linear transport step. Either 2 or 3.

Function Documentation

void FARGO_AddVelocity ( const Data d,
Grid grid 
)

Add the mean backgroun contribution to the residual velocity in order to obtain the total velocity.

Parameters
[in,out]dpointer to PLUTO Data structure
[in]gridpointer to array of Grid structures
Returns
This function has no return value.
void FARGO_ComputeVelocity ( const Data d,
Grid grid 
)

Compute the mean orbital velocity as a 2D array by averaging for each pair (x,z)/(r,z)/(r,theta) (in Cartesian/polar/spherical) along the orbital coordinate y/phi/phi.

double** FARGO_GetVelocity ( void  )

Return a pointer to the background orbital velocity wA.

void FARGO_ShiftSolution ( Data_Arr  U,
Data_Arr  Us,
Grid grid 
)

Shifts conserved variables in the orbital direction.

Parameters
[in,out]Ua 3D array of conserved, zone-centered values
[in,out]Usa 3D array of staggered magnetic fields
[in]gridpointer to Grid structure;
Returns
This function has no return value.
Todo:
Optimization: avoid using too many if statement like on nproc_s > 1 or == 1
void FARGO_SubtractVelocity ( const Data d,
Grid grid 
)

Subtract the mean background contribution from the total velocity. In other words, compute the residual velocity.

Parameters
[in,out]dpointer to PLUTO Data structure
[in]gridpointer to array of Grid structures
Returns
This function has no return value.