The FARGO_THORIN code developer's guide
 All Data Structures Files Functions Variables Typedefs Macros
Functions | Variables
TransportEuler.c File Reference

Functions that handle the transport substep of a hydrodynamical time step. More...

#include "fargo.h"
Include dependency graph for TransportEuler.c:

Go to the source code of this file.

Functions

void Transport (PolarGrid *Rho, PolarGrid *Vrad, PolarGrid *Vtheta, PolarGrid *Energy, PolarGrid *Label, real dt)
 
void OneWindRad (PolarGrid *Rho, PolarGrid *Vrad, PolarGrid *Energy, real dt)
 
void ComputeResiduals (PolarGrid *Vtheta, real dt)
 
void AdvectSHIFT (PolarGrid *array)
 
void OneWindTheta (PolarGrid *Rho, PolarGrid *Vtheta, PolarGrid *Energy, real dt)
 
void QuantitiesAdvection (PolarGrid *Rho, PolarGrid *Energy, PolarGrid *Vtheta, real dt)
 
void ComputeExtQty (PolarGrid *Rho, PolarGrid *Label, PolarGrid *ExtLabel)
 
void ComputeSpeQty (PolarGrid *Rho, PolarGrid *Label, PolarGrid *ExtLabel)
 
void InitTransport ()
 
void ComputeStarRad (PolarGrid *Qbase, PolarGrid *Vrad, PolarGrid *QStar, real dt)
 
void ComputeStarTheta (PolarGrid *Qbase, PolarGrid *Vtheta, PolarGrid *QStar, real dt)
 
void ComputeLRMomenta (PolarGrid *Rho, PolarGrid *Vrad, PolarGrid *Vtheta)
 
void ComputeVelocities (PolarGrid *Rho, PolarGrid *Vrad, PolarGrid *Vtheta)
 
real VanLeerRadial (PolarGrid *Vrad, PolarGrid *Qbase, real dt)
 
void VanLeerTheta (PolarGrid *Vtheta, PolarGrid *Qbase, real dt)
 
void TransportPebbles (PolarGrid *Rho, PolarGrid *Vrad, PolarGrid *Vtheta, real dt)
 An alternative to Transport() function for the 2nd fluid. More...
 
void OneWindRadPebbles (PolarGrid *Rho, PolarGrid *Vrad, real dt)
 An alternative to OneWindRad() function for the 2nd fluid. More...
 
void OneWindThetaPebbles (PolarGrid *Rho, PolarGrid *Vtheta, real dt)
 An alternative to OneWindTheta() function for the 2nd fluid. More...
 
void QuantitiesAdvectionPebbles (PolarGrid *Rho, PolarGrid *Vtheta, real dt)
 An alternative to QuantitiesAdvection() function for the 2nd fluid. More...
 

Variables

real OmegaFrame
 
static real VMed [MAX1D]
 
static int Nshift [MAX1D]
 
static realTempShift
 
static realdq
 
static PolarGridRadMomP
 
static PolarGridRadMomM
 
static PolarGridThetaMomP
 
static PolarGridThetaMomM
 
static PolarGridExtLabel
 
static PolarGridVthetaRes
 
static PolarGridWork
 
static PolarGridQRStar
 
static PolarGridElongations
 
int TimeStep
 
boolean OpenInner
 
boolean FastTransport
 
real LostMass = 0.0
 

Detailed Description

Functions that handle the transport substep of a hydrodynamical time step.

The FARGO algorithm is implemented here. The transport is performed in a manner similar to what is done for the ZEUS code (Stone & Norman, 1992), except for the momenta transport (we define a left and right momentum for each zone, which we declare zone centered; we then transport then normally, and deduce the new velocity in each zone by a proper averaging).

Author
THORIN modifications by Ondřej Chrenko chren.nosp@m.ko@s.nosp@m.irrah.nosp@m..tro.nosp@m.ja.mf.nosp@m.f.cu.nosp@m.ni.cz, Copyright (C) 2017; original code by Frédéric Masset

Definition in file TransportEuler.c.

Function Documentation

void AdvectSHIFT ( PolarGrid array)

Definition at line 113 of file TransportEuler.c.

References polargrid::Field, Nshift, and TempShift.

Referenced by OneWindTheta(), and OneWindThetaPebbles().

Here is the caller graph for this function:

void ComputeExtQty ( PolarGrid Rho,
PolarGrid Label,
PolarGrid ExtLabel 
)

Definition at line 177 of file TransportEuler.c.

References polargrid::Nrad.

Referenced by Transport().

Here is the caller graph for this function:

void ComputeLRMomenta ( PolarGrid Rho,
PolarGrid Vrad,
PolarGrid Vtheta 
)

Definition at line 318 of file TransportEuler.c.

References polargrid::Field, polargrid::Nrad, OmegaFrame, and Rmed.

Referenced by Transport(), and TransportPebbles().

Here is the caller graph for this function:

void ComputeResiduals ( PolarGrid Vtheta,
real  dt 
)

Definition at line 70 of file TransportEuler.c.

References FastTransport, polargrid::Field, InvRmed, polargrid::Nrad, Nshift, PI, Rmed, VMed, and YES.

Referenced by OneWindTheta(), and OneWindThetaPebbles().

Here is the caller graph for this function:

void ComputeSpeQty ( PolarGrid Rho,
PolarGrid Label,
PolarGrid ExtLabel 
)

Definition at line 197 of file TransportEuler.c.

References polargrid::Nrad.

Referenced by Transport().

Here is the caller graph for this function:

void ComputeStarRad ( PolarGrid Qbase,
PolarGrid Vrad,
PolarGrid QStar,
real  dt 
)

Definition at line 232 of file TransportEuler.c.

References dq, InvDiffRmed, polargrid::Nrad, and Rmed.

Referenced by OneWindRad(), OneWindRadPebbles(), and VanLeerRadial().

Here is the caller graph for this function:

void ComputeStarTheta ( PolarGrid Qbase,
PolarGrid Vtheta,
PolarGrid QStar,
real  dt 
)

Definition at line 275 of file TransportEuler.c.

References dq, polargrid::Nrad, PI, and Rmed.

Referenced by QuantitiesAdvection(), QuantitiesAdvectionPebbles(), and VanLeerTheta().

Here is the caller graph for this function:

void ComputeVelocities ( PolarGrid Rho,
PolarGrid Vrad,
PolarGrid Vtheta 
)

Definition at line 350 of file TransportEuler.c.

References polargrid::Field, polargrid::Nrad, OmegaFrame, and Rmed.

Referenced by Transport(), and TransportPebbles().

Here is the caller graph for this function:

void InitTransport ( )

Definition at line 217 of file TransportEuler.c.

References CreatePolarGrid(), dq, NRAD, NSEC, and TempShift.

Referenced by InitEuler().

Here is the call graph for this function:

Here is the caller graph for this function:

void OneWindRad ( PolarGrid Rho,
PolarGrid Vrad,
PolarGrid Energy,
real  dt 
)

Definition at line 49 of file TransportEuler.c.

References ActualiseGas(), AdvecteLabel, ComputeStarRad(), EnergyEq, LostMass, RhoInt, RhoStar, VanLeerRadial(), and YES.

Referenced by Transport().

Here is the call graph for this function:

Here is the caller graph for this function:

void OneWindRadPebbles ( PolarGrid Rho,
PolarGrid Vrad,
real  dt 
)

An alternative to OneWindRad() function for the 2nd fluid.

Definition at line 461 of file TransportEuler.c.

References ActualiseGas(), ComputeStarRad(), RhoInt, RhoStar, and VanLeerRadial().

Referenced by TransportPebbles().

Here is the call graph for this function:

Here is the caller graph for this function:

void OneWindTheta ( PolarGrid Rho,
PolarGrid Vtheta,
PolarGrid Energy,
real  dt 
)

Definition at line 138 of file TransportEuler.c.

References AdvecteLabel, AdvectSHIFT(), ComputeResiduals(), EnergyEq, FastTransport, QuantitiesAdvection(), and YES.

Referenced by Transport().

Here is the call graph for this function:

Here is the caller graph for this function:

void OneWindThetaPebbles ( PolarGrid Rho,
PolarGrid Vtheta,
real  dt 
)

An alternative to OneWindTheta() function for the 2nd fluid.

Definition at line 476 of file TransportEuler.c.

References AdvectSHIFT(), ComputeResiduals(), FastTransport, QuantitiesAdvectionPebbles(), and YES.

Referenced by TransportPebbles().

Here is the call graph for this function:

Here is the caller graph for this function:

void QuantitiesAdvection ( PolarGrid Rho,
PolarGrid Energy,
PolarGrid Vtheta,
real  dt 
)

Definition at line 159 of file TransportEuler.c.

References ActualiseGas(), AdvecteLabel, ComputeStarTheta(), EnergyEq, RhoInt, RhoStar, VanLeerTheta(), and YES.

Referenced by OneWindTheta().

Here is the call graph for this function:

Here is the caller graph for this function:

void QuantitiesAdvectionPebbles ( PolarGrid Rho,
PolarGrid Vtheta,
real  dt 
)

An alternative to QuantitiesAdvection() function for the 2nd fluid.

Definition at line 494 of file TransportEuler.c.

References ActualiseGas(), ComputeStarTheta(), RhoInt, RhoStar, and VanLeerTheta().

Referenced by OneWindThetaPebbles().

Here is the call graph for this function:

Here is the caller graph for this function:

void Transport ( PolarGrid Rho,
PolarGrid Vrad,
PolarGrid Vtheta,
PolarGrid Energy,
PolarGrid Label,
real  dt 
)

Definition at line 34 of file TransportEuler.c.

References AdvecteLabel, ComputeExtQty(), ComputeLRMomenta(), ComputeSpeQty(), ComputeVelocities(), OneWindRad(), OneWindTheta(), and YES.

Here is the call graph for this function:

void TransportPebbles ( PolarGrid Rho,
PolarGrid Vrad,
PolarGrid Vtheta,
real  dt 
)

An alternative to Transport() function for the 2nd fluid.

Definition at line 449 of file TransportEuler.c.

References ComputeLRMomenta(), ComputeVelocities(), OneWindRadPebbles(), and OneWindThetaPebbles().

Here is the call graph for this function:

real VanLeerRadial ( PolarGrid Vrad,
PolarGrid Qbase,
real  dt 
)

Definition at line 384 of file TransportEuler.c.

References ComputeStarRad(), DivisePolarGrid(), polargrid::Field, InvSurf, OpenInner, PI, RhoInt, RhoStar, Rinf, Rsup, and YES.

Referenced by OneWindRad(), and OneWindRadPebbles().

Here is the call graph for this function:

Here is the caller graph for this function:

void VanLeerTheta ( PolarGrid Vtheta,
PolarGrid Qbase,
real  dt 
)

Definition at line 417 of file TransportEuler.c.

References ComputeStarTheta(), DivisePolarGrid(), polargrid::Field, RhoInt, RhoStar, Rinf, Rsup, and Surf.

Referenced by QuantitiesAdvection(), and QuantitiesAdvectionPebbles().

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

real* dq
static

Definition at line 25 of file TransportEuler.c.

Referenced by ComputeStarRad(), ComputeStarTheta(), and InitTransport().

PolarGrid * Elongations
static

Definition at line 27 of file TransportEuler.c.

PolarGrid * ExtLabel
static

Definition at line 26 of file TransportEuler.c.

boolean FastTransport

Definition at line 29 of file Interpret.c.

Referenced by ComputeResiduals(), OneWindTheta(), OneWindThetaPebbles(), and ReadVariables().

real LostMass = 0.0

Definition at line 32 of file TransportEuler.c.

Referenced by OneWindRad(), WriteBigPlanetFile(), and WritePlanetFile().

int Nshift[MAX1D]
static

Definition at line 22 of file TransportEuler.c.

Referenced by AdvectSHIFT(), and ComputeResiduals().

real OmegaFrame
boolean OpenInner

Definition at line 14 of file main.c.

Referenced by VanLeerRadial().

PolarGrid * QRStar
static

Definition at line 27 of file TransportEuler.c.

PolarGrid * RadMomM
static

Definition at line 26 of file TransportEuler.c.

PolarGrid* RadMomP
static

Definition at line 26 of file TransportEuler.c.

real* TempShift
static

Definition at line 23 of file TransportEuler.c.

Referenced by AdvectSHIFT(), and InitTransport().

PolarGrid * ThetaMomM
static

Definition at line 26 of file TransportEuler.c.

PolarGrid * ThetaMomP
static

Definition at line 26 of file TransportEuler.c.

int TimeStep

Definition at line 23 of file global.h.

Referenced by AdvanceSystemFromDisk(), and main().

real VMed[MAX1D]
static

Definition at line 21 of file TransportEuler.c.

Referenced by ComputeResiduals().

PolarGrid * VthetaRes
static

Definition at line 26 of file TransportEuler.c.

PolarGrid* Work
static

Definition at line 27 of file TransportEuler.c.