Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kinetic model option causes compilation error when compiling HYDRAD #72

Open
wtbarnes opened this issue Jun 3, 2020 · 1 comment
Open
Labels
bug compilation Issues or bugs related to compiling HYDRAD and/or the initial conditions code

Comments

@wtbarnes
Copy link
Member

wtbarnes commented Jun 3, 2020

Using the USE_KINETIC_MODEL preprocessor directive yields the following error when compiling HYDRAD.exe,

../source/eqns.cpp:2943:10: error: use of undeclared identifier 'iNumCells'
iIndex = iNumCells-2;
         ^
../source/eqns.cpp:2951:10: error: use of undeclared identifier 'iNumCells'
iIndex = iNumCells-1;
         ^
../source/eqns.cpp:2970:23: error: use of undeclared identifier 'iNumCells'
for( iIndex=2; iIndex<iNumCells; iIndex++ )
                      ^
../source/eqns.cpp:2998:10: error: use of undeclared identifier 'iNumCells'
iIndex = iNumCells-2;
         ^
../source/eqns.cpp:3003:13: error: use of undeclared identifier 'iNumCells'
for( iIndex=iNumCells-3; iIndex>=0; iIndex-- )
            ^
../source/eqns.cpp:3033:23: error: use of undeclared identifier 'iNumCells'
for( iIndex=2; iIndex<iNumCells-2; iIndex++ )
                      ^
6 errors generated.

For reference, this is what the HYDRAD/source/config.h file looks like,

// ****
// *
// * #defines for configuring the hydrodynamic model
// *
// * (c) Dr. Stephen J. Bradshaw
// *
// * Source code generated by pydrad on 2020-06-03_18.15.50 UTC
// *
// ****

// **** Output ****
#define WRITE_FILE_PHYSICAL
#define WRITE_FILE_ION_POPULATIONS
#define WRITE_FILE_HSTATE
#define WRITE_FILE_SCALES
#define WRITE_FILE_TERMS
#define OUTPUT_EVERY_N_TIME_STEPS 1000
// **** End of Output ****

// **** Physics ****
#include "../../Heating_Model/source/config.h"
#include "../../Radiation_Model/source/config.h"
#define HEAT_FLUX_LIMITING_COEFFICIENT 0.167
#define TIME_STEP_LIMIT 1e-10
#define USE_KINETIC_MODEL
#include "collisions.h"


// **** End of Physics ****

// **** Solver ****

#define SAFETY_RADIATION 0.1
#define SAFETY_CONDUCTION 1.0
#define SAFETY_ADVECTION 1.0
#define SAFETY_VISCOSITY 1.0
#define TIME_STEP_INCREASE_LIMIT 1.05

#define MINIMUM_RADIATION_TEMPERATURE 20000.0
#define ZERO_OVER_TEMPERATURE_INTERVAL 500.0
#define MINIMUM_TEMPERATURE 10000.0

// **** End of Solver ****

// **** Grid ****
#define MAX_REFINEMENT_LEVEL 12
#define ADAPT
#define ADAPT_EVERY_N_TIME_STEPS 1000
#define REFINE_ON_DENSITY
#define REFINE_ON_ELECTRON_ENERGY
#define REFINE_ON_HYDROGEN_ENERGY
#define MIN_FRAC_DIFF 0.05
#define MAX_FRAC_DIFF 0.1
#define LINEAR_RESTRICTION
#define ENFORCE_CONSERVATION
// **** End of Grid ****
@wtbarnes wtbarnes added bug compilation Issues or bugs related to compiling HYDRAD and/or the initial conditions code labels Jun 3, 2020
@wtbarnes
Copy link
Member Author

wtbarnes commented Jun 3, 2020

I don't need the kinetic model for anything. I just figured that this bug should be documented in some way as it has popped up a few times and I get confused by it each time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug compilation Issues or bugs related to compiling HYDRAD and/or the initial conditions code
Projects
None yet
Development

No branches or pull requests

1 participant