Permalink
Browse files

Update for operator-split cooling term. Added configure option --enab…

…le-cooling. Added units.c to specify unit system and ode integrator in utils.c. Added problem generator and input file for thermal instability test. Note that 3D VL integrator requires CourNo<1/3 with this.
  • Loading branch information...
kimcg
kimcg committed Jan 7, 2014
1 parent 9571b0c commit 2dbd8814494082ca115f084783bba43ed231bad2
View
@@ -11,7 +11,7 @@
#
#------------------- macro definitions ---------------------------------------
MACHINE = default
MACHINE = antares
#------------------- default definitions -------------------------------------
@@ -55,6 +55,19 @@ ifeq ($(MACHINE),ophir)
FFTWLIB = -L/scr1/lemaster/fftw-3.1.2/lib -lfftw3
FFTWINC = -I/scr1/lemaster/fftw-3.1.2/include
else
ifeq ($(MACHINE),antares)
CC = icc
LDR = icc
ifeq (@MPI_MODE@,MPI_PARALLEL)
CC = /usr/peyton/openmpi/bin/mpicc
LDR = /usr/peyton/openmpi/bin/mpicc
endif
OPT = -O3 -g
MPIINC = -I/usr/peyton/openmpi/include
MPILIB = -L/usr/peyton/openmpi/lib -lmpi
FFTWLIB = -L/usr/local/fftw/gcc/3.3.3/lib64 -lfftw3
FFTWINC = -I/usr/local/fftw/gcc/3.3.3/include
else
ifeq ($(MACHINE),peyton-mpi)
CC = /usr/peyton/openmpi/bin/mpicc
LDR = /usr/peyton/openmpi/bin/mpicc
@@ -104,6 +117,7 @@ endif
endif
endif
endif
endif
ifeq (@MPI_MODE@,NO_MPI_PARALLEL)
MPIINC =
View
@@ -201,6 +201,22 @@ else
AC_MSG_ERROR([expected --with-coord=cartesian or cylindrical])
fi
#-------------------------------------------------------------------------------
# PHYSICS FEATURE: cooling
# --enable-cooling
AC_SUBST(COOLING_MODE)
AC_ARG_ENABLE(cooling,
[--enable-cooling enable implicit cooling (default is no)],
coolingok=$enableval, coolingok=no)
if test "$coolingok" = "yes"; then
COOLING_MODE="OPERATOR_SPLIT_COOLING"
COOLING_MODE_USER="ON"
else
COOLING_MODE="NO_COOLING"
COOLING_MODE_USER="OFF"
fi
#-------------------------------------------------------------------------------
# PHYSICS FEATURE: explicit thermal conduction
# --enable-conduction
@@ -625,6 +641,7 @@ fi
echo "Resistivity: $RESISTIVITY_MODE_USER"
echo "Viscosity: $VISCOSITY_MODE_USER"
echo "Thermal conduction: $CONDUCTION_MODE_USER"
echo "Cooling: $COOLING_MODE_USER"
echo "Particles: $PARTICLES_USER"
echo "Special Relativity: $SPECIAL_RELATIVITY_MODE_USER"
echo ""
View
@@ -35,6 +35,7 @@ CORE_OBJ = ath_array.o \
restart.o \
show_config.o \
smr.o \
units.o \
utils.o
FFT_OBJ =
@@ -74,6 +75,8 @@ GRAVITY_OBJ = gravity/bvals_grav.o \
MICROPHYS_OBJ = microphysics/conduction.o \
microphysics/cool.o \
microphysics/integrate_diffusion.o \
microphysics/integrate_cooling.o \
microphysics/cool_solver.o \
microphysics/get_eta.o \
microphysics/new_dt_diff.o \
microphysics/resistivity.o \
View
@@ -174,6 +174,34 @@ typedef struct Prim1D_s{
#endif
}Prim1DS;
/*----------------------------------------------------------------------------*/
/* UnitS: Code units and physical constants in the code units
* */
typedef struct Unit_S{
Real cm;
Real g;
Real s;
Real K;
Real Lcode;
Real Mcode;
Real Tcode;
Real Vcode;
Real Dcode;
Real dyne;
Real erg;
Real G;
Real Msun;
Real Lsun;
Real Myr;
Real pc;
Real kpc;
Real kms;
Real mH;
Real aR;
Real kB;
Real c;
}UnitS;
/*----------------------------------------------------------------------------*/
/*! \struct GrainS
* \brief Basic quantities for one pseudo-particle.
@@ -322,6 +350,11 @@ typedef struct Grid_s{
Real *r,*ri; /*!< cylindrical scaling factors */
#endif /* CYLINDRICAL */
#ifdef OPERATOR_SPLIT_COOLING
Real heat_ratio,heat0;
UnitS units;
#endif
}GridS;
/*! \fn void (*VGFun_t)(GridS *pG)
View
@@ -52,6 +52,9 @@
#define @PARTICLES_ALGORITHM@
#define @FEEDBACK_DEFINE@
/* implicit cooling */
#define @COOLING_MODE@
/* resistivity, viscosity, and thermal conduction */
#define @RESISTIVITY_MODE@
#define @VISCOSITY_MODE@
@@ -144,6 +147,7 @@ enum {
#endif
#define SIGN(a) ( ((a) < 0.) ? -1. : 1. )
#define SQR(x) ( (x)*(x) )
#define CUBE(x) ( (x)*(x)*(x) )
#define STR(x) #x
#define SQRT2 1.4142135623730951
#define ONE_OVER_SQRT2 0.7071067811865475
Oops, something went wrong.

0 comments on commit 2dbd881

Please sign in to comment.