Skip to content

Commit

Permalink
Finished first working version
Browse files Browse the repository at this point in the history
  • Loading branch information
Schulik committed Oct 15, 2020
1 parent 9cdf180 commit 739bef3
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 13 deletions.
3 changes: 2 additions & 1 deletion aiolos.h
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,9 @@ class hydro_run
double rs_time;
int init_static_atmosphere;
int static_atmosphere_tempprofile;

double gamma_adiabat; //ratio of specific heats
double ggminusone;
//double ggminusone;
double mdot;
double cv;
double const_T;
Expand Down
2 changes: 1 addition & 1 deletion helpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ std::vector<double> np_zeros(int size) {
//
// Return a 1-D array of one, identical to the numpy function
//
std::vector<double> nnp_ones(int size) {
std::vector<double> np_ones(int size) {

return std::vector<double>(size, 1.0) ;
}
Expand Down
29 changes: 18 additions & 11 deletions init_and_bounds.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,16 +123,6 @@ hydro_run::hydro_run(string filename, double debug_) {
//finalplotnumber = 1
solver = 0;

////~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Physical
//
////~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

gamma_adiabat = read_parameter_from_file<double>(filename,"PARI_GAMMA", debug).value; //ratio of specific heats
ggminusone = gamma_adiabat*(gamma_adiabat-1.);
const_T = read_parameter_from_file<double>(filename,"PARI_CONST_TEMP", debug).value;
T_increment = read_parameter_from_file<double>(filename,"PARI_TEMP_INCR", debug).value;

////~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
Expand Down Expand Up @@ -276,6 +266,23 @@ hydro_run::hydro_run(string filename, double debug_) {
source = init_AOS(num_cells+2); //Parabolic Variables: gravitational potential
source_pressure = init_AOS(num_cells+2); //Parabolic Variables: gravitational potential
flux = init_AOS(num_cells+1);


////~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Physical
//
////~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

//double const_gamma_adiabat = read_parameter_from_file<double>(filename,"PARI_GAMMA", debug).value; //ratio of specific heats
gamma_adiabat = read_parameter_from_file<double>(filename,"PARI_GAMMA", debug).value;
//double const_cv = read_parameter_from_file<double>(filename,"PARI_CV", debug).value; //ratio of specific heats
cv = 1;
const_T = read_parameter_from_file<double>(filename,"PARI_CONST_TEMP", debug).value;
T_increment = read_parameter_from_file<double>(filename,"PARI_TEMP_INCR", debug).value;



//left_ghost = AOS(0,0,0);
//right_ghost= AOS(0,0,0);

Expand Down Expand Up @@ -411,7 +418,7 @@ hydro_run::hydro_run(string filename, double debug_) {
void hydro_run::initialize_hydrostatic_atmosphere_nonuniform() {

cout<<"ATTENTION: Initializing nonuniform hydrostatic atmosphere and overwriting prior initial values."<<endl;
cv = 1.;
//cv = 1.;

long double temp_rhofinal;
long double factor_inner, factor_outer;
Expand Down

0 comments on commit 739bef3

Please sign in to comment.