OpenFOAM 2.2.2 Vespa LES
In this section I start from scratch and redo everything based on Large Eddie Simulations. As we start from scratch I will base it on the latest OpenFOAM 2.2.2 and do a few other tricky things.
Rather than document things blow by blow and quickly have outdated info I will focus on noting a description of the changes here and let the case file do the rest (yet to be uploaded).
Note: I am using PBS for running on a HPC system
Summary of Changes
make a copy of: /usr/local/openfoam/2.2.2/tutorials/incompressible/pisoFoam/les/motorBike/
replace motorBike.obj with motorBike.stl (which is the vespa stl model renamed to motorBike.stl for conveinece) and make that the model used
create a custom dictionary vespa_variables, this is used through the cases as a common place for common variable (e.g. "vespa_frontalArea 0.58946; // calculated m*m")
create a PBS script for launching the job and gathering results (i.e. openfoam_pbs)
Change all the run scripts to use the PBS variables to use the number of cores in the job instead of the static 8 cores (e.g. in motorBike/Allrun "runParallel snappyHexMesh $PBS_NP -overwrite -parallel")
Create a mechanism in openfoam_pbs to capture the PBS variables to a runtime dictionary (e.g. "echo "vespa_env_procs $PBS_NP;" >> ./vespa_env")
Use the vespa_env inside dictionaries that need this at runtime to adapt to different core counts (e.g. in decomposeParDict.hierarchical change the static 8 with "numberOfSubdomains $vespa_env_procs;")