ENH: the boundary value of the regularised field of design variables

(aTilda) in topology optimisation can now be provided through the 'wallValue' in the
regularisation dictionary (defaults to 1)
This commit is contained in:
Vaggelis Papoutsis 2023-12-04 16:07:25 +02:00 committed by Andrew Heather
parent 3cd2b2c692
commit 28c538f3e1
2 changed files with 10 additions and 6 deletions

View File

@ -5,8 +5,8 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2021 PCOpt/NTUA
Copyright (C) 2021 FOSS GP
Copyright (C) 2021-2023 PCOpt/NTUA
Copyright (C) 2021-2023 FOSS GP
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -92,7 +92,7 @@ void Foam::Helmholtz::solveEqn
const fvPatch& patch = mesh.boundary()[patchI];
if (isA<wallFvPatch>(patch))
{
bTilda.boundaryFieldRef()[patchI] == scalar(1);
bTilda.boundaryFieldRef()[patchI] == wallValue_;
}
}
}
@ -162,7 +162,8 @@ Foam::Helmholtz::Helmholtz
)
:
regularisationPDE(mesh, dict, zones),
solveOnActiveCells_(dict.getOrDefault<bool>("solveOnActiveCells", false))
solveOnActiveCells_(dict.getOrDefault<bool>("solveOnActiveCells", false)),
wallValue_(dict.getOrDefault<scalar>("wallValue", 1))
{}

View File

@ -5,8 +5,8 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2021 PCOpt/NTUA
Copyright (C) 2021 FOSS GP
Copyright (C) 2021-2023 PCOpt/NTUA
Copyright (C) 2021-2023 FOSS GP
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -75,6 +75,9 @@ protected:
//- active cell zones
bool solveOnActiveCells_;
//- Fixed value at wall boundaries. Defaults to 1
scalar wallValue_;
// Protected Member Functions