ENH: Changing radiation correct in YEEq.H in fireFoam.

Adding clone member functions to motion solvers
This commit is contained in:
sergio
2016-10-26 11:45:57 -07:00
parent dd31eb9e6e
commit f223e8c6f0
10 changed files with 48 additions and 7 deletions

View File

@ -53,6 +53,8 @@ tmp<fv::convectionScheme<scalar>> mvConvection
Y[inertIndex] = scalar(1) - Yt;
Y[inertIndex].max(0.0);
radiation->correct();
volScalarField& he = thermo.he();
fvScalarMatrix EEqn

View File

@ -170,7 +170,8 @@ Foam::sixDoFRigidBodyMotion::sixDoFRigidBodyMotion
momentOfInertia_(sDoFRBM.momentOfInertia_),
aRelax_(sDoFRBM.aRelax_),
aDamp_(sDoFRBM.aDamp_),
report_(sDoFRBM.report_)
report_(sDoFRBM.report_),
solver_(sDoFRBM.solver_, false)
{}

View File

@ -46,7 +46,7 @@ Foam::sixDoFSolvers::CrankNicolson::CrankNicolson
sixDoFRigidBodyMotion& body
)
:
sixDoFSolver(body),
sixDoFSolver(dict, body),
aoc_(dict.lookupOrDefault<scalar>("aoc", 0.5)),
voc_(dict.lookupOrDefault<scalar>("voc", 0.5))
{}

View File

@ -98,6 +98,15 @@ public:
sixDoFRigidBodyMotion& body
);
//- Construct and return a clone
virtual autoPtr<sixDoFSolver> clone() const
{
return autoPtr<sixDoFSolver>
(
new CrankNicolson(dict_, body_)
);
}
//- Destructor
virtual ~CrankNicolson();

View File

@ -46,7 +46,7 @@ Foam::sixDoFSolvers::Newmark::Newmark
sixDoFRigidBodyMotion& body
)
:
sixDoFSolver(body),
sixDoFSolver(dict, body),
gamma_(dict.lookupOrDefault<scalar>("gamma", 0.5)),
beta_
(

View File

@ -96,6 +96,15 @@ public:
sixDoFRigidBodyMotion& body
);
//- Construct and return a clone
virtual autoPtr<sixDoFSolver> clone() const
{
return autoPtr<sixDoFSolver>
(
new Newmark(dict_, body_)
);
}
//- Destructor
virtual ~Newmark();

View File

@ -36,9 +36,14 @@ namespace Foam
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::sixDoFSolver::sixDoFSolver(sixDoFRigidBodyMotion& body)
Foam::sixDoFSolver::sixDoFSolver
(
const dictionary& dict,
sixDoFRigidBodyMotion& body
)
:
body_(body)
body_(body),
dict_(dict)
{}

View File

@ -59,6 +59,9 @@ protected:
//- The rigid body
sixDoFRigidBodyMotion& body_;
//- Model dictionary
dictionary dict_;
// Protected member functions
@ -148,7 +151,10 @@ public:
// Constructors
// Construct for given body
sixDoFSolver(sixDoFRigidBodyMotion& body);
sixDoFSolver(const dictionary& dict, sixDoFRigidBodyMotion& body);
//- Construct and return a clone
virtual autoPtr<sixDoFSolver> clone() const = 0;
//- Destructor

View File

@ -46,7 +46,7 @@ Foam::sixDoFSolvers::symplectic::symplectic
sixDoFRigidBodyMotion& body
)
:
sixDoFSolver(body)
sixDoFSolver(dict, body)
{}

View File

@ -95,6 +95,15 @@ public:
sixDoFRigidBodyMotion& body
);
//- Construct and return a clone
virtual autoPtr<sixDoFSolver> clone() const
{
return autoPtr<sixDoFSolver>
(
new symplectic(dict_, body_)
);
}
//- Destructor
virtual ~symplectic();