TUT: added tutorials for topology optimisation
A 1-Inlet-2-Outlet geometry is showcased for laminar and turbulent flows, set-up with different variants of porosity-based and level-set-based topology optimisation
This commit is contained in:
parent
b23b09fdbd
commit
b435feffde
@ -0,0 +1,70 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volVectorField;
|
||||
object U;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 1 -1 0 0 0 0];
|
||||
|
||||
internalField uniform (0.001 0.001 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
frontBack
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
|
||||
designWall
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
IEntranceWall
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
OEntranceWall
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
OREntranceWall
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
inlet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (1 0 0);
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
outlet-right
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,72 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volVectorField;
|
||||
object U;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 1 -1 0 0 0 0];
|
||||
|
||||
internalField uniform (0 0 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
frontBack
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
|
||||
designWall
|
||||
{
|
||||
type adjointWallVelocity;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
IEntranceWall
|
||||
{
|
||||
type adjointWallVelocity;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
OEntranceWall
|
||||
{
|
||||
type adjointWallVelocity;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
OREntranceWall
|
||||
{
|
||||
type adjointWallVelocity;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
inlet
|
||||
{
|
||||
type adjointInletVelocity;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type adjointOutletVelocity;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
outlet-right
|
||||
{
|
||||
type adjointOutletVelocity;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,67 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object p;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 2 -2 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
frontBack
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
|
||||
designWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
IEntranceWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
OEntranceWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
OREntranceWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
inlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0.0;
|
||||
}
|
||||
|
||||
outlet-right
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0.0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,67 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object p;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 2 -2 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
frontBack
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
|
||||
designWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
IEntranceWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
OEntranceWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
OREntranceWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
inlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type adjointOutletPressure;
|
||||
value uniform 0.0;
|
||||
}
|
||||
|
||||
outlet-right
|
||||
{
|
||||
type adjointOutletPressure;
|
||||
value uniform 0.0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
cd "${0%/*}" || exit # Run from this directory
|
||||
. ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
cleanCase
|
||||
if [ -d "reEval" ]
|
||||
then
|
||||
cd reEval
|
||||
./Allclean
|
||||
cd ..
|
||||
fi
|
||||
|
||||
#------------------------------------------------------------------------------
|
@ -0,0 +1,20 @@
|
||||
#!/bin/sh
|
||||
cd "${0%/*}" || exit # Run from this directory
|
||||
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
runApplication blockMesh
|
||||
runApplication topoSet
|
||||
runApplication setsToZones -noFlipMap
|
||||
runApplication decomposePar
|
||||
runParallel $(getApplication)
|
||||
|
||||
if [[ ! -z $(which cartesian2DMesh) ]]
|
||||
then
|
||||
echo "Re-evaluating topO solution on a body-fitted grid"
|
||||
cd reEval
|
||||
./AllrunReEval > log.AllrunReEval 2>&1 &
|
||||
cd ..
|
||||
fi
|
||||
|
||||
#------------------------------------------------------------------------------
|
@ -0,0 +1,23 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object adjointRASProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
adjointRASModel adjointLaminar;
|
||||
|
||||
adjointTurbulence on;
|
||||
|
||||
printCoeffs off;
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,21 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object transportProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
transportModel Newtonian;
|
||||
|
||||
nu nu [0 2 -1 0 0 0 0] 1e-03;
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,28 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object turbulenceProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
simulationType laminar;
|
||||
|
||||
RAS
|
||||
{
|
||||
RASModel laminar;
|
||||
|
||||
turbulence on;
|
||||
|
||||
printCoeffs on;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,76 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volVectorField;
|
||||
object U;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 1 -1 0 0 0 0];
|
||||
|
||||
internalField uniform (0.001 0.001 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
frontBack
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
|
||||
designWall
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
topOPatch
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
IEntranceWall
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
OEntranceWall
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
OREntranceWall
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
inlet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (1 0 0);
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
outlet-right
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,78 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volVectorField;
|
||||
object U;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 1 -1 0 0 0 0];
|
||||
|
||||
internalField uniform (0 0 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
frontBack
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
|
||||
designWall
|
||||
{
|
||||
type adjointWallVelocity;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
topOPatch
|
||||
{
|
||||
type adjointWallVelocity;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
IEntranceWall
|
||||
{
|
||||
type adjointWallVelocity;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
OEntranceWall
|
||||
{
|
||||
type adjointWallVelocity;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
OREntranceWall
|
||||
{
|
||||
type adjointWallVelocity;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
inlet
|
||||
{
|
||||
type adjointInletVelocity;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type adjointOutletVelocity;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
outlet-right
|
||||
{
|
||||
type adjointOutletVelocity;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,72 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object p;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 2 -2 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
frontBack
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
|
||||
designWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
topOPatch
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
IEntranceWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
OEntranceWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
OREntranceWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
inlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0.0;
|
||||
}
|
||||
|
||||
outlet-right
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0.0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,72 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object p;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 2 -2 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
frontBack
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
|
||||
designWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
topOPatch
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
IEntranceWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
OEntranceWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
OREntranceWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
inlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type adjointOutletPressure;
|
||||
value uniform 0.0;
|
||||
}
|
||||
|
||||
outlet-right
|
||||
{
|
||||
type adjointOutletPressure;
|
||||
value uniform 0.0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
cd "${0%/*}" || exit # Run from this directory
|
||||
. ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
cleanCase
|
||||
rm -f *.stl *.fms
|
||||
foamDictionary system/meshDict -entry surfaceFile -set fileName > /dev/null
|
||||
|
||||
#------------------------------------------------------------------------------
|
@ -0,0 +1,17 @@
|
||||
#!/bin/sh
|
||||
cd "${0%/*}" || exit # Run from this directory
|
||||
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
time=$(foamDictionary ../system/controlDict -entry endTime -value)
|
||||
cp ../optimisation/topOIsoSurfaces/topOIsoSurface$time.stl .
|
||||
runApplication surfaceToFMS topOIsoSurface$time.stl
|
||||
foamDictionary system/meshDict -entry surfaceFile -set topOIsoSurface$time.fms > /dev/null
|
||||
sed -i 's/empty/wall/g' topOIsoSurface$time.fms
|
||||
sed -i 's/inlet wall/inlet patch/g' topOIsoSurface$time.fms
|
||||
sed -i 's/outlet wall/outlet patch/g' topOIsoSurface$time.fms
|
||||
runApplication cartesian2DMesh
|
||||
runApplication decomposePar
|
||||
runParallel $(getApplication)
|
||||
|
||||
#------------------------------------------------------------------------------
|
@ -0,0 +1,23 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object adjointRASProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
adjointRASModel adjointLaminar;
|
||||
|
||||
adjointTurbulence on;
|
||||
|
||||
printCoeffs off;
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,21 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object transportProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
transportModel Newtonian;
|
||||
|
||||
nu nu [0 2 -1 0 0 0 0] 1e-03;
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,28 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object turbulenceProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
simulationType laminar;
|
||||
|
||||
RAS
|
||||
{
|
||||
RASModel laminar;
|
||||
|
||||
turbulence on;
|
||||
|
||||
printCoeffs on;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,47 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object controlDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application adjointOptimisationFoam;
|
||||
|
||||
startFrom latestTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
stopAt endTime;
|
||||
|
||||
endTime 100;
|
||||
|
||||
deltaT 1;
|
||||
|
||||
writeControl timeStep;
|
||||
|
||||
writeInterval 3000;
|
||||
|
||||
purgeWrite 1;
|
||||
|
||||
writeFormat ascii;
|
||||
|
||||
writePrecision 6;
|
||||
|
||||
writeCompression yes;
|
||||
|
||||
timeFormat general;
|
||||
|
||||
timePrecision 6;
|
||||
|
||||
runTimeModifiable yes;
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,58 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object decomposeParDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
numberOfSubdomains 4;
|
||||
|
||||
method scotch;
|
||||
//method metis;
|
||||
//method parMetis;
|
||||
|
||||
simpleCoeffs
|
||||
{
|
||||
n (2 2 1);
|
||||
delta 0.001;
|
||||
}
|
||||
|
||||
hierarchicalCoeffs
|
||||
{
|
||||
n (4 4 2);
|
||||
delta 0.001;
|
||||
order xyz;
|
||||
}
|
||||
|
||||
metisCoeffs
|
||||
{
|
||||
//processorWeights
|
||||
//(
|
||||
// 1
|
||||
// 1
|
||||
// 1
|
||||
// 1
|
||||
//);
|
||||
}
|
||||
|
||||
manualCoeffs
|
||||
{
|
||||
dataFile "";
|
||||
}
|
||||
|
||||
distributed no;
|
||||
|
||||
roots
|
||||
(
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,47 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object fvSchemes;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
ddtSchemes
|
||||
{
|
||||
default steadyState;
|
||||
}
|
||||
|
||||
gradSchemes
|
||||
{
|
||||
default Gauss linear;
|
||||
}
|
||||
|
||||
divSchemes
|
||||
{
|
||||
default Gauss linear;
|
||||
div(phi,U) bounded Gauss upwind;
|
||||
div(-phi,Uaas1) bounded Gauss upwind;
|
||||
}
|
||||
|
||||
interpolationSchemes
|
||||
{
|
||||
default linear;
|
||||
}
|
||||
laplacianSchemes
|
||||
{
|
||||
default Gauss linear corrected;
|
||||
}
|
||||
snGradSchemes
|
||||
{
|
||||
default corrected;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
@ -0,0 +1,55 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object fvSolution;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
SIMPLE
|
||||
{
|
||||
nNonOrthogonalCorrectors 0;
|
||||
}
|
||||
|
||||
solvers
|
||||
{
|
||||
"p|pa.*|bTilda"
|
||||
{
|
||||
solver PCG;
|
||||
preconditioner DIC;
|
||||
tolerance 1e-09;
|
||||
relTol 0.1;
|
||||
}
|
||||
|
||||
"U|Ua.*"
|
||||
{
|
||||
solver PBiCGStab;
|
||||
preconditioner DILU;
|
||||
tolerance 1e-9;
|
||||
relTol 0.1;
|
||||
};
|
||||
}
|
||||
|
||||
relaxationFactors
|
||||
{
|
||||
fields
|
||||
{
|
||||
p 0.3;
|
||||
"pa.*" 0.2;
|
||||
}
|
||||
equations
|
||||
{
|
||||
U 0.7;
|
||||
"Ua.*" 0.5;
|
||||
}
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
@ -0,0 +1,38 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
FoamFile
|
||||
{
|
||||
version 2;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object meshDict;
|
||||
}
|
||||
|
||||
maxCellSize 0.006;
|
||||
|
||||
surfaceFile fileName;
|
||||
|
||||
boundaryCellSize 0.004;
|
||||
|
||||
boundaryCellSizeRefinementThickness 0.015;
|
||||
|
||||
boundaryLayers
|
||||
{
|
||||
patchBoundaryLayers
|
||||
{
|
||||
"lower.*|upper.*|left.*|right.*|topOPatch"
|
||||
{
|
||||
nLayers 5;
|
||||
thicknessRatio 1.8;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,118 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object optimisationDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
optimisationManager singleRun;
|
||||
|
||||
primalSolvers
|
||||
{
|
||||
op1
|
||||
{
|
||||
active true;
|
||||
type incompressible;
|
||||
solver simple;
|
||||
solutionControls
|
||||
{
|
||||
nIters 3000;
|
||||
residualControl
|
||||
{
|
||||
"p.*" 5.e-7;
|
||||
"U.*" 5.e-7;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
adjointManagers
|
||||
{
|
||||
adjManager1
|
||||
{
|
||||
primalSolver op1;
|
||||
adjointSolvers
|
||||
{
|
||||
as1
|
||||
{
|
||||
// choose adjoint solver
|
||||
//----------------------
|
||||
active false;
|
||||
type incompressible;
|
||||
solver adjointSimple;
|
||||
computeSensitivities false;
|
||||
// manage objectives
|
||||
//------------------
|
||||
objectives
|
||||
{
|
||||
type incompressible;
|
||||
objectiveNames
|
||||
{
|
||||
losses
|
||||
{
|
||||
weight 1.;
|
||||
type PtLosses;
|
||||
patches (inlet "outlet.*");
|
||||
normalize true;
|
||||
}
|
||||
}
|
||||
}
|
||||
// ATC treatment
|
||||
//--------------
|
||||
ATCModel
|
||||
{
|
||||
ATCModel standard;
|
||||
}
|
||||
// solution control
|
||||
//------------------
|
||||
solutionControls
|
||||
{
|
||||
nIters 300;
|
||||
residualControl
|
||||
{
|
||||
"pa.*" 5.e-7;
|
||||
"Ua.*" 5.e-7;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
optimisation
|
||||
{
|
||||
designVariables
|
||||
{
|
||||
type dynamicTopO;
|
||||
sensitivityType topO;
|
||||
marchingCoeffs
|
||||
{
|
||||
seedPatches (designWall);
|
||||
marchingStep 2;
|
||||
}
|
||||
fixedZeroPorousZones (IEntranceSet OEntranceSet OREntranceSet);
|
||||
regularisation
|
||||
{
|
||||
regularise false;
|
||||
}
|
||||
betaMax 2500;
|
||||
}
|
||||
updateMethod
|
||||
{
|
||||
method MMA;
|
||||
eta 1;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,245 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object blockMeshDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
convertToMeters 1;
|
||||
|
||||
vertices
|
||||
(
|
||||
(0 0 0) //0
|
||||
(0 0.3 0) //1
|
||||
(0 0.5 0) //2
|
||||
(0 0.55 0) //3
|
||||
(0 0.75 0) //4
|
||||
(0 1 0) //5
|
||||
(0.5 0 0) //6
|
||||
(0.5 0.3 0) //7
|
||||
(0.5 0.5 0) //8
|
||||
(0.5 0.55 0) //9
|
||||
(0.5 0.75 0) //10
|
||||
(0.5 1 0) //11
|
||||
(0.7 0 0) //12
|
||||
(0.7 0.3 0) //13
|
||||
(0.7 0.5 0) //14
|
||||
(0.7 0.55 0) //15
|
||||
(0.7 0.75 0) //16
|
||||
(0.7 1 0) //17
|
||||
(1 0 0) //18
|
||||
(1 0.3 0) //19
|
||||
(1 0.5 0) //20
|
||||
(1 0.55 0) //21
|
||||
(1 0.75 0) //22
|
||||
(1 1 0) //23
|
||||
(0 0 0.1) //24
|
||||
(0 0.3 0.1) //25
|
||||
(0 0.5 0.1) //26
|
||||
(0 0.55 0.1) //27
|
||||
(0 0.75 0.1) //28
|
||||
(0 1 0.1) //29
|
||||
(0.5 0 0.1) //30
|
||||
(0.5 0.3 0.1) //31
|
||||
(0.5 0.5 0.1) //32
|
||||
(0.5 0.55 0.1) //33
|
||||
(0.5 0.75 0.1) //34
|
||||
(0.5 1 0.1) //35
|
||||
(0.7 0 0.1) //36
|
||||
(0.7 0.3 0.1) //37
|
||||
(0.7 0.5 0.1) //38
|
||||
(0.7 0.55 0.1) //39
|
||||
(0.7 0.75 0.1) //40
|
||||
(0.7 1 0.1) //41
|
||||
(1 0 0.1) //42
|
||||
(1 0.3 0.1) //43
|
||||
(1 0.5 0.1) //44
|
||||
(1 0.55 0.1) //45
|
||||
(1 0.75 0.1) //46
|
||||
(1 1 0.1) //47
|
||||
|
||||
(-0.5 0.3 0) //48
|
||||
(-0.5 0.5 0) //49
|
||||
(-0.5 0.3 0.1) //50
|
||||
(-0.5 0.5 0.1) //51
|
||||
|
||||
(0.5 -0.5 0) //52
|
||||
(0.7 -0.5 0) //53
|
||||
(0.5 -0.5 0.1) //54
|
||||
(0.7 -0.5 0.1) //55
|
||||
|
||||
(1.5 0.55 0) //56
|
||||
(1.5 0.75 0) //57
|
||||
(1.5 0.55 0.1) //58
|
||||
(1.5 0.75 0.1) //59
|
||||
);
|
||||
|
||||
blocks
|
||||
(
|
||||
/*
|
||||
hex (0 24 30 6 1 25 31 7 ) (1 30 18) simpleGrading (1 1 1) //1
|
||||
hex (1 25 31 7 2 26 32 8 ) (1 30 12) simpleGrading (1 1 1) //2
|
||||
hex (2 26 32 8 3 27 33 9 ) (1 30 3) simpleGrading (1 1 1) //3
|
||||
hex (3 27 33 9 4 28 34 10) (1 30 12) simpleGrading (1 1 1) //4
|
||||
hex (4 28 34 10 5 29 35 11) (1 30 15) simpleGrading (1 1 1) //5
|
||||
hex (6 30 36 12 7 31 37 13) (1 12 18) simpleGrading (1 1 1) //6
|
||||
hex (7 31 37 13 8 32 38 14) (1 12 12) simpleGrading (1 1 1) //7
|
||||
hex (8 32 38 14 9 33 39 15) (1 12 3) simpleGrading (1 1 1) //8
|
||||
hex (9 33 39 15 10 34 40 16) (1 12 12) simpleGrading (1 1 1) //9
|
||||
hex (10 34 40 16 11 35 41 17) (1 12 15) simpleGrading (1 1 1) //10
|
||||
hex (12 36 42 18 13 37 43 19) (1 18 18) simpleGrading (1 1 1) //11
|
||||
hex (13 37 43 19 14 38 44 20) (1 18 12) simpleGrading (1 1 1) //12
|
||||
hex (14 38 44 20 15 39 45 21) (1 18 3) simpleGrading (1 1 1) //13
|
||||
hex (15 39 45 21 16 40 46 22) (1 18 12) simpleGrading (1 1 1) //14
|
||||
hex (16 40 46 22 17 41 47 23) (1 18 15) simpleGrading (1 1 1) //15
|
||||
//*/
|
||||
//*
|
||||
hex (48 50 25 1 49 51 26 2 ) (1 50 20) simpleGrading (1 1 1) //0
|
||||
hex (0 24 30 6 1 25 31 7 ) (1 50 30) simpleGrading (1 1 1) //1
|
||||
hex (1 25 31 7 2 26 32 8 ) (1 50 20) simpleGrading (1 1 1) //2
|
||||
hex (2 26 32 8 3 27 33 9 ) (1 50 5) simpleGrading (1 1 1) //3
|
||||
hex (3 27 33 9 4 28 34 10) (1 50 20) simpleGrading (1 1 1) //4
|
||||
hex (4 28 34 10 5 29 35 11) (1 50 25) simpleGrading (1 1 1) //5
|
||||
hex (6 30 36 12 7 31 37 13) (1 20 30) simpleGrading (1 1 1) //6
|
||||
hex (7 31 37 13 8 32 38 14) (1 20 20) simpleGrading (1 1 1) //7
|
||||
hex (8 32 38 14 9 33 39 15) (1 20 5) simpleGrading (1 1 1) //8
|
||||
hex (9 33 39 15 10 34 40 16) (1 20 20) simpleGrading (1 1 1) //9
|
||||
hex (10 34 40 16 11 35 41 17) (1 20 25) simpleGrading (1 1 1) //10
|
||||
hex (12 36 42 18 13 37 43 19) (1 30 30) simpleGrading (1 1 1) //11
|
||||
hex (13 37 43 19 14 38 44 20) (1 30 20) simpleGrading (1 1 1) //12
|
||||
hex (14 38 44 20 15 39 45 21) (1 30 5) simpleGrading (1 1 1) //13
|
||||
hex (15 39 45 21 16 40 46 22) (1 30 20) simpleGrading (1 1 1) //14
|
||||
hex (16 40 46 22 17 41 47 23) (1 30 25) simpleGrading (1 1 1) //15
|
||||
hex (52 54 55 53 6 30 36 12) (1 20 50) simpleGrading (1 1 1) //16
|
||||
hex (21 45 58 56 22 46 59 57) (1 50 20) simpleGrading (1 1 1) //17
|
||||
//*/
|
||||
/*
|
||||
hex (0 24 30 6 1 25 31 7 ) (1 100 60) simpleGrading (1 1 1) //1
|
||||
hex (1 25 31 7 2 26 32 8 ) (1 100 40) simpleGrading (1 1 1) //2
|
||||
hex (2 26 32 8 3 27 33 9 ) (1 100 10) simpleGrading (1 1 1) //3
|
||||
hex (3 27 33 9 4 28 34 10) (1 100 40) simpleGrading (1 1 1) //4
|
||||
hex (4 28 34 10 5 29 35 11) (1 100 50) simpleGrading (1 1 1) //5
|
||||
hex (6 30 36 12 7 31 37 13) (1 40 60) simpleGrading (1 1 1) //6
|
||||
hex (7 31 37 13 8 32 38 14) (1 40 40) simpleGrading (1 1 1) //7
|
||||
hex (8 32 38 14 9 33 39 15) (1 40 10) simpleGrading (1 1 1) //8
|
||||
hex (9 33 39 15 10 34 40 16) (1 40 40) simpleGrading (1 1 1) //9
|
||||
hex (10 34 40 16 11 35 41 17) (1 40 50) simpleGrading (1 1 1) //10
|
||||
hex (12 36 42 18 13 37 43 19) (1 60 60) simpleGrading (1 1 1) //11
|
||||
hex (13 37 43 19 14 38 44 20) (1 60 40) simpleGrading (1 1 1) //12
|
||||
hex (14 38 44 20 15 39 45 21) (1 60 10) simpleGrading (1 1 1) //13
|
||||
hex (15 39 45 21 16 40 46 22) (1 60 40) simpleGrading (1 1 1) //14
|
||||
hex (16 40 46 22 17 41 47 23) (1 60 50) simpleGrading (1 1 1) //15
|
||||
//*/
|
||||
);
|
||||
|
||||
edges
|
||||
(
|
||||
);
|
||||
|
||||
patches
|
||||
(
|
||||
wall designWall
|
||||
(
|
||||
(1 0 24 25)
|
||||
(3 2 26 27)
|
||||
(4 3 27 28)
|
||||
(5 4 28 29)
|
||||
(11 5 29 35)
|
||||
(17 11 35 41)
|
||||
(23 17 41 47)
|
||||
(22 23 47 46)
|
||||
(20 21 45 44)
|
||||
(19 20 44 43)
|
||||
(18 19 43 42)
|
||||
(0 6 30 24)
|
||||
(12 18 42 36)
|
||||
)
|
||||
|
||||
wall IEntranceWall
|
||||
(
|
||||
(48 1 25 50)
|
||||
(51 26 2 49)
|
||||
)
|
||||
|
||||
wall OEntranceWall
|
||||
(
|
||||
(6 52 54 30)
|
||||
(12 36 55 53)
|
||||
)
|
||||
|
||||
wall OREntranceWall
|
||||
(
|
||||
(22 46 59 57)
|
||||
(21 56 58 45)
|
||||
)
|
||||
|
||||
patch inlet
|
||||
(
|
||||
(49 48 50 51)
|
||||
)
|
||||
patch outlet
|
||||
(
|
||||
(52 53 55 54)
|
||||
)
|
||||
patch outlet-right
|
||||
(
|
||||
(56 57 59 58)
|
||||
)
|
||||
empty frontBack
|
||||
(
|
||||
(51 50 25 26)
|
||||
(49 2 1 48)
|
||||
|
||||
(30 54 55 36)
|
||||
(6 12 53 52)
|
||||
(46 45 58 59)
|
||||
(22 57 56 21)
|
||||
|
||||
(0 1 7 6)
|
||||
(1 2 8 7)
|
||||
(2 3 9 8)
|
||||
(3 4 10 9)
|
||||
(4 5 11 10)
|
||||
(6 7 13 12)
|
||||
(7 8 14 13)
|
||||
(8 9 15 14)
|
||||
(9 10 16 15)
|
||||
(10 11 17 16)
|
||||
(12 13 19 18)
|
||||
(13 14 20 19)
|
||||
(14 15 21 20)
|
||||
(15 16 22 21)
|
||||
(16 17 23 22)
|
||||
|
||||
(24 30 31 25)
|
||||
(25 31 32 26)
|
||||
(26 32 33 27)
|
||||
(27 33 34 28)
|
||||
(28 34 35 29)
|
||||
(30 36 37 31)
|
||||
(31 37 38 32)
|
||||
(32 38 39 33)
|
||||
(33 39 40 34)
|
||||
(34 40 41 35)
|
||||
(36 42 43 37)
|
||||
(37 43 44 38)
|
||||
(38 44 45 39)
|
||||
(39 45 46 40)
|
||||
(40 46 47 41)
|
||||
)
|
||||
);
|
||||
|
||||
mergePatchPairs
|
||||
(
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,47 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object controlDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application adjointOptimisationFoam;
|
||||
|
||||
startFrom latestTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
stopAt endTime;
|
||||
|
||||
endTime 50;
|
||||
|
||||
deltaT 1;
|
||||
|
||||
writeControl timeStep;
|
||||
|
||||
writeInterval 10;
|
||||
|
||||
purgeWrite 0;
|
||||
|
||||
writeFormat ascii;
|
||||
|
||||
writePrecision 6;
|
||||
|
||||
writeCompression yes;
|
||||
|
||||
timeFormat general;
|
||||
|
||||
timePrecision 6;
|
||||
|
||||
runTimeModifiable yes;
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,58 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object decomposeParDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
numberOfSubdomains 4;
|
||||
|
||||
method scotch;
|
||||
//method metis;
|
||||
//method parMetis;
|
||||
|
||||
simpleCoeffs
|
||||
{
|
||||
n (2 2 1);
|
||||
delta 0.001;
|
||||
}
|
||||
|
||||
hierarchicalCoeffs
|
||||
{
|
||||
n (4 4 2);
|
||||
delta 0.001;
|
||||
order xyz;
|
||||
}
|
||||
|
||||
metisCoeffs
|
||||
{
|
||||
//processorWeights
|
||||
//(
|
||||
// 1
|
||||
// 1
|
||||
// 1
|
||||
// 1
|
||||
//);
|
||||
}
|
||||
|
||||
manualCoeffs
|
||||
{
|
||||
dataFile "";
|
||||
}
|
||||
|
||||
distributed no;
|
||||
|
||||
roots
|
||||
(
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,21 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object fvOptions;
|
||||
}
|
||||
momSource
|
||||
{
|
||||
type topOSource;
|
||||
names (U Ua);
|
||||
function linear;
|
||||
interpolationField beta;
|
||||
}
|
@ -0,0 +1,47 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object fvSchemes;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
ddtSchemes
|
||||
{
|
||||
default steadyState;
|
||||
}
|
||||
|
||||
gradSchemes
|
||||
{
|
||||
default Gauss linear;
|
||||
}
|
||||
|
||||
divSchemes
|
||||
{
|
||||
default Gauss linear;
|
||||
div(phi,U) bounded Gauss upwind;
|
||||
div(-phi,Ua) bounded Gauss upwind;
|
||||
}
|
||||
|
||||
interpolationSchemes
|
||||
{
|
||||
default linear;
|
||||
}
|
||||
laplacianSchemes
|
||||
{
|
||||
default Gauss linear corrected;
|
||||
}
|
||||
snGradSchemes
|
||||
{
|
||||
default corrected;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
@ -0,0 +1,55 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object fvSolution;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
SIMPLE
|
||||
{
|
||||
nNonOrthogonalCorrectors 0;
|
||||
}
|
||||
|
||||
solvers
|
||||
{
|
||||
"p|pa.*|bTilda|aTilda"
|
||||
{
|
||||
solver PCG;
|
||||
preconditioner DIC;
|
||||
tolerance 1e-09;
|
||||
relTol 0.1;
|
||||
}
|
||||
|
||||
"U|Ua.*"
|
||||
{
|
||||
solver PBiCGStab;
|
||||
preconditioner DILU;
|
||||
tolerance 1e-9;
|
||||
relTol 0.1;
|
||||
};
|
||||
}
|
||||
|
||||
relaxationFactors
|
||||
{
|
||||
fields
|
||||
{
|
||||
p 0.3;
|
||||
"pa.*" 0.2;
|
||||
}
|
||||
equations
|
||||
{
|
||||
U 0.7;
|
||||
"Ua.*" 0.5;
|
||||
}
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
@ -0,0 +1,161 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object optimisationDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
optimisationManager steadyOptimisation;
|
||||
|
||||
primalSolvers
|
||||
{
|
||||
op1
|
||||
{
|
||||
active true;
|
||||
type incompressible;
|
||||
solver simple;
|
||||
solutionControls
|
||||
{
|
||||
nIters 300;
|
||||
residualControl
|
||||
{
|
||||
"p.*" 5.e-7;
|
||||
"U.*" 5.e-7;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
adjointManagers
|
||||
{
|
||||
adjManager1
|
||||
{
|
||||
primalSolver op1;
|
||||
adjointSolvers
|
||||
{
|
||||
as1
|
||||
{
|
||||
// choose adjoint solver
|
||||
//----------------------
|
||||
active true;
|
||||
type incompressible;
|
||||
solver adjointSimple;
|
||||
// manage objectives
|
||||
//------------------
|
||||
objectives
|
||||
{
|
||||
type incompressible;
|
||||
objectiveNames
|
||||
{
|
||||
losses
|
||||
{
|
||||
weight 1.;
|
||||
type PtLosses;
|
||||
patches (inlet "outlet.*");
|
||||
normalize true;
|
||||
}
|
||||
}
|
||||
}
|
||||
// ATC treatment
|
||||
//--------------
|
||||
ATCModel
|
||||
{
|
||||
ATCModel standard;
|
||||
}
|
||||
// solution control
|
||||
//------------------
|
||||
solutionControls
|
||||
{
|
||||
nIters 300;
|
||||
residualControl
|
||||
{
|
||||
"pa.*" 5.e-7;
|
||||
"Ua.*" 5.e-7;
|
||||
}
|
||||
}
|
||||
}
|
||||
vol
|
||||
{
|
||||
// choose adjoint solver
|
||||
//----------------------
|
||||
active true;
|
||||
type null;
|
||||
isConstraint true;
|
||||
// manage objectives
|
||||
//------------------
|
||||
objectives
|
||||
{
|
||||
type geometric;
|
||||
objectiveNames
|
||||
{
|
||||
vol
|
||||
{
|
||||
weight -1.;
|
||||
type topOSolidVolume;
|
||||
//percentage 0.462;
|
||||
percentage
|
||||
{
|
||||
type scale;
|
||||
scale
|
||||
{
|
||||
type stepRamp;
|
||||
start 0;
|
||||
duration 20;
|
||||
interval 5;
|
||||
}
|
||||
value
|
||||
{
|
||||
type constant;
|
||||
value constant 0.538;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
optimisation
|
||||
{
|
||||
designVariables
|
||||
{
|
||||
type levelSet;
|
||||
sensitivityType topO;
|
||||
fixedZeroPorousZones (IEntranceSet OEntranceSet OREntranceSet);
|
||||
regularisation
|
||||
{
|
||||
regularise true;
|
||||
meanRadiusMult 5;
|
||||
//radius 0.05;
|
||||
}
|
||||
interpolation
|
||||
{
|
||||
function sigmoidalHeaviside;
|
||||
meanRadiusMult 1;
|
||||
//d 0.01;
|
||||
}
|
||||
initialisation
|
||||
{
|
||||
method meshWave;
|
||||
}
|
||||
betaMax 2500;
|
||||
}
|
||||
updateMethod
|
||||
{
|
||||
method MMA;
|
||||
eta 1;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,68 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object topoSetDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
actions
|
||||
(
|
||||
// Inlet
|
||||
{
|
||||
name IEntranceSet;
|
||||
type cellSet;
|
||||
action new;
|
||||
source boxToCell;
|
||||
sourceInfo
|
||||
{
|
||||
box (-1.0 0.0 0.0)(0.0 1.0 1.0);
|
||||
}
|
||||
}
|
||||
|
||||
// Outlet
|
||||
{
|
||||
name OEntranceSet;
|
||||
type cellSet;
|
||||
action new;
|
||||
source boxToCell;
|
||||
sourceInfo
|
||||
{
|
||||
box (-1.0 -1.0 0.0)(1.0 0.0 1.0);
|
||||
}
|
||||
}
|
||||
|
||||
// Outlet-right
|
||||
{
|
||||
name OREntranceSet;
|
||||
type cellSet;
|
||||
action new;
|
||||
source boxToCell;
|
||||
sourceInfo
|
||||
{
|
||||
box (1.0 0.0 0.0)(2.0 1.0 1.0);
|
||||
}
|
||||
}
|
||||
|
||||
// Design space
|
||||
{
|
||||
name designSpace;
|
||||
type cellSet;
|
||||
action new;
|
||||
source boxToCell;
|
||||
sourceInfo
|
||||
{
|
||||
box (0.0 0.0 0.0)(1.0 1.0 1.0);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,70 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volVectorField;
|
||||
object U;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 1 -1 0 0 0 0];
|
||||
|
||||
internalField uniform (0.001 0.001 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
frontBack
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
|
||||
designWall
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
IEntranceWall
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
OEntranceWall
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
OREntranceWall
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
inlet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (1 0 0);
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
outlet-right
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,72 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volVectorField;
|
||||
object U;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 1 -1 0 0 0 0];
|
||||
|
||||
internalField uniform (0 0 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
frontBack
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
|
||||
designWall
|
||||
{
|
||||
type adjointWallVelocity;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
IEntranceWall
|
||||
{
|
||||
type adjointWallVelocity;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
OEntranceWall
|
||||
{
|
||||
type adjointWallVelocity;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
OREntranceWall
|
||||
{
|
||||
type adjointWallVelocity;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
inlet
|
||||
{
|
||||
type adjointInletVelocity;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type adjointOutletVelocity;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
outlet-right
|
||||
{
|
||||
type adjointOutletVelocity;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,67 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object p;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 2 -2 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
frontBack
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
|
||||
designWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
IEntranceWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
OEntranceWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
OREntranceWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
inlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0.0;
|
||||
}
|
||||
|
||||
outlet-right
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0.0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,67 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object p;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 2 -2 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
frontBack
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
|
||||
designWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
IEntranceWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
OEntranceWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
OREntranceWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
inlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type adjointOutletPressure;
|
||||
value uniform 0.0;
|
||||
}
|
||||
|
||||
outlet-right
|
||||
{
|
||||
type adjointOutletPressure;
|
||||
value uniform 0.0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
cd "${0%/*}" || exit # Run from this directory
|
||||
. ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
cleanCase
|
||||
if [ -d "reEval" ]
|
||||
then
|
||||
cd reEval
|
||||
./Allclean
|
||||
cd ..
|
||||
fi
|
||||
|
||||
#------------------------------------------------------------------------------
|
@ -0,0 +1,20 @@
|
||||
#!/bin/sh
|
||||
cd "${0%/*}" || exit # Run from this directory
|
||||
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
runApplication blockMesh
|
||||
runApplication topoSet
|
||||
runApplication setsToZones -noFlipMap
|
||||
runApplication decomposePar
|
||||
runParallel $(getApplication)
|
||||
|
||||
if [[ ! -z $(which cartesian2DMesh) ]]
|
||||
then
|
||||
echo "Re-evaluating topO solution on a body-fitted grid"
|
||||
cd reEval
|
||||
./AllrunReEval > log.AllrunReEval 2>&1 &
|
||||
cd ..
|
||||
fi
|
||||
|
||||
#------------------------------------------------------------------------------
|
@ -0,0 +1,23 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object adjointRASProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
adjointRASModel adjointLaminar;
|
||||
|
||||
adjointTurbulence on;
|
||||
|
||||
printCoeffs off;
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,21 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object transportProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
transportModel Newtonian;
|
||||
|
||||
nu nu [0 2 -1 0 0 0 0] 1e-03;
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,28 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object turbulenceProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
simulationType laminar;
|
||||
|
||||
RAS
|
||||
{
|
||||
RASModel laminar;
|
||||
|
||||
turbulence on;
|
||||
|
||||
printCoeffs on;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,76 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volVectorField;
|
||||
object U;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 1 -1 0 0 0 0];
|
||||
|
||||
internalField uniform (0.001 0.001 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
frontBack
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
|
||||
designWall
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
topOPatch
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
IEntranceWall
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
OEntranceWall
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
OREntranceWall
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
inlet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (1 0 0);
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
outlet-right
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,78 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volVectorField;
|
||||
object U;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 1 -1 0 0 0 0];
|
||||
|
||||
internalField uniform (0 0 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
frontBack
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
|
||||
designWall
|
||||
{
|
||||
type adjointWallVelocity;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
topOPatch
|
||||
{
|
||||
type adjointWallVelocity;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
IEntranceWall
|
||||
{
|
||||
type adjointWallVelocity;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
OEntranceWall
|
||||
{
|
||||
type adjointWallVelocity;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
OREntranceWall
|
||||
{
|
||||
type adjointWallVelocity;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
inlet
|
||||
{
|
||||
type adjointInletVelocity;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type adjointOutletVelocity;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
outlet-right
|
||||
{
|
||||
type adjointOutletVelocity;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,72 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object p;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 2 -2 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
frontBack
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
|
||||
designWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
topOPatch
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
IEntranceWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
OEntranceWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
OREntranceWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
inlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0.0;
|
||||
}
|
||||
|
||||
outlet-right
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0.0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,72 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object p;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 2 -2 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
frontBack
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
|
||||
designWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
topOPatch
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
IEntranceWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
OEntranceWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
OREntranceWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
inlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type adjointOutletPressure;
|
||||
value uniform 0.0;
|
||||
}
|
||||
|
||||
outlet-right
|
||||
{
|
||||
type adjointOutletPressure;
|
||||
value uniform 0.0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
cd "${0%/*}" || exit # Run from this directory
|
||||
. ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
cleanCase
|
||||
rm -f *.stl *.fms
|
||||
foamDictionary system/meshDict -entry surfaceFile -set fileName > /dev/null
|
||||
|
||||
#------------------------------------------------------------------------------
|
@ -0,0 +1,17 @@
|
||||
#!/bin/sh
|
||||
cd "${0%/*}" || exit # Run from this directory
|
||||
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
time=$(foamDictionary ../system/controlDict -entry endTime -value)
|
||||
cp ../optimisation/topOIsoSurfaces/topOIsoSurface$time.stl .
|
||||
runApplication surfaceToFMS topOIsoSurface$time.stl
|
||||
foamDictionary system/meshDict -entry surfaceFile -set topOIsoSurface$time.fms > /dev/null
|
||||
sed -i 's/empty/wall/g' topOIsoSurface$time.fms
|
||||
sed -i 's/inlet wall/inlet patch/g' topOIsoSurface$time.fms
|
||||
sed -i 's/outlet wall/outlet patch/g' topOIsoSurface$time.fms
|
||||
runApplication cartesian2DMesh
|
||||
runApplication decomposePar
|
||||
runParallel $(getApplication)
|
||||
|
||||
#------------------------------------------------------------------------------
|
@ -0,0 +1,23 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object adjointRASProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
adjointRASModel adjointLaminar;
|
||||
|
||||
adjointTurbulence on;
|
||||
|
||||
printCoeffs off;
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,21 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object transportProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
transportModel Newtonian;
|
||||
|
||||
nu nu [0 2 -1 0 0 0 0] 1e-03;
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,28 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object turbulenceProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
simulationType laminar;
|
||||
|
||||
RAS
|
||||
{
|
||||
RASModel laminar;
|
||||
|
||||
turbulence on;
|
||||
|
||||
printCoeffs on;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,47 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object controlDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application adjointOptimisationFoam;
|
||||
|
||||
startFrom latestTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
stopAt endTime;
|
||||
|
||||
endTime 100;
|
||||
|
||||
deltaT 1;
|
||||
|
||||
writeControl timeStep;
|
||||
|
||||
writeInterval 3000;
|
||||
|
||||
purgeWrite 1;
|
||||
|
||||
writeFormat ascii;
|
||||
|
||||
writePrecision 6;
|
||||
|
||||
writeCompression yes;
|
||||
|
||||
timeFormat general;
|
||||
|
||||
timePrecision 6;
|
||||
|
||||
runTimeModifiable yes;
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,58 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object decomposeParDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
numberOfSubdomains 4;
|
||||
|
||||
method scotch;
|
||||
//method metis;
|
||||
//method parMetis;
|
||||
|
||||
simpleCoeffs
|
||||
{
|
||||
n (2 2 1);
|
||||
delta 0.001;
|
||||
}
|
||||
|
||||
hierarchicalCoeffs
|
||||
{
|
||||
n (4 4 2);
|
||||
delta 0.001;
|
||||
order xyz;
|
||||
}
|
||||
|
||||
metisCoeffs
|
||||
{
|
||||
//processorWeights
|
||||
//(
|
||||
// 1
|
||||
// 1
|
||||
// 1
|
||||
// 1
|
||||
//);
|
||||
}
|
||||
|
||||
manualCoeffs
|
||||
{
|
||||
dataFile "";
|
||||
}
|
||||
|
||||
distributed no;
|
||||
|
||||
roots
|
||||
(
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,47 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object fvSchemes;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
ddtSchemes
|
||||
{
|
||||
default steadyState;
|
||||
}
|
||||
|
||||
gradSchemes
|
||||
{
|
||||
default Gauss linear;
|
||||
}
|
||||
|
||||
divSchemes
|
||||
{
|
||||
default Gauss linear;
|
||||
div(phi,U) bounded Gauss upwind;
|
||||
div(-phi,Uaas1) bounded Gauss upwind;
|
||||
}
|
||||
|
||||
interpolationSchemes
|
||||
{
|
||||
default linear;
|
||||
}
|
||||
laplacianSchemes
|
||||
{
|
||||
default Gauss linear corrected;
|
||||
}
|
||||
snGradSchemes
|
||||
{
|
||||
default corrected;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
@ -0,0 +1,55 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object fvSolution;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
SIMPLE
|
||||
{
|
||||
nNonOrthogonalCorrectors 0;
|
||||
}
|
||||
|
||||
solvers
|
||||
{
|
||||
"p|pa.*|bTilda"
|
||||
{
|
||||
solver PCG;
|
||||
preconditioner DIC;
|
||||
tolerance 1e-09;
|
||||
relTol 0.1;
|
||||
}
|
||||
|
||||
"U|Ua.*"
|
||||
{
|
||||
solver PBiCGStab;
|
||||
preconditioner DILU;
|
||||
tolerance 1e-9;
|
||||
relTol 0.1;
|
||||
};
|
||||
}
|
||||
|
||||
relaxationFactors
|
||||
{
|
||||
fields
|
||||
{
|
||||
p 0.3;
|
||||
"pa.*" 0.2;
|
||||
}
|
||||
equations
|
||||
{
|
||||
U 0.7;
|
||||
"Ua.*" 0.5;
|
||||
}
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
@ -0,0 +1,38 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
FoamFile
|
||||
{
|
||||
version 2;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object meshDict;
|
||||
}
|
||||
|
||||
maxCellSize 0.006;
|
||||
|
||||
surfaceFile fileName;
|
||||
|
||||
boundaryCellSize 0.004;
|
||||
|
||||
boundaryCellSizeRefinementThickness 0.015;
|
||||
|
||||
boundaryLayers
|
||||
{
|
||||
patchBoundaryLayers
|
||||
{
|
||||
"lower.*|upper.*|left.*|right.*|topOPatch"
|
||||
{
|
||||
nLayers 5;
|
||||
thicknessRatio 1.8;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,118 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object optimisationDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
optimisationManager singleRun;
|
||||
|
||||
primalSolvers
|
||||
{
|
||||
op1
|
||||
{
|
||||
active true;
|
||||
type incompressible;
|
||||
solver simple;
|
||||
solutionControls
|
||||
{
|
||||
nIters 3000;
|
||||
residualControl
|
||||
{
|
||||
"p.*" 5.e-7;
|
||||
"U.*" 5.e-7;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
adjointManagers
|
||||
{
|
||||
adjManager1
|
||||
{
|
||||
primalSolver op1;
|
||||
adjointSolvers
|
||||
{
|
||||
as1
|
||||
{
|
||||
// choose adjoint solver
|
||||
//----------------------
|
||||
active false;
|
||||
type incompressible;
|
||||
solver adjointSimple;
|
||||
computeSensitivities false;
|
||||
// manage objectives
|
||||
//------------------
|
||||
objectives
|
||||
{
|
||||
type incompressible;
|
||||
objectiveNames
|
||||
{
|
||||
losses
|
||||
{
|
||||
weight 1.;
|
||||
type PtLosses;
|
||||
patches (inlet "outlet.*");
|
||||
normalize true;
|
||||
}
|
||||
}
|
||||
}
|
||||
// ATC treatment
|
||||
//--------------
|
||||
ATCModel
|
||||
{
|
||||
ATCModel standard;
|
||||
}
|
||||
// solution control
|
||||
//------------------
|
||||
solutionControls
|
||||
{
|
||||
nIters 300;
|
||||
residualControl
|
||||
{
|
||||
"pa.*" 5.e-7;
|
||||
"Ua.*" 5.e-7;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
optimisation
|
||||
{
|
||||
designVariables
|
||||
{
|
||||
type dynamicTopO;
|
||||
sensitivityType topO;
|
||||
marchingCoeffs
|
||||
{
|
||||
seedPatches (designWall);
|
||||
marchingStep 2;
|
||||
}
|
||||
fixedZeroPorousZones (IEntranceSet OEntranceSet OREntranceSet);
|
||||
regularisation
|
||||
{
|
||||
regularise false;
|
||||
}
|
||||
betaMax 2500;
|
||||
}
|
||||
updateMethod
|
||||
{
|
||||
method MMA;
|
||||
eta 1;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,245 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object blockMeshDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
convertToMeters 1;
|
||||
|
||||
vertices
|
||||
(
|
||||
(0 0 0) //0
|
||||
(0 0.3 0) //1
|
||||
(0 0.5 0) //2
|
||||
(0 0.55 0) //3
|
||||
(0 0.75 0) //4
|
||||
(0 1 0) //5
|
||||
(0.5 0 0) //6
|
||||
(0.5 0.3 0) //7
|
||||
(0.5 0.5 0) //8
|
||||
(0.5 0.55 0) //9
|
||||
(0.5 0.75 0) //10
|
||||
(0.5 1 0) //11
|
||||
(0.7 0 0) //12
|
||||
(0.7 0.3 0) //13
|
||||
(0.7 0.5 0) //14
|
||||
(0.7 0.55 0) //15
|
||||
(0.7 0.75 0) //16
|
||||
(0.7 1 0) //17
|
||||
(1 0 0) //18
|
||||
(1 0.3 0) //19
|
||||
(1 0.5 0) //20
|
||||
(1 0.55 0) //21
|
||||
(1 0.75 0) //22
|
||||
(1 1 0) //23
|
||||
(0 0 0.1) //24
|
||||
(0 0.3 0.1) //25
|
||||
(0 0.5 0.1) //26
|
||||
(0 0.55 0.1) //27
|
||||
(0 0.75 0.1) //28
|
||||
(0 1 0.1) //29
|
||||
(0.5 0 0.1) //30
|
||||
(0.5 0.3 0.1) //31
|
||||
(0.5 0.5 0.1) //32
|
||||
(0.5 0.55 0.1) //33
|
||||
(0.5 0.75 0.1) //34
|
||||
(0.5 1 0.1) //35
|
||||
(0.7 0 0.1) //36
|
||||
(0.7 0.3 0.1) //37
|
||||
(0.7 0.5 0.1) //38
|
||||
(0.7 0.55 0.1) //39
|
||||
(0.7 0.75 0.1) //40
|
||||
(0.7 1 0.1) //41
|
||||
(1 0 0.1) //42
|
||||
(1 0.3 0.1) //43
|
||||
(1 0.5 0.1) //44
|
||||
(1 0.55 0.1) //45
|
||||
(1 0.75 0.1) //46
|
||||
(1 1 0.1) //47
|
||||
|
||||
(-0.5 0.3 0) //48
|
||||
(-0.5 0.5 0) //49
|
||||
(-0.5 0.3 0.1) //50
|
||||
(-0.5 0.5 0.1) //51
|
||||
|
||||
(0.5 -0.5 0) //52
|
||||
(0.7 -0.5 0) //53
|
||||
(0.5 -0.5 0.1) //54
|
||||
(0.7 -0.5 0.1) //55
|
||||
|
||||
(1.5 0.55 0) //56
|
||||
(1.5 0.75 0) //57
|
||||
(1.5 0.55 0.1) //58
|
||||
(1.5 0.75 0.1) //59
|
||||
);
|
||||
|
||||
blocks
|
||||
(
|
||||
/*
|
||||
hex (0 24 30 6 1 25 31 7 ) (1 30 18) simpleGrading (1 1 1) //1
|
||||
hex (1 25 31 7 2 26 32 8 ) (1 30 12) simpleGrading (1 1 1) //2
|
||||
hex (2 26 32 8 3 27 33 9 ) (1 30 3) simpleGrading (1 1 1) //3
|
||||
hex (3 27 33 9 4 28 34 10) (1 30 12) simpleGrading (1 1 1) //4
|
||||
hex (4 28 34 10 5 29 35 11) (1 30 15) simpleGrading (1 1 1) //5
|
||||
hex (6 30 36 12 7 31 37 13) (1 12 18) simpleGrading (1 1 1) //6
|
||||
hex (7 31 37 13 8 32 38 14) (1 12 12) simpleGrading (1 1 1) //7
|
||||
hex (8 32 38 14 9 33 39 15) (1 12 3) simpleGrading (1 1 1) //8
|
||||
hex (9 33 39 15 10 34 40 16) (1 12 12) simpleGrading (1 1 1) //9
|
||||
hex (10 34 40 16 11 35 41 17) (1 12 15) simpleGrading (1 1 1) //10
|
||||
hex (12 36 42 18 13 37 43 19) (1 18 18) simpleGrading (1 1 1) //11
|
||||
hex (13 37 43 19 14 38 44 20) (1 18 12) simpleGrading (1 1 1) //12
|
||||
hex (14 38 44 20 15 39 45 21) (1 18 3) simpleGrading (1 1 1) //13
|
||||
hex (15 39 45 21 16 40 46 22) (1 18 12) simpleGrading (1 1 1) //14
|
||||
hex (16 40 46 22 17 41 47 23) (1 18 15) simpleGrading (1 1 1) //15
|
||||
//*/
|
||||
//*
|
||||
hex (48 50 25 1 49 51 26 2 ) (1 50 20) simpleGrading (1 1 1) //0
|
||||
hex (0 24 30 6 1 25 31 7 ) (1 50 30) simpleGrading (1 1 1) //1
|
||||
hex (1 25 31 7 2 26 32 8 ) (1 50 20) simpleGrading (1 1 1) //2
|
||||
hex (2 26 32 8 3 27 33 9 ) (1 50 5) simpleGrading (1 1 1) //3
|
||||
hex (3 27 33 9 4 28 34 10) (1 50 20) simpleGrading (1 1 1) //4
|
||||
hex (4 28 34 10 5 29 35 11) (1 50 25) simpleGrading (1 1 1) //5
|
||||
hex (6 30 36 12 7 31 37 13) (1 20 30) simpleGrading (1 1 1) //6
|
||||
hex (7 31 37 13 8 32 38 14) (1 20 20) simpleGrading (1 1 1) //7
|
||||
hex (8 32 38 14 9 33 39 15) (1 20 5) simpleGrading (1 1 1) //8
|
||||
hex (9 33 39 15 10 34 40 16) (1 20 20) simpleGrading (1 1 1) //9
|
||||
hex (10 34 40 16 11 35 41 17) (1 20 25) simpleGrading (1 1 1) //10
|
||||
hex (12 36 42 18 13 37 43 19) (1 30 30) simpleGrading (1 1 1) //11
|
||||
hex (13 37 43 19 14 38 44 20) (1 30 20) simpleGrading (1 1 1) //12
|
||||
hex (14 38 44 20 15 39 45 21) (1 30 5) simpleGrading (1 1 1) //13
|
||||
hex (15 39 45 21 16 40 46 22) (1 30 20) simpleGrading (1 1 1) //14
|
||||
hex (16 40 46 22 17 41 47 23) (1 30 25) simpleGrading (1 1 1) //15
|
||||
hex (52 54 55 53 6 30 36 12) (1 20 50) simpleGrading (1 1 1) //16
|
||||
hex (21 45 58 56 22 46 59 57) (1 50 20) simpleGrading (1 1 1) //17
|
||||
//*/
|
||||
/*
|
||||
hex (0 24 30 6 1 25 31 7 ) (1 100 60) simpleGrading (1 1 1) //1
|
||||
hex (1 25 31 7 2 26 32 8 ) (1 100 40) simpleGrading (1 1 1) //2
|
||||
hex (2 26 32 8 3 27 33 9 ) (1 100 10) simpleGrading (1 1 1) //3
|
||||
hex (3 27 33 9 4 28 34 10) (1 100 40) simpleGrading (1 1 1) //4
|
||||
hex (4 28 34 10 5 29 35 11) (1 100 50) simpleGrading (1 1 1) //5
|
||||
hex (6 30 36 12 7 31 37 13) (1 40 60) simpleGrading (1 1 1) //6
|
||||
hex (7 31 37 13 8 32 38 14) (1 40 40) simpleGrading (1 1 1) //7
|
||||
hex (8 32 38 14 9 33 39 15) (1 40 10) simpleGrading (1 1 1) //8
|
||||
hex (9 33 39 15 10 34 40 16) (1 40 40) simpleGrading (1 1 1) //9
|
||||
hex (10 34 40 16 11 35 41 17) (1 40 50) simpleGrading (1 1 1) //10
|
||||
hex (12 36 42 18 13 37 43 19) (1 60 60) simpleGrading (1 1 1) //11
|
||||
hex (13 37 43 19 14 38 44 20) (1 60 40) simpleGrading (1 1 1) //12
|
||||
hex (14 38 44 20 15 39 45 21) (1 60 10) simpleGrading (1 1 1) //13
|
||||
hex (15 39 45 21 16 40 46 22) (1 60 40) simpleGrading (1 1 1) //14
|
||||
hex (16 40 46 22 17 41 47 23) (1 60 50) simpleGrading (1 1 1) //15
|
||||
//*/
|
||||
);
|
||||
|
||||
edges
|
||||
(
|
||||
);
|
||||
|
||||
patches
|
||||
(
|
||||
wall designWall
|
||||
(
|
||||
(1 0 24 25)
|
||||
(3 2 26 27)
|
||||
(4 3 27 28)
|
||||
(5 4 28 29)
|
||||
(11 5 29 35)
|
||||
(17 11 35 41)
|
||||
(23 17 41 47)
|
||||
(22 23 47 46)
|
||||
(20 21 45 44)
|
||||
(19 20 44 43)
|
||||
(18 19 43 42)
|
||||
(0 6 30 24)
|
||||
(12 18 42 36)
|
||||
)
|
||||
|
||||
wall IEntranceWall
|
||||
(
|
||||
(48 1 25 50)
|
||||
(51 26 2 49)
|
||||
)
|
||||
|
||||
wall OEntranceWall
|
||||
(
|
||||
(6 52 54 30)
|
||||
(12 36 55 53)
|
||||
)
|
||||
|
||||
wall OREntranceWall
|
||||
(
|
||||
(22 46 59 57)
|
||||
(21 56 58 45)
|
||||
)
|
||||
|
||||
patch inlet
|
||||
(
|
||||
(49 48 50 51)
|
||||
)
|
||||
patch outlet
|
||||
(
|
||||
(52 53 55 54)
|
||||
)
|
||||
patch outlet-right
|
||||
(
|
||||
(56 57 59 58)
|
||||
)
|
||||
empty frontBack
|
||||
(
|
||||
(51 50 25 26)
|
||||
(49 2 1 48)
|
||||
|
||||
(30 54 55 36)
|
||||
(6 12 53 52)
|
||||
(46 45 58 59)
|
||||
(22 57 56 21)
|
||||
|
||||
(0 1 7 6)
|
||||
(1 2 8 7)
|
||||
(2 3 9 8)
|
||||
(3 4 10 9)
|
||||
(4 5 11 10)
|
||||
(6 7 13 12)
|
||||
(7 8 14 13)
|
||||
(8 9 15 14)
|
||||
(9 10 16 15)
|
||||
(10 11 17 16)
|
||||
(12 13 19 18)
|
||||
(13 14 20 19)
|
||||
(14 15 21 20)
|
||||
(15 16 22 21)
|
||||
(16 17 23 22)
|
||||
|
||||
(24 30 31 25)
|
||||
(25 31 32 26)
|
||||
(26 32 33 27)
|
||||
(27 33 34 28)
|
||||
(28 34 35 29)
|
||||
(30 36 37 31)
|
||||
(31 37 38 32)
|
||||
(32 38 39 33)
|
||||
(33 39 40 34)
|
||||
(34 40 41 35)
|
||||
(36 42 43 37)
|
||||
(37 43 44 38)
|
||||
(38 44 45 39)
|
||||
(39 45 46 40)
|
||||
(40 46 47 41)
|
||||
)
|
||||
);
|
||||
|
||||
mergePatchPairs
|
||||
(
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,47 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object controlDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application adjointOptimisationFoam;
|
||||
|
||||
startFrom latestTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
stopAt endTime;
|
||||
|
||||
endTime 50;
|
||||
|
||||
deltaT 1;
|
||||
|
||||
writeControl timeStep;
|
||||
|
||||
writeInterval 10;
|
||||
|
||||
purgeWrite 0;
|
||||
|
||||
writeFormat ascii;
|
||||
|
||||
writePrecision 6;
|
||||
|
||||
writeCompression yes;
|
||||
|
||||
timeFormat general;
|
||||
|
||||
timePrecision 6;
|
||||
|
||||
runTimeModifiable yes;
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,58 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object decomposeParDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
numberOfSubdomains 4;
|
||||
|
||||
method scotch;
|
||||
//method metis;
|
||||
//method parMetis;
|
||||
|
||||
simpleCoeffs
|
||||
{
|
||||
n (2 2 1);
|
||||
delta 0.001;
|
||||
}
|
||||
|
||||
hierarchicalCoeffs
|
||||
{
|
||||
n (4 4 2);
|
||||
delta 0.001;
|
||||
order xyz;
|
||||
}
|
||||
|
||||
metisCoeffs
|
||||
{
|
||||
//processorWeights
|
||||
//(
|
||||
// 1
|
||||
// 1
|
||||
// 1
|
||||
// 1
|
||||
//);
|
||||
}
|
||||
|
||||
manualCoeffs
|
||||
{
|
||||
dataFile "";
|
||||
}
|
||||
|
||||
distributed no;
|
||||
|
||||
roots
|
||||
(
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,21 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object fvOptions;
|
||||
}
|
||||
momSource
|
||||
{
|
||||
type topOSource;
|
||||
names (U Ua);
|
||||
function linear;
|
||||
interpolationField beta;
|
||||
}
|
@ -0,0 +1,47 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object fvSchemes;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
ddtSchemes
|
||||
{
|
||||
default steadyState;
|
||||
}
|
||||
|
||||
gradSchemes
|
||||
{
|
||||
default Gauss linear;
|
||||
}
|
||||
|
||||
divSchemes
|
||||
{
|
||||
default Gauss linear;
|
||||
div(phi,U) bounded Gauss upwind;
|
||||
div(-phi,Ua) bounded Gauss upwind;
|
||||
}
|
||||
|
||||
interpolationSchemes
|
||||
{
|
||||
default linear;
|
||||
}
|
||||
laplacianSchemes
|
||||
{
|
||||
default Gauss linear corrected;
|
||||
}
|
||||
snGradSchemes
|
||||
{
|
||||
default corrected;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
@ -0,0 +1,55 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object fvSolution;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
SIMPLE
|
||||
{
|
||||
nNonOrthogonalCorrectors 0;
|
||||
}
|
||||
|
||||
solvers
|
||||
{
|
||||
"p|pa.*|bTilda|aTilda"
|
||||
{
|
||||
solver PCG;
|
||||
preconditioner DIC;
|
||||
tolerance 1e-09;
|
||||
relTol 0.1;
|
||||
}
|
||||
|
||||
"U|Ua.*"
|
||||
{
|
||||
solver PBiCGStab;
|
||||
preconditioner DILU;
|
||||
tolerance 1e-9;
|
||||
relTol 0.1;
|
||||
};
|
||||
}
|
||||
|
||||
relaxationFactors
|
||||
{
|
||||
fields
|
||||
{
|
||||
p 0.3;
|
||||
"pa.*" 0.2;
|
||||
}
|
||||
equations
|
||||
{
|
||||
U 0.7;
|
||||
"Ua.*" 0.5;
|
||||
}
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
@ -0,0 +1,160 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object optimisationDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
optimisationManager steadyOptimisation;
|
||||
|
||||
primalSolvers
|
||||
{
|
||||
op1
|
||||
{
|
||||
active true;
|
||||
type incompressible;
|
||||
solver simple;
|
||||
solutionControls
|
||||
{
|
||||
nIters 300;
|
||||
residualControl
|
||||
{
|
||||
"p.*" 5.e-7;
|
||||
"U.*" 5.e-7;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
adjointManagers
|
||||
{
|
||||
adjManager1
|
||||
{
|
||||
primalSolver op1;
|
||||
adjointSolvers
|
||||
{
|
||||
as1
|
||||
{
|
||||
// choose adjoint solver
|
||||
//----------------------
|
||||
active true;
|
||||
type incompressible;
|
||||
solver adjointSimple;
|
||||
// manage objectives
|
||||
//------------------
|
||||
objectives
|
||||
{
|
||||
type incompressible;
|
||||
objectiveNames
|
||||
{
|
||||
losses
|
||||
{
|
||||
weight 1.;
|
||||
type PtLosses;
|
||||
patches (inlet "outlet.*");
|
||||
normalize true;
|
||||
}
|
||||
}
|
||||
}
|
||||
// ATC treatment
|
||||
//--------------
|
||||
ATCModel
|
||||
{
|
||||
ATCModel standard;
|
||||
}
|
||||
// solution control
|
||||
//------------------
|
||||
solutionControls
|
||||
{
|
||||
nIters 300;
|
||||
residualControl
|
||||
{
|
||||
"pa.*" 5.e-7;
|
||||
"Ua.*" 5.e-7;
|
||||
}
|
||||
}
|
||||
}
|
||||
vol
|
||||
{
|
||||
// choose adjoint solver
|
||||
//----------------------
|
||||
active true;
|
||||
type null;
|
||||
isConstraint true;
|
||||
// manage objectives
|
||||
//------------------
|
||||
objectives
|
||||
{
|
||||
type geometric;
|
||||
objectiveNames
|
||||
{
|
||||
vol
|
||||
{
|
||||
weight -1.;
|
||||
type topOSolidVolume;
|
||||
//percentage 0.462;
|
||||
percentage
|
||||
{
|
||||
type scale;
|
||||
scale
|
||||
{
|
||||
type stepRamp;
|
||||
start 0;
|
||||
duration 20;
|
||||
interval 5;
|
||||
}
|
||||
value
|
||||
{
|
||||
type constant;
|
||||
value constant 0.538;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
optimisation
|
||||
{
|
||||
designVariables
|
||||
{
|
||||
type levelSet;
|
||||
sensitivityType topO;
|
||||
fixedZeroPorousZones (IEntranceSet OEntranceSet OREntranceSet);
|
||||
regularisation
|
||||
{
|
||||
regularise true;
|
||||
meanRadiusMult 5;
|
||||
}
|
||||
interpolation
|
||||
{
|
||||
function sigmoidalHeaviside;
|
||||
meanRadiusMult 2;
|
||||
//d 0.01;
|
||||
}
|
||||
initialisation
|
||||
{
|
||||
method meshWave;
|
||||
}
|
||||
betaMax 2500;
|
||||
}
|
||||
updateMethod
|
||||
{
|
||||
method MMA;
|
||||
eta 1;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,68 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object topoSetDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
actions
|
||||
(
|
||||
// Inlet
|
||||
{
|
||||
name IEntranceSet;
|
||||
type cellSet;
|
||||
action new;
|
||||
source boxToCell;
|
||||
sourceInfo
|
||||
{
|
||||
box (-1.0 0.0 0.0)(0.0 1.0 1.0);
|
||||
}
|
||||
}
|
||||
|
||||
// Outlet
|
||||
{
|
||||
name OEntranceSet;
|
||||
type cellSet;
|
||||
action new;
|
||||
source boxToCell;
|
||||
sourceInfo
|
||||
{
|
||||
box (-1.0 -1.0 0.0)(1.0 0.0 1.0);
|
||||
}
|
||||
}
|
||||
|
||||
// Outlet-right
|
||||
{
|
||||
name OREntranceSet;
|
||||
type cellSet;
|
||||
action new;
|
||||
source boxToCell;
|
||||
sourceInfo
|
||||
{
|
||||
box (1.0 0.0 0.0)(2.0 1.0 1.0);
|
||||
}
|
||||
}
|
||||
|
||||
// Design space
|
||||
{
|
||||
name designSpace;
|
||||
type cellSet;
|
||||
action new;
|
||||
source boxToCell;
|
||||
sourceInfo
|
||||
{
|
||||
box (0.0 0.0 0.0)(1.0 1.0 1.0);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,70 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volVectorField;
|
||||
object U;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 1 -1 0 0 0 0];
|
||||
|
||||
internalField uniform (0.001 0.001 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
frontBack
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
|
||||
designWall
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
IEntranceWall
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
OEntranceWall
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
OREntranceWall
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
inlet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (1 0 0);
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
outlet-right
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,72 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volVectorField;
|
||||
object U;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 1 -1 0 0 0 0];
|
||||
|
||||
internalField uniform (0 0 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
frontBack
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
|
||||
designWall
|
||||
{
|
||||
type adjointWallVelocity;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
IEntranceWall
|
||||
{
|
||||
type adjointWallVelocity;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
OEntranceWall
|
||||
{
|
||||
type adjointWallVelocity;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
OREntranceWall
|
||||
{
|
||||
type adjointWallVelocity;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
inlet
|
||||
{
|
||||
type adjointInletVelocity;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type adjointOutletVelocity;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
outlet-right
|
||||
{
|
||||
type adjointOutletVelocity;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,67 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object p;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 2 -2 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
frontBack
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
|
||||
designWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
IEntranceWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
OEntranceWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
OREntranceWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
inlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0.0;
|
||||
}
|
||||
|
||||
outlet-right
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0.0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,67 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object p;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 2 -2 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
frontBack
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
|
||||
designWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
IEntranceWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
OEntranceWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
OREntranceWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
inlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type adjointOutletPressure;
|
||||
value uniform 0.0;
|
||||
}
|
||||
|
||||
outlet-right
|
||||
{
|
||||
type adjointOutletPressure;
|
||||
value uniform 0.0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
cd "${0%/*}" || exit # Run from this directory
|
||||
. ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
cleanCase
|
||||
if [ -d "reEval" ]
|
||||
then
|
||||
cd reEval
|
||||
./Allclean
|
||||
cd ..
|
||||
fi
|
||||
|
||||
#------------------------------------------------------------------------------
|
@ -0,0 +1,20 @@
|
||||
#!/bin/sh
|
||||
cd "${0%/*}" || exit # Run from this directory
|
||||
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
runApplication blockMesh
|
||||
runApplication topoSet
|
||||
runApplication setsToZones -noFlipMap
|
||||
runApplication decomposePar
|
||||
runParallel $(getApplication)
|
||||
|
||||
if [[ ! -z $(which cartesian2DMesh) ]]
|
||||
then
|
||||
echo "Re-evaluating topO solution on a body-fitted grid"
|
||||
cd reEval
|
||||
./AllrunReEval > log.AllrunReEval 2>&1 &
|
||||
cd ..
|
||||
fi
|
||||
|
||||
#------------------------------------------------------------------------------
|
@ -0,0 +1,23 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object adjointRASProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
adjointRASModel adjointLaminar;
|
||||
|
||||
adjointTurbulence on;
|
||||
|
||||
printCoeffs off;
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,21 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object transportProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
transportModel Newtonian;
|
||||
|
||||
nu nu [0 2 -1 0 0 0 0] 1e-03;
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,28 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object turbulenceProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
simulationType laminar;
|
||||
|
||||
RAS
|
||||
{
|
||||
RASModel laminar;
|
||||
|
||||
turbulence on;
|
||||
|
||||
printCoeffs on;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,76 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volVectorField;
|
||||
object U;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 1 -1 0 0 0 0];
|
||||
|
||||
internalField uniform (0.001 0.001 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
frontBack
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
|
||||
designWall
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
topOPatch
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
IEntranceWall
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
OEntranceWall
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
OREntranceWall
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
inlet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (1 0 0);
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
outlet-right
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,78 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volVectorField;
|
||||
object U;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 1 -1 0 0 0 0];
|
||||
|
||||
internalField uniform (0 0 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
frontBack
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
|
||||
designWall
|
||||
{
|
||||
type adjointWallVelocity;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
topOPatch
|
||||
{
|
||||
type adjointWallVelocity;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
IEntranceWall
|
||||
{
|
||||
type adjointWallVelocity;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
OEntranceWall
|
||||
{
|
||||
type adjointWallVelocity;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
OREntranceWall
|
||||
{
|
||||
type adjointWallVelocity;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
inlet
|
||||
{
|
||||
type adjointInletVelocity;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type adjointOutletVelocity;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
outlet-right
|
||||
{
|
||||
type adjointOutletVelocity;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,72 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object p;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 2 -2 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
frontBack
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
|
||||
designWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
topOPatch
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
IEntranceWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
OEntranceWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
OREntranceWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
inlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0.0;
|
||||
}
|
||||
|
||||
outlet-right
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0.0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,72 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object p;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 2 -2 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
frontBack
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
|
||||
designWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
topOPatch
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
IEntranceWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
OEntranceWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
OREntranceWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
inlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type adjointOutletPressure;
|
||||
value uniform 0.0;
|
||||
}
|
||||
|
||||
outlet-right
|
||||
{
|
||||
type adjointOutletPressure;
|
||||
value uniform 0.0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
cd "${0%/*}" || exit # Run from this directory
|
||||
. ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
cleanCase
|
||||
rm -f *.stl *.fms
|
||||
foamDictionary system/meshDict -entry surfaceFile -set fileName > /dev/null
|
||||
|
||||
#------------------------------------------------------------------------------
|
@ -0,0 +1,17 @@
|
||||
#!/bin/sh
|
||||
cd "${0%/*}" || exit # Run from this directory
|
||||
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
time=$(foamDictionary ../system/controlDict -entry endTime -value)
|
||||
cp ../optimisation/topOIsoSurfaces/topOIsoSurface$time.stl .
|
||||
runApplication surfaceToFMS topOIsoSurface$time.stl
|
||||
foamDictionary system/meshDict -entry surfaceFile -set topOIsoSurface$time.fms > /dev/null
|
||||
sed -i 's/empty/wall/g' topOIsoSurface$time.fms
|
||||
sed -i 's/inlet wall/inlet patch/g' topOIsoSurface$time.fms
|
||||
sed -i 's/outlet wall/outlet patch/g' topOIsoSurface$time.fms
|
||||
runApplication cartesian2DMesh
|
||||
runApplication decomposePar
|
||||
runParallel $(getApplication)
|
||||
|
||||
#------------------------------------------------------------------------------
|
@ -0,0 +1,23 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object adjointRASProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
adjointRASModel adjointLaminar;
|
||||
|
||||
adjointTurbulence on;
|
||||
|
||||
printCoeffs off;
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,21 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object transportProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
transportModel Newtonian;
|
||||
|
||||
nu nu [0 2 -1 0 0 0 0] 1e-03;
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,28 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object turbulenceProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
simulationType laminar;
|
||||
|
||||
RAS
|
||||
{
|
||||
RASModel laminar;
|
||||
|
||||
turbulence on;
|
||||
|
||||
printCoeffs on;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,47 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object controlDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application adjointOptimisationFoam;
|
||||
|
||||
startFrom latestTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
stopAt endTime;
|
||||
|
||||
endTime 100;
|
||||
|
||||
deltaT 1;
|
||||
|
||||
writeControl timeStep;
|
||||
|
||||
writeInterval 3000;
|
||||
|
||||
purgeWrite 1;
|
||||
|
||||
writeFormat ascii;
|
||||
|
||||
writePrecision 6;
|
||||
|
||||
writeCompression yes;
|
||||
|
||||
timeFormat general;
|
||||
|
||||
timePrecision 6;
|
||||
|
||||
runTimeModifiable yes;
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,58 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object decomposeParDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
numberOfSubdomains 4;
|
||||
|
||||
method scotch;
|
||||
//method metis;
|
||||
//method parMetis;
|
||||
|
||||
simpleCoeffs
|
||||
{
|
||||
n (2 2 1);
|
||||
delta 0.001;
|
||||
}
|
||||
|
||||
hierarchicalCoeffs
|
||||
{
|
||||
n (4 4 2);
|
||||
delta 0.001;
|
||||
order xyz;
|
||||
}
|
||||
|
||||
metisCoeffs
|
||||
{
|
||||
//processorWeights
|
||||
//(
|
||||
// 1
|
||||
// 1
|
||||
// 1
|
||||
// 1
|
||||
//);
|
||||
}
|
||||
|
||||
manualCoeffs
|
||||
{
|
||||
dataFile "";
|
||||
}
|
||||
|
||||
distributed no;
|
||||
|
||||
roots
|
||||
(
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,47 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object fvSchemes;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
ddtSchemes
|
||||
{
|
||||
default steadyState;
|
||||
}
|
||||
|
||||
gradSchemes
|
||||
{
|
||||
default Gauss linear;
|
||||
}
|
||||
|
||||
divSchemes
|
||||
{
|
||||
default Gauss linear;
|
||||
div(phi,U) bounded Gauss upwind;
|
||||
div(-phi,Uaas1) bounded Gauss upwind;
|
||||
}
|
||||
|
||||
interpolationSchemes
|
||||
{
|
||||
default linear;
|
||||
}
|
||||
laplacianSchemes
|
||||
{
|
||||
default Gauss linear corrected;
|
||||
}
|
||||
snGradSchemes
|
||||
{
|
||||
default corrected;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
@ -0,0 +1,55 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object fvSolution;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
SIMPLE
|
||||
{
|
||||
nNonOrthogonalCorrectors 0;
|
||||
}
|
||||
|
||||
solvers
|
||||
{
|
||||
"p|pa.*|bTilda"
|
||||
{
|
||||
solver PCG;
|
||||
preconditioner DIC;
|
||||
tolerance 1e-09;
|
||||
relTol 0.1;
|
||||
}
|
||||
|
||||
"U|Ua.*"
|
||||
{
|
||||
solver PBiCGStab;
|
||||
preconditioner DILU;
|
||||
tolerance 1e-9;
|
||||
relTol 0.1;
|
||||
};
|
||||
}
|
||||
|
||||
relaxationFactors
|
||||
{
|
||||
fields
|
||||
{
|
||||
p 0.3;
|
||||
"pa.*" 0.2;
|
||||
}
|
||||
equations
|
||||
{
|
||||
U 0.7;
|
||||
"Ua.*" 0.5;
|
||||
}
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
@ -0,0 +1,38 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
FoamFile
|
||||
{
|
||||
version 2;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object meshDict;
|
||||
}
|
||||
|
||||
maxCellSize 0.006;
|
||||
|
||||
surfaceFile fileName;
|
||||
|
||||
boundaryCellSize 0.004;
|
||||
|
||||
boundaryCellSizeRefinementThickness 0.015;
|
||||
|
||||
boundaryLayers
|
||||
{
|
||||
patchBoundaryLayers
|
||||
{
|
||||
"lower.*|upper.*|left.*|right.*|topOPatch"
|
||||
{
|
||||
nLayers 5;
|
||||
thicknessRatio 1.8;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,118 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object optimisationDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
optimisationManager singleRun;
|
||||
|
||||
primalSolvers
|
||||
{
|
||||
op1
|
||||
{
|
||||
active true;
|
||||
type incompressible;
|
||||
solver simple;
|
||||
solutionControls
|
||||
{
|
||||
nIters 3000;
|
||||
residualControl
|
||||
{
|
||||
"p.*" 5.e-7;
|
||||
"U.*" 5.e-7;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
adjointManagers
|
||||
{
|
||||
adjManager1
|
||||
{
|
||||
primalSolver op1;
|
||||
adjointSolvers
|
||||
{
|
||||
as1
|
||||
{
|
||||
// choose adjoint solver
|
||||
//----------------------
|
||||
active false;
|
||||
type incompressible;
|
||||
solver adjointSimple;
|
||||
computeSensitivities false;
|
||||
// manage objectives
|
||||
//------------------
|
||||
objectives
|
||||
{
|
||||
type incompressible;
|
||||
objectiveNames
|
||||
{
|
||||
losses
|
||||
{
|
||||
weight 1.;
|
||||
type PtLosses;
|
||||
patches (inlet "outlet.*");
|
||||
normalize true;
|
||||
}
|
||||
}
|
||||
}
|
||||
// ATC treatment
|
||||
//--------------
|
||||
ATCModel
|
||||
{
|
||||
ATCModel standard;
|
||||
}
|
||||
// solution control
|
||||
//------------------
|
||||
solutionControls
|
||||
{
|
||||
nIters 300;
|
||||
residualControl
|
||||
{
|
||||
"pa.*" 5.e-7;
|
||||
"Ua.*" 5.e-7;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
optimisation
|
||||
{
|
||||
designVariables
|
||||
{
|
||||
type dynamicTopO;
|
||||
sensitivityType topO;
|
||||
marchingCoeffs
|
||||
{
|
||||
seedPatches (designWall);
|
||||
marchingStep 2;
|
||||
}
|
||||
fixedZeroPorousZones (IEntranceSet OEntranceSet OREntranceSet);
|
||||
regularisation
|
||||
{
|
||||
regularise false;
|
||||
}
|
||||
betaMax 2500;
|
||||
}
|
||||
updateMethod
|
||||
{
|
||||
method MMA;
|
||||
eta 1;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,245 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object blockMeshDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
convertToMeters 1;
|
||||
|
||||
vertices
|
||||
(
|
||||
(0 0 0) //0
|
||||
(0 0.3 0) //1
|
||||
(0 0.5 0) //2
|
||||
(0 0.55 0) //3
|
||||
(0 0.75 0) //4
|
||||
(0 1 0) //5
|
||||
(0.5 0 0) //6
|
||||
(0.5 0.3 0) //7
|
||||
(0.5 0.5 0) //8
|
||||
(0.5 0.55 0) //9
|
||||
(0.5 0.75 0) //10
|
||||
(0.5 1 0) //11
|
||||
(0.7 0 0) //12
|
||||
(0.7 0.3 0) //13
|
||||
(0.7 0.5 0) //14
|
||||
(0.7 0.55 0) //15
|
||||
(0.7 0.75 0) //16
|
||||
(0.7 1 0) //17
|
||||
(1 0 0) //18
|
||||
(1 0.3 0) //19
|
||||
(1 0.5 0) //20
|
||||
(1 0.55 0) //21
|
||||
(1 0.75 0) //22
|
||||
(1 1 0) //23
|
||||
(0 0 0.1) //24
|
||||
(0 0.3 0.1) //25
|
||||
(0 0.5 0.1) //26
|
||||
(0 0.55 0.1) //27
|
||||
(0 0.75 0.1) //28
|
||||
(0 1 0.1) //29
|
||||
(0.5 0 0.1) //30
|
||||
(0.5 0.3 0.1) //31
|
||||
(0.5 0.5 0.1) //32
|
||||
(0.5 0.55 0.1) //33
|
||||
(0.5 0.75 0.1) //34
|
||||
(0.5 1 0.1) //35
|
||||
(0.7 0 0.1) //36
|
||||
(0.7 0.3 0.1) //37
|
||||
(0.7 0.5 0.1) //38
|
||||
(0.7 0.55 0.1) //39
|
||||
(0.7 0.75 0.1) //40
|
||||
(0.7 1 0.1) //41
|
||||
(1 0 0.1) //42
|
||||
(1 0.3 0.1) //43
|
||||
(1 0.5 0.1) //44
|
||||
(1 0.55 0.1) //45
|
||||
(1 0.75 0.1) //46
|
||||
(1 1 0.1) //47
|
||||
|
||||
(-0.5 0.3 0) //48
|
||||
(-0.5 0.5 0) //49
|
||||
(-0.5 0.3 0.1) //50
|
||||
(-0.5 0.5 0.1) //51
|
||||
|
||||
(0.5 -0.5 0) //52
|
||||
(0.7 -0.5 0) //53
|
||||
(0.5 -0.5 0.1) //54
|
||||
(0.7 -0.5 0.1) //55
|
||||
|
||||
(1.5 0.55 0) //56
|
||||
(1.5 0.75 0) //57
|
||||
(1.5 0.55 0.1) //58
|
||||
(1.5 0.75 0.1) //59
|
||||
);
|
||||
|
||||
blocks
|
||||
(
|
||||
/*
|
||||
hex (0 24 30 6 1 25 31 7 ) (1 30 18) simpleGrading (1 1 1) //1
|
||||
hex (1 25 31 7 2 26 32 8 ) (1 30 12) simpleGrading (1 1 1) //2
|
||||
hex (2 26 32 8 3 27 33 9 ) (1 30 3) simpleGrading (1 1 1) //3
|
||||
hex (3 27 33 9 4 28 34 10) (1 30 12) simpleGrading (1 1 1) //4
|
||||
hex (4 28 34 10 5 29 35 11) (1 30 15) simpleGrading (1 1 1) //5
|
||||
hex (6 30 36 12 7 31 37 13) (1 12 18) simpleGrading (1 1 1) //6
|
||||
hex (7 31 37 13 8 32 38 14) (1 12 12) simpleGrading (1 1 1) //7
|
||||
hex (8 32 38 14 9 33 39 15) (1 12 3) simpleGrading (1 1 1) //8
|
||||
hex (9 33 39 15 10 34 40 16) (1 12 12) simpleGrading (1 1 1) //9
|
||||
hex (10 34 40 16 11 35 41 17) (1 12 15) simpleGrading (1 1 1) //10
|
||||
hex (12 36 42 18 13 37 43 19) (1 18 18) simpleGrading (1 1 1) //11
|
||||
hex (13 37 43 19 14 38 44 20) (1 18 12) simpleGrading (1 1 1) //12
|
||||
hex (14 38 44 20 15 39 45 21) (1 18 3) simpleGrading (1 1 1) //13
|
||||
hex (15 39 45 21 16 40 46 22) (1 18 12) simpleGrading (1 1 1) //14
|
||||
hex (16 40 46 22 17 41 47 23) (1 18 15) simpleGrading (1 1 1) //15
|
||||
//*/
|
||||
//*
|
||||
hex (48 50 25 1 49 51 26 2 ) (1 50 20) simpleGrading (1 1 1) //0
|
||||
hex (0 24 30 6 1 25 31 7 ) (1 50 30) simpleGrading (1 1 1) //1
|
||||
hex (1 25 31 7 2 26 32 8 ) (1 50 20) simpleGrading (1 1 1) //2
|
||||
hex (2 26 32 8 3 27 33 9 ) (1 50 5) simpleGrading (1 1 1) //3
|
||||
hex (3 27 33 9 4 28 34 10) (1 50 20) simpleGrading (1 1 1) //4
|
||||
hex (4 28 34 10 5 29 35 11) (1 50 25) simpleGrading (1 1 1) //5
|
||||
hex (6 30 36 12 7 31 37 13) (1 20 30) simpleGrading (1 1 1) //6
|
||||
hex (7 31 37 13 8 32 38 14) (1 20 20) simpleGrading (1 1 1) //7
|
||||
hex (8 32 38 14 9 33 39 15) (1 20 5) simpleGrading (1 1 1) //8
|
||||
hex (9 33 39 15 10 34 40 16) (1 20 20) simpleGrading (1 1 1) //9
|
||||
hex (10 34 40 16 11 35 41 17) (1 20 25) simpleGrading (1 1 1) //10
|
||||
hex (12 36 42 18 13 37 43 19) (1 30 30) simpleGrading (1 1 1) //11
|
||||
hex (13 37 43 19 14 38 44 20) (1 30 20) simpleGrading (1 1 1) //12
|
||||
hex (14 38 44 20 15 39 45 21) (1 30 5) simpleGrading (1 1 1) //13
|
||||
hex (15 39 45 21 16 40 46 22) (1 30 20) simpleGrading (1 1 1) //14
|
||||
hex (16 40 46 22 17 41 47 23) (1 30 25) simpleGrading (1 1 1) //15
|
||||
hex (52 54 55 53 6 30 36 12) (1 20 50) simpleGrading (1 1 1) //16
|
||||
hex (21 45 58 56 22 46 59 57) (1 50 20) simpleGrading (1 1 1) //17
|
||||
//*/
|
||||
/*
|
||||
hex (0 24 30 6 1 25 31 7 ) (1 100 60) simpleGrading (1 1 1) //1
|
||||
hex (1 25 31 7 2 26 32 8 ) (1 100 40) simpleGrading (1 1 1) //2
|
||||
hex (2 26 32 8 3 27 33 9 ) (1 100 10) simpleGrading (1 1 1) //3
|
||||
hex (3 27 33 9 4 28 34 10) (1 100 40) simpleGrading (1 1 1) //4
|
||||
hex (4 28 34 10 5 29 35 11) (1 100 50) simpleGrading (1 1 1) //5
|
||||
hex (6 30 36 12 7 31 37 13) (1 40 60) simpleGrading (1 1 1) //6
|
||||
hex (7 31 37 13 8 32 38 14) (1 40 40) simpleGrading (1 1 1) //7
|
||||
hex (8 32 38 14 9 33 39 15) (1 40 10) simpleGrading (1 1 1) //8
|
||||
hex (9 33 39 15 10 34 40 16) (1 40 40) simpleGrading (1 1 1) //9
|
||||
hex (10 34 40 16 11 35 41 17) (1 40 50) simpleGrading (1 1 1) //10
|
||||
hex (12 36 42 18 13 37 43 19) (1 60 60) simpleGrading (1 1 1) //11
|
||||
hex (13 37 43 19 14 38 44 20) (1 60 40) simpleGrading (1 1 1) //12
|
||||
hex (14 38 44 20 15 39 45 21) (1 60 10) simpleGrading (1 1 1) //13
|
||||
hex (15 39 45 21 16 40 46 22) (1 60 40) simpleGrading (1 1 1) //14
|
||||
hex (16 40 46 22 17 41 47 23) (1 60 50) simpleGrading (1 1 1) //15
|
||||
//*/
|
||||
);
|
||||
|
||||
edges
|
||||
(
|
||||
);
|
||||
|
||||
patches
|
||||
(
|
||||
wall designWall
|
||||
(
|
||||
(1 0 24 25)
|
||||
(3 2 26 27)
|
||||
(4 3 27 28)
|
||||
(5 4 28 29)
|
||||
(11 5 29 35)
|
||||
(17 11 35 41)
|
||||
(23 17 41 47)
|
||||
(22 23 47 46)
|
||||
(20 21 45 44)
|
||||
(19 20 44 43)
|
||||
(18 19 43 42)
|
||||
(0 6 30 24)
|
||||
(12 18 42 36)
|
||||
)
|
||||
|
||||
wall IEntranceWall
|
||||
(
|
||||
(48 1 25 50)
|
||||
(51 26 2 49)
|
||||
)
|
||||
|
||||
wall OEntranceWall
|
||||
(
|
||||
(6 52 54 30)
|
||||
(12 36 55 53)
|
||||
)
|
||||
|
||||
wall OREntranceWall
|
||||
(
|
||||
(22 46 59 57)
|
||||
(21 56 58 45)
|
||||
)
|
||||
|
||||
patch inlet
|
||||
(
|
||||
(49 48 50 51)
|
||||
)
|
||||
patch outlet
|
||||
(
|
||||
(52 53 55 54)
|
||||
)
|
||||
patch outlet-right
|
||||
(
|
||||
(56 57 59 58)
|
||||
)
|
||||
empty frontBack
|
||||
(
|
||||
(51 50 25 26)
|
||||
(49 2 1 48)
|
||||
|
||||
(30 54 55 36)
|
||||
(6 12 53 52)
|
||||
(46 45 58 59)
|
||||
(22 57 56 21)
|
||||
|
||||
(0 1 7 6)
|
||||
(1 2 8 7)
|
||||
(2 3 9 8)
|
||||
(3 4 10 9)
|
||||
(4 5 11 10)
|
||||
(6 7 13 12)
|
||||
(7 8 14 13)
|
||||
(8 9 15 14)
|
||||
(9 10 16 15)
|
||||
(10 11 17 16)
|
||||
(12 13 19 18)
|
||||
(13 14 20 19)
|
||||
(14 15 21 20)
|
||||
(15 16 22 21)
|
||||
(16 17 23 22)
|
||||
|
||||
(24 30 31 25)
|
||||
(25 31 32 26)
|
||||
(26 32 33 27)
|
||||
(27 33 34 28)
|
||||
(28 34 35 29)
|
||||
(30 36 37 31)
|
||||
(31 37 38 32)
|
||||
(32 38 39 33)
|
||||
(33 39 40 34)
|
||||
(34 40 41 35)
|
||||
(36 42 43 37)
|
||||
(37 43 44 38)
|
||||
(38 44 45 39)
|
||||
(39 45 46 40)
|
||||
(40 46 47 41)
|
||||
)
|
||||
);
|
||||
|
||||
mergePatchPairs
|
||||
(
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,47 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object controlDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application adjointOptimisationFoam;
|
||||
|
||||
startFrom latestTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
stopAt endTime;
|
||||
|
||||
endTime 50;
|
||||
|
||||
deltaT 1;
|
||||
|
||||
writeControl timeStep;
|
||||
|
||||
writeInterval 10;
|
||||
|
||||
purgeWrite 0;
|
||||
|
||||
writeFormat ascii;
|
||||
|
||||
writePrecision 6;
|
||||
|
||||
writeCompression yes;
|
||||
|
||||
timeFormat general;
|
||||
|
||||
timePrecision 6;
|
||||
|
||||
runTimeModifiable yes;
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,58 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object decomposeParDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
numberOfSubdomains 4;
|
||||
|
||||
method scotch;
|
||||
//method metis;
|
||||
//method parMetis;
|
||||
|
||||
simpleCoeffs
|
||||
{
|
||||
n (2 2 1);
|
||||
delta 0.001;
|
||||
}
|
||||
|
||||
hierarchicalCoeffs
|
||||
{
|
||||
n (4 4 2);
|
||||
delta 0.001;
|
||||
order xyz;
|
||||
}
|
||||
|
||||
metisCoeffs
|
||||
{
|
||||
//processorWeights
|
||||
//(
|
||||
// 1
|
||||
// 1
|
||||
// 1
|
||||
// 1
|
||||
//);
|
||||
}
|
||||
|
||||
manualCoeffs
|
||||
{
|
||||
dataFile "";
|
||||
}
|
||||
|
||||
distributed no;
|
||||
|
||||
roots
|
||||
(
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,21 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object fvOptions;
|
||||
}
|
||||
momSource
|
||||
{
|
||||
type topOSource;
|
||||
names (U Ua);
|
||||
function linear;
|
||||
interpolationField beta;
|
||||
}
|
@ -0,0 +1,47 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object fvSchemes;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
ddtSchemes
|
||||
{
|
||||
default steadyState;
|
||||
}
|
||||
|
||||
gradSchemes
|
||||
{
|
||||
default Gauss linear;
|
||||
}
|
||||
|
||||
divSchemes
|
||||
{
|
||||
default Gauss linear;
|
||||
div(phi,U) bounded Gauss upwind;
|
||||
div(-phi,Ua) bounded Gauss upwind;
|
||||
}
|
||||
|
||||
interpolationSchemes
|
||||
{
|
||||
default linear;
|
||||
}
|
||||
laplacianSchemes
|
||||
{
|
||||
default Gauss linear corrected;
|
||||
}
|
||||
snGradSchemes
|
||||
{
|
||||
default corrected;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
@ -0,0 +1,55 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object fvSolution;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
SIMPLE
|
||||
{
|
||||
nNonOrthogonalCorrectors 0;
|
||||
}
|
||||
|
||||
solvers
|
||||
{
|
||||
"p|pa.*|bTilda|aTilda"
|
||||
{
|
||||
solver PCG;
|
||||
preconditioner DIC;
|
||||
tolerance 1e-09;
|
||||
relTol 0.1;
|
||||
}
|
||||
|
||||
"U|Ua.*"
|
||||
{
|
||||
solver PBiCGStab;
|
||||
preconditioner DILU;
|
||||
tolerance 1e-9;
|
||||
relTol 0.1;
|
||||
};
|
||||
}
|
||||
|
||||
relaxationFactors
|
||||
{
|
||||
fields
|
||||
{
|
||||
p 0.3;
|
||||
"pa.*" 0.2;
|
||||
}
|
||||
equations
|
||||
{
|
||||
U 0.7;
|
||||
"Ua.*" 0.5;
|
||||
}
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
@ -0,0 +1,160 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object optimisationDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
optimisationManager steadyOptimisation;
|
||||
|
||||
primalSolvers
|
||||
{
|
||||
op1
|
||||
{
|
||||
active true;
|
||||
type incompressible;
|
||||
solver simple;
|
||||
solutionControls
|
||||
{
|
||||
nIters 300;
|
||||
residualControl
|
||||
{
|
||||
"p.*" 5.e-7;
|
||||
"U.*" 5.e-7;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
adjointManagers
|
||||
{
|
||||
adjManager1
|
||||
{
|
||||
primalSolver op1;
|
||||
adjointSolvers
|
||||
{
|
||||
as1
|
||||
{
|
||||
// choose adjoint solver
|
||||
//----------------------
|
||||
active true;
|
||||
type incompressible;
|
||||
solver adjointSimple;
|
||||
// manage objectives
|
||||
//------------------
|
||||
objectives
|
||||
{
|
||||
type incompressible;
|
||||
objectiveNames
|
||||
{
|
||||
losses
|
||||
{
|
||||
weight 1.;
|
||||
type PtLosses;
|
||||
patches (inlet "outlet.*");
|
||||
normalize true;
|
||||
}
|
||||
}
|
||||
}
|
||||
// ATC treatment
|
||||
//--------------
|
||||
ATCModel
|
||||
{
|
||||
ATCModel standard;
|
||||
}
|
||||
// solution control
|
||||
//------------------
|
||||
solutionControls
|
||||
{
|
||||
nIters 300;
|
||||
residualControl
|
||||
{
|
||||
"pa.*" 5.e-7;
|
||||
"Ua.*" 5.e-7;
|
||||
}
|
||||
}
|
||||
}
|
||||
vol
|
||||
{
|
||||
// choose adjoint solver
|
||||
//----------------------
|
||||
active true;
|
||||
type null;
|
||||
isConstraint true;
|
||||
// manage objectives
|
||||
//------------------
|
||||
objectives
|
||||
{
|
||||
type geometric;
|
||||
objectiveNames
|
||||
{
|
||||
vol
|
||||
{
|
||||
weight -1.;
|
||||
type topOSolidVolume;
|
||||
//percentage 0.462;
|
||||
percentage
|
||||
{
|
||||
type scale;
|
||||
scale
|
||||
{
|
||||
type stepRamp;
|
||||
start 0;
|
||||
duration 20;
|
||||
interval 5;
|
||||
}
|
||||
value
|
||||
{
|
||||
type constant;
|
||||
value constant 0.538;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
optimisation
|
||||
{
|
||||
designVariables
|
||||
{
|
||||
type levelSet;
|
||||
sensitivityType topO;
|
||||
fixedZeroPorousZones (IEntranceSet OEntranceSet OREntranceSet);
|
||||
regularisation
|
||||
{
|
||||
regularise true;
|
||||
meanRadiusMult 10;
|
||||
}
|
||||
interpolation
|
||||
{
|
||||
function sigmoidalHeaviside;
|
||||
meanRadiusMult 1;
|
||||
//d 0.01;
|
||||
}
|
||||
initialisation
|
||||
{
|
||||
method meshWave;
|
||||
}
|
||||
betaMax 2500;
|
||||
}
|
||||
updateMethod
|
||||
{
|
||||
method MMA;
|
||||
eta 1;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,68 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object topoSetDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
actions
|
||||
(
|
||||
// Inlet
|
||||
{
|
||||
name IEntranceSet;
|
||||
type cellSet;
|
||||
action new;
|
||||
source boxToCell;
|
||||
sourceInfo
|
||||
{
|
||||
box (-1.0 0.0 0.0)(0.0 1.0 1.0);
|
||||
}
|
||||
}
|
||||
|
||||
// Outlet
|
||||
{
|
||||
name OEntranceSet;
|
||||
type cellSet;
|
||||
action new;
|
||||
source boxToCell;
|
||||
sourceInfo
|
||||
{
|
||||
box (-1.0 -1.0 0.0)(1.0 0.0 1.0);
|
||||
}
|
||||
}
|
||||
|
||||
// Outlet-right
|
||||
{
|
||||
name OREntranceSet;
|
||||
type cellSet;
|
||||
action new;
|
||||
source boxToCell;
|
||||
sourceInfo
|
||||
{
|
||||
box (1.0 0.0 0.0)(2.0 1.0 1.0);
|
||||
}
|
||||
}
|
||||
|
||||
// Design space
|
||||
{
|
||||
name designSpace;
|
||||
type cellSet;
|
||||
action new;
|
||||
source boxToCell;
|
||||
sourceInfo
|
||||
{
|
||||
box (0.0 0.0 0.0)(1.0 1.0 1.0);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,70 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volVectorField;
|
||||
object U;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 1 -1 0 0 0 0];
|
||||
|
||||
internalField uniform (0.001 0.001 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
frontBack
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
|
||||
designWall
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
IEntranceWall
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
OEntranceWall
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
OREntranceWall
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
inlet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (1 0 0);
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
outlet-right
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,72 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volVectorField;
|
||||
object U;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 1 -1 0 0 0 0];
|
||||
|
||||
internalField uniform (0 0 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
frontBack
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
|
||||
designWall
|
||||
{
|
||||
type adjointWallVelocity;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
IEntranceWall
|
||||
{
|
||||
type adjointWallVelocity;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
OEntranceWall
|
||||
{
|
||||
type adjointWallVelocity;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
OREntranceWall
|
||||
{
|
||||
type adjointWallVelocity;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
inlet
|
||||
{
|
||||
type adjointInletVelocity;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type adjointOutletVelocity;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
outlet-right
|
||||
{
|
||||
type adjointOutletVelocity;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,67 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object p;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 2 -2 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
frontBack
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
|
||||
designWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
IEntranceWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
OEntranceWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
OREntranceWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
inlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0.0;
|
||||
}
|
||||
|
||||
outlet-right
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0.0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,67 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object p;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 2 -2 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
frontBack
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
|
||||
designWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
IEntranceWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
OEntranceWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
OREntranceWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
inlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type adjointOutletPressure;
|
||||
value uniform 0.0;
|
||||
}
|
||||
|
||||
outlet-right
|
||||
{
|
||||
type adjointOutletPressure;
|
||||
value uniform 0.0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user