ENH: set 'applied' flag to field sources when applied
This commit is contained in:
parent
f18f1ca15c
commit
3dcc83c444
@ -112,7 +112,7 @@ Foam::label Foam::actuationDiskSource::applyToField
|
||||
void Foam::actuationDiskSource::addSup
|
||||
(
|
||||
fvMatrix<vector>& eqn,
|
||||
const label
|
||||
const label fieldI
|
||||
)
|
||||
{
|
||||
bool compressible = false;
|
||||
@ -150,6 +150,8 @@ void Foam::actuationDiskSource::addSup
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
basicSource::addSup(eqn, fieldI);
|
||||
}
|
||||
|
||||
|
||||
|
@ -201,6 +201,7 @@ Foam::basicSource::basicSource
|
||||
dict_(dict),
|
||||
coeffs_(dict.subDict(modelType + "Coeffs")),
|
||||
active_(readBool(dict_.lookup("active"))),
|
||||
applied_(false),
|
||||
timeStart_(readScalar(dict_.lookup("timeStart"))),
|
||||
duration_(readScalar(dict_.lookup("duration"))),
|
||||
selectionMode_
|
||||
@ -276,13 +277,13 @@ bool Foam::basicSource::isActive()
|
||||
|
||||
void Foam::basicSource::addSup(fvMatrix<scalar>& eqn, const label fieldI)
|
||||
{
|
||||
// do nothing
|
||||
applied_ = true;
|
||||
}
|
||||
|
||||
|
||||
void Foam::basicSource::addSup(fvMatrix<vector>& eqn, const label fieldI)
|
||||
{
|
||||
// do nothing
|
||||
applied_ = true;
|
||||
}
|
||||
|
||||
|
||||
@ -292,31 +293,31 @@ void Foam::basicSource::addSup
|
||||
const label fieldI
|
||||
)
|
||||
{
|
||||
// do nothing
|
||||
applied_ = true;
|
||||
}
|
||||
|
||||
|
||||
void Foam::basicSource::addSup(fvMatrix<symmTensor>& eqn, const label fieldI)
|
||||
{
|
||||
// do nothing
|
||||
applied_ = true;
|
||||
}
|
||||
|
||||
|
||||
void Foam::basicSource::addSup(fvMatrix<tensor>& eqn, const label fieldI)
|
||||
{
|
||||
// do nothing
|
||||
applied_ = true;
|
||||
}
|
||||
|
||||
|
||||
void Foam::basicSource::setValue(fvMatrix<scalar>& eqn, const label fieldI)
|
||||
{
|
||||
// do nothing
|
||||
applied_ = true;
|
||||
}
|
||||
|
||||
|
||||
void Foam::basicSource::setValue(fvMatrix<vector>& eqn, const label fieldI)
|
||||
{
|
||||
// do nothing
|
||||
applied_ = true;
|
||||
}
|
||||
|
||||
|
||||
@ -326,7 +327,7 @@ void Foam::basicSource::setValue
|
||||
const label fieldI
|
||||
)
|
||||
{
|
||||
// do nothing
|
||||
applied_ = true;
|
||||
}
|
||||
|
||||
|
||||
@ -336,13 +337,13 @@ void Foam::basicSource::setValue
|
||||
const label fieldI
|
||||
)
|
||||
{
|
||||
// do nothing
|
||||
applied_ = true;
|
||||
}
|
||||
|
||||
|
||||
void Foam::basicSource::setValue(fvMatrix<tensor>& eqn, const label fieldI)
|
||||
{
|
||||
// do nothing
|
||||
applied_ = true;
|
||||
}
|
||||
|
||||
|
||||
|
@ -98,7 +98,7 @@ protected:
|
||||
bool active_;
|
||||
|
||||
//- Flag to indicate whether or not the source has been applied
|
||||
// bool applied_; !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
bool applied_;
|
||||
|
||||
//- Time start
|
||||
scalar timeStart_;
|
||||
|
@ -124,6 +124,8 @@ void Foam::ExplicitSetValue<Type>::setValue
|
||||
}
|
||||
|
||||
eqn.setValues(cells_, values);
|
||||
|
||||
basicSource::setValue(eqn, fieldI);
|
||||
}
|
||||
|
||||
|
||||
|
@ -184,6 +184,8 @@ void Foam::ExplicitSource<Type>::addSup
|
||||
}
|
||||
|
||||
eqn -= Su;
|
||||
|
||||
basicSource::addSup(eqn, fieldI);
|
||||
}
|
||||
|
||||
|
||||
|
@ -64,7 +64,7 @@ Foam::radialActuationDiskSource::radialActuationDiskSource
|
||||
void Foam::radialActuationDiskSource::addSup
|
||||
(
|
||||
fvMatrix<vector>& eqn,
|
||||
const label
|
||||
const label fieldI
|
||||
)
|
||||
{
|
||||
bool compressible = false;
|
||||
@ -102,6 +102,8 @@ void Foam::radialActuationDiskSource::addSup
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
basicSource::addSup(eqn, fieldI);
|
||||
}
|
||||
|
||||
|
||||
|
@ -411,7 +411,7 @@ Foam::label Foam::rotorDiskSource::applyToField(const word& fieldName) const
|
||||
}
|
||||
|
||||
|
||||
void Foam::rotorDiskSource::addSup(fvMatrix<vector>& eqn)
|
||||
void Foam::rotorDiskSource::addSup(fvMatrix<vector>& eqn, const label fieldI)
|
||||
{
|
||||
// add source to lhs of eqn
|
||||
|
||||
@ -440,6 +440,8 @@ void Foam::rotorDiskSource::addSup(fvMatrix<vector>& eqn)
|
||||
dimForce/dimVolume/dimDensity
|
||||
);
|
||||
}
|
||||
|
||||
basicSource::addSup(eqn, fieldI);
|
||||
}
|
||||
|
||||
|
||||
|
@ -273,7 +273,7 @@ public:
|
||||
// Source term addition
|
||||
|
||||
//- Source term to fvMatrix<vector>
|
||||
virtual void addSup(fvMatrix<vector>& eqn);
|
||||
virtual void addSup(fvMatrix<vector>& eqn, const label fieldI);
|
||||
|
||||
|
||||
// I-O
|
||||
|
Loading…
Reference in New Issue
Block a user