Difference between revisions of "PHASTA/Extract Energy Spectrum"
From PHASTA Wiki
m (Jrwrigh moved page Extract Energy Spectrum to PHASTA/Extract Energy Spectrum: Move to a subpage organization) |
|||
(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | + | == Run the phasta code with the following in the solver.inp file:== | |
Use STGinflow BCs: True | Use STGinflow BCs: True | ||
Line 15: | Line 15: | ||
Energy Spectrum at Distances: 0.0 0.00675 0.0162 #(from defined STGinflow face in +xdir) | Energy Spectrum at Distances: 0.0 0.00675 0.0162 #(from defined STGinflow face in +xdir) | ||
− | + | * The third to last line listed here and below matter for gathering points to gather nodes on | |
+ | * Try to have a time step a fraction of a cycle of kMax(=approx. 75.0) | ||
+ | ** ex:1/(kMax*U_0*percent_of_rotation), or 1/(75*75*0.05)=0.03)) | ||
− | + | == Configure n-procs_dir == | |
− | + | Make vars directory within n-procs_case dir. | |
− | + | mkdir n-procs_case/vars | |
− | |||
− | |||
− | Delete xyzts.dat if from a previous run. | + | * Delete <code>xyzts.dat</code> if from a previous run. |
− | If there are additional Probe points you want, create a fresh xyzts.dat file with some header (like 4 1 1 1 1) and those points | + | * If there are additional Probe points you want, create a fresh <code>xyzts.dat</code> file with some header (like 4 1 1 1 1) and those points |
− | (additional functionality may be included later by modifying common/bcSTG.f | + | (additional functionality may be included later by modifying <code>common/bcSTG.f#236</code> ex: inputing frequency of data reading (right now at every timestep)) |
− | + | == Extracting Ubar == | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
+ | * As was done to extract a <code>STGInflow.dat</code> file for the IDDES domain from the RANS domain, open the <code>/projects/tools/Models/STG/FlatePlate/RANS_FullPlate/Run/computeVARsforFLATEPLATE.pvsm</code> open the RANS case that you wish to use | ||
+ | * Create filers on that Case that find the points in <code>xyzts.dat</code> | ||
+ | * Right-click the "GradientOfUnstructuredDataSet1" and select "Change Input" and select the filter that you just created. | ||
+ | * File>Save_Data and save as <code>PV-points.csv</code> in the Run above the LES <code>n-procs_case</code> | ||
+ | * Copy Riccardo's matlab script <code>/projects/tools/Models/STG/FlatPlate/RANS_FullPlate/Run/Prepare_STGInflow3.m</code> to this directory | ||
− | + | == Creating an energy Spectrum == | |
− | + | * Copy John's matlab scripts to the Run directory | |
/projects/tools/Models/STG/FlatPlate/STG_Plate/RunNew/John_Load_Varts_Directory.m | /projects/tools/Models/STG/FlatPlate/STG_Plate/RunNew/John_Load_Varts_Directory.m | ||
/projects/tools/Models/STG/FlatPlate/STG_Plate/RunNew/John_Compute_STG_Eng_Spectrum.m (TODO) | /projects/tools/Models/STG/FlatPlate/STG_Plate/RunNew/John_Compute_STG_Eng_Spectrum.m (TODO) | ||
− | Run the | + | Run the latter. i.e. matlab execute "John_Compute_STG_Eng_Spectrum( N_procs_case_directory,dt,StartTime )" |
-Output(TODO) | -Output(TODO) | ||
+ | |||
+ | [[Category:PHASTA]] [[Category:Post-processing]] |
Latest revision as of 10:46, 18 September 2022
Contents
Run the phasta code with the following in the solver.inp file:
Use STGinflow BCs: True STG SurfID: 411 STG BL Height: 0.0027 STG U_0: 75.0 STG Number of Modes: 405 STG Mode Growth: 0.01 STG Mesh Growth: 1.13 STG Channel: False Collect STG Energy Spectrum Data: True STG Energy Distance Tolerance: 0.0005 #(allowed position error from the distance from STGinflow (helpful if the spacings are specified from the model and you know the position)) Energy Spectrum at Distances: 0.0 0.00675 0.0162 #(from defined STGinflow face in +xdir)
- The third to last line listed here and below matter for gathering points to gather nodes on
- Try to have a time step a fraction of a cycle of kMax(=approx. 75.0)
- ex:1/(kMax*U_0*percent_of_rotation), or 1/(75*75*0.05)=0.03))
Configure n-procs_dir
Make vars directory within n-procs_case dir.
mkdir n-procs_case/vars
- Delete
xyzts.dat
if from a previous run. - If there are additional Probe points you want, create a fresh
xyzts.dat
file with some header (like 4 1 1 1 1) and those points
(additional functionality may be included later by modifying common/bcSTG.f#236
ex: inputing frequency of data reading (right now at every timestep))
Extracting Ubar
- As was done to extract a
STGInflow.dat
file for the IDDES domain from the RANS domain, open the/projects/tools/Models/STG/FlatePlate/RANS_FullPlate/Run/computeVARsforFLATEPLATE.pvsm
open the RANS case that you wish to use - Create filers on that Case that find the points in
xyzts.dat
- Right-click the "GradientOfUnstructuredDataSet1" and select "Change Input" and select the filter that you just created.
- File>Save_Data and save as
PV-points.csv
in the Run above the LESn-procs_case
- Copy Riccardo's matlab script
/projects/tools/Models/STG/FlatPlate/RANS_FullPlate/Run/Prepare_STGInflow3.m
to this directory
Creating an energy Spectrum
- Copy John's matlab scripts to the Run directory
/projects/tools/Models/STG/FlatPlate/STG_Plate/RunNew/John_Load_Varts_Directory.m /projects/tools/Models/STG/FlatPlate/STG_Plate/RunNew/John_Compute_STG_Eng_Spectrum.m (TODO)
Run the latter. i.e. matlab execute "John_Compute_STG_Eng_Spectrum( N_procs_case_directory,dt,StartTime )" -Output(TODO)