diff --git a/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcelI.H b/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcelI.H index a3b6e46c7728d743557299dbd34ecfc8fcd4124b..59ebad3c2b46062f4e454f7703ce0c6bfa5c5859 100644 --- a/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcelI.H +++ b/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcelI.H @@ -61,20 +61,27 @@ inline Foam::ReactingParcel<ParcelType>::constantProperties::constantProperties ParcelType::constantProperties(parentDict), pMin_(this->dict_, "pMin", 1000.0), constantVolume_(this->dict_, "constantVolume", false), - volUpdateType_ - ( - this->dict_, - "volumeUpdateMethod", - volumeUpdateType::mConstRho - ) + volUpdateType_(this->dict_, "volumeUpdateMethod") { // If constantVolume found use it if (this->dict_.found("constantVolume")) { volUpdateType_.setValue(mUndefined); } - else if (this->dict_.found("volumeUpdateMethod")) + else { + if (!this->dict_.found("volumeUpdateMethod")) + { + FatalErrorInFunction + << "Either 'constantVolume' or 'volumeUpdateMethod' " << nl + << " must be provided. " << nl + << " The new keyword is 'volumeUpdateMethod'. " << nl + << " Available methods are : " << nl + << " constantRho, constantVolume or updateRhoAndVol. " << nl + << " 'constantVolume' is either true/false " << nl + << nl << exit(FatalError); + } + const word volumeUpdateMethod ( this->dict_.getWord("volumeUpdateMethod") diff --git a/tutorials/compressible/acousticFoam/obliqueAirJet/Allrun-parallel b/tutorials/compressible/acousticFoam/obliqueAirJet/Allrun similarity index 100% rename from tutorials/compressible/acousticFoam/obliqueAirJet/Allrun-parallel rename to tutorials/compressible/acousticFoam/obliqueAirJet/Allrun diff --git a/tutorials/finiteArea/liquidFilmFoam/cylinder/0/h b/tutorials/finiteArea/liquidFilmFoam/cylinder/0/h index 35980be347468f1755e738a9729aaf3be2cf8423..a2743c0178de91b43aff2fe598e29d9dfa3e050c 100644 --- a/tutorials/finiteArea/liquidFilmFoam/cylinder/0/h +++ b/tutorials/finiteArea/liquidFilmFoam/cylinder/0/h @@ -23,8 +23,8 @@ boundaryField { inlet { - type uniformFixedValue; - uniformValue 0.000141; + type fixedValue; + value uniform 0.000141; } outlet diff --git a/tutorials/incompressible/pimpleFoam/laminar/mixerVesselAMI2D/mixerVesselAMI2D-topologyChange/system/controlDict b/tutorials/incompressible/pimpleFoam/laminar/mixerVesselAMI2D/mixerVesselAMI2D-topologyChange/system/controlDict index 352e9cebe1094b1354dcf8d614bd096a7b7bdcc5..e09a16d00c494b2d07f91e946e6bcb90be072b19 100644 --- a/tutorials/incompressible/pimpleFoam/laminar/mixerVesselAMI2D/mixerVesselAMI2D-topologyChange/system/controlDict +++ b/tutorials/incompressible/pimpleFoam/laminar/mixerVesselAMI2D/mixerVesselAMI2D-topologyChange/system/controlDict @@ -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); + } } -} - // ************************************************************************* // diff --git a/tutorials/incompressible/pimpleFoam/laminar/mixerVesselAMI2D/mixerVesselAMI2D-topologyChange/system/topoSetDict b/tutorials/incompressible/pimpleFoam/laminar/mixerVesselAMI2D/mixerVesselAMI2D-topologyChange/system/topoSetDict index a60f5008b8ff5418054a509558309c7fa392a906..5a3d186d4a932058fa04f9ccf9076b3a6f62356f 100644 --- a/tutorials/incompressible/pimpleFoam/laminar/mixerVesselAMI2D/mixerVesselAMI2D-topologyChange/system/topoSetDict +++ b/tutorials/incompressible/pimpleFoam/laminar/mixerVesselAMI2D/mixerVesselAMI2D-topologyChange/system/topoSetDict @@ -25,11 +25,9 @@ actions type faceSet; action new; source patchToFace; - sourceInfo - { - name "AMI.*"; - } + patch "AMI.*"; } ); + // ************************************************************************* // diff --git a/tutorials/incompressible/pimpleFoam/laminar/planarPoiseuille/Allrun b/tutorials/incompressible/pimpleFoam/laminar/planarPoiseuille/Allrun index dce2c8616433b1cb29b80995a950eef2b1cc8835..5f62ec3c499f1f3d754273ffe083b24ee2756688 100755 --- a/tutorials/incompressible/pimpleFoam/laminar/planarPoiseuille/Allrun +++ b/tutorials/incompressible/pimpleFoam/laminar/planarPoiseuille/Allrun @@ -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 #------------------------------------------------------------------------------ diff --git a/tutorials/incompressible/pimpleFoam/laminar/planarPoiseuille/plot b/tutorials/incompressible/pimpleFoam/laminar/planarPoiseuille/plot new file mode 100755 index 0000000000000000000000000000000000000000..354027032dc80f0ee45cef1618f0f53370592b51 --- /dev/null +++ b/tutorials/incompressible/pimpleFoam/laminar/planarPoiseuille/plot @@ -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 + +#------------------------------------------------------------------------------ diff --git a/tutorials/lagrangian/reactingParcelFoam/counterFlowFlame2DLTS/constant/reactingCloud1Properties b/tutorials/lagrangian/reactingParcelFoam/counterFlowFlame2DLTS/constant/reactingCloud1Properties index 32a87935e8c8192dfcf314e0e47dccbdeebd2574..8f8a5a208ccad0f7bb074baf4f3f1743eb5ba6b5 100644 --- a/tutorials/lagrangian/reactingParcelFoam/counterFlowFlame2DLTS/constant/reactingCloud1Properties +++ b/tutorials/lagrangian/reactingParcelFoam/counterFlowFlame2DLTS/constant/reactingCloud1Properties @@ -21,4 +21,10 @@ solution } +constantProperties +{ + volumeUpdateMethod constantRho; +} + + // ************************************************************************* // diff --git a/tutorials/lagrangian/reactingParcelFoam/rectangularChannel/system/fvSolution b/tutorials/lagrangian/reactingParcelFoam/rectangularChannel/system/fvSolution index 5bffa00fde84a4751c220f984529d4edbfea4a79..25bdeedf720c53dacd237b3c2c8320f91242c21e 100644 --- a/tutorials/lagrangian/reactingParcelFoam/rectangularChannel/system/fvSolution +++ b/tutorials/lagrangian/reactingParcelFoam/rectangularChannel/system/fvSolution @@ -62,6 +62,11 @@ solvers relTol 0; } + Phi + { + $p_rgh; + } + "(Yi|O2|N2|H2O)" { solver PBiCGStab; diff --git a/tutorials/verificationAndValidation/atmosphericModels/atmFlatTerrain/successor/Allrun b/tutorials/verificationAndValidation/atmosphericModels/atmFlatTerrain/successor/Allrun index d91b00d025b9a8e17930a446cce0f0e6fc34ea4c..e6691183c07c71c12c6b505b6ea51c840ee2c51d 100755 --- a/tutorials/verificationAndValidation/atmosphericModels/atmFlatTerrain/successor/Allrun +++ b/tutorials/verificationAndValidation/atmosphericModels/atmFlatTerrain/successor/Allrun @@ -21,6 +21,6 @@ runParallel renumberMesh -overwrite runParallel $(getApplication) -runParallel redistributePar -reconstruct -latestTime +runApplication reconstructPar -latestTime #------------------------------------------------------------------------------ diff --git a/tutorials/verificationAndValidation/atmosphericModels/atmFlatTerrain/successor/system/controlDict b/tutorials/verificationAndValidation/atmosphericModels/atmFlatTerrain/successor/system/controlDict index 206e3f2844773e4c867a335ac9a09ad3aa2e5b24..fbfbc1d5a14011a9511c6aa41e28c530e0fd65fa 100644 --- a/tutorials/verificationAndValidation/atmosphericModels/atmFlatTerrain/successor/system/controlDict +++ b/tutorials/verificationAndValidation/atmosphericModels/atmFlatTerrain/successor/system/controlDict @@ -65,8 +65,6 @@ functions } ); } - - #includeFunc "samples" } diff --git a/tutorials/verificationAndValidation/atmosphericModels/atmFlatTerrain/successor/system/samples b/tutorials/verificationAndValidation/atmosphericModels/atmFlatTerrain/successor/system/samples deleted file mode 100644 index 13ec1014e9edd3c3c4db8b14637ac0569b046ae0..0000000000000000000000000000000000000000 --- a/tutorials/verificationAndValidation/atmosphericModels/atmFlatTerrain/successor/system/samples +++ /dev/null @@ -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; - } -); - - -// ************************************************************************* // diff --git a/tutorials/verificationAndValidation/atmosphericModels/atmForestStability/Allrun-parallel b/tutorials/verificationAndValidation/atmosphericModels/atmForestStability/Allrun similarity index 100% rename from tutorials/verificationAndValidation/atmosphericModels/atmForestStability/Allrun-parallel rename to tutorials/verificationAndValidation/atmosphericModels/atmForestStability/Allrun