Permalink
Browse files

Updates for 3.0.x

  • Loading branch information...
petebachant committed Nov 30, 2015
1 parent b2a0346 commit b5ccda0b0c139e1f5d45b2802f25f719def94002
Showing with 19 additions and 14 deletions.
  1. +7 −2 constant/turbulenceProperties
  2. +7 −5 paramsweep.py
  3. +1 −4 system/controlDict
  4. +3 −3 system/fvOptions
  5. +1 −0 system/fvSchemes
@@ -1,7 +1,7 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.2.0 |
| \\ / O peration | Version: 3.0.x |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
@@ -15,7 +15,12 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
simulationType RASModel;
simulationType RAS;
RAS
{
#include "RASProperties"
}
// ************************************************************************* //
View
@@ -12,9 +12,9 @@
from pyurtf import processing as pr
def zero_tsr_fluc():
def set_tsr_fluc(val=0.0):
"""Set TSR fluctuation amplitude to zero."""
replace_value("system/fvOptions", "tsrAmplitude", 0.0)
replace_value("system/fvOptions", "tsrAmplitude", val)
def set_tsr(val):
@@ -41,7 +41,7 @@ def tsr_sweep(start=0.4, stop=3.4, step=0.5, append=False):
if not append and os.path.isfile("processed/tsr_sweep.csv"):
os.remove("processed/tsr_sweep.csv")
tsrs = np.arange(start, stop + 0.5*step, step)
zero_tsr_fluc()
set_tsr_fluc(0.0)
cp = []
cd = []
for tsr in tsrs:
@@ -50,11 +50,13 @@ def tsr_sweep(start=0.4, stop=3.4, step=0.5, append=False):
call("./Allclean")
call("./Allrun")
else:
print("Running pimpleFoam")
call("pimpleFoam > log.pimpleFoam", shell=True)
os.rename("log.pimpleFoam", "log.pimpleFoam." + str(tsr))
log_perf(append=True)
# Checkout original fvOptions
call(["git", "checkout", "system/fvOptions"])
# Set TSR parameters back to default
set_tsr(1.9)
set_tsr_fluc(0.19)
if __name__ == "__main__":
View
@@ -1,7 +1,7 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.4.x |
| \\ / O peration | Version: 3.0.x |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
@@ -48,9 +48,6 @@ maxCo 0.9;
libs
(
"libOpenFOAM.so"
"libincompressibleTurbulenceModel.so"
"libincompressibleRASModels.so"
"libturbinesFoam.so"
);
View
@@ -1,7 +1,7 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.4.x |
| \\ / O peration | Version: 3.0.x |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
@@ -20,12 +20,12 @@ turbine
{
type crossFlowTurbineALSource;
active on;
selectionMode cellSet; // cellSet || points || cellZone
cellSet turbine;
crossFlowTurbineALSourceCoeffs
{
fieldNames (U);
selectionMode cellSet;
cellSet turbine;
origin (0 0 0);
axis (0 0 1); // Negative for opposite rotation
rotorRadius 0.5;
View
@@ -36,6 +36,7 @@ divSchemes
div(R) Gauss linear;
div(phi,nuTilda) bounded Gauss upwind;
div((nuEff*dev(T(grad(U))))) Gauss linear;
div((nuEff*dev2(T(grad(U))))) Gauss linear;
}
laplacianSchemes

0 comments on commit b5ccda0

Please sign in to comment.