diff --git a/src/optimisation/adjointOptimisation/adjoint/optimisation/designVariables/topODesignVariables/regularisation/regularisationPDE/Helmoltz/Helmholtz.C b/src/optimisation/adjointOptimisation/adjoint/optimisation/designVariables/topODesignVariables/regularisation/regularisationPDE/Helmoltz/Helmholtz.C index ffcd86a0cf..39980eece8 100644 --- a/src/optimisation/adjointOptimisation/adjoint/optimisation/designVariables/topODesignVariables/regularisation/regularisationPDE/Helmoltz/Helmholtz.C +++ b/src/optimisation/adjointOptimisation/adjoint/optimisation/designVariables/topODesignVariables/regularisation/regularisationPDE/Helmoltz/Helmholtz.C @@ -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(patch)) { - bTilda.boundaryFieldRef()[patchI] == scalar(1); + bTilda.boundaryFieldRef()[patchI] == wallValue_; } } } @@ -162,7 +162,8 @@ Foam::Helmholtz::Helmholtz ) : regularisationPDE(mesh, dict, zones), - solveOnActiveCells_(dict.getOrDefault("solveOnActiveCells", false)) + solveOnActiveCells_(dict.getOrDefault("solveOnActiveCells", false)), + wallValue_(dict.getOrDefault("wallValue", 1)) {} diff --git a/src/optimisation/adjointOptimisation/adjoint/optimisation/designVariables/topODesignVariables/regularisation/regularisationPDE/Helmoltz/Helmholtz.H b/src/optimisation/adjointOptimisation/adjoint/optimisation/designVariables/topODesignVariables/regularisation/regularisationPDE/Helmoltz/Helmholtz.H index 36a646d617..def3b8b689 100644 --- a/src/optimisation/adjointOptimisation/adjoint/optimisation/designVariables/topODesignVariables/regularisation/regularisationPDE/Helmoltz/Helmholtz.H +++ b/src/optimisation/adjointOptimisation/adjoint/optimisation/designVariables/topODesignVariables/regularisation/regularisationPDE/Helmoltz/Helmholtz.H @@ -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