-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
354 changed files
with
53,177 additions
and
0 deletions.
There are no files selected for viewing
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,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 | ||
#------------------------------------------------------------------------------ |
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,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" | ||
|
||
#------------------------------------------------------------------------------ |
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,5 @@ | ||
fluid/compressibleCourantNo.C | ||
solid/solidRegionDiffNo.C | ||
icoBoilingFoam.C | ||
|
||
EXE = $(FOAM_USER_APPBIN)/icoBoilingFoam |
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,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 |
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,2 @@ | ||
#include "createFluidFields.H" | ||
#include "createSolidFields.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,4 @@ | ||
regionProperties rp(runTime); | ||
|
||
#include "createFluidMeshes.H" | ||
#include "createSolidMeshes.H" |
9 changes: 9 additions & 0 deletions
9
applications/solvers/icoBoilingFoam/createMeshesPostProcess.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,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]; |
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,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" | ||
|
||
|
||
} |
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,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); | ||
} |
3 changes: 3 additions & 0 deletions
3
applications/solvers/icoBoilingFoam/fluid/VoF/alphaControls_advector.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,3 @@ | ||
const dictionary& alphaControls = mesh.solverDict(alpha1.name()); | ||
|
||
label nAlphaSubCycles(alphaControls.get<label>("nAlphaSubCycles")); |
59 changes: 59 additions & 0 deletions
59
applications/solvers/icoBoilingFoam/fluid/VoF/alphaCourantNo.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,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; | ||
|
||
// ************************************************************************* // |
Oops, something went wrong.