16 #define PLUTO_VERSION "4.4-patch2" 39 #define UNIFORM_GRID 1 40 #define STRETCHED_GRID 2 41 #define LOGARITHMIC_INC_GRID 3 42 #define LOGARITHMIC_DEC_GRID 4 56 #define CHOMBO_REGRID 3 62 #define CHARACTERISTIC_TRACING 3 66 #define EXP_MIDPOINT 9 67 #define SEMI_IMPLICIT 10 68 #define RK_MIDPOINT 11 72 #define SUPER_TIME_STEPPING 2 73 #define RK_CHEBYSHEV 4 83 #define DBL_H5_OUTPUT 4 84 #define FLT_H5_OUTPUT 5 89 #define PARTICLES_DBL_OUTPUT 9 90 #define PARTICLES_FLT_OUTPUT 10 91 #define PARTICLES_VTK_OUTPUT 11 92 #define PARTICLES_TAB_OUTPUT 12 93 #define PARTICLES_HDF5_OUTPUT 13 97 #define MAX_OUTPUT_TYPES 16 99 #define MAX_OUTPUT_VARS 64 117 #define PARTICLES_LP 1 118 #define PARTICLES_CR 2 119 #define PARTICLES_DUST 3 129 #define CR_TRANSPORT 7 136 #define EIGHT_WAVES 1 137 #define DIV_CLEANING 2 138 #define CONSTRAINED_TRANSPORT 3 151 #define AXISYMMETRIC 3 152 #define EQTSYMMETRIC 4 197 #define FLAG_MINMOD 1 200 #define FLAG_ENTROPY 8 201 #define FLAG_SPLIT_CELL 16 203 #define FLAG_INTERNAL_BOUNDARY 32 206 #define FLAG_CONS2PRIM_FAIL 64 207 #define FLAG_NEGATIVE_PRESSURE 128 208 #define FLAG_NEGATIVE_ENERGY 256 209 #define FLAG_NEGATIVE_DENSITY 512 210 #define FLAG_BIT_11 1024 211 #define FLAG_BIT_12 2048 212 #define FLAG_BIT_13 4096 213 #define FLAG_BIT_14 8192 214 #define FLAG_BIT_15 16384 215 #define FLAG_GCA_FAILURE 32768 234 #define CELL_CENTER 50 235 #define FACE_CENTER 51 236 #define EDGE_CENTER 52 268 #define MINMOD_LIM 22 269 #define VANALBADA_LIM 23 272 #define VANLEER_LIM 26 274 #define FOURTH_ORDER_LIM 28 282 #define CONST_AH 1.008 283 #define CONST_AHe 4.004 284 #define CONST_AZ 30.0 285 #define CONST_amu 1.66053886e-24 286 #define CONST_au 1.49597892e13 287 #define CONST_c 2.99792458e10 288 #define CONST_e 4.80320425e-10 289 #define CONST_eV 1.602176463158e-12 290 #define CONST_G 6.6726e-8 291 #define CONST_h 6.62606876e-27 292 #define CONST_kB 1.3806505e-16 293 #define CONST_ly 0.9461e18 294 #define CONST_mp 1.67262171e-24 295 #define CONST_mn 1.67492728e-24 296 #define CONST_me 9.1093826e-28 297 #define CONST_mH 1.6733e-24 298 #define CONST_Msun 2.e33 299 #define CONST_Mearth 5.9736e27 300 #define CONST_NA 6.0221367e23 301 #define CONST_pc 3.0856775807e18 302 #define CONST_PI 3.14159265358979 303 #define CONST_Rearth 6.378136e8 304 #define CONST_Rgas 8.3144598e7 305 #define CONST_Rsun 6.96e10 306 #define CONST_sigma 5.67051e-5 307 #define CONST_sigmaT 6.6524e-25 314 #include "definitions.h" 323 #ifndef AMBIPOLAR_DIFFUSION 324 #define AMBIPOLAR_DIFFUSION NO 327 #ifndef ASSIGN_VECTOR_POTENTIAL 328 #define ASSIGN_VECTOR_POTENTIAL NO 331 #ifndef BACKGROUND_FIELD 332 #define BACKGROUND_FIELD NO 335 #ifndef CHAR_LIMITING 336 #define CHAR_LIMITING NO 343 #define CHOMBO_LOGR NO 357 #ifndef CHOMBO_CONS_AM 358 #if (GEOMETRY == CYLINDRICAL) && (ENTROPY_SWITCH) 359 #define CHOMBO_CONS_AM YES 360 #elif (GEOMETRY == SPHERICAL) && (ENTROPY_SWITCH) 361 #define CHOMBO_CONS_AM YES 362 #elif (GEOMETRY == POLAR) && (ENTROPY_SWITCH) 363 #define CHOMBO_CONS_AM YES 365 #define CHOMBO_CONS_AM NO 369 #if CHOMBO_CONS_AM == YES 377 #define DUST_FLUID NO 381 #define ENABLE_HLLEM NO 384 #ifndef ENTROPY_SWITCH 385 #define ENTROPY_SWITCH NO 400 #ifndef INITIAL_SMOOTHING 401 #define INITIAL_SMOOTHING NO 405 #ifndef INTERNAL_BOUNDARY 406 #define INTERNAL_BOUNDARY NO 409 #ifndef INTERNAL_BOUNDARY_REFLECT 410 #define INTERNAL_BOUNDARY_REFLECT NO 414 #define LIMITER DEFAULT 417 #ifndef MULTIPLE_LOG_FILES 418 #define MULTIPLE_LOG_FILES NO 422 #define NGHOST_USR -1 426 #ifndef RECONSTRUCT_4VEL 427 #define RECONSTRUCT_4VEL NO 433 #define RESISTIVITY NO 437 #define RING_AVERAGE NO 440 #ifndef RING_AVERAGE_REC 442 #define RING_AVERAGE_REC 5 444 #define RING_AVERAGE_REC 1 448 #ifndef ROTATING_FRAME 449 #define ROTATING_FRAME NO 452 #ifndef SHOCK_FLATTENING 453 #define SHOCK_FLATTENING NO 457 #define SHOW_TIMING NO 460 #ifndef TIME_STEP_CONTROL 461 #define TIME_STEP_CONTROL NO 464 #ifndef THERMAL_CONDUCTION 465 #define THERMAL_CONDUCTION NO 469 #define UNIT_DENSITY (CONST_mp) 473 #define UNIT_LENGTH (CONST_au) 476 #ifndef UNIT_VELOCITY 477 #if (PHYSICS == RHD) || (PHYSICS == RMHD) || (PHYSICS == ResRMHD) 478 #define UNIT_VELOCITY (CONST_c) 480 #define UNIT_VELOCITY (1.e5) 484 #ifndef UPDATE_VECTOR_POTENTIAL 485 #define UPDATE_VECTOR_POTENTIAL NO 496 #ifndef WARNING_MESSAGES 497 #define WARNING_MESSAGES YES 504 #if (EOS == IDEAL) || (EOS == PVTE_LAW) || (EOS == TAUB) 505 #define HAVE_ENERGY YES 507 #define HAVE_ENERGY NO 513 #define KELVIN (UNIT_VELOCITY*UNIT_VELOCITY*CONST_amu/CONST_kB) 522 #ifndef CHECK_DIVB_CONDITION 523 #define CHECK_DIVB_CONDITION NO 530 #ifndef CHECK_EIGENVECTORS 531 #define CHECK_EIGENVECTORS NO 542 #if (TIME_STEPPING == HANCOCK) || (TIME_STEPPING == CHARACTERISTIC_TRACING) 548 #if TIME_STEPPING == HANCOCK 549 #ifndef PRIMITIVE_HANCOCK 550 #if (PHYSICS == MHD) && (PARTICLES == PARTICLES_CR) 551 #define PRIMITIVE_HANCOCK NO 552 #elif (PHYSICS == RMHD) || (PHYSICS == ResRMHD) 553 #define PRIMITIVE_HANCOCK NO 555 #define PRIMITIVE_HANCOCK YES 577 #if PHYSICS == HD || PHYSICS == MHD 578 #define PARABOLIC_FLUX (RESISTIVITY|THERMAL_CONDUCTION|VISCOSITY) 580 #define PARABOLIC_FLUX NO 603 typedef void Riemann_Solver (
const Sweep *,
int,
int,
double *,
Grid *);
604 typedef void Limiter (
double *,
double *,
double *,
int,
int,
Grid *);
605 typedef double Reconstruct (
double *,
double,
int);
606 typedef double ****Data_Arr;
612 #include "mod_defs.h" 647 #define H_MASS_FRAC 0.737743792120194 649 #define H_MASS_FRAC 0.7110 654 #if (EOS == PVTE_LAW) && (COOLING == NO) 655 #define He_MASS_FRAC (1 - H_MASS_FRAC) 657 #elif COOLING == SNEq 658 #define He_MASS_FRAC (0.082*CONST_AHe*H_MASS_FRAC/CONST_AH) 660 #define He_MASS_FRAC 0.2741 671 #define Z_MASS_FRAC (1.0 - H_MASS_FRAC - He_MASS_FRAC) 672 #define FRAC_He (He_MASS_FRAC/CONST_AHe*CONST_AH/H_MASS_FRAC) 673 #define FRAC_Z (Z_MASS_FRAC /CONST_AZ *CONST_AH/H_MASS_FRAC) 690 #define NSCL (NTRACER + NIONS + (ENTROPY_SWITCH != 0)) 694 #define TRC (NFLX + NIONS) 696 #define ENTR (TRC + NTRACER) 729 #define NFLX_LOOP(n) for ((n) = NFLX; (n)--; ) 730 #define NIONS_LOOP(n) for ((n) = NFLX; (n) < (NFLX+NIONS); (n)++) 731 #define NTRACER_LOOP(n) for ((n) = TRC; (n) < (TRC+NTRACER); (n)++) 732 #define NSCL_LOOP(n) for ((n) = NFLX; (n) < (NFLX+NSCL); (n)++) 734 #if DUST_FLUID == YES 737 #define NDUST_FLUID 0 739 #define NVAR (NFLX + NSCL + NDUST_FLUID) 741 #define NVAR_LOOP(n) for ((n) = NVAR; (n)--; ) 751 #define FORCED_TURB NO 752 #if FORCED_TURB == YES 753 #include "Forced_Turb/forced_turb.h" 760 #if (PARTICLES != NO) 768 #if THERMAL_CONDUCTION != NO 773 #include "Viscosity/viscosity.h" 777 #if RECONSTRUCTION == PARABOLIC 778 #include "States/ppm_coeffs.h" 786 #if DUST_FLUID == YES 787 #define IF_DUST_FLUID(a) a 789 #define IF_DUST_FLUID(a) 793 #define IF_ENERGY(a) a 798 #if (defined FARGO) && (!defined SHEARINGBOX) 799 #define IF_FARGO(a) a 804 #if ROTATING_FRAME == YES 805 #define IF_ROTATING_FRAME(a) a 807 #define IF_ROTATING_FRAME(a) 817 #include "prototypes.h" 828 extern int SZ_uint16_t;
830 extern int SZ_Float_Vect;
840 extern int VXn, VXt, VXb;
841 extern int MXn, MXt, MXb;
842 extern int BXn, BXt, BXb;
843 extern int EXn, EXt, EXb;
844 #if DUST_FLUID == YES 845 extern int VXn_D, VXt_D, VXb_D;
846 extern int MXn_D, MXt_D, MXb_D;
849 extern int FRn, FRt, FRb;
870 extern double g_OmegaZ;
877 extern double g_gamma;
878 #elif EOS == ISOTHERMAL 879 extern double g_isoSoundSpeed;
883 extern double g_absorptionCoeff;
884 extern double g_scatteringCoeff;
885 extern double g_radiationConst;
886 extern double g_idealGasConst;
887 extern double g_totalOpacity;
891 extern double glm_ch_max, glm_ch_max_loc, g_coeff_dl_min;
892 extern double g_level_dx;
893 extern double g_x2stretch, g_x3stretch;
894 extern int glm_is_defined;
895 #if GEOMETRY == CARTESIAN 896 extern double g_stretch_fact;
909 #define NX1_MAX NMAX_POINT 913 #elif DIMENSIONS == 2 914 #define NX2_MAX NMAX_POINT 917 #define NX2_MAX NMAX_POINT 918 #define NX3_MAX NMAX_POINT 923 #define NX1_MAX NX1_TOT 924 #define NX2_MAX NX2_TOT 925 #define NX3_MAX NX3_TOT Header file for Hall MHD.
long int JEND
Definition: globals.h:42
long int NX1_TOT
Definition: globals.h:56
long int NMAX_POINT
Definition: globals.h:63
int g_maxIMEXIter
Definition: globals.h:109
PLUTO header file for structure declarations.
double g_time
Definition: globals.h:132
long int IEND
Definition: globals.h:38
long int KBEG
Definition: globals.h:44
Set labels, indexes and prototypes for the dust module.
int g_k
Definition: globals.h:90
Particle module header file.
int prank
Definition: globals.h:34
long int NX1
Definition: globals.h:49
double g_maxCoolingRate
Definition: globals.h:104
Definition: structs.h:124
double g_domEnd[3]
Definition: globals.h:141
long int JBEG
Definition: globals.h:40
double g_minCoolingTemp
Definition: globals.h:106
int g_intStage
Definition: globals.h:101
PLUTO header file for function-like macros.
int g_j
Definition: globals.h:89
ArrayLib main header file.
int g_maxRiemannIter
Definition: globals.h:110
int g_maxRootIter
Definition: globals.h:112
long int NX2_TOT
Definition: globals.h:58
double g_maxMach
Definition: globals.h:134
long int NX3_TOT
Definition: globals.h:60
Cooling main header file.
double g_smallPressure
Definition: globals.h:116
long int NX3
Definition: globals.h:53
long int KEND
Definition: globals.h:46
long int g_usedMemory
Definition: globals.h:133
int g_dir
Definition: globals.h:92
double g_inputParam[32]
Definition: globals.h:146
double g_domBeg[3]
Definition: globals.h:140
Shearing-Box module header file.
double g_smallDensity
Definition: globals.h:115
FARGO-MHD module header file.
int g_nprocs
Definition: globals.h:113
Reconstruction coefficients header file.
int d_indent
Definition: globals.h:169
Thermal conduction (TC) module header file.
int g_i
Definition: globals.h:88
int d_condition
Definition: globals.h:170
long int g_stepNumber
Definition: globals.h:131
long int NX2
Definition: globals.h:51
Definition: structs.h:289
double g_dt
Definition: globals.h:99
long int IBEG
Definition: globals.h:36