Skip to content

Commit

Permalink
change SSD scheme and RK4 solver for OpenFOAM-v2006
Browse files Browse the repository at this point in the history
  • Loading branch information
moreff committed Dec 18, 2021
1 parent 3fbfbb2 commit 011b4ec
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ EXE_INC = \

EXE_LIBS = \
-lfiniteVolume \
-lfvModels \
-lfvConstraints \
-lfvOptions \
-lmeshTools \
-lsampling
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,11 @@ IOdictionary transportProperties

Info<< "Reading diffusivity DT\n" << endl;

dimensionedScalar DT
(
transportProperties.lookup("DT")
);
dimensionedScalar DT("DT", dimViscosity, transportProperties);

#include "createPhi.H"

#include "createFvModels.H"
#include "createFvConstraints.H"
#include "createFvOptions.H"

// --------------------------------- ADDED -------------------------------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,29 @@ License
Application
explicitRK4scalarTransportFoam
Group
grpBasicSolvers
Description
Solves the steady or transient transport equation for a passive scalar using
4th order Runge-Kutta explicit time-stepping.
\*---------------------------------------------------------------------------*/

#include "fvCFD.H"
#include "fvModels.H"
#include "fvConstraints.H"
#include "fvOptions.H"
#include "simpleControl.H"

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

int main(int argc, char *argv[])
{
argList::addNote
(
"Passive scalar transport equation solver."
);

#include "addCheckCaseOptions.H"
#include "setRootCaseLists.H"
#include "createTime.H"
#include "createMesh.H"
Expand All @@ -53,7 +61,7 @@ int main(int argc, char *argv[])

#include "CourantNo.H"

while (simple.loop(runTime))
while (simple.loop())
{
Info<< "Time = " << runTime.timeName() << nl << endl;
// RK4: step 1
Expand Down
7 changes: 5 additions & 2 deletions src/finiteVolume/Make/options
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
EXE_INC = \
-I$(LIB_SRC)/triSurface/lnInclude \
-I$(LIB_SRC)/fileFormats/lnInclude \
-I$(LIB_SRC)/surfMesh/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude

LIB_LIBS = \
-lOpenFOAM \
-ltriSurface \
-lfileFormats \
-lsurfMesh \
-lmeshTools \
-lfiniteVolume
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ License
Class
Foam::fv::gaussScaleSelectiveConvectionScheme
Group
grpFvConvectionSchemes
Description
Second-order convection using face-gradients, Gauss' theorem and
scale-selective discretization technique.
Expand Down Expand Up @@ -72,6 +75,13 @@ class gaussScaleSelectiveConvectionScheme
tmp<surfaceScalarField> DxDyDz_;


// Private Member Functions

//- No copy construct
gaussScaleSelectiveConvectionScheme(const gaussScaleSelectiveConvectionScheme&) = delete;

//- No copy assignment
void operator=(const gaussScaleSelectiveConvectionScheme&) = delete;

public:

Expand Down Expand Up @@ -144,11 +154,6 @@ public:
/ (4.0*constant::mathematical::pi*constant::mathematical::pi);
}

//- Disallow default bitwise copy construction
gaussScaleSelectiveConvectionScheme(
const gaussScaleSelectiveConvectionScheme&
) = delete;


// Member Functions

Expand Down Expand Up @@ -177,12 +182,6 @@ public:
const surfaceScalarField&,
const GeometricField<Type, fvPatchField, volMesh>&
) const;


// Member Operators

//- Disallow default bitwise assignment
void operator=(const gaussScaleSelectiveConvectionScheme&) = delete;
};


Expand Down

0 comments on commit 011b4ec

Please sign in to comment.