mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of /home/dm4/OpenFOAM/OpenFOAM-dev
This commit is contained in:
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -36,7 +36,7 @@ Description
|
|||||||
|
|
||||||
Storage is allocated on free-store during construction.
|
Storage is allocated on free-store during construction.
|
||||||
|
|
||||||
As a special case a null-contructed CompactListList has an empty
|
As a special case a null-constructed CompactListList has an empty
|
||||||
offsets_ (instead of size 1).
|
offsets_ (instead of size 1).
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
|
|||||||
@ -63,11 +63,31 @@ bool Foam::IOobject::IOobject::fileNameComponents
|
|||||||
// called with directory
|
// called with directory
|
||||||
if (isDir(path))
|
if (isDir(path))
|
||||||
{
|
{
|
||||||
WarningIn("IOobject::fileNameComponents(const fileName&, ...)")
|
WarningIn
|
||||||
<< " called with directory: " << path << "\n";
|
(
|
||||||
|
"IOobject::fileNameComponents"
|
||||||
|
"("
|
||||||
|
"const fileName&, "
|
||||||
|
"fileName&, "
|
||||||
|
"fileName&, "
|
||||||
|
"word&"
|
||||||
|
")"
|
||||||
|
)
|
||||||
|
<< " called with directory: " << path << endl;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (path.isAbsolute())
|
||||||
|
{
|
||||||
|
string::size_type last = path.rfind('/');
|
||||||
|
instance = path.substr(0, last);
|
||||||
|
|
||||||
|
// check afterwards
|
||||||
|
name.string::operator=(path.substr(last+1));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
string::size_type first = path.find('/');
|
string::size_type first = path.find('/');
|
||||||
|
|
||||||
if (first == string::npos)
|
if (first == string::npos)
|
||||||
@ -77,15 +97,6 @@ bool Foam::IOobject::IOobject::fileNameComponents
|
|||||||
// check afterwards
|
// check afterwards
|
||||||
name.string::operator=(path);
|
name.string::operator=(path);
|
||||||
}
|
}
|
||||||
else if (first == 0)
|
|
||||||
{
|
|
||||||
// Leading '/'. Absolute fileName
|
|
||||||
string::size_type last = path.rfind('/');
|
|
||||||
instance = path.substr(0, last);
|
|
||||||
|
|
||||||
// check afterwards
|
|
||||||
name.string::operator=(path.substr(last+1));
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
instance = path.substr(0, first);
|
instance = path.substr(0, first);
|
||||||
@ -100,14 +111,25 @@ bool Foam::IOobject::IOobject::fileNameComponents
|
|||||||
// check afterwards
|
// check afterwards
|
||||||
name.string::operator=(path.substr(last+1));
|
name.string::operator=(path.substr(last+1));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// check for valid (and stripped) name, regardless of the debug level
|
// check for valid (and stripped) name, regardless of the debug level
|
||||||
if (name.empty() || string::stripInvalid<word>(name))
|
if (name.empty() || string::stripInvalid<word>(name))
|
||||||
{
|
{
|
||||||
WarningIn("IOobject::fileNameComponents(const fileName&, ...)")
|
WarningIn
|
||||||
|
(
|
||||||
|
"IOobject::fileNameComponents"
|
||||||
|
"("
|
||||||
|
"const fileName&, "
|
||||||
|
"fileName&, "
|
||||||
|
"fileName&, "
|
||||||
|
"word&"
|
||||||
|
")"
|
||||||
|
)
|
||||||
<< "has invalid word for name: \"" << name
|
<< "has invalid word for name: \"" << name
|
||||||
<< "\"\nwhile processing path: " << path << "\n";
|
<< "\"\nwhile processing path: " << path << endl;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -202,9 +224,16 @@ Foam::IOobject::IOobject
|
|||||||
{
|
{
|
||||||
FatalErrorIn
|
FatalErrorIn
|
||||||
(
|
(
|
||||||
"IOobject::IOobject" "(const fileName&, const objectRegistry&, ...)"
|
"IOobject::IOobject"
|
||||||
|
"("
|
||||||
|
"const fileName&, "
|
||||||
|
"const objectRegistry&, "
|
||||||
|
"readOption, "
|
||||||
|
"writeOption, "
|
||||||
|
"bool"
|
||||||
|
")"
|
||||||
)
|
)
|
||||||
<< " invalid path specification\n"
|
<< " invalid path specification"
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -294,15 +294,26 @@ void Foam::cyclicACMIFvPatchField<Type>::updateCoeffs()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
void Foam::cyclicACMIFvPatchField<Type>::initEvaluate
|
||||||
|
(
|
||||||
|
const Pstream::commsTypes comms
|
||||||
|
)
|
||||||
|
{
|
||||||
|
// update non-overlap patch
|
||||||
|
const fvPatchField<Type>& npf = nonOverlapPatchField();
|
||||||
|
const_cast<fvPatchField<Type>&>(npf).evaluate(comms);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void Foam::cyclicACMIFvPatchField<Type>::evaluate
|
void Foam::cyclicACMIFvPatchField<Type>::evaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes comms
|
const Pstream::commsTypes comms
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
// blend contrubutions from the coupled and non-overlap patches
|
// blend contributions from the coupled and non-overlap patches
|
||||||
const fvPatchField<Type>& npf = nonOverlapPatchField();
|
const fvPatchField<Type>& npf = nonOverlapPatchField();
|
||||||
const_cast<fvPatchField<Type>&>(npf).evaluate();
|
|
||||||
|
|
||||||
coupledFvPatchField<Type>::evaluate(comms);
|
coupledFvPatchField<Type>::evaluate(comms);
|
||||||
const Field<Type>& cpf = *this;
|
const Field<Type>& cpf = *this;
|
||||||
@ -392,7 +403,7 @@ void Foam::cyclicACMIFvPatchField<Type>::manipulateMatrix
|
|||||||
fvMatrix<Type>& matrix
|
fvMatrix<Type>& matrix
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
// blend contrubutions from the coupled and non-overlap patches
|
// blend contributions from the coupled and non-overlap patches
|
||||||
const fvPatchField<Type>& npf = nonOverlapPatchField();
|
const fvPatchField<Type>& npf = nonOverlapPatchField();
|
||||||
|
|
||||||
const scalarField& mask = cyclicACMIPatch_.cyclicACMIPatch().mask();
|
const scalarField& mask = cyclicACMIPatch_.cyclicACMIPatch().mask();
|
||||||
|
|||||||
@ -206,6 +206,12 @@ public:
|
|||||||
//- Update the coefficients associated with the patch field
|
//- Update the coefficients associated with the patch field
|
||||||
void updateCoeffs();
|
void updateCoeffs();
|
||||||
|
|
||||||
|
//- Initialise the evaluation of the patch field
|
||||||
|
virtual void initEvaluate
|
||||||
|
(
|
||||||
|
const Pstream::commsTypes commsType
|
||||||
|
);
|
||||||
|
|
||||||
//- Evaluate the patch field
|
//- Evaluate the patch field
|
||||||
virtual void evaluate
|
virtual void evaluate
|
||||||
(
|
(
|
||||||
|
|||||||
@ -68,13 +68,11 @@ void Foam::SprayParcel<ParcelType>::calc
|
|||||||
const CompositionModel<reactingCloudType>& composition =
|
const CompositionModel<reactingCloudType>& composition =
|
||||||
td.cloud().composition();
|
td.cloud().composition();
|
||||||
|
|
||||||
bool coupled = td.cloud().solution().coupled();
|
|
||||||
|
|
||||||
// check if parcel belongs to liquid core
|
// check if parcel belongs to liquid core
|
||||||
if (liquidCore() > 0.5)
|
if (liquidCore() > 0.5)
|
||||||
{
|
{
|
||||||
// liquid core parcels should not interact with the gas
|
// liquid core parcels should not experience coupled forces
|
||||||
td.cloud().solution().coupled() = false;
|
td.cloud().forces().setCalcCoupled(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
// get old mixture composition
|
// get old mixture composition
|
||||||
@ -138,8 +136,8 @@ void Foam::SprayParcel<ParcelType>::calc
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// restore coupled
|
// restore coupled forces
|
||||||
td.cloud().solution().coupled() = coupled;
|
td.cloud().forces().setCalcCoupled(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -246,7 +244,7 @@ void Foam::SprayParcel<ParcelType>::calcBreakup
|
|||||||
const scalar mass = p.mass();
|
const scalar mass = p.mass();
|
||||||
const forceSuSp Fcp = forces.calcCoupled(p, dt, mass, Re, muAv);
|
const forceSuSp Fcp = forces.calcCoupled(p, dt, mass, Re, muAv);
|
||||||
const forceSuSp Fncp = forces.calcNonCoupled(p, dt, mass, Re, muAv);
|
const forceSuSp Fncp = forces.calcNonCoupled(p, dt, mass, Re, muAv);
|
||||||
scalar tMom = mass/(Fcp.Sp() + Fncp.Sp());
|
this->tMom() = mass/(Fcp.Sp() + Fncp.Sp());
|
||||||
|
|
||||||
const vector g = td.cloud().g().value();
|
const vector g = td.cloud().g().value();
|
||||||
|
|
||||||
@ -274,7 +272,7 @@ void Foam::SprayParcel<ParcelType>::calcBreakup
|
|||||||
muAv,
|
muAv,
|
||||||
Urel,
|
Urel,
|
||||||
Urmag,
|
Urmag,
|
||||||
tMom,
|
this->tMom(),
|
||||||
dChild,
|
dChild,
|
||||||
massChild
|
massChild
|
||||||
)
|
)
|
||||||
|
|||||||
@ -48,7 +48,7 @@ Foam::BlobsSheetAtomization<CloudType>::BlobsSheetAtomization
|
|||||||
:
|
:
|
||||||
AtomizationModel<CloudType>(am),
|
AtomizationModel<CloudType>(am),
|
||||||
B_(am.B_),
|
B_(am.B_),
|
||||||
angle_(am.B_)
|
angle_(am.angle_)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -112,7 +112,7 @@ public:
|
|||||||
const scalar rho,
|
const scalar rho,
|
||||||
const scalar mu,
|
const scalar mu,
|
||||||
const scalar sigma,
|
const scalar sigma,
|
||||||
const scalar volHlowRate,
|
const scalar volFlowRate,
|
||||||
const scalar rhoAv,
|
const scalar rhoAv,
|
||||||
const scalar Urel,
|
const scalar Urel,
|
||||||
const vector& pos,
|
const vector& pos,
|
||||||
|
|||||||
@ -52,7 +52,8 @@ namespace Foam
|
|||||||
|
|
||||||
Foam::localAxesRotation::localAxesRotation
|
Foam::localAxesRotation::localAxesRotation
|
||||||
(
|
(
|
||||||
const dictionary& dict, const objectRegistry& orb
|
const dictionary& dict,
|
||||||
|
const objectRegistry& orb
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
Rptr_(),
|
Rptr_(),
|
||||||
@ -88,10 +89,10 @@ Foam::localAxesRotation::localAxesRotation
|
|||||||
e3_()
|
e3_()
|
||||||
{
|
{
|
||||||
FatalErrorIn("localAxesRotation(const dictionary&)")
|
FatalErrorIn("localAxesRotation(const dictionary&)")
|
||||||
<< " localAxesRotation can not be contructed from dictionary "
|
<< " localAxesRotation can not be constructed from dictionary "
|
||||||
<< " use the construtctor : "
|
<< " use the construtctor : "
|
||||||
"("
|
"("
|
||||||
" const dictionary& dict, const objectRegistry& orb"
|
" const dictionary&, const objectRegistry&"
|
||||||
")"
|
")"
|
||||||
<< exit(FatalIOError);
|
<< exit(FatalIOError);
|
||||||
}
|
}
|
||||||
@ -112,7 +113,7 @@ Foam::vector Foam::localAxesRotation::transform(const vector& st) const
|
|||||||
{
|
{
|
||||||
notImplemented
|
notImplemented
|
||||||
(
|
(
|
||||||
"vector Foam::localAxesRotation::transform(const vector&) const"
|
"vector localAxesRotation::transform(const vector&) const"
|
||||||
);
|
);
|
||||||
return vector::zero;
|
return vector::zero;
|
||||||
}
|
}
|
||||||
@ -122,7 +123,7 @@ Foam::vector Foam::localAxesRotation::invTransform(const vector& st) const
|
|||||||
{
|
{
|
||||||
notImplemented
|
notImplemented
|
||||||
(
|
(
|
||||||
"vector Foam::localAxesRotation::invTransform(const vector&) const"
|
"vector localAxesRotation::invTransform(const vector&) const"
|
||||||
);
|
);
|
||||||
return vector::zero;
|
return vector::zero;
|
||||||
}
|
}
|
||||||
@ -135,7 +136,10 @@ Foam::tmp<Foam::vectorField> Foam::localAxesRotation::transform
|
|||||||
{
|
{
|
||||||
if (Rptr_->size() != st.size())
|
if (Rptr_->size() != st.size())
|
||||||
{
|
{
|
||||||
FatalErrorIn("localAxesRotation::transform(const vectorField&)")
|
FatalErrorIn
|
||||||
|
(
|
||||||
|
"tmp<vectorField> localAxesRotation::transform(const vectorField&)"
|
||||||
|
)
|
||||||
<< "vectorField st has different size to tensorField "
|
<< "vectorField st has different size to tensorField "
|
||||||
<< abort(FatalError);
|
<< abort(FatalError);
|
||||||
}
|
}
|
||||||
@ -160,7 +164,13 @@ Foam::tmp<Foam::tensorField> Foam::localAxesRotation::transformTensor
|
|||||||
{
|
{
|
||||||
if (Rptr_->size() != st.size())
|
if (Rptr_->size() != st.size())
|
||||||
{
|
{
|
||||||
FatalErrorIn("localAxesRotation::transformTensor(const tensorField&)")
|
FatalErrorIn
|
||||||
|
(
|
||||||
|
"tmp<tensorField> localAxesRotation::transformTensor"
|
||||||
|
"("
|
||||||
|
"const tensorField&"
|
||||||
|
")"
|
||||||
|
)
|
||||||
<< "tensorField st has different size to tensorField Tr"
|
<< "tensorField st has different size to tensorField Tr"
|
||||||
<< abort(FatalError);
|
<< abort(FatalError);
|
||||||
}
|
}
|
||||||
@ -173,7 +183,11 @@ Foam::tensor Foam::localAxesRotation::transformTensor
|
|||||||
const tensor& st
|
const tensor& st
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
notImplemented("tensor localAxesRotation::transformTensor() const");
|
notImplemented
|
||||||
|
(
|
||||||
|
"tensor localAxesRotation::transformTensor(const tensor&) const"
|
||||||
|
);
|
||||||
|
|
||||||
return tensor::zero;
|
return tensor::zero;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -186,7 +200,14 @@ Foam::tmp<Foam::tensorField> Foam::localAxesRotation::transformTensor
|
|||||||
{
|
{
|
||||||
if (cellMap.size() != st.size())
|
if (cellMap.size() != st.size())
|
||||||
{
|
{
|
||||||
FatalErrorIn("localAxesRotation::transformTensor(const tensorField&)")
|
FatalErrorIn
|
||||||
|
(
|
||||||
|
"tmp<tensorField> localAxesRotation::transformTensor"
|
||||||
|
"("
|
||||||
|
"const tensorField&"
|
||||||
|
"const labelList&"
|
||||||
|
")"
|
||||||
|
)
|
||||||
<< "tensorField st has different size to tensorField Tr"
|
<< "tensorField st has different size to tensorField Tr"
|
||||||
<< abort(FatalError);
|
<< abort(FatalError);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -85,6 +85,7 @@ private:
|
|||||||
//- Is surface closed
|
//- Is surface closed
|
||||||
mutable label surfaceClosed_;
|
mutable label surfaceClosed_;
|
||||||
|
|
||||||
|
|
||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
|
|
||||||
////- Helper: find instance of files without header
|
////- Helper: find instance of files without header
|
||||||
@ -166,7 +167,7 @@ public:
|
|||||||
//- Move points
|
//- Move points
|
||||||
virtual void movePoints(const pointField&);
|
virtual void movePoints(const pointField&);
|
||||||
|
|
||||||
//- Demand driven contruction of octree for boundary edges
|
//- Demand driven construction of octree for boundary edges
|
||||||
const indexedOctree<treeDataEdge>& edgeTree() const;
|
const indexedOctree<treeDataEdge>& edgeTree() const;
|
||||||
|
|
||||||
|
|
||||||
@ -260,6 +261,7 @@ public:
|
|||||||
List<volumeType>&
|
List<volumeType>&
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
|
|
||||||
// Other
|
// Other
|
||||||
|
|
||||||
//- WIP. Store element-wise field.
|
//- WIP. Store element-wise field.
|
||||||
@ -285,7 +287,6 @@ public:
|
|||||||
IOstream::versionNumber ver,
|
IOstream::versionNumber ver,
|
||||||
IOstream::compressionType cmp
|
IOstream::compressionType cmp
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -155,7 +155,7 @@ createSetsAndZone floor -$tol $floorMax -$tol $floorMax -$tol $tol
|
|||||||
echo "cellSet floorCells new faceToCell floorFaces owner" >> $tmpSetSet
|
echo "cellSet floorCells new faceToCell floorFaces owner" >> $tmpSetSet
|
||||||
echo "faceZoneSet floorFaces new setsToFaceZone floorFaces floorCells" >> $tmpSetSet
|
echo "faceZoneSet floorFaces new setsToFaceZone floorFaces floorCells" >> $tmpSetSet
|
||||||
|
|
||||||
setSet -batch $tmpSetSet > log.setSet.patchifyObstacles >/dev/null 2>&1
|
setSet -batch $tmpSetSet > log.setSet.patchifyObstacles 2>&1
|
||||||
|
|
||||||
|
|
||||||
# *************************************************************************
|
# *************************************************************************
|
||||||
|
|||||||
Reference in New Issue
Block a user