mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: fieldSources - changed fieldData -> injectionRate
This commit is contained in:
@ -34,7 +34,7 @@ template<class Type>
|
|||||||
void Foam::ExplicitSetValue<Type>::setFieldData(const dictionary& dict)
|
void Foam::ExplicitSetValue<Type>::setFieldData(const dictionary& dict)
|
||||||
{
|
{
|
||||||
fieldNames_.setSize(dict.toc().size());
|
fieldNames_.setSize(dict.toc().size());
|
||||||
fieldData_.setSize(fieldNames_.size());
|
injectionRate_.setSize(fieldNames_.size());
|
||||||
|
|
||||||
applied_.setSize(fieldNames_.size(), false);
|
applied_.setSize(fieldNames_.size(), false);
|
||||||
|
|
||||||
@ -42,7 +42,7 @@ void Foam::ExplicitSetValue<Type>::setFieldData(const dictionary& dict)
|
|||||||
forAllConstIter(dictionary, dict, iter)
|
forAllConstIter(dictionary, dict, iter)
|
||||||
{
|
{
|
||||||
fieldNames_[i] = iter().keyword();
|
fieldNames_[i] = iter().keyword();
|
||||||
dict.lookup(iter().keyword()) >> fieldData_[i];
|
dict.lookup(iter().keyword()) >> injectionRate_[i];
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -60,7 +60,7 @@ Foam::ExplicitSetValue<Type>::ExplicitSetValue
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
basicSource(name, modelType, dict, mesh),
|
basicSource(name, modelType, dict, mesh),
|
||||||
fieldData_()
|
injectionRate_()
|
||||||
{
|
{
|
||||||
read(dict);
|
read(dict);
|
||||||
}
|
}
|
||||||
@ -105,7 +105,7 @@ void Foam::ExplicitSetValue<Type>::setValue
|
|||||||
|
|
||||||
forAll(values, i)
|
forAll(values, i)
|
||||||
{
|
{
|
||||||
values[i] = fieldData_[fieldI];
|
values[i] = injectionRate_[fieldI];
|
||||||
}
|
}
|
||||||
|
|
||||||
eqn.setValues(cells_, values);
|
eqn.setValues(cells_, values);
|
||||||
|
|||||||
@ -31,7 +31,7 @@ Description
|
|||||||
|
|
||||||
<Type>ExplicitSetValueCoeffs
|
<Type>ExplicitSetValueCoeffs
|
||||||
{
|
{
|
||||||
fieldData
|
injectionRate
|
||||||
{
|
{
|
||||||
k 30.7;
|
k 30.7;
|
||||||
epsilon 1.5;
|
epsilon 1.5;
|
||||||
@ -70,7 +70,7 @@ protected:
|
|||||||
// Protected data
|
// Protected data
|
||||||
|
|
||||||
//- Source value per field
|
//- Source value per field
|
||||||
List<Type> fieldData_;
|
List<Type> injectionRate_;
|
||||||
|
|
||||||
|
|
||||||
// Protected functions
|
// Protected functions
|
||||||
|
|||||||
@ -40,7 +40,7 @@ bool Foam::ExplicitSetValue<Type>::read(const dictionary& dict)
|
|||||||
{
|
{
|
||||||
if (basicSource::read(dict))
|
if (basicSource::read(dict))
|
||||||
{
|
{
|
||||||
setFieldData(coeffs_.subDict("fieldData"));
|
setFieldData(coeffs_.subDict("injectionRate"));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@ -88,7 +88,7 @@ template<class Type>
|
|||||||
void Foam::ExplicitSource<Type>::setFieldData(const dictionary& dict)
|
void Foam::ExplicitSource<Type>::setFieldData(const dictionary& dict)
|
||||||
{
|
{
|
||||||
fieldNames_.setSize(dict.toc().size());
|
fieldNames_.setSize(dict.toc().size());
|
||||||
fieldData_.setSize(fieldNames_.size());
|
injectionRate_.setSize(fieldNames_.size());
|
||||||
|
|
||||||
applied_.setSize(fieldNames_.size(), false);
|
applied_.setSize(fieldNames_.size(), false);
|
||||||
|
|
||||||
@ -96,7 +96,7 @@ void Foam::ExplicitSource<Type>::setFieldData(const dictionary& dict)
|
|||||||
forAllConstIter(dictionary, dict, iter)
|
forAllConstIter(dictionary, dict, iter)
|
||||||
{
|
{
|
||||||
fieldNames_[i] = iter().keyword();
|
fieldNames_[i] = iter().keyword();
|
||||||
dict.lookup(iter().keyword()) >> fieldData_[i];
|
dict.lookup(iter().keyword()) >> injectionRate_[i];
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -122,7 +122,7 @@ Foam::ExplicitSource<Type>::ExplicitSource
|
|||||||
basicSource(name, modelType, dict, mesh),
|
basicSource(name, modelType, dict, mesh),
|
||||||
volumeMode_(vmAbsolute),
|
volumeMode_(vmAbsolute),
|
||||||
VDash_(1.0),
|
VDash_(1.0),
|
||||||
fieldData_()
|
injectionRate_()
|
||||||
{
|
{
|
||||||
read(dict);
|
read(dict);
|
||||||
}
|
}
|
||||||
@ -165,7 +165,7 @@ void Foam::ExplicitSource<Type>::addSup
|
|||||||
|
|
||||||
forAll(cells_, i)
|
forAll(cells_, i)
|
||||||
{
|
{
|
||||||
Su[cells_[i]] = fieldData_[fieldI]/VDash_;
|
Su[cells_[i]] = injectionRate_[fieldI]/VDash_;
|
||||||
}
|
}
|
||||||
|
|
||||||
eqn -= Su;
|
eqn -= Su;
|
||||||
|
|||||||
@ -32,7 +32,7 @@ Description
|
|||||||
<Type>ExplicitSourceCoeffs
|
<Type>ExplicitSourceCoeffs
|
||||||
{
|
{
|
||||||
volumeMode absolute; // specific
|
volumeMode absolute; // specific
|
||||||
fieldData
|
injectionRate
|
||||||
{
|
{
|
||||||
k 30.7;
|
k 30.7;
|
||||||
epsilon 1.5;
|
epsilon 1.5;
|
||||||
@ -111,7 +111,7 @@ protected:
|
|||||||
scalar VDash_;
|
scalar VDash_;
|
||||||
|
|
||||||
//- Source field values
|
//- Source field values
|
||||||
List<Type> fieldData_;
|
List<Type> injectionRate_;
|
||||||
|
|
||||||
|
|
||||||
// Protected functions
|
// Protected functions
|
||||||
@ -152,7 +152,7 @@ public:
|
|||||||
inline const volumeModeType& volumeMode() const;
|
inline const volumeModeType& volumeMode() const;
|
||||||
|
|
||||||
//- Return const access to the source field values
|
//- Return const access to the source field values
|
||||||
inline const List<Type>& fieldData() const;
|
inline const List<Type>& injectionRate() const;
|
||||||
|
|
||||||
|
|
||||||
// Edit
|
// Edit
|
||||||
@ -161,7 +161,7 @@ public:
|
|||||||
inline volumeModeType& volumeMode();
|
inline volumeModeType& volumeMode();
|
||||||
|
|
||||||
//- Return access to the source field values
|
//- Return access to the source field values
|
||||||
inline List<Type>& fieldData();
|
inline List<Type>& injectionRate();
|
||||||
|
|
||||||
|
|
||||||
// Evaluation
|
// Evaluation
|
||||||
|
|||||||
@ -36,9 +36,9 @@ Foam::ExplicitSource<Type>::volumeMode() const
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
inline const Foam::List<Type>& Foam::ExplicitSource<Type>::fieldData() const
|
inline const Foam::List<Type>& Foam::ExplicitSource<Type>::injectionRate() const
|
||||||
{
|
{
|
||||||
return fieldData_;
|
return injectionRate_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -51,9 +51,9 @@ Foam::ExplicitSource<Type>::volumeMode()
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
inline Foam::List<Type>& Foam::ExplicitSource<Type>::fieldData()
|
inline Foam::List<Type>& Foam::ExplicitSource<Type>::injectionRate()
|
||||||
{
|
{
|
||||||
return fieldData_;
|
return injectionRate_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -40,7 +40,7 @@ bool Foam::ExplicitSource<Type>::read(const dictionary& dict)
|
|||||||
{
|
{
|
||||||
if (basicSource::read(dict))
|
if (basicSource::read(dict))
|
||||||
{
|
{
|
||||||
setFieldData(coeffs_.subDict("fieldData"));
|
setFieldData(coeffs_.subDict("injectionRate"));
|
||||||
volumeMode_ = wordToVolumeModeType(coeffs_.lookup("volumeMode"));
|
volumeMode_ = wordToVolumeModeType(coeffs_.lookup("volumeMode"));
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user