The FARGO_THORIN code developer's guide
 All Data Structures Files Functions Variables Typedefs Macros
var.c
Go to the documentation of this file.
1 /** \file var.c
2 
3 Contains the function that connects the string of the parameter file to global variables.
4 The var() function is found in Interpret.c
5 
6 @author THORIN modifications by
7 Ondřej Chrenko <chrenko@sirrah.troja.mff.cuni.cz>, Copyright (C) 2017;
8 original code by Frédéric Masset
9 
10 */
11 
12 #define __LOCAL
13 #include "fargo.h"
14 #undef __LOCAL
15 
16 void
18 {
19  var("DT", &DT, REAL, YES, "1.");
20  var("SIGMA0", &SIGMA0, REAL, YES, "173.");
21  var("NINTERM", &NINTERM, INT, YES, "10.");
22  var("NTOT", &NTOT, INT, YES, "1501.");
23  var("OUTPUTDIR", OUTPUTDIR, STRING, YES, "~masset");
24  var("INNERBOUNDARY", OPENINNERBOUNDARY, STRING, NO, "WALL");
25  var("LABELADVECTION", ADVLABEL, STRING, NO, "NO");
26  var("TRANSPORT", TRANSPORT, STRING, NO, "FAST");
27  var("PLANETCONFIG", PLANETCONFIG, STRING, NO, "Systems/SolarSystem.cfg");
28  var("MASSTAPER", &MASSTAPER, REAL, NO, "0.0000001");
29  var("RADIALSPACING", GRIDSPACING, STRING, NO, "ARITHMETIC");
30  var("NRAD", &NRAD, INT, YES, "64.0");
31  var("NSEC", &NSEC, INT, YES, "64.0");
32  var("RMIN", &RMIN, REAL, YES, "1.0");
33  var("RMAX", &RMAX, REAL, YES, "1.0");
34  var("THICKNESSSMOOTHING", &THICKNESSSMOOTHING, REAL, NO, "0.0");
35  var("ROCHESMOOTHING", &ROCHESMOOTHING, REAL, NO, "0.0");
36  var("ASPECTRATIO", &ASPECTRATIO, REAL, YES, "0.05");
37  var("VISCOSITY", &VISCOSITY, REAL, NO, "0.0");
38  var("ALPHAVISCOSITY", &ALPHAVISCOSITY, REAL, NO, "0.0");
39  var("SIGMASLOPE", &SIGMASLOPE, REAL, YES, "0.0");
40  var("RELEASERADIUS", &RELEASERADIUS, REAL, NO, "0.0");
41  var("RELEASEDATE", &RELEASEDATE, REAL, NO, "0.0");
42  var("OMEGAFRAME", &OMEGAFRAME, REAL, NO, "0.0");
43  var("DISK", DISK, STRING, NO, "YES");
44  var("FRAME", FRAME, STRING, NO, "FIXED");
45  var("OUTERSOURCEMASS", OUTERSOURCEMASS, STRING, NO, "NO");
46  var("WRITEDENSITY", WRITEDENSITY, STRING, NO, "YES");
47  var("WRITEVELOCITY", WRITEVELOCITY, STRING, NO, "YES");
48  var("INDIRECTTERM", INDIRECTTERM, STRING, NO, "YES");
49  var("EXCLUDEHILL", EXCLUDEHILL, STRING, NO, "NO");
50  var("IMPOSEDDISKDRIFT", &IMPOSEDDISKDRIFT, REAL, NO, "0.0");
51  var("FLARINGINDEX", &FLARINGINDEX, REAL, NO, "0.0");
52  var("ECCENTRICITY", &ECCENTRICITY, REAL, NO, "0.0");
53  var("CAVITYRADIUS", &CAVITYRADIUS, REAL, NO, "0.0");
54  var("CAVITYRATIO", &CAVITYRATIO, REAL, NO, "1.0");
55  var("CAVITYWIDTH", &CAVITYWIDTH, REAL, NO, "1.0");
56  var("TRANSITIONRADIUS", &TRANSITIONRADIUS, REAL, NO, "0.0");
57  var("TRANSITIONRATIO", &TRANSITIONRATIO, REAL, NO, "1.0");
58  var("TRANSITIONWIDTH", &TRANSITIONWIDTH, REAL, NO, "1.0");
59  var("LAMBDADOUBLING", &LAMBDADOUBLING, REAL, NO, "0.0");
60 /* #THORIN: new params assoc.w. energy eq. implementation */
61  var("ENERGYEQUATION", ENERGYEQUATION, STRING, NO, "NO");
62  var("WRITETEMPERATURE", WRITETEMPERATURE, STRING, NO, "NO");
63  var("WRITEENERGY", WRITEENERGY, STRING, NO, "NO");
64  var("WRITEDIVV", WRITEDIVV, STRING, NO, "NO");
65  var("WRITEQPLUS", WRITEQPLUS, STRING, NO, "NO");
66  var("WRITEQBALANCE", WRITEQBALANCE, STRING, NO, "NO");
67  var("ADIABIND", &ADIABIND, REAL, NO, "1.4");
68  var("COOLINGTIME", &COOLINGTIME, REAL, NO, "-1.0");
69  var("STELLARIRRADIATION", STELLARIRRADIATION, STRING, NO, "NO");
70  var("OPACITYDROP", &OPACITYDROP, REAL, NO, "0.6");
71  var("EFFECTIVETEMPERATURE", &EFFECTIVETEMPERATURE, REAL, NO, "5656.0");
72  var("STELLARRADIUS", &STELLARRADIUS, REAL, NO, "3.0");
73  var("DISCALBEDO", &DISCALBEDO, REAL, NO, "0.5");
74  var("PARAMETRICOPACITY", &PARAMETRICOPACITY, REAL, NO, "0.0");
75 /* #THORIN: a new initialisation option */
76  var("INITIALIZEFROMFILE", INITIALIZEFROMFILE, STRING, NO, "NO");
77  var("DENSINFILE", DENSINFILE, STRING, NO, "in/gasdens.cfg");
78  var("VRADINFILE", VRADINFILE, STRING, NO, "in/gasvrad.cfg");
79  var("VTHETAINFILE", VTHETAINFILE, STRING, NO, "in/gasvtheta.cfg");
80  var("TEMPERINFILE", TEMPERINFILE, STRING, NO, "in/gastemper.cfg");
81 /* #THORIN: setup of the damping boundary condition */
82  var("DAMPTOWARDS", DAMPTOWARDS, STRING, NO, "ZEROVRAD");
83  var("DAMPINGRMINFRAC", &DAMPINGRMINFRAC, REAL, NO, "1.25");
84  var("DAMPINGRMAXFRAC", &DAMPINGRMAXFRAC, REAL, NO, "0.84");
85  var("DAMPINGPERIODFRAC", &DAMPINGPERIODFRAC, REAL, NO, "1.0");
86 /* #THORIN: new params assoc.w. the REBOUND code implementation */
87  var("NOUTELEMENTS", &NOUTELEMENTS, INT, NO, "1");
88  var("PLANETARYDENSITY", &PLANETARYDENSITY, REAL, NO, "1.0");
89  var("RESOLVECOLLISIONS", RESOLVECOLLISIONS, STRING, NO, "NO");
90  var("TARGETNPL", &TARGETNPL, INT, NO, "-1.0");
91  var("IAS15PRECISSION", &IAS15PRECISSION, REAL, NO, "1.e-9");
92  var("IAS15MINDT", &IAS15MINDT, REAL, NO, "0.0");
93 /* #THORIN: disc-planet interaction control */
94  var("WRITETORQUEFILES", WRITETORQUEFILES, STRING, NO, "YES");
95  var("HILLCUT", &HILLCUT, REAL, NO, "0.8");
96  var("VERTICALDAMPING", &VERTICALDAMPING, REAL, NO, "0.1");
97  var("PLANETSFEELDISK", PLANETSFEELDISK, STRING, NO, "NO");
98  var("ACCRETIONRATE", &ACCRETIONRATE, REAL, NO, "0.0");
99 /* #THORIN: new params assoc.w. pebble accretion */
100  var("PEBBLEACCRETION", PEBBLEACCRETION, STRING, NO, "NO");
101  var("BACKREACTION", BACKREACTION, STRING, NO, "NO");
102  var("ACCRETIONALHEATING", ACCRETIONALHEATING, STRING, NO, "NO");
103  var("WRITEETA", WRITEETA, STRING, NO, "NO");
104  var("PEBBLEFLUX", &PEBBLEFLUX, REAL, NO, "2.0e-4");
105  var("PEBBLEALPHA", &PEBBLEALPHA, REAL, NO, "1.0e-4");
106  var("PEBBLECOAGULATION", &PEBBLECOAGULATION, REAL, NO, "0.5");
107  var("PEBBLEBULKDENS", &PEBBLEBULKDENS, REAL, NO, "1.0");
108  var("SCHMIDTNUMBER", &SCHMIDTNUMBER, REAL, NO, "1.0");
109  var("PARTICLEDIFFUSION", PARTICLEDIFFUSION, STRING, NO, "NO");
110  var("HEATINGDELAY", &HEATINGDELAY, INT, NO, "100");
111 /* #THORIN: tools */
112  var("PARAMETRICACCRETION", &PARAMETRICACCRETION, REAL, NO, "0.0");
113  var("TORQUEMAPINFILE", TORQUEMAPINFILE, STRING, NO, "NO");
114  var("GETTORQUEFORPLANET", &GETTORQUEFORPLANET, INT, NO, "-1");
115 }
116 
int TARGETNPL
Definition: param_noex.h:74
real DAMPINGRMAXFRAC
Definition: param_noex.h:69
real PEBBLEFLUX
Definition: param_noex.h:86
real RELEASEDATE
Definition: param_noex.h:29
int HEATINGDELAY
Definition: param_noex.h:92
real MASSTAPER
Definition: param_noex.h:16
real SIGMASLOPE
Definition: param_noex.h:27
real CAVITYWIDTH
Definition: param_noex.h:43
real TRANSITIONWIDTH
Definition: param_noex.h:46
real DAMPINGPERIODFRAC
Definition: param_noex.h:70
real SCHMIDTNUMBER
Definition: param_noex.h:90
real PLANETARYDENSITY
Definition: param_noex.h:72
#define YES
Definition: types.h:46
#define REAL
Definition: types.h:48
real EFFECTIVETEMPERATURE
Definition: param_noex.h:58
real DT
Definition: param_noex.h:7
char WRITEQBALANCE[512]
Definition: param_noex.h:53
char PLANETCONFIG[512]
Definition: param_noex.h:15
char TORQUEMAPINFILE[512]
Definition: param_noex.h:94
char OUTPUTDIR[512]
Definition: param_noex.h:11
real STELLARRADIUS
Definition: param_noex.h:59
int NINTERM
Definition: param_noex.h:9
char WRITEDENSITY[512]
Definition: param_noex.h:34
char WRITETEMPERATURE[512]
Definition: param_noex.h:49
char TRANSPORT[512]
Definition: param_noex.h:14
char WRITEENERGY[512]
Definition: param_noex.h:50
char INDIRECTTERM[512]
Definition: param_noex.h:36
char WRITETORQUEFILES[512]
Definition: param_noex.h:77
real DISCALBEDO
Definition: param_noex.h:60
real PARAMETRICOPACITY
Definition: param_noex.h:61
char GRIDSPACING[512]
Definition: param_noex.h:17
char PEBBLEACCRETION[512]
Definition: param_noex.h:82
char WRITEVELOCITY[512]
Definition: param_noex.h:35
char PLANETSFEELDISK[512]
Definition: param_noex.h:80
real OMEGAFRAME
Definition: param_noex.h:30
char VTHETAINFILE[512]
Definition: param_noex.h:65
real ALPHAVISCOSITY
Definition: param_noex.h:26
real CAVITYRATIO
Definition: param_noex.h:42
char DENSINFILE[512]
Definition: param_noex.h:63
char ENERGYEQUATION[512]
Definition: param_noex.h:48
real THICKNESSSMOOTHING
Definition: param_noex.h:22
void InitVariables()
Definition: var.c:17
real PEBBLEBULKDENS
Definition: param_noex.h:89
real RELEASERADIUS
Definition: param_noex.h:28
char RESOLVECOLLISIONS[512]
Definition: param_noex.h:73
char ACCRETIONALHEATING[512]
Definition: param_noex.h:84
char TEMPERINFILE[512]
Definition: param_noex.h:66
real OPACITYDROP
Definition: param_noex.h:57
real ROCHESMOOTHING
Definition: param_noex.h:23
real VISCOSITY
Definition: param_noex.h:25
char OUTERSOURCEMASS[512]
Definition: param_noex.h:33
char WRITEQPLUS[512]
Definition: param_noex.h:52
real FLARINGINDEX
Definition: param_noex.h:39
char DISK[512]
Definition: param_noex.h:31
char INITIALIZEFROMFILE[512]
Definition: param_noex.h:62
char STELLARIRRADIATION[512]
Definition: param_noex.h:56
char WRITEDIVV[512]
Definition: param_noex.h:51
char DAMPTOWARDS[512]
Definition: param_noex.h:67
real ECCENTRICITY
Definition: param_noex.h:40
#define INT
Definition: types.h:49
real ACCRETIONRATE
Definition: param_noex.h:81
real VERTICALDAMPING
Definition: param_noex.h:79
int NSEC
Definition: param_noex.h:19
char BACKREACTION[512]
Definition: param_noex.h:83
int NOUTELEMENTS
Definition: param_noex.h:71
real IAS15MINDT
Definition: param_noex.h:76
real RMIN
Definition: param_noex.h:20
real DAMPINGRMINFRAC
Definition: param_noex.h:68
void var(char *name, char *ptr, int type, int necessary, char *deflt)
Definition: Interpret.c:34
real ASPECTRATIO
Definition: param_noex.h:24
char WRITEETA[512]
Definition: param_noex.h:85
char FRAME[512]
Definition: param_noex.h:32
#define NO
Definition: types.h:47
real RMAX
Definition: param_noex.h:21
char OPENINNERBOUNDARY[512]
Definition: param_noex.h:12
int GETTORQUEFORPLANET
Definition: param_noex.h:95
real ADIABIND
Definition: param_noex.h:54
int NRAD
Definition: param_noex.h:18
real IAS15PRECISSION
Definition: param_noex.h:75
real TRANSITIONRATIO
Definition: param_noex.h:45
char ADVLABEL[512]
Definition: param_noex.h:13
Contains all the include directives requested by the code.
real IMPOSEDDISKDRIFT
Definition: param_noex.h:38
real SIGMA0
Definition: param_noex.h:8
real LAMBDADOUBLING
Definition: param_noex.h:47
real TRANSITIONRADIUS
Definition: param_noex.h:44
real CAVITYRADIUS
Definition: param_noex.h:41
char EXCLUDEHILL[512]
Definition: param_noex.h:37
real PARAMETRICACCRETION
Definition: param_noex.h:93
real HILLCUT
Definition: param_noex.h:78
real COOLINGTIME
Definition: param_noex.h:55
real PEBBLECOAGULATION
Definition: param_noex.h:88
int NTOT
Definition: param_noex.h:10
char VRADINFILE[512]
Definition: param_noex.h:64
char PARTICLEDIFFUSION[512]
Definition: param_noex.h:91
real PEBBLEALPHA
Definition: param_noex.h:87
#define STRING
Definition: types.h:50