PLUTO  4.4-patch2
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   -1 /* Never average with ShearinBox model */
 
#define FARGO_OUTPUT_VTOT   NO
 

Functions

void FARGO_AverageVelocity (const Data *, Grid *)
 
void FARGO_ComputeResidualVelocity (const Data *, double ***, Grid *)
 
void FARGO_ComputeTotalVelocity (const Data *, double ***, Grid *)
 
void FARGO_Initialize (void)
 
void FARGO_Restart (const Data *, char *, int, int, Grid *)
 
void FARGO_ShiftSolution (Data_Arr, Data_Arr, Grid *)
 
void FARGO_Source (Data_Arr, Data_Arr, double, Grid *)
 
double ** FARGO_Velocity (void)
 

Detailed Description

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

Authors
A. Mignone (migno.nosp@m.ne@t.nosp@m.o.inf.nosp@m.n.it)
G. Muscianisi (g.mus.nosp@m.cian.nosp@m.isi@c.nosp@m.inec.nosp@m.a.it)
Date
Aug 21, 2019
Todo:

Macro Definition Documentation

◆ FARGO_NSTEP_AVERAGE

#define FARGO_NSTEP_AVERAGE   -1 /* Never average with ShearinBox model */

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

◆ FARGO_ORDER

#define FARGO_ORDER   3

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

◆ FARGO_OUTPUT_VTOT

#define FARGO_OUTPUT_VTOT   NO

Used to write total/residual velocity

Function Documentation

◆ FARGO_AverageVelocity()

void FARGO_AverageVelocity ( const Data d,
Grid grid 
)

Compute the background orbital velocity as a 2D array by averaging the total azimuthal velocity along the orbital coordinate y/phi/phi. Update the residual velocity as well.

◆ FARGO_ComputeResidualVelocity()

void FARGO_ComputeResidualVelocity ( const Data d,
double ***  vres,
Grid grid 
)

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

Parameters
[in]dpointer to PLUTO Data structure. It is assumed that d->Vc[VX2] contains the total vel.
[out]vresarray where the residual velocity is stored. (can be also d->Vc[VX2])
[in]gridpointer to array of Grid structures
Returns
This function has no return value.

◆ FARGO_ComputeTotalVelocity()

void FARGO_ComputeTotalVelocity ( const Data d,
double ***  vtot,
Grid grid 
)

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

Parameters
[in]dpointer to PLUTO Data structure. It is assumed that d->Vc[VX2] contains the residual.
[out]vtotarray where the total velocity is stored. (can be also d->Vc[VX2])
[in]gridpointer to array of Grid structures
Returns
This function has no return value.

◆ FARGO_Initialize()

void FARGO_Initialize ( void  )

Initialize FARGO module.

◆ FARGO_Restart()

void FARGO_Restart ( const Data d,
char *  dir,
int  nfile,
int  swap_endian,
Grid grid 
)

Read average orbital speed from .dbl file and store it in wA[][].

◆ FARGO_ShiftSolution()

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 statements like on nproc_s > 1 or == 1

◆ FARGO_Source()

void FARGO_Source ( Data_Arr  UU,
Data_Arr  Vs,
double  dt,
Grid grid 
)
Parameters
[in,out]UUarray of conserved variables
[in]Vsarray of staggered magnetic fields
[in]dtthe current time increment
[in]gridpointer to an array of Grid structures

◆ FARGO_Velocity()

double** FARGO_Velocity ( void  )

Return a pointer to the background orbital velocity wA.