From 525f77f8bb732374bd6eec73e887ce7774be11e2 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Tue, 10 May 2022 15:39:33 +0200 Subject: [PATCH] TUT: add constraint types for finiteArea tutorials STYLE: accept '-proc' as shortcut in restore0Dir function --- bin/tools/RunFunctions | 4 ++-- tutorials/finiteArea/liquidFilmFoam/cylinder/0.orig/Us | 4 +++- tutorials/finiteArea/liquidFilmFoam/cylinder/0.orig/h | 6 ++++-- .../finiteArea/liquidFilmFoam/cylinder/0.orig/manningField | 4 +++- .../sphereSurfactantFoam/sphereTransport/0.orig/Cs | 3 ++- .../sphereSurfactantFoam/sphereTransport/0.orig/Cvf | 4 +++- .../sphereSurfactantFoam/sphereTransport/0.orig/U | 4 +++- .../finiteArea/surfactantFoam/planeTransport/0.orig/Cs | 4 +++- .../finiteArea/surfactantFoam/planeTransport/0.orig/Us | 4 +++- 9 files changed, 26 insertions(+), 11 deletions(-) diff --git a/bin/tools/RunFunctions b/bin/tools/RunFunctions index b22c451c40..479d200327 100644 --- a/bin/tools/RunFunctions +++ b/bin/tools/RunFunctions @@ -6,7 +6,7 @@ # \\/ M anipulation | #------------------------------------------------------------------------------ # Copyright (C) 2011-2016 OpenFOAM Foundation -# Copyright (C) 2015-2021 OpenCFD Ltd. +# Copyright (C) 2015-2022 OpenCFD Ltd. #------------------------------------------------------------------------------ # License # This file is part of OpenFOAM, distributed under GPL-3.0-or-later. @@ -468,7 +468,7 @@ restore0Dir() fi case "$1" in - -processor | -processors) + -proc | -processor | -processors) echo "Restore 0/ from 0.orig/ [processor directories]" \ls -d processor* | xargs -I {} \rm -rf ./{}/0 diff --git a/tutorials/finiteArea/liquidFilmFoam/cylinder/0.orig/Us b/tutorials/finiteArea/liquidFilmFoam/cylinder/0.orig/Us index 4276de3648..bfc936a91a 100644 --- a/tutorials/finiteArea/liquidFilmFoam/cylinder/0.orig/Us +++ b/tutorials/finiteArea/liquidFilmFoam/cylinder/0.orig/Us @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: v2112 | +| \\ / O peration | Version: v2206 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -20,6 +20,8 @@ internalField uniform (0 0 0); boundaryField { + #includeEtc "caseDicts/setConstraintTypes" + inlet { type zeroGradient; diff --git a/tutorials/finiteArea/liquidFilmFoam/cylinder/0.orig/h b/tutorials/finiteArea/liquidFilmFoam/cylinder/0.orig/h index 8313112fae..987aeeb833 100644 --- a/tutorials/finiteArea/liquidFilmFoam/cylinder/0.orig/h +++ b/tutorials/finiteArea/liquidFilmFoam/cylinder/0.orig/h @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: v2112 | +| \\ / O peration | Version: v2206 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -20,10 +20,12 @@ internalField uniform 0.000141; boundaryField { + #includeEtc "caseDicts/setConstraintTypes" + inlet { type fixedValue; - value uniform 0.000141; + value uniform $internalField; } outlet diff --git a/tutorials/finiteArea/liquidFilmFoam/cylinder/0.orig/manningField b/tutorials/finiteArea/liquidFilmFoam/cylinder/0.orig/manningField index be16bf31ad..5376975b9c 100644 --- a/tutorials/finiteArea/liquidFilmFoam/cylinder/0.orig/manningField +++ b/tutorials/finiteArea/liquidFilmFoam/cylinder/0.orig/manningField @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: v2112 | +| \\ / O peration | Version: v2206 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -20,6 +20,8 @@ internalField uniform 0.1; boundaryField { + #includeEtc "caseDicts/setConstraintTypes" + inlet { type zeroGradient; diff --git a/tutorials/finiteArea/sphereSurfactantFoam/sphereTransport/0.orig/Cs b/tutorials/finiteArea/sphereSurfactantFoam/sphereTransport/0.orig/Cs index 625343cf1e..d8b0c92d24 100644 --- a/tutorials/finiteArea/sphereSurfactantFoam/sphereTransport/0.orig/Cs +++ b/tutorials/finiteArea/sphereSurfactantFoam/sphereTransport/0.orig/Cs @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: v2112 | +| \\ / O peration | Version: v2206 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -22,6 +22,7 @@ referenceLevel 0; boundaryField { + #includeEtc "caseDicts/setConstraintTypes" } diff --git a/tutorials/finiteArea/sphereSurfactantFoam/sphereTransport/0.orig/Cvf b/tutorials/finiteArea/sphereSurfactantFoam/sphereTransport/0.orig/Cvf index e5580a8675..d6992f2c7e 100644 --- a/tutorials/finiteArea/sphereSurfactantFoam/sphereTransport/0.orig/Cvf +++ b/tutorials/finiteArea/sphereSurfactantFoam/sphereTransport/0.orig/Cvf @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: v2112 | +| \\ / O peration | Version: v2206 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -20,6 +20,8 @@ internalField uniform 0; boundaryField { + #includeEtc "caseDicts/setConstraintTypes" + outer { type calculated; diff --git a/tutorials/finiteArea/sphereSurfactantFoam/sphereTransport/0.orig/U b/tutorials/finiteArea/sphereSurfactantFoam/sphereTransport/0.orig/U index d1ddbc231d..f36063d344 100644 --- a/tutorials/finiteArea/sphereSurfactantFoam/sphereTransport/0.orig/U +++ b/tutorials/finiteArea/sphereSurfactantFoam/sphereTransport/0.orig/U @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: v2112 | +| \\ / O peration | Version: v2206 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -20,6 +20,8 @@ internalField uniform (0 0 0); boundaryField { + #includeEtc "caseDicts/setConstraintTypes" + outer { type calculated; diff --git a/tutorials/finiteArea/surfactantFoam/planeTransport/0.orig/Cs b/tutorials/finiteArea/surfactantFoam/planeTransport/0.orig/Cs index bea563d42c..c6accba6c9 100644 --- a/tutorials/finiteArea/surfactantFoam/planeTransport/0.orig/Cs +++ b/tutorials/finiteArea/surfactantFoam/planeTransport/0.orig/Cs @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: v2112 | +| \\ / O peration | Version: v2206 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -22,6 +22,8 @@ referenceLevel 0; boundaryField { + #includeEtc "caseDicts/setConstraintTypes" + inlet1 { type fixedValue; diff --git a/tutorials/finiteArea/surfactantFoam/planeTransport/0.orig/Us b/tutorials/finiteArea/surfactantFoam/planeTransport/0.orig/Us index 8ddb0474b7..9b930a3c66 100644 --- a/tutorials/finiteArea/surfactantFoam/planeTransport/0.orig/Us +++ b/tutorials/finiteArea/surfactantFoam/planeTransport/0.orig/Us @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: v2112 | +| \\ / O peration | Version: v2206 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -20,6 +20,8 @@ internalField uniform (0.05 0 0); boundaryField { + #includeEtc "caseDicts/setConstraintTypes" + inlet1 { type fixedValue;