Skip to content

Commit

Permalink
Corrected solver names, removed unnecessary/commented code
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Stuart committed Jul 30, 2017
1 parent 4b0169d commit 088e686
Show file tree
Hide file tree
Showing 14 changed files with 8 additions and 214 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,6 @@ SiCortex*Gcc*/
solaris*Gcc*/
SunOS*Gcc*/
platforms/

# runtime log files
*.log
71 changes: 0 additions & 71 deletions solvers/tDecayFoam/createFields.H
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,6 @@ IOdictionary transportProperties
)
);

dimensionedScalar nu
(
"nu",
dimViscosity,
transportProperties.lookup("nu")
);
dimensionedScalar D
(
"D",
Expand All @@ -31,21 +25,6 @@ dimensionedScalar lambda
transportProperties.lookup("lambda")
);

Info<< "Reading field p\n" << endl;
/*volScalarField p
(
IOobject
(
"p",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
mesh
);
*/

Info<< "Reading field T\n" << endl;
volScalarField T
(
Expand All @@ -59,53 +38,3 @@ volScalarField T
),
mesh
);
Info<< "Reading field kappaEff\n" << endl;
volScalarField kappaEff
(
IOobject
(
"kappaEff",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);

/*
Info<< "Reading field U\n" << endl;
volVectorField V
(
IOobject
(
"V",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
mesh
);
//#include "createPhi.H"
surfaceScalarField phi
(
IOobject
(
"phi",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
fvc::flux(V)
);
*/

label TRefCell = 0;
scalar TRefValue = 1.0;
setRefCell(T, mesh.solutionDict().subDict("SIMPLE"), TRefCell, TRefValue);
mesh.setFluxRequired(T.name());
19 changes: 1 addition & 18 deletions solvers/tDecayFoam/tDecayFoam.C
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Application
icoTempFoam
tDecayFoam
Description
Transient solver for incompressible, laminar flow of Newtonian fluids.
Expand All @@ -40,10 +40,7 @@ int main(int argc, char *argv[])
#include "createTime.H"
#include "createMesh.H"

//simpleControl simple(mesh);

#include "createFields.H"
//#include "initContinuityErrs.H"

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

Expand All @@ -53,33 +50,19 @@ int main(int argc, char *argv[])
{
Info<< "Time = " << runTime.timeName() << nl << endl;

//#include "CourantNo.H"


// --- PISO loop
//while (simple.correctNonOrthogonal())
{
Info << "Running the solver loop!!!" << endl;
//#include "continuityErrs.H"
fvScalarMatrix TEqn
(
fvm::ddt(T)
+ lambda*T
- fvm::laplacian(D, T)
);
Info << "Got past the definition of TEqn" << endl;

TEqn.relax();

Info << "Relaxed TEqn" << endl;

solve(TEqn);

Info << "Solved TEqn" << endl;

T.correctBoundaryConditions();

Info << "Corrected boundary conditions for T" << endl;
}

runTime.write();
Expand Down
71 changes: 0 additions & 71 deletions solvers/tDiffFoam/createFields.H
Original file line number Diff line number Diff line change
Expand Up @@ -12,34 +12,13 @@ IOdictionary transportProperties
)
);

dimensionedScalar nu
(
"nu",
dimViscosity,
transportProperties.lookup("nu")
);
dimensionedScalar D
(
"D",
dimViscosity,
transportProperties.lookup("D")
);

Info<< "Reading field p\n" << endl;
/*volScalarField p
(
IOobject
(
"p",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
mesh
);
*/

Info<< "Reading field T\n" << endl;
volScalarField T
(
Expand All @@ -53,53 +32,3 @@ volScalarField T
),
mesh
);
Info<< "Reading field kappaEff\n" << endl;
volScalarField kappaEff
(
IOobject
(
"kappaEff",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);

/*
Info<< "Reading field U\n" << endl;
volVectorField V
(
IOobject
(
"V",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
mesh
);
//#include "createPhi.H"
surfaceScalarField phi
(
IOobject
(
"phi",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
fvc::flux(V)
);
*/

label TRefCell = 0;
scalar TRefValue = 1.0;
setRefCell(T, mesh.solutionDict().subDict("SIMPLE"), TRefCell, TRefValue);
mesh.setFluxRequired(T.name());
19 changes: 1 addition & 18 deletions solvers/tDiffFoam/tDiffFoam.C
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Application
icoTempFoam
tDiffFoam
Description
Transient solver for incompressible, laminar flow of Newtonian fluids.
Expand All @@ -40,10 +40,7 @@ int main(int argc, char *argv[])
#include "createTime.H"
#include "createMesh.H"

//simpleControl simple(mesh);

#include "createFields.H"
//#include "initContinuityErrs.H"

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

Expand All @@ -53,32 +50,18 @@ int main(int argc, char *argv[])
{
Info<< "Time = " << runTime.timeName() << nl << endl;

//#include "CourantNo.H"


// --- PISO loop
//while (simple.correctNonOrthogonal())
{
Info << "Running the solver loop!!!" << endl;
//#include "continuityErrs.H"
fvScalarMatrix TEqn
(
fvm::ddt(T)
- fvm::laplacian(D, T)
);
Info << "Got past the definition of TEqn" << endl;

TEqn.relax();

Info << "Relaxed TEqn" << endl;

solve(TEqn);

Info << "Solved TEqn" << endl;

T.correctBoundaryConditions();

Info << "Corrected boundary conditions for T" << endl;
}

runTime.write();
Expand Down
5 changes: 0 additions & 5 deletions solvers/tRegionDecayFoam/createFields.H
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,3 @@ volScalarField T
),
mesh
);

label TRefCell = 0;
scalar TRefValue = 1.0;
setRefCell(T, mesh.solutionDict().subDict("SIMPLE"), TRefCell, TRefValue);
mesh.setFluxRequired(T.name());
6 changes: 0 additions & 6 deletions solvers/tRegionFoam/createFields.H
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,3 @@ volScalarField T
),
mesh
);


label TRefCell = 0;
scalar TRefValue = 1.0;
setRefCell(T, mesh.solutionDict().subDict("SIMPLE"), TRefCell, TRefValue);
mesh.setFluxRequired(T.name());
5 changes: 0 additions & 5 deletions solvers/tThermDecayFoam/createFields.H
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,3 @@ volScalarField T
),
mesh
);

label C_TRefCell = 0;
scalar C_TRefValue = 1.0;
setRefCell(C_T, mesh.solutionDict().subDict("SIMPLE"), C_TRefCell, C_TRefValue);
mesh.setFluxRequired(C_T.name());
2 changes: 1 addition & 1 deletion solvers/tThermDecayFoam/tThermDecayFoam.C
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Application
tVaryDecayFoam
tThermDecayFoam
Description
Transient solver for multi-zone tritium diffusion and radioactive decay,
Expand Down
5 changes: 0 additions & 5 deletions solvers/tThermFoam/createFields.H
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,3 @@ volScalarField T
),
mesh
);

label C_TRefCell = 0;
scalar C_TRefValue = 1.0;
setRefCell(C_T, mesh.solutionDict().subDict("SIMPLE"), C_TRefCell, C_TRefValue);
mesh.setFluxRequired(C_T.name());
2 changes: 1 addition & 1 deletion solvers/tThermFoam/tThermFoam.C
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Application
tVaryDecayFoam
tThermFoam
Description
Transient solver for multi-zone tritium diffusion and radioactive decay,
Expand Down
5 changes: 0 additions & 5 deletions solvers/tVaryDecayFoam/createFields.H
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,3 @@ volScalarField T
),
mesh
);

label C_TRefCell = 0;
scalar C_TRefValue = 1.0;
setRefCell(C_T, mesh.solutionDict().subDict("SIMPLE"), C_TRefCell, C_TRefValue);
mesh.setFluxRequired(C_T.name());
7 changes: 1 addition & 6 deletions solvers/tVaryFoam/createFields.H
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ volScalarField T
mesh
);

Info<< "Reading flux tracking fields store and flux\n" << endl;
Info<< "Making flux tracking fields store and flux\n" << endl;
volScalarField store
(
IOobject
Expand All @@ -97,8 +97,3 @@ volScalarField flux
mesh,
dimensionedScalar("flux", dimless, 0.0)
);

label C_TRefCell = 0;
scalar C_TRefValue = 1.0;
setRefCell(C_T, mesh.solutionDict().subDict("SIMPLE"), C_TRefCell, C_TRefValue);
mesh.setFluxRequired(C_T.name());
2 changes: 0 additions & 2 deletions solvers/tVaryFoam/tVaryFoam.C
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ Description
#include "fvCFD.H"
#include "simpleControl.H"
#include "tritiumGradientFvPatchScalarField.H"
//#include "GeometricField.H"
//#include "GeometricBoundaryField.H"

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

Expand Down

0 comments on commit 088e686

Please sign in to comment.