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
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -36,7 +36,7 @@ Description
|
||||
|
||||
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).
|
||||
|
||||
SourceFiles
|
||||
|
||||
@ -63,23 +63,23 @@ bool Foam::IOobject::IOobject::fileNameComponents
|
||||
// called with directory
|
||||
if (isDir(path))
|
||||
{
|
||||
WarningIn("IOobject::fileNameComponents(const fileName&, ...)")
|
||||
<< " called with directory: " << path << "\n";
|
||||
WarningIn
|
||||
(
|
||||
"IOobject::fileNameComponents"
|
||||
"("
|
||||
"const fileName&, "
|
||||
"fileName&, "
|
||||
"fileName&, "
|
||||
"word&"
|
||||
")"
|
||||
)
|
||||
<< " called with directory: " << path << endl;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
string::size_type first = path.find('/');
|
||||
|
||||
if (first == string::npos)
|
||||
if (path.isAbsolute())
|
||||
{
|
||||
// no '/' found - no instance or local
|
||||
|
||||
// check afterwards
|
||||
name.string::operator=(path);
|
||||
}
|
||||
else if (first == 0)
|
||||
{
|
||||
// Leading '/'. Absolute fileName
|
||||
string::size_type last = path.rfind('/');
|
||||
instance = path.substr(0, last);
|
||||
|
||||
@ -88,26 +88,48 @@ bool Foam::IOobject::IOobject::fileNameComponents
|
||||
}
|
||||
else
|
||||
{
|
||||
instance = path.substr(0, first);
|
||||
string::size_type first = path.find('/');
|
||||
|
||||
string::size_type last = path.rfind('/');
|
||||
if (last > first)
|
||||
if (first == string::npos)
|
||||
{
|
||||
// with local
|
||||
local = path.substr(first+1, last-first-1);
|
||||
}
|
||||
// no '/' found - no instance or local
|
||||
|
||||
// check afterwards
|
||||
name.string::operator=(path.substr(last+1));
|
||||
// check afterwards
|
||||
name.string::operator=(path);
|
||||
}
|
||||
else
|
||||
{
|
||||
instance = path.substr(0, first);
|
||||
|
||||
string::size_type last = path.rfind('/');
|
||||
if (last > first)
|
||||
{
|
||||
// with local
|
||||
local = path.substr(first+1, last-first-1);
|
||||
}
|
||||
|
||||
// check afterwards
|
||||
name.string::operator=(path.substr(last+1));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// check for valid (and stripped) name, regardless of the debug level
|
||||
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
|
||||
<< "\"\nwhile processing path: " << path << "\n";
|
||||
<< "\"\nwhile processing path: " << path << endl;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -202,9 +224,16 @@ Foam::IOobject::IOobject
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
@ -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>
|
||||
void Foam::cyclicACMIFvPatchField<Type>::evaluate
|
||||
(
|
||||
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_cast<fvPatchField<Type>&>(npf).evaluate();
|
||||
|
||||
coupledFvPatchField<Type>::evaluate(comms);
|
||||
const Field<Type>& cpf = *this;
|
||||
@ -392,7 +403,7 @@ void Foam::cyclicACMIFvPatchField<Type>::manipulateMatrix
|
||||
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 scalarField& mask = cyclicACMIPatch_.cyclicACMIPatch().mask();
|
||||
|
||||
@ -206,6 +206,12 @@ public:
|
||||
//- Update the coefficients associated with the patch field
|
||||
void updateCoeffs();
|
||||
|
||||
//- Initialise the evaluation of the patch field
|
||||
virtual void initEvaluate
|
||||
(
|
||||
const Pstream::commsTypes commsType
|
||||
);
|
||||
|
||||
//- Evaluate the patch field
|
||||
virtual void evaluate
|
||||
(
|
||||
|
||||
@ -68,13 +68,11 @@ void Foam::SprayParcel<ParcelType>::calc
|
||||
const CompositionModel<reactingCloudType>& composition =
|
||||
td.cloud().composition();
|
||||
|
||||
bool coupled = td.cloud().solution().coupled();
|
||||
|
||||
// check if parcel belongs to liquid core
|
||||
if (liquidCore() > 0.5)
|
||||
{
|
||||
// liquid core parcels should not interact with the gas
|
||||
td.cloud().solution().coupled() = false;
|
||||
// liquid core parcels should not experience coupled forces
|
||||
td.cloud().forces().setCalcCoupled(false);
|
||||
}
|
||||
|
||||
// get old mixture composition
|
||||
@ -138,8 +136,8 @@ void Foam::SprayParcel<ParcelType>::calc
|
||||
}
|
||||
}
|
||||
|
||||
// restore coupled
|
||||
td.cloud().solution().coupled() = coupled;
|
||||
// restore coupled forces
|
||||
td.cloud().forces().setCalcCoupled(true);
|
||||
}
|
||||
|
||||
|
||||
@ -246,7 +244,7 @@ void Foam::SprayParcel<ParcelType>::calcBreakup
|
||||
const scalar mass = p.mass();
|
||||
const forceSuSp Fcp = forces.calcCoupled(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();
|
||||
|
||||
@ -274,7 +272,7 @@ void Foam::SprayParcel<ParcelType>::calcBreakup
|
||||
muAv,
|
||||
Urel,
|
||||
Urmag,
|
||||
tMom,
|
||||
this->tMom(),
|
||||
dChild,
|
||||
massChild
|
||||
)
|
||||
|
||||
@ -48,7 +48,7 @@ Foam::BlobsSheetAtomization<CloudType>::BlobsSheetAtomization
|
||||
:
|
||||
AtomizationModel<CloudType>(am),
|
||||
B_(am.B_),
|
||||
angle_(am.B_)
|
||||
angle_(am.angle_)
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -112,7 +112,7 @@ public:
|
||||
const scalar rho,
|
||||
const scalar mu,
|
||||
const scalar sigma,
|
||||
const scalar volHlowRate,
|
||||
const scalar volFlowRate,
|
||||
const scalar rhoAv,
|
||||
const scalar Urel,
|
||||
const vector& pos,
|
||||
|
||||
@ -52,7 +52,8 @@ namespace Foam
|
||||
|
||||
Foam::localAxesRotation::localAxesRotation
|
||||
(
|
||||
const dictionary& dict, const objectRegistry& orb
|
||||
const dictionary& dict,
|
||||
const objectRegistry& orb
|
||||
)
|
||||
:
|
||||
Rptr_(),
|
||||
@ -88,10 +89,10 @@ Foam::localAxesRotation::localAxesRotation
|
||||
e3_()
|
||||
{
|
||||
FatalErrorIn("localAxesRotation(const dictionary&)")
|
||||
<< " localAxesRotation can not be contructed from dictionary "
|
||||
<< " localAxesRotation can not be constructed from dictionary "
|
||||
<< " use the construtctor : "
|
||||
"("
|
||||
" const dictionary& dict, const objectRegistry& orb"
|
||||
" const dictionary&, const objectRegistry&"
|
||||
")"
|
||||
<< exit(FatalIOError);
|
||||
}
|
||||
@ -112,7 +113,7 @@ Foam::vector Foam::localAxesRotation::transform(const vector& st) const
|
||||
{
|
||||
notImplemented
|
||||
(
|
||||
"vector Foam::localAxesRotation::transform(const vector&) const"
|
||||
"vector localAxesRotation::transform(const vector&) const"
|
||||
);
|
||||
return vector::zero;
|
||||
}
|
||||
@ -122,7 +123,7 @@ Foam::vector Foam::localAxesRotation::invTransform(const vector& st) const
|
||||
{
|
||||
notImplemented
|
||||
(
|
||||
"vector Foam::localAxesRotation::invTransform(const vector&) const"
|
||||
"vector localAxesRotation::invTransform(const vector&) const"
|
||||
);
|
||||
return vector::zero;
|
||||
}
|
||||
@ -135,7 +136,10 @@ Foam::tmp<Foam::vectorField> Foam::localAxesRotation::transform
|
||||
{
|
||||
if (Rptr_->size() != st.size())
|
||||
{
|
||||
FatalErrorIn("localAxesRotation::transform(const vectorField&)")
|
||||
FatalErrorIn
|
||||
(
|
||||
"tmp<vectorField> localAxesRotation::transform(const vectorField&)"
|
||||
)
|
||||
<< "vectorField st has different size to tensorField "
|
||||
<< abort(FatalError);
|
||||
}
|
||||
@ -160,7 +164,13 @@ Foam::tmp<Foam::tensorField> Foam::localAxesRotation::transformTensor
|
||||
{
|
||||
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"
|
||||
<< abort(FatalError);
|
||||
}
|
||||
@ -173,7 +183,11 @@ Foam::tensor Foam::localAxesRotation::transformTensor
|
||||
const tensor& st
|
||||
) const
|
||||
{
|
||||
notImplemented("tensor localAxesRotation::transformTensor() const");
|
||||
notImplemented
|
||||
(
|
||||
"tensor localAxesRotation::transformTensor(const tensor&) const"
|
||||
);
|
||||
|
||||
return tensor::zero;
|
||||
}
|
||||
|
||||
@ -186,7 +200,14 @@ Foam::tmp<Foam::tensorField> Foam::localAxesRotation::transformTensor
|
||||
{
|
||||
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"
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
@ -85,6 +85,7 @@ private:
|
||||
//- Is surface closed
|
||||
mutable label surfaceClosed_;
|
||||
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
////- Helper: find instance of files without header
|
||||
@ -166,7 +167,7 @@ public:
|
||||
//- Move points
|
||||
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;
|
||||
|
||||
|
||||
@ -260,6 +261,7 @@ public:
|
||||
List<volumeType>&
|
||||
) const;
|
||||
|
||||
|
||||
// Other
|
||||
|
||||
//- WIP. Store element-wise field.
|
||||
@ -285,7 +287,6 @@ public:
|
||||
IOstream::versionNumber ver,
|
||||
IOstream::compressionType cmp
|
||||
) const;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -155,7 +155,7 @@ createSetsAndZone floor -$tol $floorMax -$tol $floorMax -$tol $tol
|
||||
echo "cellSet floorCells new faceToCell floorFaces owner" >> $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