Skip to content

Commit

Permalink
Merge pull request #39 from JETSCAPE/roch/automatic_FS_parameter_setting
Browse files Browse the repository at this point in the history
Fix density rotation bug / FS automatic parameter determination
  • Loading branch information
latessa authored Dec 2, 2024
2 parents fa92e28 + 2845798 commit eda8921
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 4 deletions.
6 changes: 6 additions & 0 deletions config/jetscape_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,9 @@
<FreestreamMilne>
<name>FreestreamMilne</name>
<freestream_input_file>freestream_input</freestream_input_file>
<!-- number of timesteps for the evolution, this defines the dtau = (taus - tauj) / ntau -->
<!-- in the case of <evolutionInMemory>1</evolutionInMemory> this will also set the time step for the hydro, make sure that it is small enough -->
<ntau>50</ntau>
</FreestreamMilne>

<NullPreDynamics> </NullPreDynamics>
Expand Down Expand Up @@ -296,6 +299,9 @@
<!-- (only works for VISHNew evo files) -->
<load_viscous_info>0</load_viscous_info>

<!-- PreEquilibrium evolution filename (plain binary format) -->
<PreEq_file>../examples/test_hydro_files/evolution_all_xyeta_fs.dat</PreEq_file>

<!-- MUSIC hydro evolution filename (plain binary format) -->
<!-- the associated input file specifies the grid information -->
<MUSIC_input_file>../examples/test_hydro_files/MUSIC_input</MUSIC_input_file>
Expand Down
4 changes: 2 additions & 2 deletions external_packages/get_freestream-milne.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
#git clone --depth=1 https://github.com/derekeverett/freestream-milne.git -b time_step_history freestream-milne
#git clone --depth=1 https://github.com/chunshen1987/freestream-milne -b time_step_history freestream-milne

# using a commit from the freestream-milne repository that is compatible with X-SCAPE 1.1.1
# using a commit from the freestream-milne repository that is compatible with X-SCAPE 1.1.5
folderName="freestream-milne"
commitHash="eb51fd6ff5a547f08bf817e728794dfce6177db4"
commitHash="e0a21feb48a922b4b4541ab0e4d745c65594bb5f"

git clone https://github.com/chunshen1987/freestream-milne -b time_step_history $folderName
cd $folderName
Expand Down
5 changes: 3 additions & 2 deletions external_packages/get_music.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@
# See COPYING for details.
##############################################################################


# using a commit from the MUSIC repository that is compatible with X-SCAPE 1.1.5
folderName="music"
# commitHash="52b0454b0a07a76f26c8138245c0b3c54d00af65" # for xscape 1.1
commitHash="db320898c4a9bd99ed21aa9dbb7c78e2cb0729bd" # for xscape 1.1.1
commitHash="fdcce5d9f63fc25281eda8d498c32c69ac132dac"

# download the code package
rm -fr $folderName
Expand Down
20 changes: 20 additions & 0 deletions src/preequilibrium/FreestreamMilneWrapper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,26 @@ void FreestreamMilneWrapper::InitializePreequilibrium(
params->TAU0 = tau0;
params->TAUJ = tauj;
params->DTAU = taus - tau0;

//settings for the grid size
int nx = ini->GetXSize();
int ny = ini->GetYSize();
int neta = ini->GetZSize();
params->DIM_X = nx;
params->DIM_Y = ny;
params->DIM_ETA = neta;

//settings for the grid step size
double dx = ini->GetXStep();
double dy = ini->GetYStep();
double deta = ini->GetZStep();
params->DX = dx;
params->DY = dy;
params->DETA = deta;

//setting for the number of time steps
int ntau = GetXMLElementInt({"Preequilibrium", "FreestreamMilne", "ntau"});
params->NT = ntau;
}

void FreestreamMilneWrapper::EvolvePreequilibrium() {
Expand Down

0 comments on commit eda8921

Please sign in to comment.