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

Total mass and angular momentum monitoring, and boundary conditions. More...

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

Go to the source code of this file.

Functions

real GasTotalMass (PolarGrid *array)
 
real GasMomentum (PolarGrid *Density, PolarGrid *Vtheta)
 
void DivisePolarGrid (PolarGrid *Num, PolarGrid *Denom, PolarGrid *Res)
 
void InitComputeAccel ()
 
void OpenBoundary (PolarGrid *Vrad, PolarGrid *Rho, PolarGrid *Energy)
 
void NonReflectingBoundary (PolarGrid *Vrad, PolarGrid *Rho, PolarGrid *Energy)
 
void SetWaveKillingZones ()
 Sets the wave-killing factors within the damping zones; inspired by de Val-Borro et al. More...
 
void DampingBoundary (PolarGrid *Vrad, PolarGrid *Vtheta, PolarGrid *Rho, PolarGrid *Energy, real step)
 Imposes the wave-killing boundary condition. More...
 
void DampPebbles (PolarGrid *PebbleDens, PolarGrid *PebbleVrad, PolarGrid *PebbleVtheta, real dt)
 Damps the pebble disk inside the wave-killing zones towards its equilibrium state. More...
 
void ApplyOuterSourceMass (PolarGrid *Rho, PolarGrid *Vrad)
 
void ApplyBoundaryCondition (PolarGrid *Vrad, PolarGrid *Vtheta, PolarGrid *Rho, PolarGrid *Energy, real dt)
 
void CorrectVtheta (PolarGrid *vtheta, real domega)
 
real GasTotalEnergy (PolarGrid *Rho, PolarGrid *Vrad, PolarGrid *Vtheta, PolarGrid *Energy)
 

Variables

boolean OpenInner
 
boolean NonReflecting
 
boolean OuterSourceMass
 

Detailed Description

Total mass and angular momentum monitoring, and boundary conditions.

In addition, this file contains a few low-level functions that manipulate PolarGrid 's or initialize the forces evaluation.

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 SideEuler.c.

Function Documentation

void ApplyBoundaryCondition ( PolarGrid Vrad,
PolarGrid Vtheta,
PolarGrid Rho,
PolarGrid Energy,
real  dt 
)

Definition at line 384 of file SideEuler.c.

References ApplyOuterSourceMass(), ComputeSoundSpeed(), Damping, DampingBoundary(), EnergyEq, NonReflecting, NonReflectingBoundary(), OpenBoundary(), OpenInner, OuterSourceMass, and YES.

Here is the call graph for this function:

void ApplyOuterSourceMass ( PolarGrid Rho,
PolarGrid Vrad 
)

Definition at line 354 of file SideEuler.c.

References CPU_Number, CPU_Rank, IMPOSEDDISKDRIFT, polargrid::Nrad, Rinf, SigmaMed, and SIGMASLOPE.

Referenced by ApplyBoundaryCondition().

Here is the caller graph for this function:

void CorrectVtheta ( PolarGrid vtheta,
real  domega 
)

Definition at line 398 of file SideEuler.c.

References Rmed.

void DampingBoundary ( PolarGrid Vrad,
PolarGrid Vtheta,
PolarGrid Rho,
PolarGrid Energy,
real  step 
)

Imposes the wave-killing boundary condition.

Currently, the condition is set to always damp the radial velocity to zero. Additionaly, the density, azimuthal velocity and energy can be damped to their initial values.

Definition at line 270 of file SideEuler.c.

References DAMPINGRMAXFRAC, DAMPINGRMINFRAC, DampInit, EnergyMed, Max_or_active, OmegaFrame, RMAX, Rmed, RMIN, SigmaMed, VthetaMed, WaveKiller, and Zero_or_active.

Referenced by ApplyBoundaryCondition().

Here is the caller graph for this function:

void DampPebbles ( PolarGrid PebbleDens,
PolarGrid PebbleVrad,
PolarGrid PebbleVtheta,
real  dt 
)

Damps the pebble disk inside the wave-killing zones towards its equilibrium state.

Definition at line 317 of file SideEuler.c.

References DAMPINGRMAXFRAC, DAMPINGRMINFRAC, Max_or_active, polargrid::Nsec, OmegaFrame, PebDensInit, PebVradInit, PebVthetaInit, RMAX, Rmed, RMIN, WaveKiller, and Zero_or_active.

void DivisePolarGrid ( PolarGrid Num,
PolarGrid Denom,
PolarGrid Res 
)

Definition at line 74 of file SideEuler.c.

References polargrid::Field.

real GasMomentum ( PolarGrid Density,
PolarGrid Vtheta 
)
real GasTotalEnergy ( PolarGrid Rho,
PolarGrid Vrad,
PolarGrid Vtheta,
PolarGrid Energy 
)
real GasTotalMass ( PolarGrid array)

Definition at line 18 of file SideEuler.c.

References CPU_Number, CPU_Rank, FakeSequential, fargostat, Max_or_active, MPI_Allreduce(), MPI_Bcast(), MPI_COMM_WORLD, MPI_DOUBLE, MPI_Recv(), MPI_Send(), MPI_SUM, polargrid::Nsec, Surf, and Zero_or_active.

Here is the call graph for this function:

void InitComputeAccel ( )

Definition at line 93 of file SideEuler.c.

References CellAbscissa, CellOrdinate, CreatePolarGrid(), polargrid::Field, NRAD, polargrid::Nrad, NSEC, polargrid::Nsec, PI, and Rmed.

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

void NonReflectingBoundary ( PolarGrid Vrad,
PolarGrid Rho,
PolarGrid Energy 
)

Definition at line 135 of file SideEuler.c.

References CPU_Number, CPU_Rank, EnergyMed, polargrid::Field, NSEC, PI, Rinf, Rmed, SigmaMed, and SoundSpeed.

Referenced by ApplyBoundaryCondition().

Here is the caller graph for this function:

void OpenBoundary ( PolarGrid Vrad,
PolarGrid Rho,
PolarGrid Energy 
)

Definition at line 112 of file SideEuler.c.

References CPU_Rank, and SigmaMed.

Referenced by ApplyBoundaryCondition().

Here is the caller graph for this function:

void SetWaveKillingZones ( )

Sets the wave-killing factors within the damping zones; inspired by de Val-Borro et al.

(2006).

Definition at line 242 of file SideEuler.c.

References DAMPINGPERIODFRAC, DAMPINGRMAXFRAC, DAMPINGRMINFRAC, Max_or_active, PI, RMAX, Rmed, RMIN, WaveKiller, and Zero_or_active.

Referenced by InitEuler().

Here is the caller graph for this function:

Variable Documentation

boolean NonReflecting

Definition at line 30 of file Interpret.c.

Referenced by ApplyBoundaryCondition(), and ReadVariables().

boolean OpenInner

Definition at line 14 of file main.c.

Referenced by ApplyBoundaryCondition().

boolean OuterSourceMass

Definition at line 30 of file Interpret.c.

Referenced by ApplyBoundaryCondition(), and ReadVariables().