Skip to content

Commit

Permalink
resolved conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
Schulik committed Oct 15, 2020
2 parents 80ae5b3 + 778cbdc commit 88896ad
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 15 deletions.
9 changes: 3 additions & 6 deletions advection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@ void hydro_run::execute() {
steps = 0;
double output_counter = 0;
const int maxsteps = 1e9;
dt = get_cfl_timestep();
double pressure_temp;

cout<<"Beginning main loop with num_cells="<<num_cells<<" and timestep="<<dt<<" cflfacotr="<<cflfactor<<endl;

compute_pressure();

////~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~////
// //
// Simulation main loop //
// //
////~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~////
for (globalTime = 0; (globalTime < t_max) && (steps < maxsteps); ) {

compute_pressure();
dt = get_cfl_timestep();

//
// Step 0: Update gravity. Important for self-gravity and time-dependent smoothing length
//
Expand Down Expand Up @@ -155,9 +155,6 @@ void hydro_run::execute() {
globalTime += dt;
steps++;

//This is already the next timestep. Note that the initial timestep is properly initialized!
dt = get_cfl_timestep();

if(steps==1)
cout<<"Initial sound crossing time = "<<snd_crs_time<<endl;

Expand Down
11 changes: 9 additions & 2 deletions init_and_bounds.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ hydro_run::hydro_run(string filename) {
//
x_i[0] = domain_min;
if(type_of_grid==1) {

double dlogx = pow(10.,1./cells_per_decade);

x_i[1] = x_i[0] * dlogx;
Expand Down Expand Up @@ -397,6 +398,8 @@ hydro_run::hydro_run(string filename) {

// TEMPERATURE_BUMP_STRENGTH = read_parameter_from_file<double>(filename,"TEMPERATURE_BUMP_STRENGTH", debug).value;



if(debug > 0)
cout<<"Ended init."<<endl;
}
Expand Down Expand Up @@ -432,8 +435,10 @@ void hydro_run::initialize_hydrostatic_atmosphere_nonuniform() {
//temperature[i] = 100.;

//Add temperature bumps and troughs
//temperature[i] += TEMPERATURE_BUMP_STRENGTH * 4. * exp( - pow(x_i12[i] - 1.e-1 ,2.) / (0.1) );
//temperature[i] -= TEMPERATURE_BUMP_STRENGTH * 40. * exp( - pow(x_i12[i] - 3.e-3 ,2.) / (1.e-3) );
temperature[i] += TEMPERATURE_BUMP_STRENGTH * 4. * exp( - pow(x_i12[i] - 1.e-1 ,2.) / (0.1) );

temperature[i] -= TEMPERATURE_BUMP_STRENGTH * 15. * exp( - pow(x_i12[i] - 7.e-3 ,2.) / (1.5e-3) );

}

//Last normal cell has to be awkwardly initialized
Expand Down Expand Up @@ -491,6 +496,8 @@ void hydro_run::initialize_hydrostatic_atmosphere_nonuniform() {
cin>>a;
}
}

cout<<"Ended hydrostatic construction."<<endl;

}

Expand Down
12 changes: 5 additions & 7 deletions planet_spherical.par
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,15 @@ PARI_BOUND_TYPE_RIGHT 1
PARI_DOMAIN_DX 1e-3
PARI_GRID_TYPE 1
PARI_GEOMETRY 2
PARI_CELLS_PER_DECADE 100.
PARI_DOMAIN_MIN 1.e-4
PARI_CELLS_PER_DECADE 15.
PARI_DOMAIN_MIN 3.e-3
PARI_DOMAIN_MAX 10.
PARI_TIME_DT 1e-3
PARI_CFLFACTOR 1.0
PARI_TIME_TMAX 1.21e0
PARI_TIME_OUTPUT 1.e-1
PARI_TIME_TMAX 4.41e1
PARI_TIME_OUTPUT 1.e1

WAVE_USE 0
WAVE_AMPLITUDE 1e-4
WAVE_PERIOD 1.8
WAVE_USE 0

#Physical parameters
PARI_PLANET_POS 0.
Expand Down

0 comments on commit 88896ad

Please sign in to comment.