TUT: Alltest: minor corrections (#1956)
This commit is contained in:
parent
e646218af9
commit
bcae4b7a4f
@ -23,8 +23,8 @@ boundaryField
|
||||
{
|
||||
inlet
|
||||
{
|
||||
type uniformFixedValue;
|
||||
uniformValue 0.000141;
|
||||
type fixedValue;
|
||||
value uniform 0.000141;
|
||||
}
|
||||
|
||||
outlet
|
||||
|
@ -54,55 +54,50 @@ functions
|
||||
AMI1
|
||||
{
|
||||
type surfaceFieldValue;
|
||||
functionObjectLibs ("libfieldFunctionObjects.so");
|
||||
log true;
|
||||
executeControl timeStep;
|
||||
executeInterval 1;
|
||||
writeFields true;
|
||||
regionType patch;
|
||||
name AMI1;
|
||||
operation sum;
|
||||
surfaceFormat none;
|
||||
fields (phi);
|
||||
libs (fieldFunctionObjects);
|
||||
log true;
|
||||
executeControl timeStep;
|
||||
executeInterval 1;
|
||||
writeFields true;
|
||||
regionType patch;
|
||||
name AMI1;
|
||||
operation sum;
|
||||
surfaceFormat none;
|
||||
fields (phi);
|
||||
}
|
||||
|
||||
AMI2
|
||||
{
|
||||
type surfaceFieldValue;
|
||||
functionObjectLibs ("libfieldFunctionObjects.so");
|
||||
log true;
|
||||
executeControl timeStep;
|
||||
executeInterval 1;
|
||||
writeFields true;
|
||||
regionType patch;
|
||||
name AMI2;
|
||||
operation sum;
|
||||
surfaceFormat none;
|
||||
fields (phi);
|
||||
type surfaceFieldValue;
|
||||
libs (fieldFunctionObjects);
|
||||
log true;
|
||||
executeControl timeStep;
|
||||
executeInterval 1;
|
||||
writeFields true;
|
||||
regionType patch;
|
||||
name AMI2;
|
||||
operation sum;
|
||||
surfaceFormat none;
|
||||
fields (phi);
|
||||
}
|
||||
|
||||
forces
|
||||
{
|
||||
type forces;
|
||||
|
||||
functionObjectLibs ( "libforces.so" );
|
||||
|
||||
outputControl timeStep;
|
||||
timeInterval 1;
|
||||
|
||||
log yes;
|
||||
|
||||
patches ( "rotor" );
|
||||
pName p;
|
||||
UName U;
|
||||
rho rhoInf; // Indicates incompressible
|
||||
log true;
|
||||
rhoInf 997; // Redundant for incompressible
|
||||
|
||||
CofR (0 0 0); // Rotation around centre line of propeller
|
||||
pitchAxis (0 0 1);
|
||||
forces
|
||||
{
|
||||
type forces;
|
||||
libs (forces);
|
||||
writeControl timeStep;
|
||||
timeInterval 1;
|
||||
log yes;
|
||||
patches ( "rotor" );
|
||||
pName p;
|
||||
UName U;
|
||||
rho rhoInf; // Indicates incompressible
|
||||
log true;
|
||||
rhoInf 997; // Redundant for incompressible
|
||||
CofR (0 0 0); // Rotation around centre line of propeller
|
||||
pitchAxis (0 0 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
|
@ -25,11 +25,9 @@ actions
|
||||
type faceSet;
|
||||
action new;
|
||||
source patchToFace;
|
||||
sourceInfo
|
||||
{
|
||||
name "AMI.*";
|
||||
}
|
||||
patch "AMI.*";
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
@ -60,44 +60,8 @@ serialRun() {
|
||||
runApplication WatersKing
|
||||
}
|
||||
|
||||
|
||||
# Plot streamwise flow speed at y=1.0 [m] as a function of time
|
||||
#
|
||||
# $* = models
|
||||
# ----
|
||||
plot() {
|
||||
# Require gnuplot
|
||||
command -v gnuplot >/dev/null || {
|
||||
echo "gnuplot not found - skipping graph creation" 1>&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
models=$*
|
||||
endTime=$(foamDictionary -entry endTime -value system/controlDict)
|
||||
|
||||
gnuplot<<PLT
|
||||
set terminal pngcairo font "helvetica,16" size 800,600
|
||||
set output "planarPoiseuille.png"
|
||||
set grid
|
||||
set key right top
|
||||
set xrange [0:"$endTime"]
|
||||
set yrange [0:8]
|
||||
set xlabel "t [s]"
|
||||
set ylabel "U_x [m/s]" rotate by 0 offset 3,0,0
|
||||
|
||||
results=system("ls *.txt")
|
||||
names="${models[*]}"
|
||||
plot \
|
||||
"WatersKing.dat" w lines t "Analytical" lt -1, \
|
||||
for [i=1:words(results)] word(results, i) t word(names, i) \
|
||||
w linespoints pointinterval 100 lt i pt 6 ps 1.5
|
||||
|
||||
PLT
|
||||
}
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
serialRun $endTime $models
|
||||
plot $models
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
50
tutorials/incompressible/pimpleFoam/laminar/planarPoiseuille/plot
Executable file
50
tutorials/incompressible/pimpleFoam/laminar/planarPoiseuille/plot
Executable file
@ -0,0 +1,50 @@
|
||||
#!/bin/sh
|
||||
cd "${0%/*}" || exit # Run from this directory
|
||||
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
models="
|
||||
Maxwell
|
||||
Stokes
|
||||
"
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
# Plot streamwise flow speed at y=1.0 [m] as a function of time
|
||||
#
|
||||
# $* = models
|
||||
# ----
|
||||
plot() {
|
||||
# Require gnuplot
|
||||
command -v gnuplot >/dev/null || {
|
||||
echo "gnuplot not found - skipping graph creation" 1>&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
models=$*
|
||||
endTime=$(foamDictionary -entry endTime -value system/controlDict)
|
||||
|
||||
gnuplot<<PLT
|
||||
set terminal pngcairo font "helvetica,16" size 800,600
|
||||
set output "planarPoiseuille.png"
|
||||
set grid
|
||||
set key right top
|
||||
set xrange [0:"$endTime"]
|
||||
set yrange [0:8]
|
||||
set xlabel "t [s]"
|
||||
set ylabel "U_x [m/s]" rotate by 0 offset 3,0,0
|
||||
|
||||
results=system("ls *.txt")
|
||||
names="${models[*]}"
|
||||
plot \
|
||||
"WatersKing.dat" w lines t "Analytical" lt -1, \
|
||||
for [i=1:words(results)] word(results, i) t word(names, i) \
|
||||
w linespoints pointinterval 100 lt i pt 6 ps 1.5
|
||||
PLT
|
||||
}
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
plot $models
|
||||
|
||||
#------------------------------------------------------------------------------
|
@ -21,4 +21,10 @@ solution
|
||||
}
|
||||
|
||||
|
||||
constantProperties
|
||||
{
|
||||
volumeUpdateMethod constantRho;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
@ -62,6 +62,11 @@ solvers
|
||||
relTol 0;
|
||||
}
|
||||
|
||||
Phi
|
||||
{
|
||||
$p_rgh;
|
||||
}
|
||||
|
||||
"(Yi|O2|N2|H2O)"
|
||||
{
|
||||
solver PBiCGStab;
|
||||
|
@ -21,6 +21,6 @@ runParallel renumberMesh -overwrite
|
||||
|
||||
runParallel $(getApplication)
|
||||
|
||||
runParallel redistributePar -reconstruct -latestTime
|
||||
runApplication reconstructPar -latestTime
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
@ -65,8 +65,6 @@ functions
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
#includeFunc "samples"
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,158 +0,0 @@
|
||||
// -*- C++ -*-
|
||||
|
||||
type sets;
|
||||
libs (sampling);
|
||||
interpolationScheme cellPoint;
|
||||
setFormat raw;
|
||||
|
||||
writeControl writeTime;
|
||||
|
||||
fields
|
||||
(
|
||||
T
|
||||
p_rgh
|
||||
U
|
||||
k
|
||||
nut
|
||||
);
|
||||
|
||||
sets
|
||||
(
|
||||
lineZM_C20
|
||||
{
|
||||
type uniform;
|
||||
axis distance;
|
||||
start (0.0 0.0 21.0);
|
||||
end (0.0 0.0 500.0);
|
||||
nPoints 500;
|
||||
}
|
||||
|
||||
lineFlowDirM_C20
|
||||
{
|
||||
type uniform;
|
||||
axis distance;
|
||||
start (-9000 0.0 40.0);
|
||||
end (9000 0.0 40.0);
|
||||
nPoints 500;
|
||||
}
|
||||
|
||||
lineFlowDirM_C100
|
||||
{
|
||||
type uniform;
|
||||
axis distance;
|
||||
start (-9000 0.0 120.0);
|
||||
end (9000 0.0 120.0);
|
||||
nPoints 500;
|
||||
}
|
||||
|
||||
lineFlowDirM_C200
|
||||
{
|
||||
type uniform;
|
||||
axis distance;
|
||||
start (-9000 0.0 220.0);
|
||||
end (9000 0.0 220.0);
|
||||
nPoints 500;
|
||||
}
|
||||
|
||||
lineFlowDirM_C1000
|
||||
{
|
||||
type uniform;
|
||||
axis distance;
|
||||
start (-9000 0.0 1020.0);
|
||||
end (9000 0.0 1020.0);
|
||||
nPoints 500;
|
||||
}
|
||||
|
||||
lineZM_I20
|
||||
{
|
||||
type uniform;
|
||||
axis distance;
|
||||
start (-9000.0 0.0 21.0);
|
||||
end (-9000.0 0.0 500.0);
|
||||
nPoints 500;
|
||||
}
|
||||
|
||||
lineFlowDirM_I20
|
||||
{
|
||||
type uniform;
|
||||
axis distance;
|
||||
start (-9000 0.0 40.0);
|
||||
end (9000 0.0 40.0);
|
||||
nPoints 500;
|
||||
}
|
||||
|
||||
lineFlowDirM_I100
|
||||
{
|
||||
type uniform;
|
||||
axis distance;
|
||||
start (-9000 0.0 120.0);
|
||||
end (9000 0.0 120.0);
|
||||
nPoints 500;
|
||||
}
|
||||
|
||||
lineFlowDirM_I200
|
||||
{
|
||||
type uniform;
|
||||
axis distance;
|
||||
start (-9000 0.0 220.0);
|
||||
end (9000 0.0 220.0);
|
||||
nPoints 500;
|
||||
}
|
||||
|
||||
lineFlowDirM_I1000
|
||||
{
|
||||
type uniform;
|
||||
axis distance;
|
||||
start (-9000 0.0 1020.0);
|
||||
end (9000 0.0 1020.0);
|
||||
nPoints 500;
|
||||
}
|
||||
|
||||
lineZM_O20
|
||||
{
|
||||
type uniform;
|
||||
axis distance;
|
||||
start (9000.0 0.0 21.0);
|
||||
end (9000.0 0.0 500.0);
|
||||
nPoints 500;
|
||||
}
|
||||
|
||||
lineFlowDirM_O20
|
||||
{
|
||||
type uniform;
|
||||
axis distance;
|
||||
start (-9000 0.0 40.0);
|
||||
end (9000.0 0.0 40.0);
|
||||
nPoints 500;
|
||||
}
|
||||
|
||||
lineFlowDirM_O100
|
||||
{
|
||||
type uniform;
|
||||
axis distance;
|
||||
start (-9000 0.0 120.0);
|
||||
end (9000.0 0.0 120.0);
|
||||
nPoints 500;
|
||||
}
|
||||
|
||||
lineFlowDirM_O200
|
||||
{
|
||||
type uniform;
|
||||
axis distance;
|
||||
start (-9000 0.0 220.0);
|
||||
end (9000.0 0.0 220.0);
|
||||
nPoints 500;
|
||||
}
|
||||
|
||||
lineFlowDirM_O1000
|
||||
{
|
||||
type uniform;
|
||||
axis distance;
|
||||
start (-9000 0.0 1020.0);
|
||||
end (9000.0 0.0 1020.0);
|
||||
nPoints 500;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
Loading…
Reference in New Issue
Block a user