mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-12-28 03:37:59 +00:00
173 lines
5.0 KiB
C++
173 lines
5.0 KiB
C++
/*--------------------------------*- C++ -*----------------------------------*\
|
|
| ========= | |
|
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
|
| \\ / O peration | Version: v2312 |
|
|
| \\ / 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
|
|
{
|
|
consistent yes;
|
|
nIters 1000;
|
|
residualControl
|
|
{
|
|
"p.*" 1.e-5;
|
|
"U.*" 1.e-5;
|
|
}
|
|
averaging
|
|
{
|
|
average true;
|
|
startIter 500;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
adjointManagers
|
|
{
|
|
adjManager1
|
|
{
|
|
primalSolver op1;
|
|
adjointSolvers
|
|
{
|
|
adjS1
|
|
{
|
|
// choose adjoint solver
|
|
//----------------------
|
|
active true;
|
|
type incompressible;
|
|
solver adjointSimple;
|
|
|
|
// manage objectives
|
|
//------------------
|
|
objectives
|
|
{
|
|
type incompressible;
|
|
objectiveNames
|
|
{
|
|
drag
|
|
{
|
|
weight 1.;
|
|
type force;
|
|
patches ("motorBike.*");
|
|
direction (1 0 0);
|
|
Aref 0.75;
|
|
rhoInf 1;
|
|
UInf 20;
|
|
}
|
|
}
|
|
}
|
|
// ATC treatment
|
|
//--------------
|
|
ATCModel
|
|
{
|
|
ATCModel standard;
|
|
extraConvection 0;
|
|
nSmooth 0;
|
|
zeroATCPatchTypes (wall patch);
|
|
maskType pointCells;
|
|
}
|
|
// solution control
|
|
//------------------
|
|
solutionControls
|
|
{
|
|
consistent yes;
|
|
nIters 1000;
|
|
residualControl
|
|
{
|
|
"pa.*" 1.e-5;
|
|
"Ua.*" 1.e-5;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
optimisation
|
|
{
|
|
designVariables
|
|
{
|
|
sensitivityType multiple;
|
|
sensitivityTypes
|
|
(
|
|
pointBased
|
|
faceBased-unsmoothed
|
|
faceBased-RMult_2
|
|
faceBased-RMult_5
|
|
faceBased-RMult_10
|
|
);
|
|
patches (motorBikeGroup);
|
|
pointBased
|
|
{
|
|
sensitivityType surfacePoints;
|
|
patches (motorBikeGroup);
|
|
adjointEikonalSolver
|
|
{
|
|
tolerance 1.e-5;
|
|
iters 1000;
|
|
epsilon 0.1;
|
|
}
|
|
}
|
|
faceBased-unsmoothed
|
|
{
|
|
sensitivityType surface;
|
|
patches (motorBikeGroup);
|
|
includeSurfaceArea true;
|
|
}
|
|
faceBased-RMult_2
|
|
{
|
|
sensitivityType surface;
|
|
patches (motorBikeGroup);
|
|
includeSurfaceArea true;
|
|
smoothSensitivities true;
|
|
meanRadiusMultiplier 2;
|
|
suffix Rmult2; // suffix of the sensitivity map output files
|
|
iters 1000;
|
|
}
|
|
faceBased-RMult_5
|
|
{
|
|
sensitivityType surface;
|
|
patches (motorBikeGroup);
|
|
includeSurfaceArea true;
|
|
smoothSensitivities true;
|
|
meanRadiusMultiplier 5;
|
|
suffix Rmult5; // suffix of the sensitivity map output files
|
|
iters 1000;
|
|
}
|
|
faceBased-RMult_10
|
|
{
|
|
sensitivityType surface;
|
|
patches (motorBikeGroup);
|
|
includeSurfaceArea true;
|
|
smoothSensitivities true;
|
|
meanRadiusMultiplier 10;
|
|
suffix Rmult10; // suffix of the sensitivity map output files
|
|
iters 1000;
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
// ************************************************************************* //
|