-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adapted NavierStokes to new narrow band
- Loading branch information
Showing
15 changed files
with
396 additions
and
74 deletions.
There are no files selected for viewing
6 changes: 6 additions & 0 deletions
6
applications/solvers/leiaLevelSetTwoPhaseFoam/YoungLaplaceEqn.H
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
fvScalarMatrix YoungLaplaceEqn | ||
( | ||
fvm::laplacian(p_rgh) == fvc::div(fSigma->faceSurfaceTensionForce()*mesh.magSf()) | ||
); | ||
YoungLaplaceEqn.solve(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
75 changes: 75 additions & 0 deletions
75
src/leiaLevelSet/surfaceTensionForce/constantCurvatureSurfTension.C
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
/*---------------------------------------------------------------------------*\ | ||
========= | | ||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox | ||
\\ / O peration | | ||
\\ / A nd | www.openfoam.com | ||
\\/ M anipulation | | ||
------------------------------------------------------------------------------- | ||
Copyright (C) 2023 Tomislav Maric, TU Darmstadt | ||
------------------------------------------------------------------------------- | ||
License | ||
This file is part of OpenFOAM. | ||
OpenFOAM is free software: you can redistribute it and/or modify it | ||
under the terms of the GNU General Public License as published by | ||
the Free Software Foundation, either version 3 of the License, or | ||
(at your option) any later version. | ||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT | ||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
for more details. | ||
You should have received a copy of the GNU General Public License | ||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. | ||
\*---------------------------------------------------------------------------*/ | ||
|
||
#include "fvPatchFieldsFwd.H" | ||
#include "primitiveFieldsFwd.H" | ||
#include "surfaceTensionForce.H" | ||
#include "constantCurvatureSurfaceTension.H" | ||
#include "addToRunTimeSelectionTable.H" | ||
#include "volFields.H" | ||
#include "surfaceFields.H" | ||
#include "fvcGrad.H" | ||
#include "fvcSnGrad.H" | ||
#include "surfaceInterpolate.H" | ||
#include "volFieldsFwd.H" | ||
|
||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // | ||
|
||
namespace Foam | ||
{ | ||
|
||
defineTypeNameAndDebug(constantCurvatureSurfaceTension, false); | ||
addToRunTimeSelectionTable(surfaceTensionForce, constantCurvatureSurfaceTension, Mesh); | ||
|
||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // | ||
constantCurvatureSurfaceTension::constantCurvatureSurfaceTension(const fvMesh& mesh) | ||
: | ||
surfaceTensionForce(mesh), | ||
fvSolutionDict_(mesh_), | ||
levelSetDict_(fvSolutionDict_.subDict("levelSet")), | ||
surfTensionDict_(levelSetDict_.subDict("surfaceTensionForce")), | ||
curvature_ | ||
( | ||
"curvature", | ||
pow(dimLength, -1), | ||
surfTensionDict_.get<scalar>("curvature") | ||
), | ||
alpha_(mesh_.lookupObject<volScalarField>(surfTensionDict_.getOrDefault<word>("alpha", "alpha.dispersed"))) | ||
{} | ||
|
||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // | ||
|
||
tmp<surfaceScalarField> constantCurvatureSurfaceTension::faceSurfaceTensionForce() const | ||
{ | ||
return sigma_ * curvature_ * fvc::snGrad(alpha_); | ||
} | ||
|
||
} // End namespace Foam | ||
|
||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // | ||
|
||
// ************************************************************************* // |
91 changes: 91 additions & 0 deletions
91
src/leiaLevelSet/surfaceTensionForce/constantCurvatureSurfaceTension.H
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
/*---------------------------------------------------------------------------*\ | ||
========= | | ||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox | ||
\\ / O peration | | ||
\\ / A nd | www.openfoam.com | ||
\\/ M anipulation | | ||
------------------------------------------------------------------------------- | ||
Copyright (C) 2023 Tomislav Maric, TU Darmstadt | ||
------------------------------------------------------------------------------- | ||
License | ||
This file is part of OpenFOAM. | ||
OpenFOAM is free software: you can redistribute it and/or modify it | ||
under the terms of the GNU General Public License as published by | ||
the Free Software Foundation, either version 3 of the License, or | ||
(at your option) any later version. | ||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT | ||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
for more details. | ||
You should have received a copy of the GNU General Public License | ||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. | ||
Class | ||
Foam::constantCurvatureSurfaceTension | ||
Description | ||
A constant-curvature surface-tension force for testing if the pressure- | ||
velocity coupling algorithm is force-balanced. | ||
SourceFiles | ||
constantCurvatureSurfaceTension.C | ||
\*---------------------------------------------------------------------------*/ | ||
|
||
#ifndef constantCurvatureSurfaceTension_H | ||
#define constantCurvatureSurfaceTension_H | ||
|
||
#include "IOdictionary.H" | ||
#include "surfaceTensionForce.H" | ||
|
||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // | ||
|
||
namespace Foam | ||
{ | ||
|
||
/*---------------------------------------------------------------------------*\ | ||
Class constantCurvatureSurfaceTension Declaration | ||
\*---------------------------------------------------------------------------*/ | ||
|
||
class constantCurvatureSurfaceTension | ||
: | ||
public surfaceTensionForce | ||
{ | ||
protected: | ||
|
||
const fvSolution& fvSolutionDict_; | ||
const dictionary& levelSetDict_; | ||
const dictionary& surfTensionDict_; | ||
|
||
// Volume fraction | ||
const dimensionedScalar curvature_; | ||
const volScalarField& alpha_; | ||
|
||
public: | ||
|
||
// Static Data Members | ||
TypeName ("constantCurvatureSurfaceTension"); | ||
|
||
// Constructors | ||
constantCurvatureSurfaceTension(const fvMesh& mesh); | ||
|
||
//- Destructor | ||
virtual ~constantCurvatureSurfaceTension() = default; | ||
|
||
// Member Functions | ||
virtual tmp<surfaceScalarField> faceSurfaceTensionForce() const; | ||
}; | ||
|
||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // | ||
|
||
} // End namespace Foam | ||
|
||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // | ||
|
||
#endif | ||
|
||
// ************************************************************************* // |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.