Skip to content

Commit

Permalink
Updates for 3.0.x
Browse files Browse the repository at this point in the history
  • Loading branch information
petebachant committed Nov 30, 2015
1 parent b2a0346 commit b5ccda0
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 14 deletions.
9 changes: 7 additions & 2 deletions constant/turbulenceProperties
Original file line number Diff line number Diff line change
@@ -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 | |
\*---------------------------------------------------------------------------*/
Expand All @@ -15,7 +15,12 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

simulationType RASModel;
simulationType RAS;

RAS
{
#include "RASProperties"
}


// ************************************************************************* //
12 changes: 7 additions & 5 deletions paramsweep.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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:
Expand All @@ -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__":
Expand Down
5 changes: 1 addition & 4 deletions system/controlDict
Original file line number Diff line number Diff line change
@@ -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 | |
\*---------------------------------------------------------------------------*/
Expand Down Expand Up @@ -48,9 +48,6 @@ maxCo 0.9;

libs
(
"libOpenFOAM.so"
"libincompressibleTurbulenceModel.so"
"libincompressibleRASModels.so"
"libturbinesFoam.so"
);

Expand Down
6 changes: 3 additions & 3 deletions system/fvOptions
Original file line number Diff line number Diff line change
@@ -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 | |
\*---------------------------------------------------------------------------*/
Expand All @@ -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;
Expand Down
1 change: 1 addition & 0 deletions system/fvSchemes
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b5ccda0

Please sign in to comment.