mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
GIT: Resolved conflict
This commit is contained in:
@ -224,14 +224,14 @@ int main(int argc, char *argv[])
|
||||
|
||||
if (nearCellValue)
|
||||
{
|
||||
WarningIn(args.executable())
|
||||
WarningInFunction
|
||||
<< "Using neighbouring cell value instead of patch value"
|
||||
<< nl << endl;
|
||||
}
|
||||
|
||||
if (noPointValues)
|
||||
{
|
||||
WarningIn(args.executable())
|
||||
WarningInFunction
|
||||
<< "Outputting cell values only" << nl << endl;
|
||||
}
|
||||
|
||||
|
||||
@ -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-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -69,7 +69,7 @@ Pout<< endl
|
||||
)
|
||||
)
|
||||
{
|
||||
// FatalErrorIn("tecplotWriter::writeInit(..) const")
|
||||
// FatalErrorInFunction
|
||||
// << "Error in TECINI112." << exit(FatalError);
|
||||
}
|
||||
}
|
||||
@ -148,7 +148,7 @@ Pout<< "zoneName:" << zoneName
|
||||
)
|
||||
)
|
||||
{
|
||||
// FatalErrorIn("tecplotWriter::writePolyhedralZone(..) const")
|
||||
// FatalErrorInFunction
|
||||
// << "Error in TECZNE112." << exit(FatalError);
|
||||
}
|
||||
}
|
||||
@ -228,7 +228,7 @@ Pout<< "zoneName:" << zoneName
|
||||
)
|
||||
)
|
||||
{
|
||||
// FatalErrorIn("tecplotWriter::writePolygonalZone(..) const")
|
||||
// FatalErrorInFunction
|
||||
// << "Error in TECZNE112." << exit(FatalError);
|
||||
}
|
||||
}
|
||||
@ -308,7 +308,7 @@ Pout<< "zoneName:" << zoneName
|
||||
)
|
||||
)
|
||||
{
|
||||
// FatalErrorIn("tecplotWriter::writePolygonalZone(..) const")
|
||||
// FatalErrorInFunction
|
||||
// << "Error in TECZNE112." << exit(FatalError);
|
||||
}
|
||||
}
|
||||
@ -379,7 +379,7 @@ void Foam::tecplotWriter::writeConnectivity(const fvMesh& mesh) const
|
||||
)
|
||||
)
|
||||
{
|
||||
// FatalErrorIn("tecplotWriter::writeConnectivity(const fvMesh&) const")
|
||||
// FatalErrorInFunction
|
||||
// << "Error in TECPOLY112." << exit(FatalError);
|
||||
}
|
||||
}
|
||||
@ -493,7 +493,7 @@ void Foam::tecplotWriter::writeConnectivity
|
||||
)
|
||||
)
|
||||
{
|
||||
// FatalErrorIn("tecplotWriter::writeConnectivity(..) const")
|
||||
// FatalErrorInFunction
|
||||
// << "Error in TECPOLY112." << exit(FatalError);
|
||||
}
|
||||
}
|
||||
@ -505,7 +505,7 @@ Pout<< "writeEnd" << endl;
|
||||
|
||||
if (!TECEND112())
|
||||
{
|
||||
// FatalErrorIn("tecplotWriter::writeEnd() const")
|
||||
// FatalErrorInFunction
|
||||
// << "Error in TECEND112." << exit(FatalError);
|
||||
}
|
||||
|
||||
|
||||
@ -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-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -57,7 +57,7 @@ void Foam::tecplotWriter::writeField(const Field<Type>& fld) const
|
||||
|
||||
if (!TECDAT112(&size, floats.begin(), &IsDouble))
|
||||
{
|
||||
// FatalErrorIn("tecplotWriter::writeField(..) const")
|
||||
// FatalErrorInFunction
|
||||
// << "Error in TECDAT112." << exit(FatalError);
|
||||
}
|
||||
}
|
||||
|
||||
@ -29,7 +29,6 @@ Description
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
#include "argList.H"
|
||||
#include "fvMesh.H"
|
||||
#include "volFields.H"
|
||||
@ -120,7 +119,7 @@ void ReadAndMapFields
|
||||
}
|
||||
//else
|
||||
//{
|
||||
// FatalErrorIn("ReadAndMapFields(..)")
|
||||
// FatalErrorInFunction
|
||||
// << "Face " << faceI << " from index " << index
|
||||
// << " is not a boundary face." << abort(FatalError);
|
||||
//}
|
||||
@ -128,7 +127,7 @@ void ReadAndMapFields
|
||||
}
|
||||
//else
|
||||
//{
|
||||
// WarningIn("ReadAndMapFields(..)")
|
||||
// WarningInFunction
|
||||
// << "Point " << pointI << " at "
|
||||
// << tetDualMesh.points()[pointI]
|
||||
// << " has no dual correspondence." << endl;
|
||||
@ -188,7 +187,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
if (pointDualAddressing.size() != tetDualMesh.nPoints())
|
||||
{
|
||||
FatalErrorIn(args.executable())
|
||||
FatalErrorInFunction
|
||||
<< "Size " << pointDualAddressing.size()
|
||||
<< " of addressing map " << pointDualAddressing.objectPath()
|
||||
<< " differs from number of points in mesh "
|
||||
@ -218,7 +217,7 @@ int main(int argc, char *argv[])
|
||||
label faceI = -index-1;
|
||||
if (faceI < mesh.nInternalFaces())
|
||||
{
|
||||
FatalErrorIn(args.executable())
|
||||
FatalErrorInFunction
|
||||
<< "Face " << faceI << " from index " << index
|
||||
<< " is not a boundary face."
|
||||
<< " nInternalFaces:" << mesh.nInternalFaces()
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -332,7 +332,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
if (binary && (sizeof(floatScalar) != 4 || sizeof(label) != 4))
|
||||
{
|
||||
FatalErrorIn(args.executable())
|
||||
FatalErrorInFunction
|
||||
<< "floatScalar and/or label are not 4 bytes in size" << nl
|
||||
<< "Hence cannot use binary VTK format. Please use -ascii"
|
||||
<< exit(FatalError);
|
||||
@ -342,7 +342,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
if (nearCellValue)
|
||||
{
|
||||
WarningIn(args.executable())
|
||||
WarningInFunction
|
||||
<< "Using neighbouring cell value instead of patch value"
|
||||
<< nl << endl;
|
||||
}
|
||||
@ -351,7 +351,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
if (noPointValues)
|
||||
{
|
||||
WarningIn(args.executable())
|
||||
WarningInFunction
|
||||
<< "Outputting cell values only" << nl << endl;
|
||||
}
|
||||
|
||||
@ -429,7 +429,7 @@ int main(int argc, char *argv[])
|
||||
mkDir(fvPath);
|
||||
|
||||
|
||||
// mesh wrapper; does subsetting and decomposition
|
||||
// Mesh wrapper; does subsetting and decomposition
|
||||
vtkMesh vMesh(mesh, cellSetName);
|
||||
|
||||
|
||||
@ -1295,7 +1295,7 @@ int main(int argc, char *argv[])
|
||||
);
|
||||
if (system(cmd.c_str()) == -1)
|
||||
{
|
||||
WarningIn(args.executable())
|
||||
WarningInFunction
|
||||
<< "Could not execute command " << cmd << endl;
|
||||
}
|
||||
}
|
||||
|
||||
@ -70,7 +70,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
if (!smapFile.good())
|
||||
{
|
||||
FatalErrorIn(args.executable())
|
||||
FatalErrorInFunction
|
||||
<< "Cannot open SMAP file " << smapFile.name()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
@ -92,7 +92,7 @@ int main(int argc, char *argv[])
|
||||
&& fieldName.wordToken() != "CELL"
|
||||
)
|
||||
{
|
||||
FatalErrorIn(args.executable())
|
||||
FatalErrorInFunction
|
||||
<< "Expected first CELL, found "
|
||||
<< fieldName
|
||||
<< exit(FatalError);
|
||||
@ -222,7 +222,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
if (cell != 0)
|
||||
{
|
||||
FatalErrorIn(args.executable())
|
||||
FatalErrorInFunction
|
||||
<< "Expected first SMAP dummy entry to be cell 0, found "
|
||||
<< cell
|
||||
<< exit(FatalError);
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -72,7 +72,7 @@ public:
|
||||
|
||||
bool writeData(Ostream&) const
|
||||
{
|
||||
notImplemented("zonesEntries::writeData(Ostream&) const");
|
||||
NotImplemented;
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
@ -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-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -90,7 +90,7 @@ void Foam::vtkPV3Foam::AddToBlock
|
||||
{
|
||||
if (blockDO)
|
||||
{
|
||||
FatalErrorIn("Foam::vtkPV3Foam::AddToBlock")
|
||||
FatalErrorInFunction
|
||||
<< "Block already has a vtkDataSet assigned to it"
|
||||
<< endl;
|
||||
return;
|
||||
|
||||
@ -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-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -84,7 +84,7 @@ void Foam::vtkPV3blockMesh::AddToBlock
|
||||
{
|
||||
if (blockDO)
|
||||
{
|
||||
FatalErrorIn("Foam::vtkPV3blockMesh::AddToBlock")
|
||||
FatalErrorInFunction
|
||||
<< "Block already has a vtkDataSet assigned to it"
|
||||
<< endl;
|
||||
return;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -93,7 +93,7 @@ void Foam::vtkPV3Readers::AddToBlock
|
||||
{
|
||||
if (blockDO)
|
||||
{
|
||||
FatalErrorIn("Foam::vtkPV3Readers::AddToBlock")
|
||||
FatalErrorInFunction
|
||||
<< "Block already has a vtkDataSet assigned to it"
|
||||
<< endl;
|
||||
return;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -72,7 +72,7 @@ public:
|
||||
|
||||
bool writeData(Ostream&) const
|
||||
{
|
||||
notImplemented("zonesEntries::writeData(Ostream&) const");
|
||||
NotImplemented;
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -90,7 +90,7 @@ void Foam::vtkPV4Foam::AddToBlock
|
||||
{
|
||||
if (blockDO)
|
||||
{
|
||||
FatalErrorIn("Foam::vtkPV4Foam::AddToBlock")
|
||||
FatalErrorInFunction
|
||||
<< "Block already has a vtkDataSet assigned to it"
|
||||
<< endl;
|
||||
return;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -84,7 +84,7 @@ void Foam::vtkPV4blockMesh::AddToBlock
|
||||
{
|
||||
if (blockDO)
|
||||
{
|
||||
FatalErrorIn("Foam::vtkPV4blockMesh::AddToBlock")
|
||||
FatalErrorInFunction
|
||||
<< "Block already has a vtkDataSet assigned to it"
|
||||
<< endl;
|
||||
return;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -93,7 +93,7 @@ void Foam::vtkPV4Readers::AddToBlock
|
||||
{
|
||||
if (blockDO)
|
||||
{
|
||||
FatalErrorIn("Foam::vtkPV4Readers::AddToBlock")
|
||||
FatalErrorInFunction
|
||||
<< "Block already has a vtkDataSet assigned to it"
|
||||
<< endl;
|
||||
return;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -57,15 +57,7 @@ tmp<Field<Type> > readParticleField
|
||||
return tmp<Field<Type> >(new Field<Type>(newField.xfer()));
|
||||
}
|
||||
|
||||
FatalErrorIn
|
||||
(
|
||||
"template<class Type>"
|
||||
"void readParticleField"
|
||||
"("
|
||||
"const word&, "
|
||||
"const IOobjectList"
|
||||
")"
|
||||
)
|
||||
FatalErrorInFunction
|
||||
<< "error: cloud field name " << name << " not found"
|
||||
<< abort(FatalError);
|
||||
|
||||
@ -94,16 +86,7 @@ void readFields
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"template<class Type>"
|
||||
"void readFields"
|
||||
"("
|
||||
"PtrList<List<Type> >&, "
|
||||
"const List<word>&, "
|
||||
"const IOobjectList&"
|
||||
")"
|
||||
)
|
||||
FatalErrorInFunction
|
||||
<< "Unable to read field " << fieldNames[j]
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
@ -26,8 +26,9 @@ Application
|
||||
|
||||
Description
|
||||
Calculate the geometric compression ratio.
|
||||
Note that if you have valves and/or extra volumes it will not work,
|
||||
since it calculates the volume at BDC and TCD.
|
||||
|
||||
Note: if you have valves and/or extra volumes it will not work,
|
||||
since it calculates the volume at BDC and TCD.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -68,9 +69,9 @@ int main(int argc, char *argv[])
|
||||
|
||||
scalar Vmax = sum(mesh.V().field());
|
||||
|
||||
while (mag(runTime.theta()-ca1) > eps)
|
||||
while (mag(runTime.theta() - ca1) > eps)
|
||||
{
|
||||
scalar t1 = runTime.userTimeToTime(ca1-runTime.theta());
|
||||
scalar t1 = runTime.userTimeToTime(ca1 - runTime.theta());
|
||||
runTime.setDeltaT(t1);
|
||||
runTime++;
|
||||
Info<< "CA = " << runTime.theta() << endl;
|
||||
@ -79,9 +80,10 @@ int main(int argc, char *argv[])
|
||||
|
||||
scalar Vmin = sum(mesh.V().field());
|
||||
|
||||
Info<< "\nVmax = " << Vmax;
|
||||
Info<< ", Vmin = " << Vmin << endl;
|
||||
Info<< "Vmax/Vmin = " << Vmax/Vmin << endl;
|
||||
Info<< "\nVmax = " << Vmax
|
||||
<< ", Vmin = " << Vmin << nl
|
||||
<< "Vmax/Vmin = " << Vmax/Vmin << endl;
|
||||
|
||||
Info<< "\nEnd\n" << endl;
|
||||
|
||||
return 0;
|
||||
|
||||
@ -8,7 +8,6 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/fvOptions/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude
|
||||
|
||||
|
||||
@ -43,7 +43,7 @@ Description
|
||||
#include "pointFields.H"
|
||||
#include "uniformDimensionedFields.H"
|
||||
#include "ReadFields.H"
|
||||
#include "fvIOoptionList.H"
|
||||
#include "fvOptions.H"
|
||||
|
||||
#include "singlePhaseTransportModel.H"
|
||||
#include "turbulentTransportModel.H"
|
||||
@ -84,12 +84,8 @@ wordList ReadUniformFields
|
||||
|
||||
if (iter == localNamesSet.end())
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"ReadFields<class GeoField>"
|
||||
"(const IOobjectList&, PtrList<GeoField>&"
|
||||
", const bool)"
|
||||
) << "Fields not synchronised across processors." << endl
|
||||
FatalErrorInFunction
|
||||
<< "Fields not synchronised across processors." << endl
|
||||
<< "Master has fields " << masterNames
|
||||
<< " processor " << Pstream::myProcNo()
|
||||
<< " has fields " << localNames << exit(FatalError);
|
||||
@ -102,12 +98,8 @@ wordList ReadUniformFields
|
||||
|
||||
forAllConstIter(HashSet<word>, localNamesSet, iter)
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"ReadFields<class GeoField>"
|
||||
"(const IOobjectList&, PtrList<GeoField>&"
|
||||
", const bool)"
|
||||
) << "Fields not synchronised across processors." << endl
|
||||
FatalErrorInFunction
|
||||
<< "Fields not synchronised across processors." << endl
|
||||
<< "Master has fields " << masterNames
|
||||
<< " processor " << Pstream::myProcNo()
|
||||
<< " has fields " << localNames << exit(FatalError);
|
||||
@ -298,8 +290,6 @@ void calc
|
||||
mesh
|
||||
);
|
||||
|
||||
#include "createFvOptions.H"
|
||||
|
||||
if (phi.dimensions() == dimVolume/dimTime)
|
||||
{
|
||||
IOobject turbulencePropertiesHeader
|
||||
@ -404,7 +394,7 @@ void calc
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalErrorIn(args.executable())
|
||||
FatalErrorInFunction
|
||||
<< "Incorrect dimensions of phi: " << phi.dimensions()
|
||||
<< nl << exit(FatalError);
|
||||
}
|
||||
|
||||
@ -80,7 +80,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
if (!nProcs)
|
||||
{
|
||||
FatalErrorIn(args.executable())
|
||||
FatalErrorInFunction
|
||||
<< "No processor* directories found"
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
@ -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-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -113,7 +113,7 @@ void Foam::channelIndex::walkOppositeFaces
|
||||
|
||||
if (oppositeFaceI == -1)
|
||||
{
|
||||
FatalErrorIn("channelIndex::walkOppositeFaces(..)")
|
||||
FatalErrorInFunction
|
||||
<< "Face:" << faceI << " owner cell:" << ownCell
|
||||
<< " is not a hex?" << abort(FatalError);
|
||||
}
|
||||
@ -135,7 +135,7 @@ void Foam::channelIndex::walkOppositeFaces
|
||||
|
||||
if (oppositeFaceI == -1)
|
||||
{
|
||||
FatalErrorIn("channelIndex::walkOppositeFaces(..)")
|
||||
FatalErrorInFunction
|
||||
<< "Face:" << faceI << " neighbour cell:" << neiCell
|
||||
<< " is not a hex?" << abort(FatalError);
|
||||
}
|
||||
@ -247,7 +247,7 @@ Foam::channelIndex::channelIndex
|
||||
|
||||
if (patchI == -1)
|
||||
{
|
||||
FatalErrorIn("channelIndex::channelIndex(const polyMesh&)")
|
||||
FatalErrorInFunction
|
||||
<< "Illegal patch " << patchNames[i]
|
||||
<< ". Valid patches are " << patches.name()
|
||||
<< exit(FatalError);
|
||||
|
||||
@ -107,7 +107,7 @@ Foam::scalar checkUniformTimeStep(const scalarField& t)
|
||||
|
||||
if (mag(deltaT - dT) > SMALL)
|
||||
{
|
||||
FatalErrorIn("checkUniformTimeStep(const scalarField&)")
|
||||
FatalErrorInFunction
|
||||
<< "Unable to process data with a variable time step"
|
||||
<< exit(FatalError);
|
||||
}
|
||||
@ -115,7 +115,7 @@ Foam::scalar checkUniformTimeStep(const scalarField& t)
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalErrorIn("checkUniformTimeStep(const scalarField&)")
|
||||
FatalErrorInFunction
|
||||
<< "Unable to create FFT with a single value"
|
||||
<< exit(FatalError);
|
||||
}
|
||||
@ -145,7 +145,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
if (t.size() < N)
|
||||
{
|
||||
FatalErrorIn(args.executable())
|
||||
FatalErrorInFunction
|
||||
<< "Block size N = " << N
|
||||
<< " is larger than number of data = " << t.size()
|
||||
<< exit(FatalError);
|
||||
|
||||
@ -17,6 +17,7 @@ EXE_LIBS = \
|
||||
-lfluidThermophysicalModels \
|
||||
-lspecie \
|
||||
-lfiniteVolume \
|
||||
-lfvOptions \
|
||||
-lgenericPatchFields \
|
||||
-lmeshTools \
|
||||
-lsampling
|
||||
|
||||
@ -12,4 +12,5 @@ EXE_LIBS = \
|
||||
-lincompressibleTransportModels \
|
||||
-lgenericPatchFields \
|
||||
-lfiniteVolume \
|
||||
-lfvOptions \
|
||||
-lmeshTools
|
||||
|
||||
@ -18,5 +18,5 @@
|
||||
|
||||
autoPtr<incompressible::RASModel> RASModel
|
||||
(
|
||||
incompressible::RASModel::New(U, phi, laminarTransport)
|
||||
incompressible::New<incompressible::RASModel>(U, phi, laminarTransport)
|
||||
);
|
||||
|
||||
@ -44,11 +44,26 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
timeSelector::addOptions();
|
||||
|
||||
argList::addOption
|
||||
(
|
||||
"fields",
|
||||
"wordReList",
|
||||
"specify which turbulence fields (k, epsilon, omega, R) to write"
|
||||
" - eg '(k omega)' or '(R)' or '(.*)'."
|
||||
);
|
||||
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
|
||||
instantList timeDirs = timeSelector::select0(runTime, args);
|
||||
|
||||
const bool selectedFields = args.optionFound("fields");
|
||||
wordReList fieldPatterns;
|
||||
if (selectedFields)
|
||||
{
|
||||
fieldPatterns = wordReList(args.optionLookup("fields")());
|
||||
}
|
||||
|
||||
#include "createMesh.H"
|
||||
|
||||
forAll(timeDirs, timeI)
|
||||
@ -59,69 +74,77 @@ int main(int argc, char *argv[])
|
||||
|
||||
#include "createFields.H"
|
||||
|
||||
Info<< "\nRetrieving field k from turbulence model" << endl;
|
||||
const volScalarField k(RASModel->k());
|
||||
|
||||
Info<< "\nRetrieving field epsilon from turbulence model" << endl;
|
||||
const volScalarField epsilon(RASModel->epsilon());
|
||||
|
||||
Info<< "\nRetrieving field R from turbulence model" << endl;
|
||||
const volSymmTensorField R(RASModel->R());
|
||||
|
||||
// Check availability of tubulence fields
|
||||
|
||||
if (!IOobject("k", runTime.timeName(), mesh).headerOk())
|
||||
if (findStrings(fieldPatterns, "k"))
|
||||
{
|
||||
Info<< "\nWriting turbulence field k" << endl;
|
||||
k.write();
|
||||
}
|
||||
else
|
||||
{
|
||||
Info<< "\nTurbulence k field already exists" << endl;
|
||||
if (!IOobject("k", runTime.timeName(), mesh).headerOk())
|
||||
{
|
||||
Info<< " Writing turbulence field k" << endl;
|
||||
const volScalarField k(RASModel->k());
|
||||
k.write();
|
||||
}
|
||||
else
|
||||
{
|
||||
Info<< " Turbulence k field already exists" << endl;
|
||||
}
|
||||
}
|
||||
|
||||
if (!IOobject("epsilon", runTime.timeName(), mesh).headerOk())
|
||||
if (findStrings(fieldPatterns, "epsilon"))
|
||||
{
|
||||
Info<< "\nWriting turbulence field epsilon" << endl;
|
||||
epsilon.write();
|
||||
}
|
||||
else
|
||||
{
|
||||
Info<< "\nTurbulence epsilon field already exists" << endl;
|
||||
if (!IOobject("epsilon", runTime.timeName(), mesh).headerOk())
|
||||
{
|
||||
Info<< " Writing turbulence field epsilon" << endl;
|
||||
const volScalarField epsilon(RASModel->epsilon());
|
||||
epsilon.write();
|
||||
}
|
||||
else
|
||||
{
|
||||
Info<< " Turbulence epsilon field already exists" << endl;
|
||||
}
|
||||
}
|
||||
|
||||
if (!IOobject("R", runTime.timeName(), mesh).headerOk())
|
||||
if (findStrings(fieldPatterns, "R"))
|
||||
{
|
||||
Info<< "\nWriting turbulence field R" << endl;
|
||||
R.write();
|
||||
}
|
||||
else
|
||||
{
|
||||
Info<< "\nTurbulence R field already exists" << endl;
|
||||
if (!IOobject("R", runTime.timeName(), mesh).headerOk())
|
||||
{
|
||||
Info<< " Writing turbulence field R" << endl;
|
||||
const volSymmTensorField R(RASModel->R());
|
||||
R.write();
|
||||
}
|
||||
else
|
||||
{
|
||||
Info<< " Turbulence R field already exists" << endl;
|
||||
}
|
||||
}
|
||||
|
||||
if (!IOobject("omega", runTime.timeName(), mesh).headerOk())
|
||||
if (findStrings(fieldPatterns, "omega"))
|
||||
{
|
||||
const scalar Cmu = 0.09;
|
||||
if (!IOobject("omega", runTime.timeName(), mesh).headerOk())
|
||||
{
|
||||
const scalar Cmu = 0.09;
|
||||
|
||||
Info<< "creating omega" << endl;
|
||||
volScalarField omega
|
||||
(
|
||||
IOobject
|
||||
// Assume k and epsilon are available
|
||||
const volScalarField k(RASModel->k());
|
||||
const volScalarField epsilon(RASModel->epsilon());
|
||||
|
||||
volScalarField omega
|
||||
(
|
||||
"omega",
|
||||
runTime.timeName(),
|
||||
mesh
|
||||
),
|
||||
epsilon/(Cmu*k),
|
||||
epsilon.boundaryField().types()
|
||||
);
|
||||
Info<< "\nWriting turbulence field omega" << endl;
|
||||
omega.write();
|
||||
}
|
||||
else
|
||||
{
|
||||
Info<< "\nTurbulence omega field already exists" << endl;
|
||||
IOobject
|
||||
(
|
||||
"omega",
|
||||
runTime.timeName(),
|
||||
mesh
|
||||
),
|
||||
epsilon/(Cmu*k),
|
||||
epsilon.boundaryField().types()
|
||||
);
|
||||
|
||||
Info<< " Writing turbulence field omega" << endl;
|
||||
omega.write();
|
||||
}
|
||||
else
|
||||
{
|
||||
Info<< " Turbulence omega field already exists" << endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -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-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -104,7 +104,7 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh)
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalErrorIn(args.executable())
|
||||
FatalErrorInFunction
|
||||
<< "Incorrect dimensions of phi: " << phi.dimensions()
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
@ -20,6 +20,7 @@ EXE_LIBS = \
|
||||
-lfluidThermophysicalModels \
|
||||
-lspecie \
|
||||
-lfiniteVolume \
|
||||
-lfvOptions \
|
||||
-lgenericPatchFields \
|
||||
-lmeshTools \
|
||||
-lsampling
|
||||
|
||||
@ -241,7 +241,7 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh)
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalErrorIn(args.executable())
|
||||
FatalErrorInFunction
|
||||
<< "Incorrect dimensions of phi: " << phi.dimensions()
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
@ -56,7 +56,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
if (nD != 2)
|
||||
{
|
||||
FatalErrorIn(args.executable())
|
||||
FatalErrorInFunction
|
||||
<< "Case is not 2D, stream-function cannot be computed"
|
||||
<< exit(FatalError);
|
||||
}
|
||||
@ -232,7 +232,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalErrorIn(args.executable())
|
||||
FatalErrorInFunction
|
||||
<< "Cannot find initialisation face or a cell."
|
||||
<< abort(FatalError);
|
||||
}
|
||||
@ -476,7 +476,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
else
|
||||
{
|
||||
WarningIn(args.executable())
|
||||
WarningInFunction
|
||||
<< "Flux field does not exist."
|
||||
<< " Stream function not calculated" << endl;
|
||||
}
|
||||
|
||||
@ -19,4 +19,5 @@ EXE_LIBS = \
|
||||
-lfluidThermophysicalModels \
|
||||
-lsolidThermo \
|
||||
-lfiniteVolume \
|
||||
-lfvOptions \
|
||||
-lmeshTools
|
||||
|
||||
@ -42,6 +42,7 @@ if (isA<fluidThermo>(thermo()))
|
||||
const volVectorField& U = UPtr();
|
||||
|
||||
#include "compressibleCreatePhi.H"
|
||||
|
||||
// Copy phi to autoPtr. Rename to make sure copy is now registered as 'phi'.
|
||||
phi.rename("phiFluid");
|
||||
phiPtr.reset(new surfaceScalarField("phi", phi));
|
||||
@ -54,3 +55,18 @@ if (isA<fluidThermo>(thermo()))
|
||||
refCast<const fluidThermo>(thermo())
|
||||
);
|
||||
}
|
||||
|
||||
// Read radiative heat-flux if available
|
||||
volScalarField Qr
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"Qr",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::READ_IF_PRESENT,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("Qr", dimMass/pow3(dimTime), 0.0)
|
||||
);
|
||||
|
||||
@ -70,19 +70,24 @@ int main(int argc, char *argv[])
|
||||
const surfaceScalarField::GeometricBoundaryField& patchHeatFlux =
|
||||
heatFlux.boundaryField();
|
||||
|
||||
const volScalarField::GeometricBoundaryField& patchRadHeatFlux =
|
||||
Qr.boundaryField();
|
||||
|
||||
const surfaceScalarField::GeometricBoundaryField& magSf =
|
||||
mesh.magSf().boundaryField();
|
||||
|
||||
Info<< "\nWall heat fluxes [W]" << endl;
|
||||
forAll(patchHeatFlux, patchi)
|
||||
{
|
||||
if (isA<wallFvPatch>(mesh.boundary()[patchi]))
|
||||
{
|
||||
Info<< mesh.boundary()[patchi].name()
|
||||
<< " "
|
||||
<< gSum
|
||||
(
|
||||
mesh.magSf().boundaryField()[patchi]
|
||||
*patchHeatFlux[patchi]
|
||||
)
|
||||
<< endl;
|
||||
scalar convFlux = gSum(magSf[patchi]*patchHeatFlux[patchi]);
|
||||
scalar radFlux = -gSum(magSf[patchi]*patchRadHeatFlux[patchi]);
|
||||
|
||||
Info<< mesh.boundary()[patchi].name() << endl
|
||||
<< " convective: " << convFlux << endl
|
||||
<< " radiative: " << radFlux << endl
|
||||
<< " total: " << convFlux + radFlux << endl;
|
||||
}
|
||||
}
|
||||
Info<< endl;
|
||||
@ -105,6 +110,36 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
wallHeatFlux.write();
|
||||
|
||||
// Write the total heat-flux including the radiative contribution
|
||||
// if available
|
||||
if (Qr.headerOk())
|
||||
{
|
||||
volScalarField totalWallHeatFlux
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"totalWallHeatFlux",
|
||||
runTime.timeName(),
|
||||
mesh
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar
|
||||
(
|
||||
"totalWallHeatFlux",
|
||||
heatFlux.dimensions(),
|
||||
0.0
|
||||
)
|
||||
);
|
||||
|
||||
forAll(totalWallHeatFlux.boundaryField(), patchi)
|
||||
{
|
||||
totalWallHeatFlux.boundaryField()[patchi] =
|
||||
patchHeatFlux[patchi] - patchRadHeatFlux[patchi];
|
||||
}
|
||||
|
||||
totalWallHeatFlux.write();
|
||||
}
|
||||
}
|
||||
|
||||
Info<< "End" << endl;
|
||||
@ -112,4 +147,5 @@ int main(int argc, char *argv[])
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -19,4 +19,5 @@ EXE_LIBS = \
|
||||
-lspecie \
|
||||
-lgenericPatchFields \
|
||||
-lfiniteVolume \
|
||||
-lfvOptions \
|
||||
-lmeshTools
|
||||
|
||||
@ -55,7 +55,7 @@ void calcIncompressible
|
||||
|
||||
autoPtr<incompressible::RASModel> model
|
||||
(
|
||||
incompressible::RASModel::New(U, phi, laminarTransport)
|
||||
incompressible::New<incompressible::RASModel>(U, phi, laminarTransport)
|
||||
);
|
||||
|
||||
const volSymmTensorField Reff(model->devReff());
|
||||
@ -104,7 +104,7 @@ void calcCompressible
|
||||
|
||||
autoPtr<compressible::RASModel> model
|
||||
(
|
||||
compressible::RASModel::New
|
||||
compressible::New<compressible::RASModel>
|
||||
(
|
||||
rho,
|
||||
U,
|
||||
|
||||
@ -18,6 +18,7 @@ EXE_LIBS = \
|
||||
-lfluidThermophysicalModels \
|
||||
-lspecie \
|
||||
-lfiniteVolume \
|
||||
-lfvOptions \
|
||||
-lgenericPatchFields \
|
||||
-lmeshTools \
|
||||
-lsampling
|
||||
|
||||
Reference in New Issue
Block a user