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

Calculates the gravitational interactions between the disk and massive bodies in terms of a vertically averaged potential. More...

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

Go to the source code of this file.

Functions

void FillForcesArrays (PolarGrid *Rho, PlanetarySystem *sys)
 Using the vertical averaging procedure of Muller & Kley (2012), calculates the acceleration in planet-disk and star-disk interactions for both gas and pebbles. More...
 
void AdvanceSystemFromDisk (PolarGrid *Rho, PlanetarySystem *sys, real dt)
 Updates the planet velocities due to disk forces. More...
 
real DampingTW04 (PolarGrid *Rho, real m, real x, real y, real z, real vz)
 Artificial vertical force to damp the orbital inclinations using the Tanaka & Ward (2004) prescription (see also Morbidelli et al. More...
 
real ConstructSequence (real *u, real *v, int n)
 
void InitGasDensityEnergy (PolarGrid *Rho, PolarGrid *Energy)
 Part of the initialisation. More...
 
void InitGasVelocity (PolarGrid *Vr, PolarGrid *Vt)
 

Variables

boolean AllowAccretion
 
boolean Corotating
 
boolean Indirect_Term
 
static Pair IndirectTerm
 
static real vt_int [MAX1D]
 
static real vt_cent [MAX1D]
 
boolean DumpTorqueNow
 
boolean DumpTorqueDensNow
 

Detailed Description

Calculates the gravitational interactions between the disk and massive bodies in terms of a vertically averaged potential.

Author
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

The function FillForcesArrays() computes the gravitational acceleration due to planet-disk and star-disk interactions adopting the outline of Muller & Kley (2012). Works both for the gas and pebbles. The indirect terms are included as well as a deep cubic potential with thickness smoothing (see Eq. (37) in Chrenko et al. 2017). There is also a function which provides the inclination damping for 3D planetary orbits.

LICENSE

Copyright (c) 2017 Ondřej Chrenko. See the LICENSE file of the distribution.

Definition in file Pframeforce.c.

Function Documentation

void AdvanceSystemFromDisk ( PolarGrid Rho,
PlanetarySystem sys,
real  dt 
)

Updates the planet velocities due to disk forces.

Also applies the inclination damping.

Definition at line 448 of file Pframeforce.c.

References CPU_Master, CPU_Number, DampingTW04(), DumpTorqueDensNow, DumpTorqueNow, Merge, MPI_Barrier(), MPI_COMM_WORLD, NO, OUTPUTDIR, TimeStep, Torque, UpdateLog(), WriteDiskPolar(), pair::x, pair::y, and YES.

Referenced by AlgoGas().

Here is the call graph for this function:

Here is the caller graph for this function:

real ConstructSequence ( real u,
real v,
int  n 
)

Definition at line 529 of file Pframeforce.c.

Referenced by InitGasVelocity().

Here is the caller graph for this function:

real DampingTW04 ( PolarGrid Rho,
real  m,
real  x,
real  y,
real  z,
real  vz 
)

Artificial vertical force to damp the orbital inclinations using the Tanaka & Ward (2004) prescription (see also Morbidelli et al.

2007, Pierens & Nelson 2008)

Definition at line 495 of file Pframeforce.c.

References CPU_Number, polargrid::Field, Max_or_active, MPI_Allreduce(), MPI_COMM_WORLD, MPI_DOUBLE, MPI_SUM, PI, Rinf, Rsup, SoundSpeed, VERTICALDAMPING, and Zero_or_active.

Referenced by AdvanceSystemFromDisk().

Here is the call graph for this function:

Here is the caller graph for this function:

void FillForcesArrays ( PolarGrid Rho,
PlanetarySystem sys 
)

Using the vertical averaging procedure of Muller & Kley (2012), calculates the acceleration in planet-disk and star-disk interactions for both gas and pebbles.

Definition at line 38 of file Pframeforce.c.

References planetary_system::ax, planetary_system::ay, CellAbscissa, CellOrdinate, ExcludeHill, polargrid::Field, GETTORQUEFORPLANET, GravAccelRad, GravAccelTheta, HILLCUT, Indirect_Term, InvRmed, planetary_system::mass, MassTaper, Max_or_active, MAXPLANETS, MPI_Allreduce(), MPI_COMM_WORLD, MPI_DOUBLE, MPI_SUM, planetary_system::nb, NO, OmegaInv, PEBBLEALPHA, PebbleGravAccelRad, PebbleGravAccelTheta, Pebbles, Rmed, Rmed2, SoundSpeed, SQRT_ADIABIND_INV, StokesNumber, Surf, THICKNESSSMOOTHING, ThicknessSmoothing(), Torque, TorqueDensity, pair::x, planetary_system::x, pair::y, planetary_system::y, YES, planetary_system::z, and Zero_or_active.

Referenced by AlgoGas().

Here is the call graph for this function:

Here is the caller graph for this function:

void InitGasDensityEnergy ( PolarGrid Rho,
PolarGrid Energy 
)

Part of the initialisation.

Definition at line 544 of file Pframeforce.c.

References EnergyMed, and SigmaMed.

Referenced by InitEuler().

Here is the caller graph for this function:

void InitGasVelocity ( PolarGrid Vr,
PolarGrid Vt 
)

Variable Documentation

boolean AllowAccretion
boolean Corotating

Definition at line 30 of file Interpret.c.

boolean DumpTorqueDensNow

Definition at line 21 of file main.c.

Referenced by AdvanceSystemFromDisk(), and main().

boolean DumpTorqueNow

Definition at line 21 of file main.c.

Referenced by AdvanceSystemFromDisk(), and main().

boolean Indirect_Term

Definition at line 31 of file Interpret.c.

Referenced by FillForcesArrays(), and ReadVariables().

Pair IndirectTerm
static

Definition at line 28 of file Pframeforce.c.

real vt_cent[MAX1D]
static

Definition at line 29 of file Pframeforce.c.

Referenced by GasTotalEnergy(), and InitGasVelocity().

real vt_int[MAX1D]
static

Definition at line 29 of file Pframeforce.c.

Referenced by InitGasVelocity().