TUT: updated the topology optimisation tutorials

Most cases now rely on the nullSpace update method, instead of MMA,
since it has proven more reliable.

Also, added some constrained optimisation cases, including constraints
on the flow rate partition and total pressure losses as well as cases
targeting uniformity as the objective function.

Added a 3D topology optimisation case which also includes constraints.
This commit is contained in:
Vaggelis Papoutsis 2023-11-24 13:19:55 +02:00 committed by Andrew Heather
parent 46757d12ec
commit eabb821926
549 changed files with 10527 additions and 2652 deletions

View File

@ -64,7 +64,7 @@ boundaryField
{
type zeroGradient;
}
}
// ************************************************************************* //

View File

@ -10,7 +10,7 @@ FoamFile
version 2.0;
format ascii;
class volVectorField;
object U;
object Ua;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -66,7 +66,7 @@ boundaryField
type adjointOutletVelocity;
value uniform (0 0 0);
}
}
// ************************************************************************* //

View File

@ -61,7 +61,7 @@ boundaryField
type fixedValue;
value uniform 0.0;
}
}
// ************************************************************************* //

View File

@ -10,7 +10,7 @@ FoamFile
version 2.0;
format ascii;
class volScalarField;
object p;
object pa;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -61,7 +61,7 @@ boundaryField
type adjointOutletPressure;
value uniform 0.0;
}
}
// ************************************************************************* //

View File

@ -13,7 +13,7 @@ if [[ ! -z $(which cartesian2DMesh) ]]
then
echo "Re-evaluating topO solution on a body-fitted grid"
cd reEval
./AllrunReEval > log.AllrunReEval 2>&1 &
./AllrunReEval > log.AllrunReEval 2>&1 && echo "End" >> log.AllrunReEval
cd ..
fi

View File

@ -16,6 +16,6 @@ FoamFile
transportModel Newtonian;
nu nu [0 2 -1 0 0 0 0] 1e-03;
nu [0 2 -1 0 0 0 0] 1e-03;
// ************************************************************************* //

View File

@ -70,7 +70,7 @@ boundaryField
{
type zeroGradient;
}
}
// ************************************************************************* //

View File

@ -10,7 +10,7 @@ FoamFile
version 2.0;
format ascii;
class volVectorField;
object U;
object Ua;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -72,7 +72,7 @@ boundaryField
type adjointOutletVelocity;
value uniform (0 0 0);
}
}
// ************************************************************************* //

View File

@ -66,7 +66,7 @@ boundaryField
type fixedValue;
value uniform 0.0;
}
}
// ************************************************************************* //

View File

@ -10,7 +10,7 @@ FoamFile
version 2.0;
format ascii;
class volScalarField;
object p;
object pa;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -66,7 +66,7 @@ boundaryField
type adjointOutletPressure;
value uniform 0.0;
}
}
// ************************************************************************* //

View File

@ -10,6 +10,7 @@ foamDictionary system/meshDict -entry surfaceFile -set topOIsoSurface$time.fms >
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
sed -i 's/outlet-right wall/outlet-right patch/g' topOIsoSurface$time.fms
runApplication cartesian2DMesh
runApplication decomposePar
runParallel $(getApplication)

View File

@ -16,6 +16,6 @@ FoamFile
transportModel Newtonian;
nu nu [0 2 -1 0 0 0 0] 1e-03;
nu [0 2 -1 0 0 0 0] 1e-03;
// ************************************************************************* //

View File

@ -17,42 +17,5 @@ FoamFile
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
(
);
// ************************************************************************* //

View File

@ -28,20 +28,23 @@ divSchemes
{
default Gauss linear;
div(phi,U) bounded Gauss upwind;
div(-phi,Uaas1) bounded Gauss upwind;
div(-phi,Ua) bounded Gauss upwind;
}
interpolationSchemes
{
default linear;
}
laplacianSchemes
{
default Gauss linear corrected;
}
snGradSchemes
{
default corrected;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// ************************************************************************* //

View File

@ -52,4 +52,5 @@ relaxationFactors
}
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// ************************************************************************* //

View File

@ -88,31 +88,4 @@ adjointManagers
}
}
/*
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;
}
}
*/
// ************************************************************************* //

View File

@ -85,24 +85,6 @@ vertices
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
@ -121,24 +103,6 @@ blocks
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

View File

@ -28,7 +28,7 @@ deltaT 1;
writeControl timeStep;
writeInterval 10;
writeInterval 50;
purgeWrite 0;

View File

@ -17,42 +17,5 @@ FoamFile
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
(
);
// ************************************************************************* //

View File

@ -12,6 +12,8 @@ FoamFile
class dictionary;
object fvOptions;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
momSource
{
type topOSource;
@ -19,3 +21,6 @@ momSource
function linear;
interpolationField beta;
}
// ************************************************************************* //

View File

@ -35,13 +35,16 @@ interpolationSchemes
{
default linear;
}
laplacianSchemes
{
default Gauss linear corrected;
}
snGradSchemes
{
default corrected;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// ************************************************************************* //

View File

@ -21,7 +21,7 @@ SIMPLE
solvers
{
"p|pa.*|bTilda|aTilda"
"p|pa.*|bTilda"
{
solver PCG;
preconditioner DIC;
@ -52,4 +52,5 @@ relaxationFactors
}
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// ************************************************************************* //

View File

@ -64,7 +64,7 @@ boundaryField
{
type zeroGradient;
}
}
// ************************************************************************* //

View File

@ -10,7 +10,7 @@ FoamFile
version 2.0;
format ascii;
class volVectorField;
object U;
object Ua;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -66,7 +66,7 @@ boundaryField
type adjointOutletVelocity;
value uniform (0 0 0);
}
}
// ************************************************************************* //

View File

@ -61,7 +61,7 @@ boundaryField
type fixedValue;
value uniform 0.0;
}
}
// ************************************************************************* //

View File

@ -10,7 +10,7 @@ FoamFile
version 2.0;
format ascii;
class volScalarField;
object p;
object pa;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -61,7 +61,7 @@ boundaryField
type adjointOutletPressure;
value uniform 0.0;
}
}
// ************************************************************************* //

View File

@ -13,7 +13,7 @@ if [[ ! -z $(which cartesian2DMesh) ]]
then
echo "Re-evaluating topO solution on a body-fitted grid"
cd reEval
./AllrunReEval > log.AllrunReEval 2>&1 &
./AllrunReEval > log.AllrunReEval 2>&1 && echo "End" >> log.AllrunReEval
cd ..
fi

View File

@ -16,6 +16,6 @@ FoamFile
transportModel Newtonian;
nu nu [0 2 -1 0 0 0 0] 1e-03;
nu [0 2 -1 0 0 0 0] 1e-03;
// ************************************************************************* //

View File

@ -70,7 +70,7 @@ boundaryField
{
type zeroGradient;
}
}
// ************************************************************************* //

View File

@ -10,7 +10,7 @@ FoamFile
version 2.0;
format ascii;
class volVectorField;
object U;
object Ua;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -72,7 +72,7 @@ boundaryField
type adjointOutletVelocity;
value uniform (0 0 0);
}
}
// ************************************************************************* //

View File

@ -66,7 +66,7 @@ boundaryField
type fixedValue;
value uniform 0.0;
}
}
// ************************************************************************* //

View File

@ -10,7 +10,7 @@ FoamFile
version 2.0;
format ascii;
class volScalarField;
object p;
object pa;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -66,7 +66,7 @@ boundaryField
type adjointOutletPressure;
value uniform 0.0;
}
}
// ************************************************************************* //

View File

@ -10,6 +10,7 @@ foamDictionary system/meshDict -entry surfaceFile -set topOIsoSurface$time.fms >
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
sed -i 's/outlet-right wall/outlet-right patch/g' topOIsoSurface$time.fms
runApplication cartesian2DMesh
runApplication decomposePar
runParallel $(getApplication)

View File

@ -16,6 +16,6 @@ FoamFile
transportModel Newtonian;
nu nu [0 2 -1 0 0 0 0] 1e-03;
nu [0 2 -1 0 0 0 0] 1e-03;
// ************************************************************************* //

View File

@ -17,42 +17,5 @@ FoamFile
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
(
);
// ************************************************************************* //

View File

@ -28,20 +28,23 @@ divSchemes
{
default Gauss linear;
div(phi,U) bounded Gauss upwind;
div(-phi,Uaas1) bounded Gauss upwind;
div(-phi,Ua) bounded Gauss upwind;
}
interpolationSchemes
{
default linear;
}
laplacianSchemes
{
default Gauss linear corrected;
}
snGradSchemes
{
default corrected;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// ************************************************************************* //

View File

@ -52,4 +52,5 @@ relaxationFactors
}
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// ************************************************************************* //

View File

@ -88,31 +88,4 @@ adjointManagers
}
}
/*
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;
}
}
*/
// ************************************************************************* //

View File

@ -85,24 +85,6 @@ vertices
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
@ -121,24 +103,6 @@ blocks
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

View File

@ -28,7 +28,7 @@ deltaT 1;
writeControl timeStep;
writeInterval 10;
writeInterval 50;
purgeWrite 0;

View File

@ -17,42 +17,5 @@ FoamFile
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
(
);
// ************************************************************************* //

View File

@ -12,6 +12,8 @@ FoamFile
class dictionary;
object fvOptions;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
momSource
{
type topOSource;
@ -19,3 +21,6 @@ momSource
function linear;
interpolationField beta;
}
// ************************************************************************* //

View File

@ -35,13 +35,16 @@ interpolationSchemes
{
default linear;
}
laplacianSchemes
{
default Gauss linear corrected;
}
snGradSchemes
{
default corrected;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// ************************************************************************* //

View File

@ -21,7 +21,7 @@ SIMPLE
solvers
{
"p|pa.*|bTilda|aTilda"
"p|pa.*|bTilda"
{
solver PCG;
preconditioner DIC;
@ -52,4 +52,5 @@ relaxationFactors
}
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// ************************************************************************* //

View File

@ -137,6 +137,7 @@ optimisation
{
regularise true;
meanRadiusMult 5;
//radius 0.05;
}
interpolation
{

View File

@ -64,7 +64,7 @@ boundaryField
{
type zeroGradient;
}
}
// ************************************************************************* //

View File

@ -10,7 +10,7 @@ FoamFile
version 2.0;
format ascii;
class volVectorField;
object U;
object Ua;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -66,7 +66,7 @@ boundaryField
type adjointOutletVelocity;
value uniform (0 0 0);
}
}
// ************************************************************************* //

View File

@ -61,7 +61,7 @@ boundaryField
type fixedValue;
value uniform 0.0;
}
}
// ************************************************************************* //

View File

@ -10,7 +10,7 @@ FoamFile
version 2.0;
format ascii;
class volScalarField;
object p;
object pa;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -61,7 +61,7 @@ boundaryField
type adjointOutletPressure;
value uniform 0.0;
}
}
// ************************************************************************* //

View File

@ -13,7 +13,7 @@ if [[ ! -z $(which cartesian2DMesh) ]]
then
echo "Re-evaluating topO solution on a body-fitted grid"
cd reEval
./AllrunReEval > log.AllrunReEval 2>&1 &
./AllrunReEval > log.AllrunReEval 2>&1 && echo "End" >> log.AllrunReEval
cd ..
fi

View File

@ -16,6 +16,6 @@ FoamFile
transportModel Newtonian;
nu nu [0 2 -1 0 0 0 0] 1e-03;
nu [0 2 -1 0 0 0 0] 1e-03;
// ************************************************************************* //

View File

@ -70,7 +70,7 @@ boundaryField
{
type zeroGradient;
}
}
// ************************************************************************* //

View File

@ -10,7 +10,7 @@ FoamFile
version 2.0;
format ascii;
class volVectorField;
object U;
object Ua;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -72,7 +72,7 @@ boundaryField
type adjointOutletVelocity;
value uniform (0 0 0);
}
}
// ************************************************************************* //

View File

@ -66,7 +66,7 @@ boundaryField
type fixedValue;
value uniform 0.0;
}
}
// ************************************************************************* //

View File

@ -10,7 +10,7 @@ FoamFile
version 2.0;
format ascii;
class volScalarField;
object p;
object pa;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -66,7 +66,7 @@ boundaryField
type adjointOutletPressure;
value uniform 0.0;
}
}
// ************************************************************************* //

View File

@ -10,6 +10,7 @@ foamDictionary system/meshDict -entry surfaceFile -set topOIsoSurface$time.fms >
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
sed -i 's/outlet-right wall/outlet-right patch/g' topOIsoSurface$time.fms
runApplication cartesian2DMesh
runApplication decomposePar
runParallel $(getApplication)

View File

@ -16,6 +16,6 @@ FoamFile
transportModel Newtonian;
nu nu [0 2 -1 0 0 0 0] 1e-03;
nu [0 2 -1 0 0 0 0] 1e-03;
// ************************************************************************* //

View File

@ -17,42 +17,5 @@ FoamFile
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
(
);
// ************************************************************************* //

View File

@ -28,20 +28,23 @@ divSchemes
{
default Gauss linear;
div(phi,U) bounded Gauss upwind;
div(-phi,Uaas1) bounded Gauss upwind;
div(-phi,Ua) bounded Gauss upwind;
}
interpolationSchemes
{
default linear;
}
laplacianSchemes
{
default Gauss linear corrected;
}
snGradSchemes
{
default corrected;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// ************************************************************************* //

View File

@ -52,4 +52,5 @@ relaxationFactors
}
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// ************************************************************************* //

View File

@ -88,31 +88,4 @@ adjointManagers
}
}
/*
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;
}
}
*/
// ************************************************************************* //

View File

@ -85,24 +85,6 @@ vertices
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
@ -121,24 +103,6 @@ blocks
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

View File

@ -28,7 +28,7 @@ deltaT 1;
writeControl timeStep;
writeInterval 10;
writeInterval 50;
purgeWrite 0;

View File

@ -17,42 +17,5 @@ FoamFile
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
(
);
// ************************************************************************* //

View File

@ -12,6 +12,8 @@ FoamFile
class dictionary;
object fvOptions;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
momSource
{
type topOSource;
@ -19,3 +21,6 @@ momSource
function linear;
interpolationField beta;
}
// ************************************************************************* //

View File

@ -35,13 +35,16 @@ interpolationSchemes
{
default linear;
}
laplacianSchemes
{
default Gauss linear corrected;
}
snGradSchemes
{
default corrected;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// ************************************************************************* //

View File

@ -21,7 +21,7 @@ SIMPLE
solvers
{
"p|pa.*|bTilda|aTilda"
"p|pa.*|bTilda"
{
solver PCG;
preconditioner DIC;
@ -52,4 +52,5 @@ relaxationFactors
}
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// ************************************************************************* //

View File

@ -137,6 +137,7 @@ optimisation
{
regularise true;
meanRadiusMult 10;
//radius 0.05;
}
interpolation
{

View File

@ -64,7 +64,7 @@ boundaryField
{
type zeroGradient;
}
}
// ************************************************************************* //

View File

@ -10,7 +10,7 @@ FoamFile
version 2.0;
format ascii;
class volVectorField;
object U;
object Ua;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -66,7 +66,7 @@ boundaryField
type adjointOutletVelocity;
value uniform (0 0 0);
}
}
// ************************************************************************* //

View File

@ -61,7 +61,7 @@ boundaryField
type fixedValue;
value uniform 0.0;
}
}
// ************************************************************************* //

View File

@ -10,7 +10,7 @@ FoamFile
version 2.0;
format ascii;
class volScalarField;
object p;
object pa;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -61,7 +61,7 @@ boundaryField
type adjointOutletPressure;
value uniform 0.0;
}
}
// ************************************************************************* //

View File

@ -13,7 +13,7 @@ if [[ ! -z $(which cartesian2DMesh) ]]
then
echo "Re-evaluating topO solution on a body-fitted grid"
cd reEval
./AllrunReEval > log.AllrunReEval 2>&1 &
./AllrunReEval > log.AllrunReEval 2>&1 && echo "End" >> log.AllrunReEval
cd ..
fi

View File

@ -16,6 +16,6 @@ FoamFile
transportModel Newtonian;
nu nu [0 2 -1 0 0 0 0] 1e-03;
nu [0 2 -1 0 0 0 0] 1e-03;
// ************************************************************************* //

View File

@ -70,7 +70,7 @@ boundaryField
{
type zeroGradient;
}
}
// ************************************************************************* //

View File

@ -10,7 +10,7 @@ FoamFile
version 2.0;
format ascii;
class volVectorField;
object U;
object Ua;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -72,7 +72,7 @@ boundaryField
type adjointOutletVelocity;
value uniform (0 0 0);
}
}
// ************************************************************************* //

View File

@ -66,7 +66,7 @@ boundaryField
type fixedValue;
value uniform 0.0;
}
}
// ************************************************************************* //

View File

@ -10,7 +10,7 @@ FoamFile
version 2.0;
format ascii;
class volScalarField;
object p;
object pa;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -66,7 +66,7 @@ boundaryField
type adjointOutletPressure;
value uniform 0.0;
}
}
// ************************************************************************* //

View File

@ -10,6 +10,7 @@ foamDictionary system/meshDict -entry surfaceFile -set topOIsoSurface$time.fms >
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
sed -i 's/outlet-right wall/outlet-right patch/g' topOIsoSurface$time.fms
runApplication cartesian2DMesh
runApplication decomposePar
runParallel $(getApplication)

View File

@ -16,6 +16,6 @@ FoamFile
transportModel Newtonian;
nu nu [0 2 -1 0 0 0 0] 1e-03;
nu [0 2 -1 0 0 0 0] 1e-03;
// ************************************************************************* //

View File

@ -17,42 +17,5 @@ FoamFile
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
(
);
// ************************************************************************* //

View File

@ -28,20 +28,23 @@ divSchemes
{
default Gauss linear;
div(phi,U) bounded Gauss upwind;
div(-phi,Uaas1) bounded Gauss upwind;
div(-phi,Ua) bounded Gauss upwind;
}
interpolationSchemes
{
default linear;
}
laplacianSchemes
{
default Gauss linear corrected;
}
snGradSchemes
{
default corrected;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// ************************************************************************* //

View File

@ -52,4 +52,5 @@ relaxationFactors
}
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// ************************************************************************* //

View File

@ -88,31 +88,4 @@ adjointManagers
}
}
/*
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;
}
}
*/
// ************************************************************************* //

View File

@ -85,24 +85,6 @@ vertices
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
@ -121,24 +103,6 @@ blocks
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

View File

@ -28,7 +28,7 @@ deltaT 1;
writeControl timeStep;
writeInterval 10;
writeInterval 50;
purgeWrite 0;

View File

@ -17,42 +17,5 @@ FoamFile
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
(
);
// ************************************************************************* //

View File

@ -12,6 +12,8 @@ FoamFile
class dictionary;
object fvOptions;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
momSource
{
type topOSource;
@ -19,3 +21,6 @@ momSource
function linear;
interpolationField beta;
}
// ************************************************************************* //

View File

@ -35,13 +35,16 @@ interpolationSchemes
{
default linear;
}
laplacianSchemes
{
default Gauss linear corrected;
}
snGradSchemes
{
default corrected;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// ************************************************************************* //

View File

@ -21,7 +21,7 @@ SIMPLE
solvers
{
"p|pa.*|bTilda|aTilda"
"p|pa.*|bTilda"
{
solver PCG;
preconditioner DIC;
@ -52,4 +52,5 @@ relaxationFactors
}
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// ************************************************************************* //

View File

@ -137,6 +137,7 @@ optimisation
{
regularise true;
meanRadiusMult 10;
//radius 0.05;
}
interpolation
{

View File

@ -64,7 +64,7 @@ boundaryField
{
type zeroGradient;
}
}
// ************************************************************************* //

View File

@ -10,7 +10,7 @@ FoamFile
version 2.0;
format ascii;
class volVectorField;
object U;
object Ua;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -66,7 +66,7 @@ boundaryField
type adjointOutletVelocity;
value uniform (0 0 0);
}
}
// ************************************************************************* //

View File

@ -61,7 +61,7 @@ boundaryField
type fixedValue;
value uniform 0.0;
}
}
// ************************************************************************* //

View File

@ -10,7 +10,7 @@ FoamFile
version 2.0;
format ascii;
class volScalarField;
object p;
object pa;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -61,7 +61,7 @@ boundaryField
type adjointOutletPressure;
value uniform 0.0;
}
}
// ************************************************************************* //

View File

@ -13,7 +13,7 @@ if [[ ! -z $(which cartesian2DMesh) ]]
then
echo "Re-evaluating topO solution on a body-fitted grid"
cd reEval
./AllrunReEval > log.AllrunReEval 2>&1 &
./AllrunReEval > log.AllrunReEval 2>&1 && echo "End" >> log.AllrunReEval
cd ..
fi

View File

@ -16,6 +16,6 @@ FoamFile
transportModel Newtonian;
nu nu [0 2 -1 0 0 0 0] 1e-03;
nu [0 2 -1 0 0 0 0] 1e-03;
// ************************************************************************* //

View File

@ -70,7 +70,7 @@ boundaryField
{
type zeroGradient;
}
}
// ************************************************************************* //

View File

@ -10,7 +10,7 @@ FoamFile
version 2.0;
format ascii;
class volVectorField;
object U;
object Ua;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -72,7 +72,7 @@ boundaryField
type adjointOutletVelocity;
value uniform (0 0 0);
}
}
// ************************************************************************* //

View File

@ -66,7 +66,7 @@ boundaryField
type fixedValue;
value uniform 0.0;
}
}
// ************************************************************************* //

Some files were not shown because too many files have changed in this diff Show More