TUT: changes in optimisation tutorials

- shape optimisation: SQP failed due to wrong divScheme for the adjoint
  equations
- shape optimisation: tutorials designed to show the impact of different flow
  conditions were actually using the same U
- topology optimisation: tutorials designed to show the impact of the
  flow rate distribution were actually using the same target
  fractions
- topology optimisation: updated old fvSolution syntax
This commit is contained in:
Vaggelis Papoutsis 2023-12-21 19:02:54 +02:00 committed by Andrew Heather
parent 58787bb166
commit 9f0f9f2dd6
14 changed files with 44 additions and 21 deletions

View File

@ -29,8 +29,7 @@ divSchemes
default Gauss linear;
div(phi,U) bounded Gauss linearUpwind gradUConv;
div(-phi,Uaas1) bounded Gauss linearUpwind gradUaConv;
div(-phi,Uavol) bounded Gauss linearUpwind gradUaConv;
div(-phi,Ua) bounded Gauss linearUpwind gradUaConv;
div((nuEff*dev(grad(U).T()))) Gauss linear;
div((nuEff*dev(grad(Ua).T()))) Gauss linear;

View File

@ -16,7 +16,7 @@ FoamFile
dimensions [ 0 1 -1 0 0 0 0 ];
internalField uniform ( 0.3 0 0 );
internalField uniform ( 4.95 0 0 );
boundaryField
{
@ -46,7 +46,7 @@ boundaryField
Inlet
{
type fixedValue;
value uniform ( 0.3 0 0 );
value uniform ( 4.95 0 0 );
}
Outlet

View File

@ -22,13 +22,13 @@ startTime 0;
stopAt endTime;
endTime 70;
endTime 100;
deltaT 1;
writeControl timeStep;
writeInterval 70;
writeInterval 100;
purgeWrite 0;

View File

@ -108,7 +108,7 @@ adjointManagers
type flowRatePartition;
inletPatches (inlet);
outletPatches (outlet outlet-right);
targetFractions (0.5 0.5);
targetFractions (0.3 0.7);
target 1.e-05;
normalize true;
}

View File

@ -108,7 +108,7 @@ adjointManagers
type flowRatePartition;
inletPatches (inlet);
outletPatches (outlet outlet-right);
targetFractions (0.5 0.5);
targetFractions (0.7 0.3);
target 1.e-05;
normalize true;
}

View File

@ -1,7 +1,7 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2312 |
| \\ / O peration | Version: v2306 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
@ -15,6 +15,11 @@ FoamFile
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
numberOfSubdomains 60;
method scotch;
method hierarchical;
coeffs
{
n (5 4 3);
}
// ************************************************************************* //

View File

@ -29,8 +29,9 @@ solvers
relTol 0.01;
}
"U|Ua.*" smoothSolver
"U|Ua.*"
{
solver smoothSolver;
smoother GaussSeidel;
tolerance 1e-12;
relTol 0.1;

View File

@ -1,7 +1,7 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2312 |
| \\ / O peration | Version: v2306 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
@ -15,6 +15,11 @@ FoamFile
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
numberOfSubdomains 60;
method scotch;
method hierarchical;
coeffs
{
n (5 4 3);
}
// ************************************************************************* //

View File

@ -29,8 +29,9 @@ solvers
relTol 0.01;
}
"U|Ua.*" smoothSolver
"U|Ua.*"
{
solver smoothSolver;
smoother GaussSeidel;
tolerance 1e-12;
relTol 0.1;

View File

@ -1,7 +1,7 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2312 |
| \\ / O peration | Version: v2306 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
@ -15,6 +15,11 @@ FoamFile
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
numberOfSubdomains 60;
method scotch;
method hierarchical;
coeffs
{
n (5 4 3);
}
// ************************************************************************* //

View File

@ -29,8 +29,9 @@ solvers
relTol 0.01;
}
"U|Ua.*" smoothSolver
"U|Ua.*"
{
solver smoothSolver;
smoother GaussSeidel;
tolerance 1e-12;
relTol 0.1;

View File

@ -1,7 +1,7 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2312 |
| \\ / O peration | Version: v2306 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
@ -15,6 +15,11 @@ FoamFile
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
numberOfSubdomains 60;
method scotch;
method hierarchical;
coeffs
{
n (5 4 3);
}
// ************************************************************************* //

View File

@ -29,8 +29,9 @@ solvers
relTol 0.01;
}
"U|Ua.*" smoothSolver
"U|Ua.*"
{
solver smoothSolver;
smoother GaussSeidel;
tolerance 1e-12;
relTol 0.1;

View File

@ -12,7 +12,7 @@ runParallel $(getApplication)
if [[ ! -z $(which cartesian2DMesh) ]]
then
cd reEval
./AllrunReEval > log.AllrunReEval 2>&1 &
./AllrunReEval > log.AllrunReEval 2>&1 && echo "End" >> log.AllrunReEval
cd ..
fi