Skip to content

Commit

Permalink
Pushing code
Browse files Browse the repository at this point in the history
  • Loading branch information
fmuni committed May 31, 2023
1 parent f3914f4 commit 3ced5bc
Show file tree
Hide file tree
Showing 354 changed files with 53,177 additions and 0 deletions.
20 changes: 20 additions & 0 deletions Allwclean
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash
cd "${0%/*}" || exit # Run from this directory

#------------------------------------------------------------------------------
echo WARNING: This will clean all the libraries and solvers!
echo Press y to proceed or anything else to abort.

read varname;

if [[ "$varname" == "y" ]];
then
input="etc/buildList"

while IFS= read -r target
do
wclean $targetType $target
done < "$input"

fi
#------------------------------------------------------------------------------
13 changes: 13 additions & 0 deletions Allwmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/sh
cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/wmake/scripts/AllwmakeParseArguments

#------------------------------------------------------------------------------
input="etc/buildList"

while IFS= read -r target
do
wmake $targetType $target
done < "$input"

#------------------------------------------------------------------------------
5 changes: 5 additions & 0 deletions applications/solvers/icoBoilingFoam/Make/files
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
fluid/compressibleCourantNo.C
solid/solidRegionDiffNo.C
icoBoilingFoam.C

EXE = $(FOAM_USER_APPBIN)/icoBoilingFoam
52 changes: 52 additions & 0 deletions applications/solvers/icoBoilingFoam/Make/options
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
EXE_INC = \
-I./fluid \
-I./fluid/VoF \
-I./solid \
-I./include \
-I../../../src/interfaceProperties/lnInclude \
-I../../../src/geometricVoF/lnInclude \
-I$(LIB_SRC)/transportModels/twoPhaseMixture/lnInclude \
-I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/transportModels/incompressible/lnInclude \
-I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
-I$(LIB_SRC)/surfMesh/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/solidThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
-I$(LIB_SRC)/ODE/lnInclude \
-I$(LIB_SRC)/combustionModels/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \
-Wfatal-errors

EXE_LIBS = \
-lincompressibleTransportModels \
-lturbulenceModels \
-lincompressibleTurbulenceModels \
-lfiniteVolume \
-ldynamicFvMesh \
-lsurfMesh \
-lfvOptions \
-lmeshTools \
-lsampling \
-lwaveModels \
-lspecie \
-lreactionThermophysicalModels \
-lsolidThermo \
-lchemistryModel \
-lODE \
-lcombustionModels \
-lturbulenceModels \
-lcompressibleTurbulenceModels \
-lradiationModels \
-lregionModels \
-L$(FOAM_USER_LIBBIN) -linterfacePropertiesBoiling -lgeometricVoFBoiling
2 changes: 2 additions & 0 deletions applications/solvers/icoBoilingFoam/createFields.H
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#include "createFluidFields.H"
#include "createSolidFields.H"
4 changes: 4 additions & 0 deletions applications/solvers/icoBoilingFoam/createMeshes.H
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
regionProperties rp(runTime);

#include "createFluidMeshes.H"
#include "createSolidMeshes.H"
9 changes: 9 additions & 0 deletions applications/solvers/icoBoilingFoam/createMeshesPostProcess.H
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#include "createMeshes.H"

if (!fluidRegions.size() && !solidRegions.size())
{
FatalErrorIn(args.executable())
<< "No region meshes present" << exit(FatalError);
}

fvMesh& mesh = fluidRegions.size() ? fluidRegions[0] : solidRegions[0];
33 changes: 33 additions & 0 deletions applications/solvers/icoBoilingFoam/fluid/TEqn.H
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{

kappa = alpha1*k1 + alpha2*k2;
surfaceScalarField kappaf(fvc::interpolate(kappa));
volScalarField energyExp(energySource*Tsat);

#include "computeMassSource.H"



fvScalarMatrix TEqn
(
fvm::ddt(rhoCp,T)
+ fvm::div(rhoCpPhi,T)
- fvm::Sp(fvc::ddt(rhoCp) + fvc::div(rhoCpPhi), T)
- fvm::laplacian(kappaf,T)
- fvm::Sp(energySource,T)
// - fvc::DDt(phi,p_rgh)
==
- energyExp
);


TEqn.relax();
TEqn.solve();

Info<< "min/max(T) = " << min(T).value() << ", " << max(T).value() <<endl;

//update continuity source with new T
#include "computeMassSource.H"


}
41 changes: 41 additions & 0 deletions applications/solvers/icoBoilingFoam/fluid/UEqn.H
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
// Solve the Momentum equation

MRF.correctBoundaryVelocity(U);

tmp<fvVectorMatrix> tUEqn
(
fvm::ddt(rho, U) + fvm::div(rhoPhi, U)
- fvm::Sp(fvc::ddt(rho) + fvc::div(rhoPhi), U)
+ MRF.DDt(rho, U)
+ turbulence.divDevRhoReff(rho,U)
==
fvOptions(rho, U)
);
fvVectorMatrix& UEqn = tUEqn.ref();

UEqn.relax();

fvOptions.constrain(UEqn);

if (momentumPredictor)
{

#include "pEqnCorr.H"

solve
(
UEqn
==
fvc::reconstruct
(
(
interface.surfaceTensionForce()
- ghf*fvc::snGrad(rho)
- fvc::snGrad(p_rgh)
)*mesh.magSf()
),
mesh.solver(U.select(finalIter))
);

fvOptions.correct(U);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
const dictionary& alphaControls = mesh.solverDict(alpha1.name());

label nAlphaSubCycles(alphaControls.get<label>("nAlphaSubCycles"));
59 changes: 59 additions & 0 deletions applications/solvers/icoBoilingFoam/fluid/VoF/alphaCourantNo.H
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2017 OpenFOAM Foundation
-------------------------------------------------------------------------------
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/>.
Global
alphaCourantNo
Description
Calculates and outputs the mean and maximum Courant Numbers.
\*---------------------------------------------------------------------------*/

scalar maxAlphaCo
(
runTime.controlDict().get<scalar>("maxAlphaCo")
);

scalar alphaCoNum = 0.0;
scalar meanAlphaCoNum = 0.0;

if (mesh.nInternalFaces())
{
scalarField sumPhi
(
mixture.nearInterface()().primitiveField()
*fvc::surfaceSum(mag(phi))().primitiveField()
);

alphaCoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaTValue();

meanAlphaCoNum =
0.5*(gSum(sumPhi)/gSum(mesh.V().field()))*runTime.deltaTValue();
}

Info<< "Interface Courant Number mean: " << meanAlphaCoNum
<< " max: " << alphaCoNum << endl;

// ************************************************************************* //
Loading

0 comments on commit 3ced5bc

Please sign in to comment.