mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of ssh://chris@noisy/~OpenFOAM/OpenFOAM-dev
This commit is contained in:
9
.gitignore
vendored
9
.gitignore
vendored
@ -16,6 +16,8 @@
|
|||||||
*.la
|
*.la
|
||||||
*.so
|
*.so
|
||||||
*.jar
|
*.jar
|
||||||
|
|
||||||
|
# ignore derived files
|
||||||
lex.yy.c
|
lex.yy.c
|
||||||
|
|
||||||
# Corefiles
|
# Corefiles
|
||||||
@ -32,9 +34,10 @@ linux*Gcc*
|
|||||||
|
|
||||||
# reinstate wmake/rules that look like build folders
|
# reinstate wmake/rules that look like build folders
|
||||||
!wmake/rules/linux*
|
!wmake/rules/linux*
|
||||||
# but do ignore the derived files in there
|
|
||||||
wmake/rules/linux*/dirToString
|
# but do continue to ignore the derived wmake files
|
||||||
wmake/rules/linux*/wmkdep
|
wmake/rules/*/dirToString
|
||||||
|
wmake/rules/*/wmkdep
|
||||||
|
|
||||||
# doxygen generated documentation
|
# doxygen generated documentation
|
||||||
doc/[Dd]oxygen/html
|
doc/[Dd]oxygen/html
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
polyDualMesh.C
|
|
||||||
polyDualMeshApp.C
|
polyDualMeshApp.C
|
||||||
|
|
||||||
EXE = $(FOAM_APPBIN)/polyDualMesh
|
EXE = $(FOAM_APPBIN)/polyDualMesh
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
EXE_INC = \
|
EXE_INC = \
|
||||||
-I$(LIB_SRC)/meshTools/lnInclude
|
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||||
|
-I$(LIB_SRC)/conversion/lnInclude
|
||||||
|
|
||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
-lmeshTools
|
-lmeshTools -lconversion
|
||||||
|
|||||||
@ -344,7 +344,7 @@ bool doCommand
|
|||||||
/ (10*Pstream::nProcs());
|
/ (10*Pstream::nProcs());
|
||||||
|
|
||||||
|
|
||||||
bool error = false;
|
bool ok = true;
|
||||||
|
|
||||||
// Set to work on
|
// Set to work on
|
||||||
autoPtr<topoSet> currentSetPtr(NULL);
|
autoPtr<topoSet> currentSetPtr(NULL);
|
||||||
@ -388,7 +388,7 @@ bool doCommand
|
|||||||
Pout<< " Cannot construct/load set "
|
Pout<< " Cannot construct/load set "
|
||||||
<< topoSet::localPath(mesh, setName) << endl;
|
<< topoSet::localPath(mesh, setName) << endl;
|
||||||
|
|
||||||
error = true;
|
ok = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -518,7 +518,7 @@ bool doCommand
|
|||||||
}
|
}
|
||||||
catch (Foam::IOerror& fIOErr)
|
catch (Foam::IOerror& fIOErr)
|
||||||
{
|
{
|
||||||
error = true;
|
ok = false;
|
||||||
|
|
||||||
Pout<< fIOErr.message().c_str() << endl;
|
Pout<< fIOErr.message().c_str() << endl;
|
||||||
|
|
||||||
@ -529,7 +529,7 @@ bool doCommand
|
|||||||
}
|
}
|
||||||
catch (Foam::error& fErr)
|
catch (Foam::error& fErr)
|
||||||
{
|
{
|
||||||
error = true;
|
ok = false;
|
||||||
|
|
||||||
Pout<< fErr.message().c_str() << endl;
|
Pout<< fErr.message().c_str() << endl;
|
||||||
|
|
||||||
@ -539,15 +539,16 @@ bool doCommand
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return !error;
|
return ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Status returned from parsing the first token of the line
|
||||||
enum commandStatus
|
enum commandStatus
|
||||||
{
|
{
|
||||||
QUIT,
|
QUIT, // quit program
|
||||||
INVALID,
|
INVALID, // token is not a valid set manipulation command
|
||||||
VALID
|
VALID // ,, is a valid ,,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -841,7 +842,7 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ok = false;
|
ok = true;
|
||||||
|
|
||||||
if (stat == QUIT)
|
if (stat == QUIT)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -50,6 +50,14 @@ Usage
|
|||||||
Remove any existing @a processor subdirectories before decomposing the
|
Remove any existing @a processor subdirectories before decomposing the
|
||||||
geometry.
|
geometry.
|
||||||
|
|
||||||
|
@param -ifRequired \n
|
||||||
|
Only decompose the geometry if the number of domains has changed from a
|
||||||
|
previous decomposition. No @a processor subdirectories will be removed
|
||||||
|
unless the @a -force option is also specified. This option can be used
|
||||||
|
to avoid redundant geometry decomposition (eg, in scripts), but should
|
||||||
|
be used with caution when the underlying (serial) geometry or the
|
||||||
|
decomposition method etc. have been changed between decompositions.
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "OSspecific.H"
|
#include "OSspecific.H"
|
||||||
@ -80,6 +88,7 @@ int main(int argc, char *argv[])
|
|||||||
argList::validOptions.insert("fields", "");
|
argList::validOptions.insert("fields", "");
|
||||||
argList::validOptions.insert("filterPatches", "");
|
argList::validOptions.insert("filterPatches", "");
|
||||||
argList::validOptions.insert("force", "");
|
argList::validOptions.insert("force", "");
|
||||||
|
argList::validOptions.insert("ifRequired", "");
|
||||||
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
|
|
||||||
@ -88,6 +97,7 @@ int main(int argc, char *argv[])
|
|||||||
bool decomposeFieldsOnly(args.options().found("fields"));
|
bool decomposeFieldsOnly(args.options().found("fields"));
|
||||||
bool filterPatches(args.options().found("filterPatches"));
|
bool filterPatches(args.options().found("filterPatches"));
|
||||||
bool forceOverwrite(args.options().found("force"));
|
bool forceOverwrite(args.options().found("force"));
|
||||||
|
bool ifRequiredDecomposition(args.options().found("ifRequired"));
|
||||||
|
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
|
|
||||||
@ -100,47 +110,84 @@ int main(int argc, char *argv[])
|
|||||||
++nProcs;
|
++nProcs;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check for previously decomposed case first
|
// get requested numberOfSubdomains
|
||||||
|
label nDomains = 0;
|
||||||
|
{
|
||||||
|
IOdictionary decompDict
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"decomposeParDict",
|
||||||
|
runTime.time().system(),
|
||||||
|
runTime,
|
||||||
|
IOobject::MUST_READ,
|
||||||
|
IOobject::NO_WRITE,
|
||||||
|
false
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
decompDict.lookup("numberOfSubdomains") >> nDomains;
|
||||||
|
}
|
||||||
|
|
||||||
if (decomposeFieldsOnly)
|
if (decomposeFieldsOnly)
|
||||||
{
|
{
|
||||||
if (!nProcs)
|
// Sanity check on previously decomposed case
|
||||||
|
if (nProcs != nDomains)
|
||||||
{
|
{
|
||||||
FatalErrorIn(args.executable())
|
FatalErrorIn(args.executable())
|
||||||
<< "Specifying -fields requires a decomposed geometry!"
|
<< "Specified -fields, but the case was decomposed with "
|
||||||
|
<< nProcs << " domains"
|
||||||
|
<< nl
|
||||||
|
<< "instead of " << nDomains
|
||||||
|
<< " domains as specified in decomposeParDict"
|
||||||
<< nl
|
<< nl
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else if (nProcs)
|
||||||
{
|
{
|
||||||
if (nProcs)
|
bool procDirsProblem = true;
|
||||||
|
|
||||||
|
if (ifRequiredDecomposition && nProcs == nDomains)
|
||||||
{
|
{
|
||||||
if (forceOverwrite)
|
// we can reuse the decomposition
|
||||||
{
|
decomposeFieldsOnly = true;
|
||||||
Info<< "Removing " << nProcs
|
procDirsProblem = false;
|
||||||
<< " existing processor directories" << endl;
|
forceOverwrite = false;
|
||||||
|
|
||||||
// remove existing processor dirs
|
Info<< "Using existing processor directories" << nl;
|
||||||
for (label procI = nProcs-1; procI >= 0; --procI)
|
}
|
||||||
{
|
|
||||||
fileName procDir
|
|
||||||
(
|
|
||||||
runTime.path()/(word("processor") + name(procI))
|
|
||||||
);
|
|
||||||
|
|
||||||
rmDir(procDir);
|
if (forceOverwrite)
|
||||||
}
|
{
|
||||||
}
|
Info<< "Removing " << nProcs
|
||||||
else
|
<< " existing processor directories" << endl;
|
||||||
|
|
||||||
|
// remove existing processor dirs
|
||||||
|
// reverse order to avoid gaps if someone interrupts the process
|
||||||
|
for (label procI = nProcs-1; procI >= 0; --procI)
|
||||||
{
|
{
|
||||||
FatalErrorIn(args.executable())
|
fileName procDir
|
||||||
<< "Case is already decomposed, "
|
(
|
||||||
"use the -force option or manually remove" << nl
|
runTime.path()/(word("processor") + name(procI))
|
||||||
<< "processor directories before decomposing. e.g.," << nl
|
);
|
||||||
<< " rm -rf " << runTime.path().c_str() << "/processor*"
|
|
||||||
<< nl
|
rmDir(procDir);
|
||||||
<< exit(FatalError);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
procDirsProblem = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (procDirsProblem)
|
||||||
|
{
|
||||||
|
FatalErrorIn(args.executable())
|
||||||
|
<< "Case is already decomposed with " << nProcs
|
||||||
|
<< " domains, use the -force option or manually" << nl
|
||||||
|
<< "remove processor directories before decomposing. e.g.,"
|
||||||
|
<< nl
|
||||||
|
<< " rm -rf " << runTime.path().c_str() << "/processor*"
|
||||||
|
<< nl
|
||||||
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,61 +1,61 @@
|
|||||||
// Mesh decomposition control dictionary
|
/*-------------------------------*- C++ -*---------------------------------*\
|
||||||
|
| ========= |
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
| \\ / OpenFOAM |
|
||||||
|
| \\ / |
|
||||||
|
| \\ / The Open Source CFD Toolbox |
|
||||||
|
| \\/ http://www.OpenFOAM.org |
|
||||||
|
\*-------------------------------------------------------------------------*/
|
||||||
FoamFile
|
FoamFile
|
||||||
{
|
{
|
||||||
version 0.5;
|
version 2.0;
|
||||||
format ascii;
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
root "ROOT";
|
note "mesh decomposition control dictionary";
|
||||||
case "CASE";
|
location "system";
|
||||||
instance "system";
|
object decomposeParDict;
|
||||||
local "";
|
|
||||||
|
|
||||||
class dictionary;
|
|
||||||
|
|
||||||
object decompositionDict;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
numberOfSubdomains 4;
|
numberOfSubdomains 4;
|
||||||
|
|
||||||
//preservePatches (inlet);
|
// preservePatches (inlet);
|
||||||
//preserveFaceZones (heater solid1 solid3);
|
// preserveFaceZones (heater solid1 solid3);
|
||||||
|
|
||||||
method simple;
|
method simple;
|
||||||
//method hierarchical;
|
// method hierarchical;
|
||||||
//method metis;
|
// method metis;
|
||||||
//method manual;
|
// method manual;
|
||||||
|
|
||||||
simpleCoeffs
|
simpleCoeffs
|
||||||
{
|
{
|
||||||
n (2 2 1);
|
n (2 2 1);
|
||||||
delta 0.001;
|
delta 0.001;
|
||||||
}
|
}
|
||||||
|
|
||||||
hierarchicalCoeffs
|
hierarchicalCoeffs
|
||||||
{
|
{
|
||||||
n (2 2 1);
|
n (2 2 1);
|
||||||
delta 0.001;
|
delta 0.001;
|
||||||
order xyz;
|
order xyz;
|
||||||
}
|
}
|
||||||
|
|
||||||
metisCoeffs
|
metisCoeffs
|
||||||
{
|
{
|
||||||
//processorWeights
|
/*
|
||||||
//(
|
processorWeights
|
||||||
// 1
|
(
|
||||||
// 1
|
1
|
||||||
// 1
|
1
|
||||||
// 1
|
1
|
||||||
//);
|
1
|
||||||
|
);
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
manualCoeffs
|
manualCoeffs
|
||||||
{
|
{
|
||||||
dataFile "decompositionData";
|
dataFile "decompositionData";
|
||||||
}
|
}
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -70,6 +70,7 @@ Foam::polyMesh::readUpdateState Foam::vtkMesh::readUpdate()
|
|||||||
// the subset even if only movement.
|
// the subset even if only movement.
|
||||||
|
|
||||||
topoPtr_.clear();
|
topoPtr_.clear();
|
||||||
|
pointMeshPtr_.clear();
|
||||||
|
|
||||||
if (setName_.size() > 0)
|
if (setName_.size() > 0)
|
||||||
{
|
{
|
||||||
|
|||||||
7
applications/utilities/postProcessing/graphics/PV3FoamReader/Allwclean
Executable file
7
applications/utilities/postProcessing/graphics/PV3FoamReader/Allwclean
Executable file
@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
set -x
|
||||||
|
|
||||||
|
rm -r PV3FoamReader/Make
|
||||||
|
|
||||||
|
wclean libso vtkPV3Foam
|
||||||
|
|
||||||
@ -54,7 +54,7 @@ vtkPV3FoamReader::vtkPV3FoamReader()
|
|||||||
{
|
{
|
||||||
Debug = 0;
|
Debug = 0;
|
||||||
vtkDebugMacro(<<"Constructor");
|
vtkDebugMacro(<<"Constructor");
|
||||||
|
|
||||||
SetNumberOfInputPorts(0);
|
SetNumberOfInputPorts(0);
|
||||||
|
|
||||||
FileName = NULL;
|
FileName = NULL;
|
||||||
@ -115,7 +115,6 @@ vtkPV3FoamReader::vtkPV3FoamReader()
|
|||||||
vtkPV3FoamReader::~vtkPV3FoamReader()
|
vtkPV3FoamReader::~vtkPV3FoamReader()
|
||||||
{
|
{
|
||||||
vtkDebugMacro(<<"Deconstructor");
|
vtkDebugMacro(<<"Deconstructor");
|
||||||
cout << "Destroy ~vtkPV3FoamReader\n";
|
|
||||||
|
|
||||||
if (foamData_)
|
if (foamData_)
|
||||||
{
|
{
|
||||||
@ -152,23 +151,30 @@ int vtkPV3FoamReader::RequestInformation
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
vtkDebugMacro(<<"RequestInformation");
|
vtkDebugMacro(<<"RequestInformation");
|
||||||
cout<<"REQUEST_INFORMATION\n";
|
|
||||||
|
|
||||||
|
if (Foam::vtkPV3Foam::debug)
|
||||||
|
{
|
||||||
|
cout<<"REQUEST_INFORMATION\n";
|
||||||
|
}
|
||||||
|
|
||||||
if (!FileName)
|
if (!FileName)
|
||||||
{
|
{
|
||||||
vtkErrorMacro("FileName has to be specified!");
|
vtkErrorMacro("FileName has to be specified!");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Foam::vtkPV3Foam::debug)
|
||||||
{
|
{
|
||||||
vtkInformation* outputInfo = this->GetOutputPortInformation(0);
|
vtkInformation* outputInfo = this->GetOutputPortInformation(0);
|
||||||
outputInfo->Print(cout);
|
|
||||||
|
|
||||||
vtkMultiBlockDataSet* output = vtkMultiBlockDataSet::SafeDownCast
|
vtkMultiBlockDataSet* output = vtkMultiBlockDataSet::SafeDownCast
|
||||||
(
|
(
|
||||||
outputInfo->Get(vtkMultiBlockDataSet::DATA_OBJECT())
|
outputInfo->Get(vtkMultiBlockDataSet::DATA_OBJECT())
|
||||||
);
|
);
|
||||||
if (output)
|
|
||||||
|
outputInfo->Print(cout);
|
||||||
|
if (output)
|
||||||
{
|
{
|
||||||
output->Print(cout);
|
output->Print(cout);
|
||||||
}
|
}
|
||||||
@ -177,21 +183,19 @@ int vtkPV3FoamReader::RequestInformation
|
|||||||
cout << "no output\n";
|
cout << "no output\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
cout << "GetExecutive:\n";
|
|
||||||
|
|
||||||
this->GetExecutive()->GetOutputInformation(0)->Print(cout);
|
this->GetExecutive()->GetOutputInformation(0)->Print(cout);
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
int nInfo = outputVector->GetNumberOfInformationObjects();
|
int nInfo = outputVector->GetNumberOfInformationObjects();
|
||||||
cout<<"requestInfo with " << nInfo << " items\n";
|
|
||||||
|
cout<< "requestInfo with " << nInfo << " items:\n";
|
||||||
|
|
||||||
for (int i=0; i<nInfo; i++)
|
for (int i=0; i<nInfo; i++)
|
||||||
{
|
{
|
||||||
vtkInformation *info = outputVector->GetInformationObject(i);
|
vtkInformation *info = outputVector->GetInformationObject(i);
|
||||||
info->Print(cout);
|
info->Print(cout);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
vtkInformation *outInfo = outputVector->GetInformationObject(0);
|
vtkInformation *outInfo = outputVector->GetInformationObject(0);
|
||||||
|
|
||||||
if (!foamData_)
|
if (!foamData_)
|
||||||
@ -207,15 +211,12 @@ int vtkPV3FoamReader::RequestInformation
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
vtkDebugMacro("RequestInformation: updating information");
|
vtkDebugMacro("RequestInformation: updating information");
|
||||||
|
|
||||||
foamData_->UpdateInformation();
|
foamData_->UpdateInformation();
|
||||||
}
|
}
|
||||||
|
|
||||||
int nTimeSteps = 0;
|
int nTimeSteps = 0;
|
||||||
double* timeSteps = foamData_->timeSteps(nTimeSteps);
|
double* timeSteps = foamData_->timeSteps(nTimeSteps);
|
||||||
|
|
||||||
cout<<"Have nTimeSteps: " << nTimeSteps << "\n";
|
|
||||||
|
|
||||||
outInfo->Set
|
outInfo->Set
|
||||||
(
|
(
|
||||||
vtkStreamingDemandDrivenPipeline::TIME_STEPS(),
|
vtkStreamingDemandDrivenPipeline::TIME_STEPS(),
|
||||||
@ -229,13 +230,16 @@ int vtkPV3FoamReader::RequestInformation
|
|||||||
timeRange[0] = timeSteps[0];
|
timeRange[0] = timeSteps[0];
|
||||||
timeRange[1] = timeSteps[nTimeSteps-1];
|
timeRange[1] = timeSteps[nTimeSteps-1];
|
||||||
|
|
||||||
cout<<"nTimeSteps " << nTimeSteps << "\n";
|
if (Foam::vtkPV3Foam::debug)
|
||||||
cout<<"timeRange " << timeRange[0] << " -> " << timeRange[1] << "\n";
|
{
|
||||||
|
cout<<"nTimeSteps " << nTimeSteps << "\n";
|
||||||
|
cout<<"timeRange " << timeRange[0] << " to " << timeRange[1] << "\n";
|
||||||
|
|
||||||
// for (int i = 0; i < nTimeSteps; ++i)
|
for (int i = 0; i < nTimeSteps; ++i)
|
||||||
// {
|
{
|
||||||
// cout<<"step[" << i << "] = " << timeSteps[i] << "\n";
|
cout<< "step[" << i << "] = " << timeSteps[i] << "\n";
|
||||||
// }
|
}
|
||||||
|
}
|
||||||
|
|
||||||
outInfo->Set
|
outInfo->Set
|
||||||
(
|
(
|
||||||
@ -247,7 +251,6 @@ int vtkPV3FoamReader::RequestInformation
|
|||||||
|
|
||||||
delete timeSteps;
|
delete timeSteps;
|
||||||
|
|
||||||
cout<<"done RequestInformation\n";
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -261,21 +264,27 @@ int vtkPV3FoamReader::RequestData
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
vtkDebugMacro(<<"RequestData");
|
vtkDebugMacro(<<"RequestData");
|
||||||
cout<<"REQUEST_DATA\n";
|
|
||||||
|
|
||||||
if (!FileName)
|
if (!FileName)
|
||||||
{
|
{
|
||||||
vtkErrorMacro("FileName has to be specified!");
|
vtkErrorMacro("FileName has to be specified!");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
int nInfo = outputVector->GetNumberOfInformationObjects();
|
int nInfo = outputVector->GetNumberOfInformationObjects();
|
||||||
cout<<"requestData with " << nInfo << " items\n";
|
if (Foam::vtkPV3Foam::debug)
|
||||||
|
{
|
||||||
|
cout<<"requestData with " << nInfo << " items\n";
|
||||||
|
}
|
||||||
for (int i=0; i<nInfo; i++)
|
for (int i=0; i<nInfo; i++)
|
||||||
{
|
{
|
||||||
vtkInformation *info = outputVector->GetInformationObject(i);
|
vtkInformation *info = outputVector->GetInformationObject(i);
|
||||||
info->Print(cout);
|
|
||||||
|
if (Foam::vtkPV3Foam::debug)
|
||||||
|
{
|
||||||
|
info->Print(cout);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -284,38 +293,38 @@ int vtkPV3FoamReader::RequestData
|
|||||||
(
|
(
|
||||||
outInfo->Get(vtkMultiBlockDataSet::DATA_OBJECT())
|
outInfo->Get(vtkMultiBlockDataSet::DATA_OBJECT())
|
||||||
);
|
);
|
||||||
|
|
||||||
#if 1
|
if (Foam::vtkPV3Foam::debug)
|
||||||
{
|
{
|
||||||
vtkInformation* outputInfo = this->GetOutputPortInformation(0);
|
vtkInformation* outputInfo = this->GetOutputPortInformation(0);
|
||||||
outputInfo->Print(cout);
|
outputInfo->Print(cout);
|
||||||
|
|
||||||
vtkMultiBlockDataSet* output = vtkMultiBlockDataSet::SafeDownCast
|
vtkMultiBlockDataSet* output = vtkMultiBlockDataSet::SafeDownCast
|
||||||
(
|
(
|
||||||
outputInfo->Get(vtkMultiBlockDataSet::DATA_OBJECT())
|
outputInfo->Get(vtkMultiBlockDataSet::DATA_OBJECT())
|
||||||
);
|
);
|
||||||
if (output)
|
if (output)
|
||||||
{
|
{
|
||||||
output->Print(cout);
|
output->Print(cout);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
cout << "no output\n";
|
cout<< "no output\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
vtkInformation* execInfo = this->GetExecutive()->GetOutputInformation(0);
|
vtkInformation* execInfo = this->GetExecutive()->GetOutputInformation(0);
|
||||||
execInfo->Print(cout);
|
execInfo->Print(cout);
|
||||||
|
|
||||||
outInfo->Print(cout);
|
outInfo->Print(cout);
|
||||||
|
|
||||||
vtkMultiBlockDataSet* dobj = vtkMultiBlockDataSet::SafeDownCast
|
vtkMultiBlockDataSet* dobj = vtkMultiBlockDataSet::SafeDownCast
|
||||||
(
|
(
|
||||||
outInfo->Get(vtkMultiBlockDataSet::DATA_OBJECT())
|
outInfo->Get(vtkMultiBlockDataSet::DATA_OBJECT())
|
||||||
);
|
);
|
||||||
if (dobj)
|
if (dobj)
|
||||||
{
|
{
|
||||||
dobj->Print(cout);
|
dobj->Print(cout);
|
||||||
|
|
||||||
vtkInformation* dobjInfo = dobj->GetInformation();
|
vtkInformation* dobjInfo = dobj->GetInformation();
|
||||||
dobjInfo->Print(cout);
|
dobjInfo->Print(cout);
|
||||||
}
|
}
|
||||||
@ -323,16 +332,16 @@ int vtkPV3FoamReader::RequestData
|
|||||||
{
|
{
|
||||||
cout << "no data_object\n";
|
cout << "no data_object\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
if (outInfo->Has(vtkStreamingDemandDrivenPipeline::UPDATE_TIME_STEPS()))
|
if (outInfo->Has(vtkStreamingDemandDrivenPipeline::UPDATE_TIME_STEPS()))
|
||||||
{
|
{
|
||||||
cout<<"Has UPDATE_TIME_STEPS\n";
|
if (Foam::vtkPV3Foam::debug)
|
||||||
cout<<"output->GetNumberOfBlocks() " << output->GetNumberOfBlocks() <<
|
{
|
||||||
"\n";
|
cout<<"Has UPDATE_TIME_STEPS\n";
|
||||||
|
cout<<"output->GetNumberOfBlocks() = "
|
||||||
|
<< output->GetNumberOfBlocks() << "\n";
|
||||||
|
}
|
||||||
|
|
||||||
// Get the requested time step.
|
// Get the requested time step.
|
||||||
// We only supprt requests of a single time step
|
// We only supprt requests of a single time step
|
||||||
@ -370,10 +379,6 @@ int vtkPV3FoamReader::RequestData
|
|||||||
}
|
}
|
||||||
UpdateGUIOld = GetUpdateGUI();
|
UpdateGUIOld = GetUpdateGUI();
|
||||||
|
|
||||||
cout<<"done RequestData\n";
|
|
||||||
cout<<"done output->GetNumberOfBlocks() "
|
|
||||||
<< output->GetNumberOfBlocks() << "\n";
|
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -87,10 +87,13 @@ void Foam::vtkPV3Foam::AddToBlock
|
|||||||
|
|
||||||
if (block)
|
if (block)
|
||||||
{
|
{
|
||||||
Info<< "block[" << blockNo << "] has "
|
if (debug)
|
||||||
<< block->GetNumberOfBlocks()
|
{
|
||||||
<< " datasets prior to adding set " << datasetNo
|
Info<< "block[" << blockNo << "] has "
|
||||||
<< " with name: " << blockName << endl;
|
<< block->GetNumberOfBlocks()
|
||||||
|
<< " datasets prior to adding set " << datasetNo
|
||||||
|
<< " with name: " << blockName << endl;
|
||||||
|
}
|
||||||
|
|
||||||
// when assigning dataset 0, also name the parent block
|
// when assigning dataset 0, also name the parent block
|
||||||
if (!datasetNo && selector.name())
|
if (!datasetNo && selector.name())
|
||||||
@ -481,8 +484,11 @@ Foam::vtkPV3Foam::vtkPV3Foam
|
|||||||
|
|
||||||
dbPtr_().functionObjects().off();
|
dbPtr_().functionObjects().off();
|
||||||
|
|
||||||
cout<<"constructed with output: ";
|
if (debug)
|
||||||
output_->Print(cout),
|
{
|
||||||
|
cout<< "constructed with output: ";
|
||||||
|
output_->Print(cout);
|
||||||
|
}
|
||||||
|
|
||||||
resetCounters();
|
resetCounters();
|
||||||
|
|
||||||
@ -579,8 +585,8 @@ void Foam::vtkPV3Foam::Update
|
|||||||
{
|
{
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "entered Foam::vtkPV3Foam::Update" << endl;
|
cout<< "entered Foam::vtkPV3Foam::Update" << nl
|
||||||
cout<<"Update\n";
|
<<"Update\n";
|
||||||
output->Print(cout);
|
output->Print(cout);
|
||||||
|
|
||||||
cout<<"Internally:\n";
|
cout<<"Internally:\n";
|
||||||
@ -765,7 +771,10 @@ void Foam::vtkPV3Foam::addPatchNames(vtkRenderer* renderer)
|
|||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
|
||||||
Info<<"patches: " << selectedPatches <<endl;
|
if (debug)
|
||||||
|
{
|
||||||
|
Info<<"patches: " << selectedPatches <<endl;
|
||||||
|
}
|
||||||
|
|
||||||
// Find the total number of zones
|
// Find the total number of zones
|
||||||
// Each zone will take the patch name
|
// Each zone will take the patch name
|
||||||
|
|||||||
@ -172,6 +172,7 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
// Private data
|
// Private data
|
||||||
@ -645,85 +646,6 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * Template Specialisations * * * * * * * * * * * //
|
|
||||||
|
|
||||||
template<>
|
|
||||||
void vtkPV3Foam::convertVolField
|
|
||||||
(
|
|
||||||
const GeometricField<scalar, fvPatchField, volMesh>& sf,
|
|
||||||
vtkMultiBlockDataSet* output,
|
|
||||||
const selectionInfo&,
|
|
||||||
const label datasetNo,
|
|
||||||
labelList& superCells
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
template<>
|
|
||||||
void vtkPV3Foam::convertPatchFaceField
|
|
||||||
(
|
|
||||||
const word& name,
|
|
||||||
const Field<scalar>&,
|
|
||||||
vtkMultiBlockDataSet* output,
|
|
||||||
const selectionInfo&,
|
|
||||||
const label datasetNo
|
|
||||||
);
|
|
||||||
|
|
||||||
template<>
|
|
||||||
void vtkPV3Foam::convertFaceField
|
|
||||||
(
|
|
||||||
const GeometricField<scalar, fvPatchField, volMesh>&,
|
|
||||||
vtkMultiBlockDataSet* output,
|
|
||||||
const selectionInfo&,
|
|
||||||
const label datasetNo,
|
|
||||||
const fvMesh&,
|
|
||||||
const labelList& faceLabels
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
template<>
|
|
||||||
void vtkPV3Foam::convertFaceField
|
|
||||||
(
|
|
||||||
const GeometricField<scalar, fvPatchField, volMesh>&,
|
|
||||||
vtkMultiBlockDataSet* output,
|
|
||||||
const selectionInfo&,
|
|
||||||
const label datasetNo,
|
|
||||||
const fvMesh&,
|
|
||||||
const faceSet&
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
template<>
|
|
||||||
void vtkPV3Foam::convertPointField
|
|
||||||
(
|
|
||||||
const GeometricField<scalar, pointPatchField, pointMesh>&,
|
|
||||||
const GeometricField<scalar, fvPatchField, volMesh>&,
|
|
||||||
vtkMultiBlockDataSet* output,
|
|
||||||
const selectionInfo&,
|
|
||||||
const label datasetNo
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
template<>
|
|
||||||
void vtkPV3Foam::convertPatchPointField
|
|
||||||
(
|
|
||||||
const word& name,
|
|
||||||
const Field<scalar>&,
|
|
||||||
vtkMultiBlockDataSet* output,
|
|
||||||
const selectionInfo&,
|
|
||||||
const label datasetNo
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
template<>
|
|
||||||
void vtkPV3Foam::convertLagrangianField
|
|
||||||
(
|
|
||||||
const IOField<scalar>&,
|
|
||||||
vtkMultiBlockDataSet* output,
|
|
||||||
const selectionInfo&,
|
|
||||||
const label datasetNo
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
} // End namespace Foam
|
} // End namespace Foam
|
||||||
|
|||||||
@ -48,6 +48,8 @@ void Foam::vtkPV3Foam::convertFaceField
|
|||||||
const labelList& faceLabels
|
const labelList& faceLabels
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
const label nComp = pTraits<Type>::nComponents;
|
||||||
|
|
||||||
vtkPolyData* vtkmesh = vtkPolyData::SafeDownCast
|
vtkPolyData* vtkmesh = vtkPolyData::SafeDownCast
|
||||||
(
|
(
|
||||||
GetDataSetFromBlock(output, selector, datasetNo)
|
GetDataSetFromBlock(output, selector, datasetNo)
|
||||||
@ -59,33 +61,30 @@ void Foam::vtkPV3Foam::convertFaceField
|
|||||||
|
|
||||||
vtkFloatArray *cellData = vtkFloatArray::New();
|
vtkFloatArray *cellData = vtkFloatArray::New();
|
||||||
cellData->SetNumberOfTuples(faceLabels.size());
|
cellData->SetNumberOfTuples(faceLabels.size());
|
||||||
cellData->SetNumberOfComponents(Type::nComponents);
|
cellData->SetNumberOfComponents(nComp);
|
||||||
cellData->Allocate(Type::nComponents*faceLabels.size());
|
cellData->Allocate(nComp*faceLabels.size());
|
||||||
cellData->SetName(tf.name().c_str());
|
cellData->SetName(tf.name().c_str());
|
||||||
|
|
||||||
float vec[Type::nComponents];
|
float vec[nComp];
|
||||||
|
|
||||||
forAll(faceLabels, faceI)
|
forAll(faceLabels, faceI)
|
||||||
{
|
{
|
||||||
const label faceNo = faceLabels[faceI];
|
const label faceNo = faceLabels[faceI];
|
||||||
if (faceNo < nInternalFaces)
|
if (faceNo < nInternalFaces)
|
||||||
{
|
{
|
||||||
Type t = 0.5 *
|
Type t = 0.5*(tf[faceOwner[faceNo]] + tf[faceNeigh[faceNo]]);
|
||||||
(
|
|
||||||
tf[faceOwner[faceNo]] + tf[faceNeigh[faceNo]]
|
|
||||||
);
|
|
||||||
|
|
||||||
for (direction d=0; d<Type::nComponents; d++)
|
for (direction d=0; d<nComp; d++)
|
||||||
{
|
{
|
||||||
vec[d] = t[d];
|
vec[d] = component(t, d);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
const Type& t = tf[faceOwner[faceNo]];
|
const Type& t = tf[faceOwner[faceNo]];
|
||||||
for (direction d=0; d<Type::nComponents; d++)
|
for (direction d=0; d<nComp; d++)
|
||||||
{
|
{
|
||||||
vec[d] = t[d];
|
vec[d] = component(t, d);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -108,6 +107,8 @@ void Foam::vtkPV3Foam::convertFaceField
|
|||||||
const faceSet& fSet
|
const faceSet& fSet
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
const label nComp = pTraits<Type>::nComponents;
|
||||||
|
|
||||||
vtkPolyData* vtkmesh = vtkPolyData::SafeDownCast
|
vtkPolyData* vtkmesh = vtkPolyData::SafeDownCast
|
||||||
(
|
(
|
||||||
GetDataSetFromBlock(output, selector, datasetNo)
|
GetDataSetFromBlock(output, selector, datasetNo)
|
||||||
@ -119,11 +120,11 @@ void Foam::vtkPV3Foam::convertFaceField
|
|||||||
|
|
||||||
vtkFloatArray *cellData = vtkFloatArray::New();
|
vtkFloatArray *cellData = vtkFloatArray::New();
|
||||||
cellData->SetNumberOfTuples(fSet.size());
|
cellData->SetNumberOfTuples(fSet.size());
|
||||||
cellData->SetNumberOfComponents(Type::nComponents);
|
cellData->SetNumberOfComponents(nComp);
|
||||||
cellData->Allocate(Type::nComponents*fSet.size());
|
cellData->Allocate(nComp*fSet.size());
|
||||||
cellData->SetName(tf.name().c_str());
|
cellData->SetName(tf.name().c_str());
|
||||||
|
|
||||||
float vec[Type::nComponents];
|
float vec[nComp];
|
||||||
|
|
||||||
label faceI = 0;
|
label faceI = 0;
|
||||||
forAllConstIter(faceSet, fSet, iter)
|
forAllConstIter(faceSet, fSet, iter)
|
||||||
@ -132,22 +133,19 @@ void Foam::vtkPV3Foam::convertFaceField
|
|||||||
|
|
||||||
if (faceNo < nInternalFaces)
|
if (faceNo < nInternalFaces)
|
||||||
{
|
{
|
||||||
Type t = 0.5 *
|
Type t = 0.5*(tf[faceOwner[faceNo]] + tf[faceNeigh[faceNo]]);
|
||||||
(
|
|
||||||
tf[faceOwner[faceNo]] + tf[faceNeigh[faceNo]]
|
|
||||||
);
|
|
||||||
|
|
||||||
for (direction d=0; d<Type::nComponents; d++)
|
for (direction d=0; d<nComp; d++)
|
||||||
{
|
{
|
||||||
vec[d] = t[d];
|
vec[d] = component(t, d);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
const Type& t = tf[faceOwner[faceNo]];
|
const Type& t = tf[faceOwner[faceNo]];
|
||||||
for (direction d=0; d<Type::nComponents; d++)
|
for (direction d=0; d<nComp; d++)
|
||||||
{
|
{
|
||||||
vec[d] = t[d];
|
vec[d] = component(t, d);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -160,125 +158,6 @@ void Foam::vtkPV3Foam::convertFaceField
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<>
|
|
||||||
void Foam::vtkPV3Foam::convertFaceField
|
|
||||||
(
|
|
||||||
const GeometricField<scalar, fvPatchField, volMesh>& tf,
|
|
||||||
vtkMultiBlockDataSet* output,
|
|
||||||
const selectionInfo& selector,
|
|
||||||
const label datasetNo,
|
|
||||||
const fvMesh& mesh,
|
|
||||||
const labelList& faceLabels
|
|
||||||
)
|
|
||||||
{
|
|
||||||
vtkPolyData* vtkmesh = vtkPolyData::SafeDownCast
|
|
||||||
(
|
|
||||||
GetDataSetFromBlock(output, selector, datasetNo)
|
|
||||||
);
|
|
||||||
|
|
||||||
const label nInternalFaces = mesh.nInternalFaces();
|
|
||||||
const labelList& faceOwner = mesh.faceOwner();
|
|
||||||
const labelList& faceNeigh = mesh.faceNeighbour();
|
|
||||||
|
|
||||||
vtkFloatArray *cellData = vtkFloatArray::New();
|
|
||||||
cellData->SetNumberOfTuples(faceLabels.size());
|
|
||||||
cellData->SetNumberOfComponents(1);
|
|
||||||
cellData->Allocate(faceLabels.size());
|
|
||||||
cellData->SetName(tf.name().c_str());
|
|
||||||
|
|
||||||
forAll(faceLabels, faceI)
|
|
||||||
{
|
|
||||||
const label faceNo = faceLabels[faceI];
|
|
||||||
if (faceNo < nInternalFaces)
|
|
||||||
{
|
|
||||||
cellData->InsertComponent
|
|
||||||
(
|
|
||||||
faceI,
|
|
||||||
0,
|
|
||||||
0.5 * (tf[faceOwner[faceNo]] + tf[faceNeigh[faceNo]])
|
|
||||||
);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
cellData->InsertComponent
|
|
||||||
(
|
|
||||||
faceI, 0, tf[faceOwner[faceNo]]
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
vtkmesh->GetCellData()->AddArray(cellData);
|
|
||||||
|
|
||||||
if (!vtkmesh->GetCellData()->GetScalars())
|
|
||||||
{
|
|
||||||
vtkmesh->GetCellData()->SetScalars(cellData);
|
|
||||||
}
|
|
||||||
|
|
||||||
cellData->Delete();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<>
|
|
||||||
void Foam::vtkPV3Foam::convertFaceField
|
|
||||||
(
|
|
||||||
const GeometricField<scalar, fvPatchField, volMesh>& tf,
|
|
||||||
vtkMultiBlockDataSet* output,
|
|
||||||
const selectionInfo& selector,
|
|
||||||
const label datasetNo,
|
|
||||||
const fvMesh& mesh,
|
|
||||||
const faceSet& fSet
|
|
||||||
)
|
|
||||||
{
|
|
||||||
vtkPolyData* vtkmesh = vtkPolyData::SafeDownCast
|
|
||||||
(
|
|
||||||
GetDataSetFromBlock(output, selector, datasetNo)
|
|
||||||
);
|
|
||||||
|
|
||||||
const label nInternalFaces = mesh.nInternalFaces();
|
|
||||||
const labelList& faceOwner = mesh.faceOwner();
|
|
||||||
const labelList& faceNeigh = mesh.faceNeighbour();
|
|
||||||
|
|
||||||
vtkFloatArray *cellData = vtkFloatArray::New();
|
|
||||||
cellData->SetNumberOfTuples(fSet.size());
|
|
||||||
cellData->SetNumberOfComponents(1);
|
|
||||||
cellData->Allocate(fSet.size());
|
|
||||||
cellData->SetName(tf.name().c_str());
|
|
||||||
|
|
||||||
label faceI = 0;
|
|
||||||
forAllConstIter(faceSet, fSet, iter)
|
|
||||||
{
|
|
||||||
const label faceNo = iter.key();
|
|
||||||
if (faceNo < nInternalFaces)
|
|
||||||
{
|
|
||||||
cellData->InsertComponent
|
|
||||||
(
|
|
||||||
faceI,
|
|
||||||
0,
|
|
||||||
0.5 * (tf[faceOwner[faceNo]] + tf[faceNeigh[faceNo]])
|
|
||||||
);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
cellData->InsertComponent
|
|
||||||
(
|
|
||||||
faceI, 0, tf[faceOwner[faceNo]]
|
|
||||||
);
|
|
||||||
}
|
|
||||||
++faceI;
|
|
||||||
}
|
|
||||||
|
|
||||||
vtkmesh->GetCellData()->AddArray(cellData);
|
|
||||||
|
|
||||||
if (!vtkmesh->GetCellData()->GetScalars())
|
|
||||||
{
|
|
||||||
vtkmesh->GetCellData()->SetScalars(cellData);
|
|
||||||
}
|
|
||||||
|
|
||||||
cellData->Delete();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -95,6 +95,8 @@ void Foam::vtkPV3Foam::convertLagrangianField
|
|||||||
const label datasetNo
|
const label datasetNo
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
const label nComp = pTraits<Type>::nComponents;
|
||||||
|
|
||||||
vtkPolyData* vtkmesh = vtkPolyData::SafeDownCast
|
vtkPolyData* vtkmesh = vtkPolyData::SafeDownCast
|
||||||
(
|
(
|
||||||
GetDataSetFromBlock(output, selector, datasetNo)
|
GetDataSetFromBlock(output, selector, datasetNo)
|
||||||
@ -102,24 +104,24 @@ void Foam::vtkPV3Foam::convertLagrangianField
|
|||||||
|
|
||||||
vtkFloatArray *pointData = vtkFloatArray::New();
|
vtkFloatArray *pointData = vtkFloatArray::New();
|
||||||
pointData->SetNumberOfTuples(tf.size());
|
pointData->SetNumberOfTuples(tf.size());
|
||||||
pointData->SetNumberOfComponents(Type::nComponents);
|
pointData->SetNumberOfComponents(nComp);
|
||||||
pointData->Allocate(Type::nComponents*tf.size());
|
pointData->Allocate(nComp*tf.size());
|
||||||
pointData->SetName(tf.name().c_str());
|
pointData->SetName(tf.name().c_str());
|
||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "converting Lagrangian <Type>Field: " << tf.name() << nl
|
Info<< "converting Lagrangian <Type>Field: " << tf.name() << nl
|
||||||
<< "tf.size() = " << tf.size() << nl
|
<< "tf.size() = " << tf.size() << nl
|
||||||
<< "nComps = " << Type::nComponents << endl;
|
<< "nComp = " << nComp << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
float vec[Type::nComponents];
|
float vec[nComp];
|
||||||
|
|
||||||
forAll(tf, i)
|
forAll(tf, i)
|
||||||
{
|
{
|
||||||
for (direction d=0; d<Type::nComponents; d++)
|
for (direction d=0; d<nComp; d++)
|
||||||
{
|
{
|
||||||
vec[d] = tf[i][d];
|
vec[d] = component(tf[i], d);
|
||||||
}
|
}
|
||||||
|
|
||||||
pointData->InsertTuple(i, vec);
|
pointData->InsertTuple(i, vec);
|
||||||
@ -130,48 +132,6 @@ void Foam::vtkPV3Foam::convertLagrangianField
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<>
|
|
||||||
void Foam::vtkPV3Foam::convertLagrangianField
|
|
||||||
(
|
|
||||||
const IOField<scalar>& sf,
|
|
||||||
vtkMultiBlockDataSet* output,
|
|
||||||
const selectionInfo& selector,
|
|
||||||
const label datasetNo
|
|
||||||
)
|
|
||||||
{
|
|
||||||
vtkPolyData* vtkmesh = vtkPolyData::SafeDownCast
|
|
||||||
(
|
|
||||||
GetDataSetFromBlock(output, selector, datasetNo)
|
|
||||||
);
|
|
||||||
|
|
||||||
vtkFloatArray *pointData = vtkFloatArray::New();
|
|
||||||
pointData->SetNumberOfTuples(sf.size());
|
|
||||||
pointData->SetNumberOfComponents(1);
|
|
||||||
pointData->Allocate(sf.size());
|
|
||||||
pointData->SetName(sf.name().c_str());
|
|
||||||
|
|
||||||
if (debug)
|
|
||||||
{
|
|
||||||
Info<< "converting Lagrangian scalarField: " << sf.name() << nl
|
|
||||||
<< "sf.size() = " << sf.size() << nl
|
|
||||||
<< "nComps = 1" << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (int i=0; i<sf.size(); i++)
|
|
||||||
{
|
|
||||||
pointData->InsertComponent(i, 0, sf[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
vtkmesh->GetPointData()->AddArray(pointData);
|
|
||||||
if (!vtkmesh->GetPointData()->GetScalars())
|
|
||||||
{
|
|
||||||
vtkmesh->GetPointData()->SetScalars(pointData);
|
|
||||||
}
|
|
||||||
|
|
||||||
pointData->Delete();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -48,6 +48,8 @@ void Foam::vtkPV3Foam::convertPatchFaceField
|
|||||||
const label datasetNo
|
const label datasetNo
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
const label nComp = pTraits<Type>::nComponents;
|
||||||
|
|
||||||
vtkPolyData* vtkmesh = vtkPolyData::SafeDownCast
|
vtkPolyData* vtkmesh = vtkPolyData::SafeDownCast
|
||||||
(
|
(
|
||||||
GetDataSetFromBlock(output, selector, datasetNo)
|
GetDataSetFromBlock(output, selector, datasetNo)
|
||||||
@ -55,18 +57,18 @@ void Foam::vtkPV3Foam::convertPatchFaceField
|
|||||||
|
|
||||||
vtkFloatArray *cellData = vtkFloatArray::New();
|
vtkFloatArray *cellData = vtkFloatArray::New();
|
||||||
cellData->SetNumberOfTuples(ptf.size());
|
cellData->SetNumberOfTuples(ptf.size());
|
||||||
cellData->SetNumberOfComponents(Type::nComponents);
|
cellData->SetNumberOfComponents(nComp);
|
||||||
cellData->Allocate(Type::nComponents*ptf.size());
|
cellData->Allocate(nComp*ptf.size());
|
||||||
cellData->SetName(name.c_str());
|
cellData->SetName(name.c_str());
|
||||||
|
|
||||||
float vec[Type::nComponents];
|
float vec[nComp];
|
||||||
|
|
||||||
forAll(ptf, i)
|
forAll(ptf, i)
|
||||||
{
|
{
|
||||||
const Type& t = ptf[i];
|
const Type& t = ptf[i];
|
||||||
for (direction d=0; d<Type::nComponents; d++)
|
for (direction d=0; d<nComp; d++)
|
||||||
{
|
{
|
||||||
vec[d] = t[d];
|
vec[d] = component(t, d);
|
||||||
}
|
}
|
||||||
|
|
||||||
cellData->InsertTuple(i, vec);
|
cellData->InsertTuple(i, vec);
|
||||||
@ -77,43 +79,6 @@ void Foam::vtkPV3Foam::convertPatchFaceField
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<>
|
|
||||||
void Foam::vtkPV3Foam::convertPatchFaceField
|
|
||||||
(
|
|
||||||
const word& name,
|
|
||||||
const Field<scalar>& psf,
|
|
||||||
vtkMultiBlockDataSet* output,
|
|
||||||
const selectionInfo& selector,
|
|
||||||
const label datasetNo
|
|
||||||
)
|
|
||||||
{
|
|
||||||
vtkPolyData* vtkmesh = vtkPolyData::SafeDownCast
|
|
||||||
(
|
|
||||||
GetDataSetFromBlock(output, selector, datasetNo)
|
|
||||||
);
|
|
||||||
|
|
||||||
vtkFloatArray *cellData = vtkFloatArray::New();
|
|
||||||
cellData->SetNumberOfTuples(psf.size());
|
|
||||||
cellData->SetNumberOfComponents(1);
|
|
||||||
cellData->Allocate(psf.size());
|
|
||||||
cellData->SetName(name.c_str());
|
|
||||||
|
|
||||||
forAll(psf, i)
|
|
||||||
{
|
|
||||||
cellData->InsertComponent(i, 0, psf[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
vtkmesh->GetCellData()->AddArray(cellData);
|
|
||||||
|
|
||||||
if (!vtkmesh->GetCellData()->GetScalars())
|
|
||||||
{
|
|
||||||
vtkmesh->GetCellData()->SetScalars(cellData);
|
|
||||||
}
|
|
||||||
|
|
||||||
cellData->Delete();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -45,6 +45,8 @@ void Foam::vtkPV3Foam::convertPatchPointField
|
|||||||
const label datasetNo
|
const label datasetNo
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
const label nComp = pTraits<Type>::nComponents;
|
||||||
|
|
||||||
vtkPolyData* vtkmesh = vtkPolyData::SafeDownCast
|
vtkPolyData* vtkmesh = vtkPolyData::SafeDownCast
|
||||||
(
|
(
|
||||||
GetDataSetFromBlock(output, selector, datasetNo)
|
GetDataSetFromBlock(output, selector, datasetNo)
|
||||||
@ -52,17 +54,17 @@ void Foam::vtkPV3Foam::convertPatchPointField
|
|||||||
|
|
||||||
vtkFloatArray *pointData = vtkFloatArray::New();
|
vtkFloatArray *pointData = vtkFloatArray::New();
|
||||||
pointData->SetNumberOfTuples(pptf.size());
|
pointData->SetNumberOfTuples(pptf.size());
|
||||||
pointData->SetNumberOfComponents(Type::nComponents);
|
pointData->SetNumberOfComponents(nComp);
|
||||||
pointData->Allocate(Type::nComponents*pptf.size());
|
pointData->Allocate(nComp*pptf.size());
|
||||||
pointData->SetName(name.c_str());
|
pointData->SetName(name.c_str());
|
||||||
|
|
||||||
float vec[Type::nComponents];
|
float vec[nComp];
|
||||||
|
|
||||||
forAll(pptf, i)
|
forAll(pptf, i)
|
||||||
{
|
{
|
||||||
for (direction d=0; d<Type::nComponents; d++)
|
for (direction d=0; d<nComp; d++)
|
||||||
{
|
{
|
||||||
vec[d] = pptf[i][d];
|
vec[d] = component(pptf[i], d);
|
||||||
}
|
}
|
||||||
|
|
||||||
pointData->InsertTuple(i, vec);
|
pointData->InsertTuple(i, vec);
|
||||||
@ -73,42 +75,6 @@ void Foam::vtkPV3Foam::convertPatchPointField
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<>
|
|
||||||
void Foam::vtkPV3Foam::convertPatchPointField
|
|
||||||
(
|
|
||||||
const word& name,
|
|
||||||
const Field<scalar>& ppsf,
|
|
||||||
vtkMultiBlockDataSet* output,
|
|
||||||
const selectionInfo& selector,
|
|
||||||
const label datasetNo
|
|
||||||
)
|
|
||||||
{
|
|
||||||
vtkPolyData* vtkmesh = vtkPolyData::SafeDownCast
|
|
||||||
(
|
|
||||||
GetDataSetFromBlock(output, selector, datasetNo)
|
|
||||||
);
|
|
||||||
|
|
||||||
vtkFloatArray *pointData = vtkFloatArray::New();
|
|
||||||
pointData->SetNumberOfTuples(ppsf.size());
|
|
||||||
pointData->SetNumberOfComponents(1);
|
|
||||||
pointData->Allocate(ppsf.size());
|
|
||||||
pointData->SetName(name.c_str());
|
|
||||||
|
|
||||||
for (int i=0; i<ppsf.size(); i++)
|
|
||||||
{
|
|
||||||
pointData->InsertComponent(i, 0, ppsf[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
vtkmesh->GetPointData()->AddArray(pointData);
|
|
||||||
if (!vtkmesh->GetPointData()->GetScalars())
|
|
||||||
{
|
|
||||||
vtkmesh->GetPointData()->SetScalars(pointData);
|
|
||||||
}
|
|
||||||
|
|
||||||
pointData->Delete();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -33,8 +33,6 @@ InClass
|
|||||||
// Foam includes
|
// Foam includes
|
||||||
#include "interpolatePointToCell.H"
|
#include "interpolatePointToCell.H"
|
||||||
|
|
||||||
// VTK includes
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
@ -145,6 +143,8 @@ void Foam::vtkPV3Foam::convertPointField
|
|||||||
const label datasetNo
|
const label datasetNo
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
const label nComp = pTraits<Type>::nComponents;
|
||||||
|
|
||||||
vtkUnstructuredGrid* internalMesh = vtkUnstructuredGrid::SafeDownCast
|
vtkUnstructuredGrid* internalMesh = vtkUnstructuredGrid::SafeDownCast
|
||||||
(
|
(
|
||||||
GetDataSetFromBlock(output, selector, datasetNo)
|
GetDataSetFromBlock(output, selector, datasetNo)
|
||||||
@ -152,17 +152,17 @@ void Foam::vtkPV3Foam::convertPointField
|
|||||||
|
|
||||||
vtkFloatArray *pointData = vtkFloatArray::New();
|
vtkFloatArray *pointData = vtkFloatArray::New();
|
||||||
pointData->SetNumberOfTuples(ptf.size() + addPointCellLabels_.size());
|
pointData->SetNumberOfTuples(ptf.size() + addPointCellLabels_.size());
|
||||||
pointData->SetNumberOfComponents(Type::nComponents);
|
pointData->SetNumberOfComponents(nComp);
|
||||||
pointData->Allocate(Type::nComponents*ptf.size());
|
pointData->Allocate(nComp*ptf.size());
|
||||||
pointData->SetName(tf.name().c_str());
|
pointData->SetName(tf.name().c_str());
|
||||||
|
|
||||||
float vec[Type::nComponents];
|
float vec[nComp];
|
||||||
|
|
||||||
forAll(ptf, i)
|
forAll(ptf, i)
|
||||||
{
|
{
|
||||||
for (direction d=0; d<Type::nComponents; d++)
|
for (direction d=0; d<nComp; d++)
|
||||||
{
|
{
|
||||||
vec[d] = ptf[i][d];
|
vec[d] = component(ptf[i], d);
|
||||||
}
|
}
|
||||||
|
|
||||||
pointData->InsertTuple(i, vec);
|
pointData->InsertTuple(i, vec);
|
||||||
@ -176,9 +176,9 @@ void Foam::vtkPV3Foam::convertPointField
|
|||||||
{
|
{
|
||||||
Type t = tf[addPointCellLabels_[api]];
|
Type t = tf[addPointCellLabels_[api]];
|
||||||
|
|
||||||
for (direction d=0; d<Type::nComponents; d++)
|
for (direction d=0; d<nComp; d++)
|
||||||
{
|
{
|
||||||
vec[d] = t[d];
|
vec[d] = component(t, d);
|
||||||
}
|
}
|
||||||
|
|
||||||
pointData->InsertTuple(i++, vec);
|
pointData->InsertTuple(i++, vec);
|
||||||
@ -190,9 +190,9 @@ void Foam::vtkPV3Foam::convertPointField
|
|||||||
{
|
{
|
||||||
Type t = interpolatePointToCell(ptf, addPointCellLabels_[api]);
|
Type t = interpolatePointToCell(ptf, addPointCellLabels_[api]);
|
||||||
|
|
||||||
for (direction d=0; d<Type::nComponents; d++)
|
for (direction d=0; d<nComp; d++)
|
||||||
{
|
{
|
||||||
vec[d] = t[d];
|
vec[d] = component(t, d);
|
||||||
}
|
}
|
||||||
|
|
||||||
pointData->InsertTuple(i++, vec);
|
pointData->InsertTuple(i++, vec);
|
||||||
@ -204,69 +204,6 @@ void Foam::vtkPV3Foam::convertPointField
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<>
|
|
||||||
void Foam::vtkPV3Foam::convertPointField
|
|
||||||
(
|
|
||||||
const GeometricField<scalar, pointPatchField, pointMesh>& psf,
|
|
||||||
const GeometricField<scalar, fvPatchField, volMesh>& sf,
|
|
||||||
vtkMultiBlockDataSet* output,
|
|
||||||
const selectionInfo& selector,
|
|
||||||
const label datasetNo
|
|
||||||
)
|
|
||||||
{
|
|
||||||
vtkUnstructuredGrid* internalMesh = vtkUnstructuredGrid::SafeDownCast
|
|
||||||
(
|
|
||||||
GetDataSetFromBlock(output, selector, datasetNo)
|
|
||||||
);
|
|
||||||
|
|
||||||
vtkFloatArray *pointData = vtkFloatArray::New();
|
|
||||||
pointData->SetNumberOfTuples(psf.size() + addPointCellLabels_.size());
|
|
||||||
pointData->SetNumberOfComponents(1);
|
|
||||||
pointData->Allocate(psf.size());
|
|
||||||
pointData->SetName(sf.name().c_str());
|
|
||||||
|
|
||||||
for (int i=0; i<psf.size(); i++)
|
|
||||||
{
|
|
||||||
pointData->InsertComponent(i, 0, psf[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
label i = psf.size();
|
|
||||||
|
|
||||||
if (&sf != &GeometricField<scalar, fvPatchField, volMesh>::null())
|
|
||||||
{
|
|
||||||
forAll(addPointCellLabels_, api)
|
|
||||||
{
|
|
||||||
pointData->InsertComponent
|
|
||||||
(
|
|
||||||
i++,
|
|
||||||
0,
|
|
||||||
sf[addPointCellLabels_[api]]
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
forAll(addPointCellLabels_, api)
|
|
||||||
{
|
|
||||||
pointData->InsertComponent
|
|
||||||
(
|
|
||||||
i++,
|
|
||||||
0,
|
|
||||||
interpolatePointToCell(psf, addPointCellLabels_[api])
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
internalMesh->GetPointData()->AddArray(pointData);
|
|
||||||
if (!internalMesh->GetPointData()->GetScalars())
|
|
||||||
{
|
|
||||||
internalMesh->GetPointData()->SetScalars(pointData);
|
|
||||||
}
|
|
||||||
|
|
||||||
pointData->Delete();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -372,6 +372,8 @@ void Foam::vtkPV3Foam::convertVolField
|
|||||||
labelList& superCells
|
labelList& superCells
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
const label nComp = pTraits<Type>::nComponents;
|
||||||
|
|
||||||
vtkUnstructuredGrid* vtkmesh = vtkUnstructuredGrid::SafeDownCast
|
vtkUnstructuredGrid* vtkmesh = vtkUnstructuredGrid::SafeDownCast
|
||||||
(
|
(
|
||||||
GetDataSetFromBlock(output, selector, datasetNo)
|
GetDataSetFromBlock(output, selector, datasetNo)
|
||||||
@ -379,8 +381,8 @@ void Foam::vtkPV3Foam::convertVolField
|
|||||||
|
|
||||||
vtkFloatArray* celldata = vtkFloatArray::New();
|
vtkFloatArray* celldata = vtkFloatArray::New();
|
||||||
celldata->SetNumberOfTuples(superCells.size());
|
celldata->SetNumberOfTuples(superCells.size());
|
||||||
celldata->SetNumberOfComponents(Type::nComponents);
|
celldata->SetNumberOfComponents(nComp);
|
||||||
celldata->Allocate(Type::nComponents*superCells.size());
|
celldata->Allocate(nComp*superCells.size());
|
||||||
celldata->SetName(tf.name().c_str());
|
celldata->SetName(tf.name().c_str());
|
||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
@ -388,17 +390,17 @@ void Foam::vtkPV3Foam::convertVolField
|
|||||||
Info<< "converting vol<Type>Field: " << tf.name() << nl
|
Info<< "converting vol<Type>Field: " << tf.name() << nl
|
||||||
<< "field size = " << tf.size() << nl
|
<< "field size = " << tf.size() << nl
|
||||||
<< "nTuples = " << superCells.size() << nl
|
<< "nTuples = " << superCells.size() << nl
|
||||||
<< "nComps = " << Type::nComponents << endl;
|
<< "nComp = " << nComp << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
float vec[Type::nComponents];
|
float vec[nComp];
|
||||||
|
|
||||||
forAll(superCells, scI)
|
forAll(superCells, scI)
|
||||||
{
|
{
|
||||||
const Type& t = tf[superCells[scI]];
|
const Type& t = tf[superCells[scI]];
|
||||||
for (direction d=0; d<Type::nComponents; d++)
|
for (direction d=0; d<nComp; d++)
|
||||||
{
|
{
|
||||||
vec[d] = t[d];
|
vec[d] = component(t, d);
|
||||||
}
|
}
|
||||||
|
|
||||||
celldata->InsertTuple(scI, vec);
|
celldata->InsertTuple(scI, vec);
|
||||||
@ -409,50 +411,6 @@ void Foam::vtkPV3Foam::convertVolField
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<>
|
|
||||||
void Foam::vtkPV3Foam::convertVolField
|
|
||||||
(
|
|
||||||
const GeometricField<scalar, fvPatchField, volMesh>& sf,
|
|
||||||
vtkMultiBlockDataSet* output,
|
|
||||||
const selectionInfo& selector,
|
|
||||||
const label datasetNo,
|
|
||||||
labelList& superCells
|
|
||||||
)
|
|
||||||
{
|
|
||||||
vtkUnstructuredGrid* vtkmesh = vtkUnstructuredGrid::SafeDownCast
|
|
||||||
(
|
|
||||||
GetDataSetFromBlock(output, selector, datasetNo)
|
|
||||||
);
|
|
||||||
|
|
||||||
vtkFloatArray *cellData = vtkFloatArray::New();
|
|
||||||
cellData->SetNumberOfTuples(superCells.size());
|
|
||||||
cellData->SetNumberOfComponents(1);
|
|
||||||
cellData->Allocate(superCells.size());
|
|
||||||
cellData->SetName(sf.name().c_str());
|
|
||||||
|
|
||||||
if (debug)
|
|
||||||
{
|
|
||||||
Info<< "converting volScalarField: " << sf.name() << nl
|
|
||||||
<< "field size = " << sf.size() << nl
|
|
||||||
<< "nTuples = " << superCells.size() << nl
|
|
||||||
<< "nComps = 1" << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
forAll(superCells, scI)
|
|
||||||
{
|
|
||||||
cellData->InsertComponent(scI, 0, sf[superCells[scI]]);
|
|
||||||
}
|
|
||||||
|
|
||||||
vtkmesh->GetCellData()->AddArray(cellData);
|
|
||||||
if (!vtkmesh->GetCellData()->GetScalars())
|
|
||||||
{
|
|
||||||
vtkmesh->GetCellData()->SetScalars(cellData);
|
|
||||||
}
|
|
||||||
|
|
||||||
cellData->Delete();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -114,6 +114,12 @@ void Foam::vtkPV3Foam::updateVolFields
|
|||||||
}
|
}
|
||||||
|
|
||||||
volPointInterpolation pInterp(mesh, pMesh);
|
volPointInterpolation pInterp(mesh, pMesh);
|
||||||
|
/*
|
||||||
|
convertVolFields<Foam::label>
|
||||||
|
(
|
||||||
|
mesh, pInterp, objects, arraySelection, output
|
||||||
|
);
|
||||||
|
*/
|
||||||
convertVolFields<Foam::scalar>
|
convertVolFields<Foam::scalar>
|
||||||
(
|
(
|
||||||
mesh, pInterp, objects, arraySelection, output
|
mesh, pInterp, objects, arraySelection, output
|
||||||
@ -159,7 +165,12 @@ void Foam::vtkPV3Foam::updatePointFields
|
|||||||
{
|
{
|
||||||
Info<< "converting Foam point fields" << endl;
|
Info<< "converting Foam point fields" << endl;
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
|
convertPointFields<Foam::label>
|
||||||
|
(
|
||||||
|
mesh, objects, arraySelection, output
|
||||||
|
);
|
||||||
|
*/
|
||||||
convertPointFields<Foam::scalar>
|
convertPointFields<Foam::scalar>
|
||||||
(
|
(
|
||||||
mesh, objects, arraySelection, output
|
mesh, objects, arraySelection, output
|
||||||
@ -213,6 +224,11 @@ void Foam::vtkPV3Foam::updateLagrangianFields
|
|||||||
Info<< "converting Foam Lagrangian fields" << endl;
|
Info<< "converting Foam Lagrangian fields" << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
convertLagrangianFields<Foam::label>
|
||||||
|
(
|
||||||
|
mesh, objects, arraySelection, output
|
||||||
|
);
|
||||||
|
|
||||||
convertLagrangianFields<Foam::scalar>
|
convertLagrangianFields<Foam::scalar>
|
||||||
(
|
(
|
||||||
mesh, objects, arraySelection, output
|
mesh, objects, arraySelection, output
|
||||||
|
|||||||
@ -108,15 +108,13 @@ void Foam::vtkPV3Foam::updateInformationLagrangian()
|
|||||||
{
|
{
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "entered Foam::vtkPV3Foam::updateInformationLagrangian at timePath "
|
Info<< "entered Foam::vtkPV3Foam::updateInformationLagrangian "
|
||||||
<< dbPtr_->timePath()/"lagrangian" << endl;
|
<< "at timePath " << dbPtr_->timePath()/"lagrangian" << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
vtkDataArraySelection* arraySelection = reader_->GetRegionSelection();
|
vtkDataArraySelection* arraySelection = reader_->GetRegionSelection();
|
||||||
|
|
||||||
// Search for list of lagrangian objects for this time
|
// Search for list of lagrangian objects for this time
|
||||||
// IOobjectList lagrangianObjects(dbPtr(), dbPtr_().timeName(), "lagrangian");
|
|
||||||
|
|
||||||
fileNameList cloudDirs
|
fileNameList cloudDirs
|
||||||
(
|
(
|
||||||
readDir(dbPtr_->timePath()/"lagrangian", fileName::DIRECTORY)
|
readDir(dbPtr_->timePath()/"lagrangian", fileName::DIRECTORY)
|
||||||
@ -144,7 +142,11 @@ void Foam::vtkPV3Foam::updateInformationLagrangian()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Info<<"no cloudDirs @ " << dbPtr_->timePath()/"lagrangian" << endl;
|
if (debug)
|
||||||
|
{
|
||||||
|
Info<<"no clouds identified in "
|
||||||
|
<< dbPtr_->timePath()/"lagrangian" << endl;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -159,7 +161,7 @@ void Foam::vtkPV3Foam::updateInformationPatches()
|
|||||||
|
|
||||||
vtkDataArraySelection *arraySelection = reader_->GetRegionSelection();
|
vtkDataArraySelection *arraySelection = reader_->GetRegionSelection();
|
||||||
|
|
||||||
//- Read patches
|
// Read patches
|
||||||
polyBoundaryMeshEntries patchEntries
|
polyBoundaryMeshEntries patchEntries
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
@ -182,7 +184,7 @@ void Foam::vtkPV3Foam::updateInformationPatches()
|
|||||||
{
|
{
|
||||||
label nFaces(readLabel(patchEntries[entryI].dict().lookup("nFaces")));
|
label nFaces(readLabel(patchEntries[entryI].dict().lookup("nFaces")));
|
||||||
|
|
||||||
//- Valid patch if nFace > 0
|
// Valid patch if nFace > 0
|
||||||
if (nFaces)
|
if (nFaces)
|
||||||
{
|
{
|
||||||
// Add patch to GUI region list
|
// Add patch to GUI region list
|
||||||
@ -208,7 +210,7 @@ void Foam::vtkPV3Foam::updateInformationZones()
|
|||||||
|
|
||||||
vtkDataArraySelection *arraySelection = reader_->GetRegionSelection();
|
vtkDataArraySelection *arraySelection = reader_->GetRegionSelection();
|
||||||
|
|
||||||
//- Read cell zone information
|
// Read cell zone information
|
||||||
{
|
{
|
||||||
zonesEntries zones
|
zonesEntries zones
|
||||||
(
|
(
|
||||||
@ -240,7 +242,7 @@ void Foam::vtkPV3Foam::updateInformationZones()
|
|||||||
superCellZonesCells_.setSize(selectInfoCellZones_.size());
|
superCellZonesCells_.setSize(selectInfoCellZones_.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Read face zone information
|
// Read face zone information
|
||||||
{
|
{
|
||||||
zonesEntries zones
|
zonesEntries zones
|
||||||
(
|
(
|
||||||
@ -270,7 +272,7 @@ void Foam::vtkPV3Foam::updateInformationZones()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Read point zone information
|
// Read point zone information
|
||||||
{
|
{
|
||||||
zonesEntries zones
|
zonesEntries zones
|
||||||
(
|
(
|
||||||
@ -373,6 +375,11 @@ void Foam::vtkPV3Foam::updateInformationLagrangianFields()
|
|||||||
"lagrangian"/cloudName_
|
"lagrangian"/cloudName_
|
||||||
);
|
);
|
||||||
|
|
||||||
|
addFields<IOField<label> >
|
||||||
|
(
|
||||||
|
arraySelection,
|
||||||
|
objects
|
||||||
|
);
|
||||||
addFields<IOField<scalar> >
|
addFields<IOField<scalar> >
|
||||||
(
|
(
|
||||||
arraySelection,
|
arraySelection,
|
||||||
|
|||||||
@ -55,6 +55,13 @@ void Foam::vtkPV3Foam::updateInformationFields
|
|||||||
// Populate the GUI volume/point field arrays
|
// Populate the GUI volume/point field arrays
|
||||||
|
|
||||||
//- Add volume fields to GUI
|
//- Add volume fields to GUI
|
||||||
|
/*
|
||||||
|
addFields<GeometricField<label, patchType, meshType> >
|
||||||
|
(
|
||||||
|
arraySelection,
|
||||||
|
objects
|
||||||
|
);
|
||||||
|
*/
|
||||||
addFields<GeometricField<scalar, patchType, meshType> >
|
addFields<GeometricField<scalar, patchType, meshType> >
|
||||||
(
|
(
|
||||||
arraySelection,
|
arraySelection,
|
||||||
|
|||||||
@ -77,8 +77,8 @@ do
|
|||||||
[ -s "$parentDir/$check" ] || usage "file does not exist: '$parentDir/$check'"
|
[ -s "$parentDir/$check" ] || usage "file does not exist: '$parentDir/$check'"
|
||||||
done
|
done
|
||||||
|
|
||||||
caseFile="$caseName.foam"
|
#caseFile="$caseName.foam"
|
||||||
# caseFile="$caseName.OpenFOAM"
|
caseFile="$caseName.OpenFOAM"
|
||||||
|
|
||||||
case "$ParaView_VERSION" in
|
case "$ParaView_VERSION" in
|
||||||
2*)
|
2*)
|
||||||
|
|||||||
@ -1244,7 +1244,7 @@ DOTFILE_DIRS =
|
|||||||
# The MAX_DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
|
# The MAX_DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
|
||||||
# nodes that will be shown in the graph. If the number of nodes in a graph
|
# nodes that will be shown in the graph. If the number of nodes in a graph
|
||||||
# becomes larger than this value, doxygen will truncate the graph, which is
|
# becomes larger than this value, doxygen will truncate the graph, which is
|
||||||
# visualized by representing a node as a red box. Note that doxygen if the number
|
# visualized by representing a node as a red box. Note that if the number
|
||||||
# of direct children of the root node in a graph is already larger than
|
# of direct children of the root node in a graph is already larger than
|
||||||
# MAX_DOT_GRAPH_NOTES then the graph will not be shown at all. Also note
|
# MAX_DOT_GRAPH_NOTES then the graph will not be shown at all. Also note
|
||||||
# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
|
# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
|
||||||
|
|||||||
@ -31,6 +31,7 @@ wmake libso randomProcesses
|
|||||||
( cd turbulenceModels && ./Allwmake )
|
( cd turbulenceModels && ./Allwmake )
|
||||||
( cd lagrangian && ./Allwmake )
|
( cd lagrangian && ./Allwmake )
|
||||||
( cd postProcessing && ./Allwmake )
|
( cd postProcessing && ./Allwmake )
|
||||||
|
( cd conversion && ./Allwmake )
|
||||||
|
|
||||||
wmake libso autoMesh
|
wmake libso autoMesh
|
||||||
wmake libso errorEstimation
|
wmake libso errorEstimation
|
||||||
|
|||||||
@ -210,7 +210,7 @@ const Foam::entry& Foam::dictionary::lookupEntry
|
|||||||
(
|
(
|
||||||
"dictionary::lookupEntry(const word& keyword) const",
|
"dictionary::lookupEntry(const word& keyword) const",
|
||||||
*this
|
*this
|
||||||
) << " keyword " << keyword << " is undefined in dictionary "
|
) << "keyword " << keyword << " is undefined in dictionary "
|
||||||
<< name()
|
<< name()
|
||||||
<< exit(FatalIOError);
|
<< exit(FatalIOError);
|
||||||
}
|
}
|
||||||
@ -268,7 +268,7 @@ const Foam::dictionary& Foam::dictionary::subDict(const word& keyword) const
|
|||||||
(
|
(
|
||||||
"dictionary::subDict(const word& keyword) const",
|
"dictionary::subDict(const word& keyword) const",
|
||||||
*this
|
*this
|
||||||
) << " keyword " << keyword << " is undefined in dictionary "
|
) << "keyword " << keyword << " is undefined in dictionary "
|
||||||
<< name()
|
<< name()
|
||||||
<< exit(FatalIOError);
|
<< exit(FatalIOError);
|
||||||
}
|
}
|
||||||
@ -285,7 +285,7 @@ Foam::dictionary& Foam::dictionary::subDict(const word& keyword)
|
|||||||
(
|
(
|
||||||
"dictionary::subDict(const word& keyword)",
|
"dictionary::subDict(const word& keyword)",
|
||||||
*this
|
*this
|
||||||
) << " keyword " << keyword << " is undefined in dictionary "
|
) << "keyword " << keyword << " is undefined in dictionary "
|
||||||
<< name()
|
<< name()
|
||||||
<< exit(FatalIOError);
|
<< exit(FatalIOError);
|
||||||
}
|
}
|
||||||
@ -479,7 +479,7 @@ bool Foam::dictionary::changeKeyword
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
WarningIn("dictionary::changeKeyword(const word& old, const word& new)")
|
WarningIn("dictionary::changeKeyword(const word&, const word&)")
|
||||||
<< "cannot rename keyword "<< oldKeyword
|
<< "cannot rename keyword "<< oldKeyword
|
||||||
<< " to existing keyword " << newKeyword
|
<< " to existing keyword " << newKeyword
|
||||||
<< " in dictionary " << name() << endl;
|
<< " in dictionary " << name() << endl;
|
||||||
|
|||||||
@ -28,8 +28,6 @@ License
|
|||||||
#include "Time.H"
|
#include "Time.H"
|
||||||
#include "IFstream.H"
|
#include "IFstream.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
@ -57,8 +55,7 @@ timeVaryingUniformFixedValuePointPatchField
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedValuePointPatchField<Type>(ptf, p, iF, mapper),
|
fixedValuePointPatchField<Type>(ptf, p, iF, mapper),
|
||||||
timeDataFile_(ptf.timeDataFile_),
|
timeSeries_(ptf.timeSeries_)
|
||||||
timeSeries_(ptf.timeBounding())
|
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -73,8 +70,7 @@ timeVaryingUniformFixedValuePointPatchField
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedValuePointPatchField<Type>(p, iF),
|
fixedValuePointPatchField<Type>(p, iF),
|
||||||
timeDataFile_(dict.lookup("timeDataFile")),
|
timeSeries_(this->db(), dict)
|
||||||
timeSeries_(word(dict.lookup("timeBounding")))
|
|
||||||
{
|
{
|
||||||
updateCoeffs();
|
updateCoeffs();
|
||||||
}
|
}
|
||||||
@ -89,8 +85,7 @@ timeVaryingUniformFixedValuePointPatchField
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedValuePointPatchField<Type>(ptf),
|
fixedValuePointPatchField<Type>(ptf),
|
||||||
timeDataFile_(ptf.timeDataFile_),
|
timeSeries_(ptf.timeSeries_)
|
||||||
timeSeries_(ptf.timeBounding())
|
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -104,67 +99,12 @@ timeVaryingUniformFixedValuePointPatchField
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedValuePointPatchField<Type>(ptf, iF),
|
fixedValuePointPatchField<Type>(ptf, iF),
|
||||||
timeDataFile_(ptf.timeDataFile_),
|
timeSeries_(ptf.timeSeries_)
|
||||||
timeSeries_(ptf.timeBounding())
|
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
|
||||||
Type
|
|
||||||
Foam::timeVaryingUniformFixedValuePointPatchField<Type>::
|
|
||||||
currentValue()
|
|
||||||
{
|
|
||||||
if (timeSeries_.size() == 0)
|
|
||||||
{
|
|
||||||
fileName fName(timeDataFile_);
|
|
||||||
fName.expand();
|
|
||||||
|
|
||||||
if (fName.size() == 0)
|
|
||||||
{
|
|
||||||
FatalErrorIn
|
|
||||||
(
|
|
||||||
"timeVaryingUniformFixedValuePointPatchField"
|
|
||||||
"::currentValue()"
|
|
||||||
) << "timeDataFile not specified for Patch "
|
|
||||||
<< this->patch().name()
|
|
||||||
<< exit(FatalError);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// relative path
|
|
||||||
if (fName[0] != '/')
|
|
||||||
{
|
|
||||||
fName = this->db().path()/fName;
|
|
||||||
}
|
|
||||||
|
|
||||||
// just in case we change the interface to timeSeries
|
|
||||||
word boundType = timeBounding();
|
|
||||||
|
|
||||||
IFstream(fName)() >> timeSeries_;
|
|
||||||
timeSeries_.bounding(boundType);
|
|
||||||
|
|
||||||
// be a bit paranoid and check that the list is okay
|
|
||||||
timeSeries_.check();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (timeSeries_.size() == 0)
|
|
||||||
{
|
|
||||||
FatalErrorIn
|
|
||||||
(
|
|
||||||
"timeVaryingUniformFixedValuePointPatchField"
|
|
||||||
"::currentValue()"
|
|
||||||
) << "empty time series for Patch "
|
|
||||||
<< this->patch().name()
|
|
||||||
<< exit(FatalError);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return timeSeries_(this->db().time().timeOutputValue());
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void Foam::timeVaryingUniformFixedValuePointPatchField<Type>::updateCoeffs()
|
void Foam::timeVaryingUniformFixedValuePointPatchField<Type>::updateCoeffs()
|
||||||
{
|
{
|
||||||
@ -173,7 +113,7 @@ void Foam::timeVaryingUniformFixedValuePointPatchField<Type>::updateCoeffs()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this->operator==(currentValue());
|
this->operator==(timeSeries_(this->db().time().timeOutputValue()));
|
||||||
fixedValuePointPatchField<Type>::updateCoeffs();
|
fixedValuePointPatchField<Type>::updateCoeffs();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -182,13 +122,8 @@ template<class Type>
|
|||||||
void Foam::timeVaryingUniformFixedValuePointPatchField<Type>::write(Ostream& os) const
|
void Foam::timeVaryingUniformFixedValuePointPatchField<Type>::write(Ostream& os) const
|
||||||
{
|
{
|
||||||
fixedValuePointPatchField<Type>::write(os);
|
fixedValuePointPatchField<Type>::write(os);
|
||||||
os.writeKeyword("timeDataFile")
|
timeSeries_.write(os);
|
||||||
<< timeDataFile_ << token::END_STATEMENT << nl;
|
|
||||||
os.writeKeyword("timeBounding")
|
|
||||||
<< timeBounding() << token::END_STATEMENT << nl;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -40,7 +40,7 @@ SourceFiles
|
|||||||
#define timeVaryingUniformFixedValuePointPatchField_H
|
#define timeVaryingUniformFixedValuePointPatchField_H
|
||||||
|
|
||||||
#include "fixedValuePointPatchField.H"
|
#include "fixedValuePointPatchField.H"
|
||||||
#include "timeSeries.H"
|
#include "interpolationTable.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -58,14 +58,9 @@ class timeVaryingUniformFixedValuePointPatchField
|
|||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
//- file containing time/uniformFixedValue
|
|
||||||
fileName timeDataFile_;
|
|
||||||
|
|
||||||
//- the time series being used, including the bounding treatment
|
//- the time series being used, including the bounding treatment
|
||||||
timeSeries<Type> timeSeries_;
|
interpolationTable<Type> timeSeries_;
|
||||||
|
|
||||||
//- interpolate the value at the current time
|
|
||||||
Type currentValue();
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
@ -138,14 +133,8 @@ public:
|
|||||||
|
|
||||||
// Access
|
// Access
|
||||||
|
|
||||||
//- Return the out-of-bounds treatment as a word
|
|
||||||
word timeBounding() const
|
|
||||||
{
|
|
||||||
return timeSeries_.bounding();
|
|
||||||
}
|
|
||||||
|
|
||||||
//- Return the time series used
|
//- Return the time series used
|
||||||
const timeSeries<Type>& timeData() const
|
const interpolationTable<Type>& timeSeries() const
|
||||||
{
|
{
|
||||||
return timeSeries_;
|
return timeSeries_;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,482 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd.
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by the
|
||||||
|
Free Software Foundation; either version 2 of the License, or (at your
|
||||||
|
option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "interpolationTable.H"
|
||||||
|
#include "IFstream.H"
|
||||||
|
#include "objectRegistry.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
Foam::interpolationTable<Type>::interpolationTable()
|
||||||
|
:
|
||||||
|
List<Tuple2<scalar, Type> >(),
|
||||||
|
dict_(dictionary::null),
|
||||||
|
boundAction_(interpolationTable::WARN),
|
||||||
|
fileName_("undefined_fileName")
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
Foam::interpolationTable<Type>::interpolationTable
|
||||||
|
(
|
||||||
|
const objectRegistry& obr,
|
||||||
|
const dictionary& dict
|
||||||
|
)
|
||||||
|
:
|
||||||
|
List<Tuple2<scalar, Type> >(),
|
||||||
|
dict_(dict),
|
||||||
|
boundAction_(wordToBoundAction(dict.lookup("boundAction"))),
|
||||||
|
fileName_(dict.lookup("fileName"))
|
||||||
|
{
|
||||||
|
fileName_.expand();
|
||||||
|
|
||||||
|
// Correct for relative path
|
||||||
|
if (fileName_[0] != '/')
|
||||||
|
{
|
||||||
|
fileName_ = obr.db().path()/fileName_;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Read data from file
|
||||||
|
IFstream(fileName_)() >> *this;
|
||||||
|
|
||||||
|
// Check that the data is okay
|
||||||
|
check();
|
||||||
|
|
||||||
|
if (this->size() == 0)
|
||||||
|
{
|
||||||
|
FatalErrorIn
|
||||||
|
(
|
||||||
|
"Foam::interpolationTable<Type>::interpolationTable"
|
||||||
|
"(const dictionary& dict)"
|
||||||
|
) << "table is empty" << nl
|
||||||
|
<< exit(FatalError);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
Foam::interpolationTable<Type>::interpolationTable
|
||||||
|
(
|
||||||
|
const interpolationTable& interpTable
|
||||||
|
)
|
||||||
|
:
|
||||||
|
List<Tuple2<scalar, Type> >(interpTable),
|
||||||
|
dict_(interpTable.dict_),
|
||||||
|
boundAction_(interpTable.boundAction_),
|
||||||
|
fileName_(interpTable.fileName_)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
Foam::interpolationTable<Type>::~interpolationTable()
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
Foam::word Foam::interpolationTable<Type>::boundActionToWord
|
||||||
|
(
|
||||||
|
const boundActions& bound
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
word enumName("warn");
|
||||||
|
|
||||||
|
switch (bound)
|
||||||
|
{
|
||||||
|
case interpolationTable::ERROR:
|
||||||
|
{
|
||||||
|
enumName = "error";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case interpolationTable::WARN:
|
||||||
|
{
|
||||||
|
enumName = "warn";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case interpolationTable::CLAMP:
|
||||||
|
{
|
||||||
|
enumName = "clamp";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case interpolationTable::REPEAT:
|
||||||
|
{
|
||||||
|
enumName = "repeat";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return enumName;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
typename Foam::interpolationTable<Type>::boundActions
|
||||||
|
Foam::interpolationTable<Type>::wordToBoundAction
|
||||||
|
(
|
||||||
|
const word& bound
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
if (bound == "error")
|
||||||
|
{
|
||||||
|
return interpolationTable::ERROR;
|
||||||
|
}
|
||||||
|
else if (bound == "warn")
|
||||||
|
{
|
||||||
|
return interpolationTable::WARN;
|
||||||
|
}
|
||||||
|
else if (bound == "clamp")
|
||||||
|
{
|
||||||
|
return interpolationTable::CLAMP;
|
||||||
|
}
|
||||||
|
else if (bound == "repeat")
|
||||||
|
{
|
||||||
|
return interpolationTable::REPEAT;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
WarningIn
|
||||||
|
(
|
||||||
|
"Foam::interpolationTable<Type>::wordToBoundAction(const word&)"
|
||||||
|
) << "bad bounding specifier " << bound << " using 'warn'" << endl;
|
||||||
|
|
||||||
|
return interpolationTable::WARN;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
void Foam::interpolationTable<Type>::check() const
|
||||||
|
{
|
||||||
|
label n = size();
|
||||||
|
scalar prevValue = List<Tuple2<scalar, Type> >::operator[](0).first();
|
||||||
|
|
||||||
|
for (label i=1; i<n; ++i)
|
||||||
|
{
|
||||||
|
const scalar currValue =
|
||||||
|
List<Tuple2<scalar, Type> >::operator[](i).first();
|
||||||
|
|
||||||
|
// avoid duplicate values (divide-by-zero error)
|
||||||
|
if (currValue <= prevValue)
|
||||||
|
{
|
||||||
|
FatalErrorIn
|
||||||
|
(
|
||||||
|
"Foam::interpolationTable<Type>::checkOrder() const"
|
||||||
|
) << "out-of-order value: "
|
||||||
|
<< currValue << " at index " << i << nl
|
||||||
|
<< exit(FatalError);
|
||||||
|
}
|
||||||
|
prevValue = currValue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
typename Foam::interpolationTable<Type>::boundActions
|
||||||
|
Foam::interpolationTable<Type>::boundAction
|
||||||
|
(
|
||||||
|
const boundActions& bound
|
||||||
|
)
|
||||||
|
{
|
||||||
|
boundActions prev = boundAction_;
|
||||||
|
boundAction_ = bound;
|
||||||
|
return prev;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
void Foam::interpolationTable<Type>::write(Ostream& os) const
|
||||||
|
{
|
||||||
|
os.writeKeyword("fileName")
|
||||||
|
<< fileName_ << token::END_STATEMENT << nl;
|
||||||
|
os.writeKeyword("boundAction")
|
||||||
|
<< boundActionToWord(boundAction_) << token::END_STATEMENT << nl;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
const Foam::Tuple2<Foam::scalar, Type>&
|
||||||
|
Foam::interpolationTable<Type>::operator[](const label i) const
|
||||||
|
{
|
||||||
|
label ii = i;
|
||||||
|
label n = size();
|
||||||
|
|
||||||
|
if (n <= 1)
|
||||||
|
{
|
||||||
|
ii = 0;
|
||||||
|
}
|
||||||
|
else if (ii < 0)
|
||||||
|
{
|
||||||
|
switch (boundAction_)
|
||||||
|
{
|
||||||
|
case interpolationTable::ERROR:
|
||||||
|
{
|
||||||
|
FatalErrorIn
|
||||||
|
(
|
||||||
|
"Foam::interpolationTable<Type>::operator[]"
|
||||||
|
"(const label) const"
|
||||||
|
) << "index (" << ii << ") underflow" << nl
|
||||||
|
<< exit(FatalError);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case interpolationTable::WARN:
|
||||||
|
{
|
||||||
|
WarningIn
|
||||||
|
(
|
||||||
|
"Foam::interpolationTable<Type>::operator[]"
|
||||||
|
"(const label) const"
|
||||||
|
) << "index (" << ii << ") underflow" << nl
|
||||||
|
<< " Continuing with the first entry"
|
||||||
|
<< endl;
|
||||||
|
// fall-through to 'CLAMP'
|
||||||
|
}
|
||||||
|
case interpolationTable::CLAMP:
|
||||||
|
{
|
||||||
|
ii = 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case interpolationTable::REPEAT:
|
||||||
|
{
|
||||||
|
while (ii < 0)
|
||||||
|
{
|
||||||
|
ii += n;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (ii >= n)
|
||||||
|
{
|
||||||
|
switch (boundAction_)
|
||||||
|
{
|
||||||
|
case interpolationTable::ERROR:
|
||||||
|
{
|
||||||
|
FatalErrorIn
|
||||||
|
(
|
||||||
|
"Foam::interpolationTable<Type>::operator[]"
|
||||||
|
"(const label) const"
|
||||||
|
) << "index (" << ii << ") overflow" << nl
|
||||||
|
<< exit(FatalError);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case interpolationTable::WARN:
|
||||||
|
{
|
||||||
|
WarningIn
|
||||||
|
(
|
||||||
|
"Foam::interpolationTable<Type>::operator[]"
|
||||||
|
"(const label) const"
|
||||||
|
) << "index (" << ii << ") overflow" << nl
|
||||||
|
<< " Continuing with the last entry"
|
||||||
|
<< endl;
|
||||||
|
// fall-through to 'CLAMP'
|
||||||
|
}
|
||||||
|
case interpolationTable::CLAMP:
|
||||||
|
{
|
||||||
|
ii = n - 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case interpolationTable::REPEAT:
|
||||||
|
{
|
||||||
|
while (ii >= n)
|
||||||
|
{
|
||||||
|
ii -= n;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return List<Tuple2<scalar, Type> >::operator[](ii);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
Type Foam::interpolationTable<Type>::operator()(const scalar value) const
|
||||||
|
{
|
||||||
|
label n = size();
|
||||||
|
|
||||||
|
if (n <= 1)
|
||||||
|
{
|
||||||
|
return List<Tuple2<scalar, Type> >::operator[](0).second();
|
||||||
|
}
|
||||||
|
|
||||||
|
scalar minLimit = List<Tuple2<scalar, Type> >::operator[](0).first();
|
||||||
|
scalar maxLimit = List<Tuple2<scalar, Type> >::operator[](n-1).first();
|
||||||
|
scalar lookupValue = value;
|
||||||
|
|
||||||
|
if (lookupValue < minLimit)
|
||||||
|
{
|
||||||
|
switch (boundAction_)
|
||||||
|
{
|
||||||
|
case interpolationTable::ERROR:
|
||||||
|
{
|
||||||
|
FatalErrorIn
|
||||||
|
(
|
||||||
|
"Foam::interpolationTable<Type>::operator[]"
|
||||||
|
"(const scalar) const"
|
||||||
|
) << "value (" << lookupValue << ") underflow" << nl
|
||||||
|
<< exit(FatalError);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case interpolationTable::WARN:
|
||||||
|
{
|
||||||
|
WarningIn
|
||||||
|
(
|
||||||
|
"Foam::interpolationTable<Type>::operator[]"
|
||||||
|
"(const scalar) const"
|
||||||
|
) << "value (" << lookupValue << ") underflow" << nl
|
||||||
|
<< " Continuing with the first entry"
|
||||||
|
<< endl;
|
||||||
|
// fall-through to 'CLAMP'
|
||||||
|
}
|
||||||
|
case interpolationTable::CLAMP:
|
||||||
|
{
|
||||||
|
return List<Tuple2<scalar, Type> >::operator[](0).second();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case interpolationTable::REPEAT:
|
||||||
|
{
|
||||||
|
// adjust lookupValue to >= 0
|
||||||
|
while (lookupValue < 0)
|
||||||
|
{
|
||||||
|
lookupValue += maxLimit;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (lookupValue >= maxLimit)
|
||||||
|
{
|
||||||
|
switch (boundAction_)
|
||||||
|
{
|
||||||
|
case interpolationTable::ERROR:
|
||||||
|
{
|
||||||
|
FatalErrorIn
|
||||||
|
(
|
||||||
|
"Foam::interpolationTable<Type>::operator[]"
|
||||||
|
"(const label) const"
|
||||||
|
) << "value (" << lookupValue << ") overflow" << nl
|
||||||
|
<< exit(FatalError);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case interpolationTable::WARN:
|
||||||
|
{
|
||||||
|
WarningIn
|
||||||
|
(
|
||||||
|
"Foam::interpolationTable<Type>::operator[]"
|
||||||
|
"(const label) const"
|
||||||
|
) << "value (" << lookupValue << ") overflow" << nl
|
||||||
|
<< " Continuing with the last entry"
|
||||||
|
<< endl;
|
||||||
|
// fall-through to 'CLAMP'
|
||||||
|
}
|
||||||
|
case interpolationTable::CLAMP:
|
||||||
|
{
|
||||||
|
return List<Tuple2<scalar, Type> >::operator[](n-1).second();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case interpolationTable::REPEAT:
|
||||||
|
{
|
||||||
|
// adjust lookupValue <= maxLimit
|
||||||
|
while (lookupValue > maxLimit)
|
||||||
|
{
|
||||||
|
lookupValue -= maxLimit;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
label lo = 0;
|
||||||
|
label hi = 0;
|
||||||
|
|
||||||
|
// look for the correct range
|
||||||
|
for (label i = 0; i < n; ++i)
|
||||||
|
{
|
||||||
|
if (lookupValue >= List<Tuple2<scalar, Type> >::operator[](i).first())
|
||||||
|
{
|
||||||
|
lo = hi = i;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
hi = i;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (lo == hi)
|
||||||
|
{
|
||||||
|
// we are at the end of the table - or there is only a single entry
|
||||||
|
return List<Tuple2<scalar, Type> >::operator[](hi).second();
|
||||||
|
}
|
||||||
|
else if (hi == 0)
|
||||||
|
{
|
||||||
|
// this treatment should should only occur under these conditions:
|
||||||
|
// -> the 'REPEAT' treatment
|
||||||
|
// -> (0 <= value <= minLimit)
|
||||||
|
// -> minLimit > 0
|
||||||
|
// Use the value at maxLimit as the value for value=0
|
||||||
|
lo = n - 1;
|
||||||
|
|
||||||
|
return
|
||||||
|
(
|
||||||
|
List<Tuple2<scalar, Type> >::operator[](lo).second()
|
||||||
|
+ (
|
||||||
|
List<Tuple2<scalar, Type> >::operator[](hi).second()
|
||||||
|
- List<Tuple2<scalar, Type> >::operator[](lo).second()
|
||||||
|
)
|
||||||
|
*(lookupValue / minLimit)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// normal interpolation
|
||||||
|
return
|
||||||
|
(
|
||||||
|
List<Tuple2<scalar, Type> >::operator[](lo).second()
|
||||||
|
+ (
|
||||||
|
List<Tuple2<scalar, Type> >::operator[](hi).second()
|
||||||
|
- List<Tuple2<scalar, Type> >::operator[](lo).second()
|
||||||
|
)
|
||||||
|
*(
|
||||||
|
lookupValue
|
||||||
|
- List<Tuple2<scalar, Type> >::operator[](lo).first()
|
||||||
|
)
|
||||||
|
/(
|
||||||
|
List<Tuple2<scalar, Type> >::operator[](hi).first()
|
||||||
|
- List<Tuple2<scalar, Type> >::operator[](lo).first()
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -23,7 +23,7 @@ License
|
|||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::timeSeries
|
Foam::interpolationTable
|
||||||
|
|
||||||
Description
|
Description
|
||||||
A list of times and values.
|
A list of times and values.
|
||||||
@ -40,12 +40,12 @@ Note
|
|||||||
- Accessing a list with a single element will always return the same value.
|
- Accessing a list with a single element will always return the same value.
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
timeSeries.C
|
interpolationTable.C
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef timeSeries_H
|
#ifndef interpolationTable_H
|
||||||
#define timeSeries_H
|
#define interpolationTable_H
|
||||||
|
|
||||||
#include "List.H"
|
#include "List.H"
|
||||||
#include "Tuple2.H"
|
#include "Tuple2.H"
|
||||||
@ -55,21 +55,23 @@ SourceFiles
|
|||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
|
class objectRegistry;
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class timeSeries Declaration
|
Class interpolationTable Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
template<class T>
|
template<class Type>
|
||||||
class timeSeries
|
class interpolationTable
|
||||||
:
|
:
|
||||||
public List<Tuple2<scalar, T> >
|
public List<Tuple2<scalar, Type> >
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
// Public data types
|
// Public data types
|
||||||
|
|
||||||
//- Enumeration for handling out-of-bound times
|
//- Enumeration for handling out-of-bound values
|
||||||
enum bounds
|
enum boundActions
|
||||||
{
|
{
|
||||||
ERROR, /*!< Exit with a FatalError */
|
ERROR, /*!< Exit with a FatalError */
|
||||||
WARN, /*!< Issue warning and clamp value (default) */
|
WARN, /*!< Issue warning and clamp value (default) */
|
||||||
@ -77,86 +79,96 @@ public:
|
|||||||
REPEAT /*!< Treat as a repeating list */
|
REPEAT /*!< Treat as a repeating list */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
//- Enumeration for handling out-of-bound times
|
//- Parent dictionary
|
||||||
bounds bounding_;
|
const dictionary& dict_;
|
||||||
|
|
||||||
|
//- Enumeration for handling out-of-bound values
|
||||||
|
boundActions boundAction_;
|
||||||
|
|
||||||
|
//- File name
|
||||||
|
fileName fileName_;
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct null, optionally with a given bounding
|
//- Construct null
|
||||||
timeSeries(const bounds = timeSeries::WARN);
|
interpolationTable();
|
||||||
|
|
||||||
//- Construct null with a given bounding
|
//- Construct from objectRegistry and dictionary
|
||||||
timeSeries(const word&);
|
interpolationTable(const objectRegistry& obr, const dictionary& dict);
|
||||||
|
|
||||||
//- Construct from Istream, optionally with a given bounding
|
//- Construct copy
|
||||||
timeSeries(Istream&, const bounds = timeSeries::WARN);
|
interpolationTable(const interpolationTable& interpTable);
|
||||||
|
|
||||||
//- Construct from Istream with a given bounding
|
|
||||||
timeSeries(Istream&, const word&);
|
|
||||||
|
|
||||||
// Destructor
|
//- Destructor
|
||||||
|
~interpolationTable();
|
||||||
|
|
||||||
~timeSeries();
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|
||||||
// Access
|
// Access
|
||||||
|
|
||||||
//- Return the size
|
//- Return the size
|
||||||
label size() const
|
label size() const
|
||||||
{
|
{
|
||||||
return List<Tuple2<scalar, T> >::size();
|
return List<Tuple2<scalar, Type> >::size();
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Return the out-of-bounds treatment as a word
|
//- Return the out-of-bounds treatment as a word
|
||||||
word bounding() const;
|
word boundActionToWord(const boundActions& bound) const;
|
||||||
|
|
||||||
// Check
|
//- Return the out-of-bounds treatment as an enumeration
|
||||||
|
boundActions wordToBoundAction(const word& bound) const;
|
||||||
|
|
||||||
//- Check that list is monotonically increasing
|
|
||||||
// Exit with a FatalError if there is a problem
|
|
||||||
void check() const;
|
|
||||||
|
|
||||||
// Edit
|
// Check
|
||||||
|
|
||||||
//- Set the out-of-bounds treatment from enum, return previous setting
|
//- Check that list is monotonically increasing
|
||||||
bounds bounding(const bounds& bound)
|
// Exit with a FatalError if there is a problem
|
||||||
{
|
void check() const;
|
||||||
bounds prev = bounding_;
|
|
||||||
bounding_ = bound;
|
|
||||||
return prev;
|
|
||||||
}
|
|
||||||
|
|
||||||
//- Set the out-of-bounds treatment from word
|
|
||||||
void bounding(const word& bound);
|
|
||||||
|
|
||||||
// Member Operators
|
// Edit
|
||||||
|
|
||||||
//- Return an element of constant Tuple2<scalar, T>
|
//- Set the out-of-bounds treatment from enum, return previous
|
||||||
const Tuple2<scalar, T>& operator[](const label) const;
|
// setting
|
||||||
|
boundActions boundAction(const boundActions& bound);
|
||||||
|
|
||||||
//- Return an interpolated value
|
|
||||||
T operator()(const scalar) const;
|
|
||||||
|
|
||||||
|
// Member Operators
|
||||||
|
|
||||||
|
//- Return an element of constant Tuple2<scalar, Type>
|
||||||
|
const Tuple2<scalar, Type>& operator[](const label) const;
|
||||||
|
|
||||||
|
//- Return an interpolated value
|
||||||
|
Type operator()(const scalar) const;
|
||||||
|
|
||||||
|
|
||||||
|
// I-O
|
||||||
|
|
||||||
|
//- Write
|
||||||
|
void write(Ostream& os) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
} // End namespace Foam
|
} // End namespace Foam
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
#ifdef NoRepository
|
#ifdef NoRepository
|
||||||
# include "timeSeries.C"
|
# include "interpolationTable.C"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
@ -1,402 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd.
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by the
|
|
||||||
Free Software Foundation; either version 2 of the License, or (at your
|
|
||||||
option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#include "timeSeries.H"
|
|
||||||
#include "Istream.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
template<typename T>
|
|
||||||
Foam::timeSeries<T>::timeSeries(const bounds bound)
|
|
||||||
:
|
|
||||||
List<Tuple2<scalar, T> >(),
|
|
||||||
bounding_(bound)
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
template<typename T>
|
|
||||||
Foam::timeSeries<T>::timeSeries(const word& bound)
|
|
||||||
:
|
|
||||||
List<Tuple2<scalar, T> >(),
|
|
||||||
bounding_(timeSeries::WARN)
|
|
||||||
{
|
|
||||||
bounding(bound);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<typename T>
|
|
||||||
Foam::timeSeries<T>::timeSeries(Istream& is, const bounds bound)
|
|
||||||
:
|
|
||||||
List<Tuple2<scalar, T> >(is),
|
|
||||||
bounding_(bound)
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
template<typename T>
|
|
||||||
Foam::timeSeries<T>::timeSeries(Istream& is, const word& bound)
|
|
||||||
:
|
|
||||||
List<Tuple2<scalar, T> >(is),
|
|
||||||
bounding_(timeSeries::WARN)
|
|
||||||
{
|
|
||||||
bounding(bound);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
template<typename T>
|
|
||||||
Foam::timeSeries<T>::~timeSeries()
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
template<typename T>
|
|
||||||
Foam::word Foam::timeSeries<T>::bounding() const
|
|
||||||
{
|
|
||||||
word enumName("warn");
|
|
||||||
|
|
||||||
switch (bounding_)
|
|
||||||
{
|
|
||||||
case timeSeries::ERROR:
|
|
||||||
enumName = "error";
|
|
||||||
break;
|
|
||||||
|
|
||||||
case timeSeries::WARN:
|
|
||||||
enumName = "warn";
|
|
||||||
break;
|
|
||||||
|
|
||||||
case timeSeries::CLAMP:
|
|
||||||
enumName = "clamp";
|
|
||||||
break;
|
|
||||||
|
|
||||||
case timeSeries::REPEAT:
|
|
||||||
enumName = "repeat";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return enumName;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<typename T>
|
|
||||||
void Foam::timeSeries<T>::bounding(const word& bound)
|
|
||||||
{
|
|
||||||
if (bound == "error")
|
|
||||||
{
|
|
||||||
bounding_ = timeSeries::ERROR;
|
|
||||||
}
|
|
||||||
else if (bound == "warn")
|
|
||||||
{
|
|
||||||
bounding_ = timeSeries::WARN;
|
|
||||||
}
|
|
||||||
else if (bound == "clamp")
|
|
||||||
{
|
|
||||||
bounding_ = timeSeries::CLAMP;
|
|
||||||
}
|
|
||||||
else if (bound == "repeat")
|
|
||||||
{
|
|
||||||
bounding_ = timeSeries::REPEAT;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
WarningIn("Foam::timeSeries<T>::boundingEnum(const word&)")
|
|
||||||
<< "bad bounding specifier " << bound << " using 'warn'" << endl;
|
|
||||||
|
|
||||||
bounding_ = timeSeries::WARN;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<typename T>
|
|
||||||
void Foam::timeSeries<T>::check() const
|
|
||||||
{
|
|
||||||
label n = size();
|
|
||||||
scalar prevTime = List<Tuple2<scalar, T> >::operator[](0).first();
|
|
||||||
|
|
||||||
for (label i = 1; i < n; ++i)
|
|
||||||
{
|
|
||||||
const scalar currTime = List<Tuple2<scalar, T> >::operator[](i).first();
|
|
||||||
|
|
||||||
// avoid duplicate times (divide-by-zero error)
|
|
||||||
if (currTime <= prevTime)
|
|
||||||
{
|
|
||||||
FatalErrorIn
|
|
||||||
(
|
|
||||||
"Foam::timeSeries<T>::checkOrder() const"
|
|
||||||
) << "out-of-order time: "
|
|
||||||
<< currTime << " at index " << i << nl
|
|
||||||
<< exit(FatalError);
|
|
||||||
}
|
|
||||||
prevTime = currTime;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
|
|
||||||
template<typename T>
|
|
||||||
const Foam::Tuple2<Foam::scalar, T>&
|
|
||||||
Foam::timeSeries<T>::operator[](const label i) const
|
|
||||||
{
|
|
||||||
label ii = i;
|
|
||||||
label n = size();
|
|
||||||
|
|
||||||
if (n <= 1)
|
|
||||||
{
|
|
||||||
ii = 0;
|
|
||||||
}
|
|
||||||
else if (ii < 0)
|
|
||||||
{
|
|
||||||
switch (bounding_)
|
|
||||||
{
|
|
||||||
case timeSeries::ERROR:
|
|
||||||
FatalErrorIn
|
|
||||||
(
|
|
||||||
"Foam::timeSeries<T>::operator[](const label) const"
|
|
||||||
) << "index (" << ii << ") underflow" << nl
|
|
||||||
<< exit(FatalError);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case timeSeries::WARN:
|
|
||||||
WarningIn
|
|
||||||
(
|
|
||||||
"Foam::timeSeries<T>::operator[](const label) const"
|
|
||||||
) << "index (" << ii << ") underflow" << nl
|
|
||||||
<< " Continuing with the first entry"
|
|
||||||
<< endl;
|
|
||||||
// fall-through to 'CLAMP'
|
|
||||||
|
|
||||||
case timeSeries::CLAMP:
|
|
||||||
ii = 0;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case timeSeries::REPEAT:
|
|
||||||
while (ii < 0)
|
|
||||||
{
|
|
||||||
ii += n;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (ii >= n)
|
|
||||||
{
|
|
||||||
switch (bounding_)
|
|
||||||
{
|
|
||||||
case timeSeries::ERROR:
|
|
||||||
FatalErrorIn
|
|
||||||
(
|
|
||||||
"Foam::timeSeries<T>::operator[](const label) const"
|
|
||||||
) << "index (" << ii << ") overflow" << nl
|
|
||||||
<< exit(FatalError);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case timeSeries::WARN:
|
|
||||||
WarningIn
|
|
||||||
(
|
|
||||||
"Foam::timeSeries<T>::operator[](const label) const"
|
|
||||||
) << "index (" << ii << ") overflow" << nl
|
|
||||||
<< " Continuing with the last entry"
|
|
||||||
<< endl;
|
|
||||||
// fall-through to 'CLAMP'
|
|
||||||
|
|
||||||
case timeSeries::CLAMP:
|
|
||||||
ii = n - 1;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case timeSeries::REPEAT:
|
|
||||||
while (ii >= n)
|
|
||||||
{
|
|
||||||
ii -= n;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return List<Tuple2<scalar, T> >::operator[](ii);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<typename T>
|
|
||||||
T Foam::timeSeries<T>::operator()(const scalar timeValue) const
|
|
||||||
{
|
|
||||||
label n = size();
|
|
||||||
|
|
||||||
if (n <= 1)
|
|
||||||
{
|
|
||||||
return List<Tuple2<scalar, T> >::operator[](0).second();
|
|
||||||
}
|
|
||||||
|
|
||||||
scalar minTime = List<Tuple2<scalar, T> >::operator[](0).first();
|
|
||||||
scalar maxTime = List<Tuple2<scalar, T> >::operator[](n-1).first();
|
|
||||||
scalar lookupTime = timeValue;
|
|
||||||
|
|
||||||
if (lookupTime < minTime)
|
|
||||||
{
|
|
||||||
switch (bounding_)
|
|
||||||
{
|
|
||||||
case timeSeries::ERROR:
|
|
||||||
FatalErrorIn
|
|
||||||
(
|
|
||||||
"Foam::timeSeries<T>::operator[](const scalar) const"
|
|
||||||
) << "time (" << lookupTime << ") underflow" << nl
|
|
||||||
<< exit(FatalError);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case timeSeries::WARN:
|
|
||||||
WarningIn
|
|
||||||
(
|
|
||||||
"Foam::timeSeries<T>::operator[](const scalar) const"
|
|
||||||
) << "time (" << lookupTime << ") underflow" << nl
|
|
||||||
<< " Continuing with the first entry"
|
|
||||||
<< endl;
|
|
||||||
// fall-through to 'CLAMP'
|
|
||||||
|
|
||||||
case timeSeries::CLAMP:
|
|
||||||
return List<Tuple2<scalar, T> >::operator[](0).second();
|
|
||||||
break;
|
|
||||||
|
|
||||||
case timeSeries::REPEAT:
|
|
||||||
// adjust lookupTime to >= 0
|
|
||||||
while (lookupTime < 0)
|
|
||||||
{
|
|
||||||
lookupTime += maxTime;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (lookupTime >= maxTime)
|
|
||||||
{
|
|
||||||
switch (bounding_)
|
|
||||||
{
|
|
||||||
case timeSeries::ERROR:
|
|
||||||
FatalErrorIn
|
|
||||||
(
|
|
||||||
"Foam::timeSeries<T>::operator[](const label) const"
|
|
||||||
) << "time (" << lookupTime << ") overflow" << nl
|
|
||||||
<< exit(FatalError);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case timeSeries::WARN:
|
|
||||||
WarningIn
|
|
||||||
(
|
|
||||||
"Foam::timeSeries<T>::operator[](const label) const"
|
|
||||||
) << "time (" << lookupTime << ") overflow" << nl
|
|
||||||
<< " Continuing with the last entry"
|
|
||||||
<< endl;
|
|
||||||
// fall-through to 'CLAMP'
|
|
||||||
|
|
||||||
case timeSeries::CLAMP:
|
|
||||||
return List<Tuple2<scalar, T> >::operator[](n-1).second();
|
|
||||||
break;
|
|
||||||
|
|
||||||
case timeSeries::REPEAT:
|
|
||||||
// adjust lookupTime <= maxTime
|
|
||||||
while (lookupTime > maxTime)
|
|
||||||
{
|
|
||||||
lookupTime -= maxTime;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
label lo = 0;
|
|
||||||
label hi = 0;
|
|
||||||
|
|
||||||
// look for the correct range
|
|
||||||
for (label i = 0; i < n; ++i)
|
|
||||||
{
|
|
||||||
if (lookupTime >= List<Tuple2<scalar, T> >::operator[](i).first())
|
|
||||||
{
|
|
||||||
lo = hi = i;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
hi = i;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (lo == hi)
|
|
||||||
{
|
|
||||||
// we are at the end of the table - or there is only a single entry
|
|
||||||
return List<Tuple2<scalar, T> >::operator[](hi).second();
|
|
||||||
}
|
|
||||||
else if (hi == 0)
|
|
||||||
{
|
|
||||||
// this treatment should should only occur under these condition:
|
|
||||||
// -> the 'REPEAT' treatment
|
|
||||||
// -> (0 <= time <= minTime)
|
|
||||||
// -> minTime > 0
|
|
||||||
// Use the value at maxTime as the value for time=0
|
|
||||||
lo = n - 1;
|
|
||||||
|
|
||||||
return
|
|
||||||
(
|
|
||||||
List<Tuple2<scalar, T> >::operator[](lo).second()
|
|
||||||
+
|
|
||||||
(
|
|
||||||
List<Tuple2<scalar, T> >::operator[](hi).second()
|
|
||||||
- List<Tuple2<scalar, T> >::operator[](lo).second()
|
|
||||||
)
|
|
||||||
* (lookupTime / minTime)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// normal interpolation
|
|
||||||
return
|
|
||||||
(
|
|
||||||
List<Tuple2<scalar, T> >::operator[](lo).second()
|
|
||||||
+
|
|
||||||
(
|
|
||||||
List<Tuple2<scalar, T> >::operator[](hi).second()
|
|
||||||
- List<Tuple2<scalar, T> >::operator[](lo).second()
|
|
||||||
)
|
|
||||||
*
|
|
||||||
(
|
|
||||||
lookupTime
|
|
||||||
- List<Tuple2<scalar, T> >::operator[](lo).first()
|
|
||||||
)
|
|
||||||
/
|
|
||||||
(
|
|
||||||
List<Tuple2<scalar, T> >::operator[](hi).first()
|
|
||||||
- List<Tuple2<scalar, T> >::operator[](lo).first()
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -119,6 +119,7 @@ namespace Foam
|
|||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#include "pTraits.H"
|
#include "pTraits.H"
|
||||||
|
#include "direction.H"
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
@ -202,6 +203,16 @@ MAXMIN(long, int, long)
|
|||||||
MAXMIN(long long, int, long long)
|
MAXMIN(long long, int, long long)
|
||||||
MAXMIN(long long, long long, int)
|
MAXMIN(long long, long long, int)
|
||||||
|
|
||||||
|
inline label& setComponent(label& l, const direction)
|
||||||
|
{
|
||||||
|
return l;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline label component(const label l, const direction)
|
||||||
|
{
|
||||||
|
return l;
|
||||||
|
}
|
||||||
|
|
||||||
inline label mag(const label l)
|
inline label mag(const label l)
|
||||||
{
|
{
|
||||||
return ::abs(l);
|
return ::abs(l);
|
||||||
|
|||||||
4
src/conversion/Allwmake
Executable file
4
src/conversion/Allwmake
Executable file
@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
set -x
|
||||||
|
|
||||||
|
wmake libso
|
||||||
3
src/conversion/Make/files
Normal file
3
src/conversion/Make/files
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
polyDualMesh/polyDualMesh.C
|
||||||
|
|
||||||
|
LIB = $(FOAM_LIBBIN)/libconversion
|
||||||
5
src/conversion/Make/options
Normal file
5
src/conversion/Make/options
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
EXE_INC = \
|
||||||
|
-I$(LIB_SRC)/meshTools/lnInclude
|
||||||
|
|
||||||
|
LIB_LIBS = \
|
||||||
|
-lmeshTools
|
||||||
@ -50,15 +50,15 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
defineTypeNameAndDebug(hexRef8, 0);
|
defineTypeNameAndDebug(hexRef8, 0);
|
||||||
|
|
||||||
// Reduction class. If x and y are not equal assign value.
|
//- Reduction class. If x and y are not equal assign value.
|
||||||
template< int value >
|
template< int value >
|
||||||
class ifEqEqOp
|
class ifEqEqOp
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
void operator()( label& x, const label& y ) const
|
void operator()( label& x, const label& y ) const
|
||||||
{
|
{
|
||||||
x = (x==y) ? x:value;
|
x = (x==y) ? x:value;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -78,7 +78,7 @@ $(derivedFvPatchFields)/freestream/freestreamFvPatchFields.C
|
|||||||
$(derivedFvPatchFields)/freestreamPressure/freestreamPressureFvPatchScalarField.C
|
$(derivedFvPatchFields)/freestreamPressure/freestreamPressureFvPatchScalarField.C
|
||||||
$(derivedFvPatchFields)/inletOutlet/inletOutletFvPatchFields.C
|
$(derivedFvPatchFields)/inletOutlet/inletOutletFvPatchFields.C
|
||||||
$(derivedFvPatchFields)/inletOutletTotalTemperature/inletOutletTotalTemperatureFvPatchScalarField.C
|
$(derivedFvPatchFields)/inletOutletTotalTemperature/inletOutletTotalTemperatureFvPatchScalarField.C
|
||||||
$(derivedFvPatchFields)/massFlowRateInletVelocity/massFlowRateInletVelocityFvPatchVectorField.C
|
$(derivedFvPatchFields)/flowRateInletVelocity/flowRateInletVelocityFvPatchVectorField.C
|
||||||
$(derivedFvPatchFields)/movingWallVelocity/movingWallVelocityFvPatchVectorField.C
|
$(derivedFvPatchFields)/movingWallVelocity/movingWallVelocityFvPatchVectorField.C
|
||||||
$(derivedFvPatchFields)/oscillatingFixedValue/oscillatingFixedValueFvPatchFields.C
|
$(derivedFvPatchFields)/oscillatingFixedValue/oscillatingFixedValueFvPatchFields.C
|
||||||
$(derivedFvPatchFields)/outletInlet/outletInletFvPatchFields.C
|
$(derivedFvPatchFields)/outletInlet/outletInletFvPatchFields.C
|
||||||
@ -96,7 +96,7 @@ $(derivedFvPatchFields)/surfaceNormalFixedValue/surfaceNormalFixedValueFvPatchVe
|
|||||||
$(derivedFvPatchFields)/syringePressure/syringePressureFvPatchScalarField.C
|
$(derivedFvPatchFields)/syringePressure/syringePressureFvPatchScalarField.C
|
||||||
$(derivedFvPatchFields)/timeVaryingMappedFixedValue/AverageIOFields.C
|
$(derivedFvPatchFields)/timeVaryingMappedFixedValue/AverageIOFields.C
|
||||||
$(derivedFvPatchFields)/timeVaryingMappedFixedValue/timeVaryingMappedFixedValueFvPatchFields.C
|
$(derivedFvPatchFields)/timeVaryingMappedFixedValue/timeVaryingMappedFixedValueFvPatchFields.C
|
||||||
$(derivedFvPatchFields)/timeVaryingMassFlowRateInletVelocity/timeVaryingMassFlowRateInletVelocityFvPatchVectorField.C
|
$(derivedFvPatchFields)/timeVaryingFlowRateInletVelocity/timeVaryingFlowRateInletVelocityFvPatchVectorField.C
|
||||||
$(derivedFvPatchFields)/timeVaryingUniformFixedValue/timeVaryingUniformFixedValueFvPatchFields.C
|
$(derivedFvPatchFields)/timeVaryingUniformFixedValue/timeVaryingUniformFixedValueFvPatchFields.C
|
||||||
$(derivedFvPatchFields)/totalPressure/totalPressureFvPatchScalarField.C
|
$(derivedFvPatchFields)/totalPressure/totalPressureFvPatchScalarField.C
|
||||||
$(derivedFvPatchFields)/timeVaryingUniformTotalPressure/timeVaryingUniformTotalPressureFvPatchScalarField.C
|
$(derivedFvPatchFields)/timeVaryingUniformTotalPressure/timeVaryingUniformTotalPressureFvPatchScalarField.C
|
||||||
|
|||||||
@ -24,7 +24,7 @@ License
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "massFlowRateInletVelocityFvPatchVectorField.H"
|
#include "flowRateInletVelocityFvPatchVectorField.H"
|
||||||
#include "volFields.H"
|
#include "volFields.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
#include "fvPatchFieldMapper.H"
|
#include "fvPatchFieldMapper.H"
|
||||||
@ -33,38 +33,40 @@ License
|
|||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::
|
Foam::
|
||||||
massFlowRateInletVelocityFvPatchVectorField::
|
flowRateInletVelocityFvPatchVectorField::
|
||||||
massFlowRateInletVelocityFvPatchVectorField
|
flowRateInletVelocityFvPatchVectorField
|
||||||
(
|
(
|
||||||
const fvPatch& p,
|
const fvPatch& p,
|
||||||
const DimensionedField<vector, volMesh>& iF
|
const DimensionedField<vector, volMesh>& iF
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedValueFvPatchField<vector>(p, iF),
|
fixedValueFvPatchField<vector>(p, iF),
|
||||||
massFlowRate_(0),
|
flowRate_(0),
|
||||||
phiName_("phi"),
|
phiName_("phi"),
|
||||||
rhoName_("rho")
|
rhoName_("rho")
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
Foam::
|
Foam::
|
||||||
massFlowRateInletVelocityFvPatchVectorField::
|
flowRateInletVelocityFvPatchVectorField::
|
||||||
massFlowRateInletVelocityFvPatchVectorField
|
flowRateInletVelocityFvPatchVectorField
|
||||||
(
|
(
|
||||||
const massFlowRateInletVelocityFvPatchVectorField& ptf,
|
const flowRateInletVelocityFvPatchVectorField& ptf,
|
||||||
const fvPatch& p,
|
const fvPatch& p,
|
||||||
const DimensionedField<vector, volMesh>& iF,
|
const DimensionedField<vector, volMesh>& iF,
|
||||||
const fvPatchFieldMapper& mapper
|
const fvPatchFieldMapper& mapper
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedValueFvPatchField<vector>(ptf, p, iF, mapper),
|
fixedValueFvPatchField<vector>(ptf, p, iF, mapper),
|
||||||
massFlowRate_(ptf.massFlowRate_),
|
flowRate_(ptf.flowRate_),
|
||||||
phiName_(ptf.phiName_),
|
phiName_(ptf.phiName_),
|
||||||
rhoName_(ptf.rhoName_)
|
rhoName_(ptf.rhoName_)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
Foam::
|
Foam::
|
||||||
massFlowRateInletVelocityFvPatchVectorField::
|
flowRateInletVelocityFvPatchVectorField::
|
||||||
massFlowRateInletVelocityFvPatchVectorField
|
flowRateInletVelocityFvPatchVectorField
|
||||||
(
|
(
|
||||||
const fvPatch& p,
|
const fvPatch& p,
|
||||||
const DimensionedField<vector, volMesh>& iF,
|
const DimensionedField<vector, volMesh>& iF,
|
||||||
@ -72,7 +74,7 @@ massFlowRateInletVelocityFvPatchVectorField
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedValueFvPatchField<vector>(p, iF, dict),
|
fixedValueFvPatchField<vector>(p, iF, dict),
|
||||||
massFlowRate_(readScalar(dict.lookup("massFlowRate"))),
|
flowRate_(readScalar(dict.lookup("flowRate"))),
|
||||||
phiName_("phi"),
|
phiName_("phi"),
|
||||||
rhoName_("rho")
|
rhoName_("rho")
|
||||||
{
|
{
|
||||||
@ -87,29 +89,31 @@ massFlowRateInletVelocityFvPatchVectorField
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::
|
Foam::
|
||||||
massFlowRateInletVelocityFvPatchVectorField::
|
flowRateInletVelocityFvPatchVectorField::
|
||||||
massFlowRateInletVelocityFvPatchVectorField
|
flowRateInletVelocityFvPatchVectorField
|
||||||
(
|
(
|
||||||
const massFlowRateInletVelocityFvPatchVectorField& ptf
|
const flowRateInletVelocityFvPatchVectorField& ptf
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedValueFvPatchField<vector>(ptf),
|
fixedValueFvPatchField<vector>(ptf),
|
||||||
massFlowRate_(ptf.massFlowRate_),
|
flowRate_(ptf.flowRate_),
|
||||||
phiName_(ptf.phiName_),
|
phiName_(ptf.phiName_),
|
||||||
rhoName_(ptf.rhoName_)
|
rhoName_(ptf.rhoName_)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
Foam::
|
Foam::
|
||||||
massFlowRateInletVelocityFvPatchVectorField::
|
flowRateInletVelocityFvPatchVectorField::
|
||||||
massFlowRateInletVelocityFvPatchVectorField
|
flowRateInletVelocityFvPatchVectorField
|
||||||
(
|
(
|
||||||
const massFlowRateInletVelocityFvPatchVectorField& ptf,
|
const flowRateInletVelocityFvPatchVectorField& ptf,
|
||||||
const DimensionedField<vector, volMesh>& iF
|
const DimensionedField<vector, volMesh>& iF
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedValueFvPatchField<vector>(ptf, iF),
|
fixedValueFvPatchField<vector>(ptf, iF),
|
||||||
massFlowRate_(ptf.massFlowRate_),
|
flowRate_(ptf.flowRate_),
|
||||||
phiName_(ptf.phiName_),
|
phiName_(ptf.phiName_),
|
||||||
rhoName_(ptf.rhoName_)
|
rhoName_(ptf.rhoName_)
|
||||||
{}
|
{}
|
||||||
@ -117,7 +121,7 @@ massFlowRateInletVelocityFvPatchVectorField
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void Foam::massFlowRateInletVelocityFvPatchVectorField::updateCoeffs()
|
void Foam::flowRateInletVelocityFvPatchVectorField::updateCoeffs()
|
||||||
{
|
{
|
||||||
if (updated())
|
if (updated())
|
||||||
{
|
{
|
||||||
@ -125,7 +129,7 @@ void Foam::massFlowRateInletVelocityFvPatchVectorField::updateCoeffs()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// a simpler way of doing this would be nice
|
// a simpler way of doing this would be nice
|
||||||
scalar avgU = -massFlowRate_/gSum(patch().magSf());
|
scalar avgU = -flowRate_/gSum(patch().magSf());
|
||||||
|
|
||||||
vectorField n = patch().nf();
|
vectorField n = patch().nf();
|
||||||
|
|
||||||
@ -151,23 +155,23 @@ void Foam::massFlowRateInletVelocityFvPatchVectorField::updateCoeffs()
|
|||||||
{
|
{
|
||||||
FatalErrorIn
|
FatalErrorIn
|
||||||
(
|
(
|
||||||
"massFlowRateInletVelocityFvPatchVectorField::updateCoeffs()"
|
"flowRateInletVelocityFvPatchVectorField::updateCoeffs()"
|
||||||
) << "dimensions of phi are incorrect"
|
) << "dimensions of phi are incorrect"
|
||||||
<< "\n on patch " << this->patch().name()
|
<< "\n on patch " << this->patch().name()
|
||||||
<< " of field " << this->dimensionedInternalField().name()
|
<< " of field " << this->dimensionedInternalField().name()
|
||||||
<< " in file " << this->dimensionedInternalField().objectPath()
|
<< " in file " << this->dimensionedInternalField().objectPath()
|
||||||
<< exit(FatalError);
|
<< nl << exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
fixedValueFvPatchField<vector>::updateCoeffs();
|
fixedValueFvPatchField<vector>::updateCoeffs();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::massFlowRateInletVelocityFvPatchVectorField::write(Ostream& os) const
|
void Foam::flowRateInletVelocityFvPatchVectorField::write(Ostream& os) const
|
||||||
{
|
{
|
||||||
fvPatchField<vector>::write(os);
|
fvPatchField<vector>::write(os);
|
||||||
|
|
||||||
os.writeKeyword("massFlowRate") << massFlowRate_
|
os.writeKeyword("flowRate") << flowRate_
|
||||||
<< token::END_STATEMENT << nl;
|
<< token::END_STATEMENT << nl;
|
||||||
|
|
||||||
if (phiName_ != "phi")
|
if (phiName_ != "phi")
|
||||||
@ -191,7 +195,7 @@ namespace Foam
|
|||||||
makePatchTypeField
|
makePatchTypeField
|
||||||
(
|
(
|
||||||
fvPatchVectorField,
|
fvPatchVectorField,
|
||||||
massFlowRateInletVelocityFvPatchVectorField
|
flowRateInletVelocityFvPatchVectorField
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -23,19 +23,22 @@ License
|
|||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::massFlowRateInletVelocityFvPatchVectorField
|
Foam::flowRateInletVelocityFvPatchVectorField
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Describes an massflow normal vector boundary condition by its magnitude
|
Describes an volumetric/mass flow normal vector boundary condition by its
|
||||||
as an integral over its area.
|
magnitude as an integral over its area.
|
||||||
The current density is used to correct the velocity.
|
The basis of the patch (volumetric or mass) is determined by the
|
||||||
|
dimensions of the flux, phi.
|
||||||
|
The current density is used to correct the velocity when applying the mass
|
||||||
|
basis.
|
||||||
|
|
||||||
Example of the boundary condition specification:
|
Example of the boundary condition specification:
|
||||||
@verbatim
|
@verbatim
|
||||||
inlet
|
inlet
|
||||||
{
|
{
|
||||||
type massFlowRateInletVelocity;
|
type flowRateInletVelocity;
|
||||||
massFlowRate 0.2; // Mass flow rate [kg/s]
|
flowRate 0.2; // Volumetric/mass flow rate [m3/s or kg/s]
|
||||||
value uniform (0 0 0); // placeholder
|
value uniform (0 0 0); // placeholder
|
||||||
}
|
}
|
||||||
@endverbatim
|
@endverbatim
|
||||||
@ -46,12 +49,12 @@ Note
|
|||||||
- Strange behaviour with potentialFoam since the U equation is not solved
|
- Strange behaviour with potentialFoam since the U equation is not solved
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
massFlowRateInletVelocityFvPatchVectorField.C
|
flowRateInletVelocityFvPatchVectorField.C
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef massFlowRateInletVelocityFvPatchVectorField_H
|
#ifndef flowRateInletVelocityFvPatchVectorField_H
|
||||||
#define massFlowRateInletVelocityFvPatchVectorField_H
|
#define flowRateInletVelocityFvPatchVectorField_H
|
||||||
|
|
||||||
#include "fixedValueFvPatchFields.H"
|
#include "fixedValueFvPatchFields.H"
|
||||||
|
|
||||||
@ -60,17 +63,17 @@ SourceFiles
|
|||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class massFlowRateInletVelocityFvPatch Declaration
|
Class flowRateInletVelocityFvPatch Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class massFlowRateInletVelocityFvPatchVectorField
|
class flowRateInletVelocityFvPatchVectorField
|
||||||
:
|
:
|
||||||
public fixedValueFvPatchVectorField
|
public fixedValueFvPatchVectorField
|
||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
//- Inlet integral mass flow rate
|
//- Inlet integral flow rate
|
||||||
scalar massFlowRate_;
|
scalar flowRate_;
|
||||||
|
|
||||||
//- Name of the flux transporting the field
|
//- Name of the flux transporting the field
|
||||||
word phiName_;
|
word phiName_;
|
||||||
@ -82,20 +85,20 @@ class massFlowRateInletVelocityFvPatchVectorField
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
//- Runtime type information
|
//- Runtime type information
|
||||||
TypeName("massFlowRateInletVelocity");
|
TypeName("flowRateInletVelocity");
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from patch and internal field
|
//- Construct from patch and internal field
|
||||||
massFlowRateInletVelocityFvPatchVectorField
|
flowRateInletVelocityFvPatchVectorField
|
||||||
(
|
(
|
||||||
const fvPatch&,
|
const fvPatch&,
|
||||||
const DimensionedField<vector, volMesh>&
|
const DimensionedField<vector, volMesh>&
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Construct from patch, internal field and dictionary
|
//- Construct from patch, internal field and dictionary
|
||||||
massFlowRateInletVelocityFvPatchVectorField
|
flowRateInletVelocityFvPatchVectorField
|
||||||
(
|
(
|
||||||
const fvPatch&,
|
const fvPatch&,
|
||||||
const DimensionedField<vector, volMesh>&,
|
const DimensionedField<vector, volMesh>&,
|
||||||
@ -103,20 +106,20 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
//- Construct by mapping given
|
//- Construct by mapping given
|
||||||
// massFlowRateInletVelocityFvPatchVectorField
|
// flowRateInletVelocityFvPatchVectorField
|
||||||
// onto a new patch
|
// onto a new patch
|
||||||
massFlowRateInletVelocityFvPatchVectorField
|
flowRateInletVelocityFvPatchVectorField
|
||||||
(
|
(
|
||||||
const massFlowRateInletVelocityFvPatchVectorField&,
|
const flowRateInletVelocityFvPatchVectorField&,
|
||||||
const fvPatch&,
|
const fvPatch&,
|
||||||
const DimensionedField<vector, volMesh>&,
|
const DimensionedField<vector, volMesh>&,
|
||||||
const fvPatchFieldMapper&
|
const fvPatchFieldMapper&
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Construct as copy
|
//- Construct as copy
|
||||||
massFlowRateInletVelocityFvPatchVectorField
|
flowRateInletVelocityFvPatchVectorField
|
||||||
(
|
(
|
||||||
const massFlowRateInletVelocityFvPatchVectorField&
|
const flowRateInletVelocityFvPatchVectorField&
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Construct and return a clone
|
//- Construct and return a clone
|
||||||
@ -124,14 +127,14 @@ public:
|
|||||||
{
|
{
|
||||||
return tmp<fvPatchVectorField>
|
return tmp<fvPatchVectorField>
|
||||||
(
|
(
|
||||||
new massFlowRateInletVelocityFvPatchVectorField(*this)
|
new flowRateInletVelocityFvPatchVectorField(*this)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Construct as copy setting internal field reference
|
//- Construct as copy setting internal field reference
|
||||||
massFlowRateInletVelocityFvPatchVectorField
|
flowRateInletVelocityFvPatchVectorField
|
||||||
(
|
(
|
||||||
const massFlowRateInletVelocityFvPatchVectorField&,
|
const flowRateInletVelocityFvPatchVectorField&,
|
||||||
const DimensionedField<vector, volMesh>&
|
const DimensionedField<vector, volMesh>&
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -143,7 +146,7 @@ public:
|
|||||||
{
|
{
|
||||||
return tmp<fvPatchVectorField>
|
return tmp<fvPatchVectorField>
|
||||||
(
|
(
|
||||||
new massFlowRateInletVelocityFvPatchVectorField(*this, iF)
|
new flowRateInletVelocityFvPatchVectorField(*this, iF)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -152,16 +155,16 @@ public:
|
|||||||
|
|
||||||
// Access
|
// Access
|
||||||
|
|
||||||
//- Return the mass flux
|
//- Return the flux
|
||||||
scalar massFlowRate() const
|
scalar flowRate() const
|
||||||
{
|
{
|
||||||
return massFlowRate_;
|
return flowRate_;
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Return reference to the mass flux to allow adjustment
|
//- Return reference to the flux to allow adjustment
|
||||||
scalar& massFlowRate()
|
scalar& flowRate()
|
||||||
{
|
{
|
||||||
return massFlowRate_;
|
return flowRate_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,141 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2006-2008 OpenCFD Ltd.
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by the
|
||||||
|
Free Software Foundation; either version 2 of the License, or (at your
|
||||||
|
option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "timeVaryingFlowRateInletVelocityFvPatchVectorField.H"
|
||||||
|
#include "volFields.H"
|
||||||
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
#include "fvPatchFieldMapper.H"
|
||||||
|
#include "surfaceFields.H"
|
||||||
|
#include "Time.H"
|
||||||
|
#include "IFstream.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::
|
||||||
|
timeVaryingFlowRateInletVelocityFvPatchVectorField::
|
||||||
|
timeVaryingFlowRateInletVelocityFvPatchVectorField
|
||||||
|
(
|
||||||
|
const fvPatch& p,
|
||||||
|
const DimensionedField<vector, volMesh>& iF
|
||||||
|
)
|
||||||
|
:
|
||||||
|
flowRateInletVelocityFvPatchVectorField(p, iF),
|
||||||
|
timeSeries_()
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
Foam::
|
||||||
|
timeVaryingFlowRateInletVelocityFvPatchVectorField::
|
||||||
|
timeVaryingFlowRateInletVelocityFvPatchVectorField
|
||||||
|
(
|
||||||
|
const timeVaryingFlowRateInletVelocityFvPatchVectorField& ptf,
|
||||||
|
const fvPatch& p,
|
||||||
|
const DimensionedField<vector, volMesh>& iF,
|
||||||
|
const fvPatchFieldMapper& mapper
|
||||||
|
)
|
||||||
|
:
|
||||||
|
flowRateInletVelocityFvPatchVectorField(ptf, p, iF, mapper),
|
||||||
|
timeSeries_(ptf.timeSeries_)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
Foam::
|
||||||
|
timeVaryingFlowRateInletVelocityFvPatchVectorField::
|
||||||
|
timeVaryingFlowRateInletVelocityFvPatchVectorField
|
||||||
|
(
|
||||||
|
const fvPatch& p,
|
||||||
|
const DimensionedField<vector, volMesh>& iF,
|
||||||
|
const dictionary& dict
|
||||||
|
)
|
||||||
|
:
|
||||||
|
flowRateInletVelocityFvPatchVectorField(p, iF, dict),
|
||||||
|
timeSeries_(this->db(), dict)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
Foam::
|
||||||
|
timeVaryingFlowRateInletVelocityFvPatchVectorField::
|
||||||
|
timeVaryingFlowRateInletVelocityFvPatchVectorField
|
||||||
|
(
|
||||||
|
const timeVaryingFlowRateInletVelocityFvPatchVectorField& ptf
|
||||||
|
)
|
||||||
|
:
|
||||||
|
flowRateInletVelocityFvPatchVectorField(ptf),
|
||||||
|
timeSeries_(ptf.timeSeries_)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
Foam::
|
||||||
|
timeVaryingFlowRateInletVelocityFvPatchVectorField::
|
||||||
|
timeVaryingFlowRateInletVelocityFvPatchVectorField
|
||||||
|
(
|
||||||
|
const timeVaryingFlowRateInletVelocityFvPatchVectorField& ptf,
|
||||||
|
const DimensionedField<vector, volMesh>& iF
|
||||||
|
)
|
||||||
|
:
|
||||||
|
flowRateInletVelocityFvPatchVectorField(ptf, iF),
|
||||||
|
timeSeries_(ptf.timeSeries_)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
void Foam::
|
||||||
|
timeVaryingFlowRateInletVelocityFvPatchVectorField::
|
||||||
|
updateCoeffs()
|
||||||
|
{
|
||||||
|
if (updated())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
flowRate() = timeSeries_(this->db().time().timeOutputValue());
|
||||||
|
flowRateInletVelocityFvPatchVectorField::updateCoeffs();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Foam::
|
||||||
|
timeVaryingFlowRateInletVelocityFvPatchVectorField::
|
||||||
|
write(Ostream& os) const
|
||||||
|
{
|
||||||
|
flowRateInletVelocityFvPatchVectorField::write(os);
|
||||||
|
timeSeries_.write(os);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
makePatchTypeField
|
||||||
|
(
|
||||||
|
fvPatchVectorField,
|
||||||
|
timeVaryingFlowRateInletVelocityFvPatchVectorField
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -23,20 +23,20 @@ License
|
|||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::timeVaryingMassFlowRateInletVelocityFvPatchVectorField
|
Foam::timeVaryingFlowRateInletVelocityFvPatchVectorField
|
||||||
|
|
||||||
Description
|
Description
|
||||||
A time-varying form of a massflow normal vector boundary condition.
|
A time-varying form of a flow normal vector boundary condition.
|
||||||
|
|
||||||
Example of the boundary condition specification:
|
Example of the boundary condition specification:
|
||||||
@verbatim
|
@verbatim
|
||||||
inlet
|
inlet
|
||||||
{
|
{
|
||||||
type timeVaryingMassFlowRateInletVelocity;
|
type timeVaryingFlowRateInletVelocity;
|
||||||
massFlowRate 0.2; // Massflow rate [kg/s]
|
flowRate 0.2; // Volumetric/mass flow rate [m3/s or kg/s]
|
||||||
value uniform (0 0 0); // placeholder
|
value uniform (0 0 0); // placeholder
|
||||||
timeDataFile "time-series";
|
fileName "time-series";
|
||||||
timeBounding repeat; // (error|warn|clamp|repeat)
|
boundAction repeat; // (error|warn|clamp|repeat)
|
||||||
}
|
}
|
||||||
@endverbatim
|
@endverbatim
|
||||||
|
|
||||||
@ -46,58 +46,54 @@ Note
|
|||||||
- strange behaviour with potentialFoam since the U equation is not solved
|
- strange behaviour with potentialFoam since the U equation is not solved
|
||||||
|
|
||||||
See Also
|
See Also
|
||||||
Foam::timeSeries and Foam::massFlowRateInletVelocityFvPatchVectorField
|
Foam::timeSeries and Foam::flowRateInletVelocityFvPatchVectorField
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
timeVaryingMassFlowRateInletVelocityFvPatchVectorField.C
|
timeVaryingFlowRateInletVelocityFvPatchVectorField.C
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef timeVaryingMassFlowRateInletVelocityFvPatchVectorField_H
|
#ifndef timeVaryingFlowRateInletVelocityFvPatchVectorField_H
|
||||||
#define timeVaryingMassFlowRateInletVelocityFvPatchVectorField_H
|
#define timeVaryingFlowRateInletVelocityFvPatchVectorField_H
|
||||||
|
|
||||||
|
#include "flowRateInletVelocityFvPatchVectorField.H"
|
||||||
|
#include "interpolationTable.H"
|
||||||
|
|
||||||
#include "massFlowRateInletVelocityFvPatchVectorField.H"
|
|
||||||
#include "timeSeries.H"
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class timeVaryingMassFlowRateInletVelocityFvPatch Declaration
|
Class timeVaryingFlowRateInletVelocityFvPatch Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class timeVaryingMassFlowRateInletVelocityFvPatchVectorField
|
class timeVaryingFlowRateInletVelocityFvPatchVectorField
|
||||||
:
|
:
|
||||||
public massFlowRateInletVelocityFvPatchVectorField
|
public flowRateInletVelocityFvPatchVectorField
|
||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
//- file containing time/massFlowRate
|
|
||||||
fileName timeDataFile_;
|
|
||||||
|
|
||||||
//- the time series being used, including the bounding treatment
|
//- the time series being used, including the bounding treatment
|
||||||
timeSeries<scalar> timeSeries_;
|
interpolationTable<scalar> timeSeries_;
|
||||||
|
|
||||||
//- interpolate the value at the current time
|
|
||||||
scalar currentValue();
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
//- Runtime type information
|
//- Runtime type information
|
||||||
TypeName("timeVaryingMassFlowRateInletVelocity");
|
TypeName("timeVaryingFlowRateInletVelocity");
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from patch and internal field
|
//- Construct from patch and internal field
|
||||||
timeVaryingMassFlowRateInletVelocityFvPatchVectorField
|
timeVaryingFlowRateInletVelocityFvPatchVectorField
|
||||||
(
|
(
|
||||||
const fvPatch&,
|
const fvPatch&,
|
||||||
const DimensionedField<vector, volMesh>&
|
const DimensionedField<vector, volMesh>&
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Construct from patch, internal field and dictionary
|
//- Construct from patch, internal field and dictionary
|
||||||
timeVaryingMassFlowRateInletVelocityFvPatchVectorField
|
timeVaryingFlowRateInletVelocityFvPatchVectorField
|
||||||
(
|
(
|
||||||
const fvPatch&,
|
const fvPatch&,
|
||||||
const DimensionedField<vector, volMesh>&,
|
const DimensionedField<vector, volMesh>&,
|
||||||
@ -105,18 +101,18 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
//- Construct by mapping given patch field onto a new patch
|
//- Construct by mapping given patch field onto a new patch
|
||||||
timeVaryingMassFlowRateInletVelocityFvPatchVectorField
|
timeVaryingFlowRateInletVelocityFvPatchVectorField
|
||||||
(
|
(
|
||||||
const timeVaryingMassFlowRateInletVelocityFvPatchVectorField&,
|
const timeVaryingFlowRateInletVelocityFvPatchVectorField&,
|
||||||
const fvPatch&,
|
const fvPatch&,
|
||||||
const DimensionedField<vector, volMesh>&,
|
const DimensionedField<vector, volMesh>&,
|
||||||
const fvPatchFieldMapper&
|
const fvPatchFieldMapper&
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Construct as copy
|
//- Construct as copy
|
||||||
timeVaryingMassFlowRateInletVelocityFvPatchVectorField
|
timeVaryingFlowRateInletVelocityFvPatchVectorField
|
||||||
(
|
(
|
||||||
const timeVaryingMassFlowRateInletVelocityFvPatchVectorField&
|
const timeVaryingFlowRateInletVelocityFvPatchVectorField&
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Construct and return a clone
|
//- Construct and return a clone
|
||||||
@ -124,14 +120,14 @@ public:
|
|||||||
{
|
{
|
||||||
return tmp<fvPatchVectorField>
|
return tmp<fvPatchVectorField>
|
||||||
(
|
(
|
||||||
new timeVaryingMassFlowRateInletVelocityFvPatchVectorField(*this)
|
new timeVaryingFlowRateInletVelocityFvPatchVectorField(*this)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Construct as copy setting internal field reference
|
//- Construct as copy setting internal field reference
|
||||||
timeVaryingMassFlowRateInletVelocityFvPatchVectorField
|
timeVaryingFlowRateInletVelocityFvPatchVectorField
|
||||||
(
|
(
|
||||||
const timeVaryingMassFlowRateInletVelocityFvPatchVectorField&,
|
const timeVaryingFlowRateInletVelocityFvPatchVectorField&,
|
||||||
const DimensionedField<vector, volMesh>&
|
const DimensionedField<vector, volMesh>&
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -143,34 +139,34 @@ public:
|
|||||||
{
|
{
|
||||||
return tmp<fvPatchVectorField>
|
return tmp<fvPatchVectorField>
|
||||||
(
|
(
|
||||||
new timeVaryingMassFlowRateInletVelocityFvPatchVectorField(*this, iF)
|
new timeVaryingFlowRateInletVelocityFvPatchVectorField
|
||||||
|
(
|
||||||
|
*this,
|
||||||
|
iF
|
||||||
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Member functions
|
// Member functions
|
||||||
|
|
||||||
// Access
|
// Access
|
||||||
|
|
||||||
//- Return the out-of-bounds treatment as a word
|
|
||||||
word timeBounding() const
|
|
||||||
{
|
|
||||||
return timeSeries_.bounding();
|
|
||||||
}
|
|
||||||
|
|
||||||
//- Return the time series used
|
//- Return the time series used
|
||||||
const timeSeries<scalar>& timeData() const
|
const interpolationTable<scalar>& timeSeries() const
|
||||||
{
|
{
|
||||||
return timeSeries_;
|
return timeSeries_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Evaluation functions
|
// Evaluation functions
|
||||||
|
|
||||||
//- Update the coefficients associated with the patch field
|
//- Update the coefficients associated with the patch field
|
||||||
virtual void updateCoeffs();
|
virtual void updateCoeffs();
|
||||||
|
|
||||||
|
|
||||||
//- Write
|
//- Write
|
||||||
virtual void write(Ostream&) const;
|
virtual void write(Ostream&) const;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -1,200 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | Copyright (C) 2006-2008 OpenCFD Ltd.
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by the
|
|
||||||
Free Software Foundation; either version 2 of the License, or (at your
|
|
||||||
option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#include "timeVaryingMassFlowRateInletVelocityFvPatchVectorField.H"
|
|
||||||
#include "volFields.H"
|
|
||||||
#include "addToRunTimeSelectionTable.H"
|
|
||||||
#include "fvPatchFieldMapper.H"
|
|
||||||
#include "surfaceFields.H"
|
|
||||||
#include "Time.H"
|
|
||||||
#include "IFstream.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::
|
|
||||||
timeVaryingMassFlowRateInletVelocityFvPatchVectorField::
|
|
||||||
timeVaryingMassFlowRateInletVelocityFvPatchVectorField
|
|
||||||
(
|
|
||||||
const fvPatch& p,
|
|
||||||
const DimensionedField<vector, volMesh>& iF
|
|
||||||
)
|
|
||||||
:
|
|
||||||
massFlowRateInletVelocityFvPatchVectorField(p, iF)
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
Foam::
|
|
||||||
timeVaryingMassFlowRateInletVelocityFvPatchVectorField::
|
|
||||||
timeVaryingMassFlowRateInletVelocityFvPatchVectorField
|
|
||||||
(
|
|
||||||
const timeVaryingMassFlowRateInletVelocityFvPatchVectorField& ptf,
|
|
||||||
const fvPatch& p,
|
|
||||||
const DimensionedField<vector, volMesh>& iF,
|
|
||||||
const fvPatchFieldMapper& mapper
|
|
||||||
)
|
|
||||||
:
|
|
||||||
massFlowRateInletVelocityFvPatchVectorField(ptf, p, iF, mapper),
|
|
||||||
timeDataFile_(ptf.timeDataFile_),
|
|
||||||
timeSeries_(ptf.timeBounding())
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
Foam::
|
|
||||||
timeVaryingMassFlowRateInletVelocityFvPatchVectorField::
|
|
||||||
timeVaryingMassFlowRateInletVelocityFvPatchVectorField
|
|
||||||
(
|
|
||||||
const fvPatch& p,
|
|
||||||
const DimensionedField<vector, volMesh>& iF,
|
|
||||||
const dictionary& dict
|
|
||||||
)
|
|
||||||
:
|
|
||||||
massFlowRateInletVelocityFvPatchVectorField(p, iF, dict),
|
|
||||||
timeDataFile_(dict.lookup("timeDataFile")),
|
|
||||||
timeSeries_(word(dict.lookup("timeBounding")))
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
Foam::
|
|
||||||
timeVaryingMassFlowRateInletVelocityFvPatchVectorField::
|
|
||||||
timeVaryingMassFlowRateInletVelocityFvPatchVectorField
|
|
||||||
(
|
|
||||||
const timeVaryingMassFlowRateInletVelocityFvPatchVectorField& ptf
|
|
||||||
)
|
|
||||||
:
|
|
||||||
massFlowRateInletVelocityFvPatchVectorField(ptf),
|
|
||||||
timeDataFile_(ptf.timeDataFile_),
|
|
||||||
timeSeries_(ptf.timeBounding())
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
Foam::
|
|
||||||
timeVaryingMassFlowRateInletVelocityFvPatchVectorField::
|
|
||||||
timeVaryingMassFlowRateInletVelocityFvPatchVectorField
|
|
||||||
(
|
|
||||||
const timeVaryingMassFlowRateInletVelocityFvPatchVectorField& ptf,
|
|
||||||
const DimensionedField<vector, volMesh>& iF
|
|
||||||
)
|
|
||||||
:
|
|
||||||
massFlowRateInletVelocityFvPatchVectorField(ptf, iF),
|
|
||||||
timeDataFile_(ptf.timeDataFile_),
|
|
||||||
timeSeries_(ptf.timeBounding())
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::scalar
|
|
||||||
Foam::timeVaryingMassFlowRateInletVelocityFvPatchVectorField::
|
|
||||||
currentValue()
|
|
||||||
{
|
|
||||||
if (timeSeries_.size() == 0)
|
|
||||||
{
|
|
||||||
fileName fName(timeDataFile_);
|
|
||||||
fName.expand();
|
|
||||||
|
|
||||||
if (fName.size() == 0)
|
|
||||||
{
|
|
||||||
FatalErrorIn
|
|
||||||
(
|
|
||||||
"timeVaryingMassFlowRateInletVelocity"
|
|
||||||
"::currentValue()"
|
|
||||||
) << "timeDataFile not specified for Patch "
|
|
||||||
<< this->patch().name()
|
|
||||||
<< exit(FatalError);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// relative path
|
|
||||||
if (fName[0] != '/')
|
|
||||||
{
|
|
||||||
fName = this->db().path()/fName;
|
|
||||||
}
|
|
||||||
|
|
||||||
// just in case we change the interface to timeSeries
|
|
||||||
word boundType = timeBounding();
|
|
||||||
|
|
||||||
IFstream(fName)() >> timeSeries_;
|
|
||||||
timeSeries_.bounding(boundType);
|
|
||||||
|
|
||||||
// be a bit paranoid and check that the list is okay
|
|
||||||
timeSeries_.check();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (timeSeries_.size() == 0)
|
|
||||||
{
|
|
||||||
FatalErrorIn
|
|
||||||
(
|
|
||||||
"timeVaryingMassFlowRateInletVelocity"
|
|
||||||
"::currentValue()"
|
|
||||||
) << "empty time series for Patch "
|
|
||||||
<< this->patch().name()
|
|
||||||
<< exit(FatalError);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return timeSeries_(this->db().time().timeOutputValue());
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Foam::
|
|
||||||
timeVaryingMassFlowRateInletVelocityFvPatchVectorField::
|
|
||||||
updateCoeffs()
|
|
||||||
{
|
|
||||||
if (updated())
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
massFlowRate() = currentValue();
|
|
||||||
massFlowRateInletVelocityFvPatchVectorField::updateCoeffs();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Foam::
|
|
||||||
timeVaryingMassFlowRateInletVelocityFvPatchVectorField::
|
|
||||||
write(Ostream& os) const
|
|
||||||
{
|
|
||||||
massFlowRateInletVelocityFvPatchVectorField::write(os);
|
|
||||||
os.writeKeyword("timeDataFile")
|
|
||||||
<< timeDataFile_ << token::END_STATEMENT << nl;
|
|
||||||
os.writeKeyword("timeBounding")
|
|
||||||
<< timeBounding() << token::END_STATEMENT << nl;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
makePatchTypeField
|
|
||||||
(
|
|
||||||
fvPatchVectorField,
|
|
||||||
timeVaryingMassFlowRateInletVelocityFvPatchVectorField
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -38,7 +38,8 @@ timeVaryingUniformFixedValueFvPatchField
|
|||||||
const DimensionedField<Type, volMesh>& iF
|
const DimensionedField<Type, volMesh>& iF
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedValueFvPatchField<Type>(p, iF)
|
fixedValueFvPatchField<Type>(p, iF),
|
||||||
|
timeSeries_()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -52,8 +53,7 @@ timeVaryingUniformFixedValueFvPatchField
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedValueFvPatchField<Type>(p, iF),
|
fixedValueFvPatchField<Type>(p, iF),
|
||||||
timeDataFile_(dict.lookup("timeDataFile")),
|
timeSeries_(this->db(), dict)
|
||||||
timeSeries_(word(dict.lookup("timeBounding")))
|
|
||||||
{
|
{
|
||||||
if (dict.found("value"))
|
if (dict.found("value"))
|
||||||
{
|
{
|
||||||
@ -77,8 +77,7 @@ timeVaryingUniformFixedValueFvPatchField
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedValueFvPatchField<Type>(ptf, p, iF, mapper),
|
fixedValueFvPatchField<Type>(ptf, p, iF, mapper),
|
||||||
timeDataFile_(ptf.timeDataFile_),
|
timeSeries_(ptf.timeSeries_)
|
||||||
timeSeries_(ptf.timeBounding())
|
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -90,8 +89,7 @@ timeVaryingUniformFixedValueFvPatchField
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedValueFvPatchField<Type>(ptf),
|
fixedValueFvPatchField<Type>(ptf),
|
||||||
timeDataFile_(ptf.timeDataFile_),
|
timeSeries_(ptf.timeSeries_)
|
||||||
timeSeries_(ptf.timeBounding())
|
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -104,66 +102,12 @@ timeVaryingUniformFixedValueFvPatchField
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedValueFvPatchField<Type>(ptf, iF),
|
fixedValueFvPatchField<Type>(ptf, iF),
|
||||||
timeDataFile_(ptf.timeDataFile_),
|
timeSeries_(ptf.timeSeries_)
|
||||||
timeSeries_(ptf.timeBounding())
|
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
|
||||||
Type Foam::timeVaryingUniformFixedValueFvPatchField<Type>::
|
|
||||||
currentValue()
|
|
||||||
{
|
|
||||||
if (timeSeries_.size() == 0)
|
|
||||||
{
|
|
||||||
fileName fName(timeDataFile_);
|
|
||||||
fName.expand();
|
|
||||||
|
|
||||||
if (fName.size() == 0)
|
|
||||||
{
|
|
||||||
FatalErrorIn
|
|
||||||
(
|
|
||||||
"timeVaryingUniformFixedValueFvPatchField"
|
|
||||||
"::currentValue()"
|
|
||||||
) << "timeDataFile not specified for Patch "
|
|
||||||
<< this->patch().name()
|
|
||||||
<< exit(FatalError);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// relative path
|
|
||||||
if (fName[0] != '/')
|
|
||||||
{
|
|
||||||
fName = this->db().path()/fName;
|
|
||||||
}
|
|
||||||
|
|
||||||
// just in case we change the interface to timeSeries
|
|
||||||
word boundType = timeBounding();
|
|
||||||
|
|
||||||
IFstream(fName)() >> timeSeries_;
|
|
||||||
timeSeries_.bounding(boundType);
|
|
||||||
|
|
||||||
// be a bit paranoid and check that the list is okay
|
|
||||||
timeSeries_.check();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (timeSeries_.size() == 0)
|
|
||||||
{
|
|
||||||
FatalErrorIn
|
|
||||||
(
|
|
||||||
"timeVaryingUniformFixedValueFvPatchField"
|
|
||||||
"::currentValue()"
|
|
||||||
) << "empty time series for Patch "
|
|
||||||
<< this->patch().name()
|
|
||||||
<< exit(FatalError);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return timeSeries_(this->db().time().timeOutputValue());
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void Foam::timeVaryingUniformFixedValueFvPatchField<Type>::updateCoeffs()
|
void Foam::timeVaryingUniformFixedValueFvPatchField<Type>::updateCoeffs()
|
||||||
{
|
{
|
||||||
@ -172,7 +116,10 @@ void Foam::timeVaryingUniformFixedValueFvPatchField<Type>::updateCoeffs()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
fvPatchField<Type>::operator==(currentValue());
|
fvPatchField<Type>::operator==
|
||||||
|
(
|
||||||
|
timeSeries_(this->db().time().timeOutputValue())
|
||||||
|
);
|
||||||
fixedValueFvPatchField<Type>::updateCoeffs();
|
fixedValueFvPatchField<Type>::updateCoeffs();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -184,10 +131,7 @@ void Foam::timeVaryingUniformFixedValueFvPatchField<Type>::write
|
|||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
fvPatchField<Type>::write(os);
|
fvPatchField<Type>::write(os);
|
||||||
os.writeKeyword("timeDataFile")
|
timeSeries_.write(os);
|
||||||
<< timeDataFile_ << token::END_STATEMENT << nl;
|
|
||||||
os.writeKeyword("timeBounding")
|
|
||||||
<< timeBounding() << token::END_STATEMENT << nl;
|
|
||||||
this->writeEntry("value", os);
|
this->writeEntry("value", os);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -33,8 +33,8 @@ Description
|
|||||||
inlet
|
inlet
|
||||||
{
|
{
|
||||||
type timeVaryingUniformFixedValue;
|
type timeVaryingUniformFixedValue;
|
||||||
timeDataFile "time-series";
|
fileName "time-series";
|
||||||
timeBounding clamp; // (error|warn|clamp|repeat)
|
boundAction clamp; // (error|warn|clamp|repeat)
|
||||||
}
|
}
|
||||||
@endverbatim
|
@endverbatim
|
||||||
|
|
||||||
@ -54,7 +54,7 @@ SourceFiles
|
|||||||
#define timeVaryingUniformFixedValueFvPatchField_H
|
#define timeVaryingUniformFixedValueFvPatchField_H
|
||||||
|
|
||||||
#include "fixedValueFvPatchField.H"
|
#include "fixedValueFvPatchField.H"
|
||||||
#include "timeSeries.H"
|
#include "interpolationTable.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -72,14 +72,8 @@ class timeVaryingUniformFixedValueFvPatchField
|
|||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
//- File containing time/uniformFixedValue
|
|
||||||
fileName timeDataFile_;
|
|
||||||
|
|
||||||
//- The time series being used, including the bounding treatment
|
//- The time series being used, including the bounding treatment
|
||||||
timeSeries<Type> timeSeries_;
|
interpolationTable<Type> timeSeries_;
|
||||||
|
|
||||||
//- Interpolate the value at the current time
|
|
||||||
Type currentValue();
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -153,14 +147,8 @@ public:
|
|||||||
|
|
||||||
// Access
|
// Access
|
||||||
|
|
||||||
//- Return the out-of-bounds treatment as a word
|
|
||||||
word timeBounding() const
|
|
||||||
{
|
|
||||||
return timeSeries_.bounding();
|
|
||||||
}
|
|
||||||
|
|
||||||
//- Return the time series used
|
//- Return the time series used
|
||||||
const timeSeries<Type>& timeData() const
|
const interpolationTable<Type>& timeSeries() const
|
||||||
{
|
{
|
||||||
return timeSeries_;
|
return timeSeries_;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -46,8 +46,8 @@ timeVaryingUniformTotalPressureFvPatchScalarField
|
|||||||
rhoName_("undefined"),
|
rhoName_("undefined"),
|
||||||
psiName_("undefined"),
|
psiName_("undefined"),
|
||||||
gamma_(0.0),
|
gamma_(0.0),
|
||||||
p0_(0.0)
|
p0_(0.0),
|
||||||
|
totalPressureTimeSeries_()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -66,8 +66,7 @@ timeVaryingUniformTotalPressureFvPatchScalarField
|
|||||||
psiName_(dict.lookup("psi")),
|
psiName_(dict.lookup("psi")),
|
||||||
gamma_(readScalar(dict.lookup("gamma"))),
|
gamma_(readScalar(dict.lookup("gamma"))),
|
||||||
p0_(readScalar(dict.lookup("p0"))),
|
p0_(readScalar(dict.lookup("p0"))),
|
||||||
totalPressureDataFileName_(dict.lookup("totalPressureDataFileName")),
|
totalPressureTimeSeries_(this->db(), dict)
|
||||||
totalPressureTimeSeries_(word(dict.lookup("timeBounding")))
|
|
||||||
{
|
{
|
||||||
if (dict.found("value"))
|
if (dict.found("value"))
|
||||||
{
|
{
|
||||||
@ -99,8 +98,7 @@ timeVaryingUniformTotalPressureFvPatchScalarField
|
|||||||
psiName_(ptf.psiName_),
|
psiName_(ptf.psiName_),
|
||||||
gamma_(ptf.gamma_),
|
gamma_(ptf.gamma_),
|
||||||
p0_(ptf.p0_),
|
p0_(ptf.p0_),
|
||||||
totalPressureDataFileName_(ptf.totalPressureDataFileName_),
|
totalPressureTimeSeries_(ptf.totalPressureTimeSeries_)
|
||||||
totalPressureTimeSeries_(ptf.timeBounding())
|
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -117,8 +115,7 @@ timeVaryingUniformTotalPressureFvPatchScalarField
|
|||||||
psiName_(tppsf.psiName_),
|
psiName_(tppsf.psiName_),
|
||||||
gamma_(tppsf.gamma_),
|
gamma_(tppsf.gamma_),
|
||||||
p0_(tppsf.p0_),
|
p0_(tppsf.p0_),
|
||||||
totalPressureDataFileName_(tppsf.totalPressureDataFileName_),
|
totalPressureTimeSeries_(tppsf.totalPressureTimeSeries_)
|
||||||
totalPressureTimeSeries_(tppsf.timeBounding())
|
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -136,64 +133,12 @@ timeVaryingUniformTotalPressureFvPatchScalarField
|
|||||||
psiName_(tppsf.psiName_),
|
psiName_(tppsf.psiName_),
|
||||||
gamma_(tppsf.gamma_),
|
gamma_(tppsf.gamma_),
|
||||||
p0_(tppsf.p0_),
|
p0_(tppsf.p0_),
|
||||||
totalPressureDataFileName_(tppsf.totalPressureDataFileName_),
|
totalPressureTimeSeries_(tppsf.totalPressureTimeSeries_)
|
||||||
totalPressureTimeSeries_(tppsf.timeBounding())
|
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::scalar Foam::timeVaryingUniformTotalPressureFvPatchScalarField::
|
|
||||||
currentValue()
|
|
||||||
{
|
|
||||||
if (totalPressureTimeSeries_.size() == 0)
|
|
||||||
{
|
|
||||||
fileName fName(totalPressureDataFileName_);
|
|
||||||
fName.expand();
|
|
||||||
|
|
||||||
if (fName.size() == 0)
|
|
||||||
{
|
|
||||||
FatalErrorIn
|
|
||||||
(
|
|
||||||
"timeVaryingUniformFixedValueFvPatchField::currentValue()"
|
|
||||||
) << "timeDataFile not specified for Patch "
|
|
||||||
<< patch().name()
|
|
||||||
<< exit(FatalError);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// relative path
|
|
||||||
if (fName[0] != '/')
|
|
||||||
{
|
|
||||||
fName = db().path()/fName;
|
|
||||||
}
|
|
||||||
|
|
||||||
// just in case we change the interface to timeSeries
|
|
||||||
word boundType = timeBounding();
|
|
||||||
|
|
||||||
IFstream(fName)() >> totalPressureTimeSeries_;
|
|
||||||
totalPressureTimeSeries_.bounding(boundType);
|
|
||||||
|
|
||||||
// be a bit paranoid and check that the list is okay
|
|
||||||
totalPressureTimeSeries_.check();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (totalPressureTimeSeries_.size() == 0)
|
|
||||||
{
|
|
||||||
FatalErrorIn
|
|
||||||
(
|
|
||||||
"timeVaryingUniformFixedValueFvPatchField"
|
|
||||||
"::currentValue()"
|
|
||||||
) << "empty time series for Patch "
|
|
||||||
<< this->patch().name()
|
|
||||||
<< exit(FatalError);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return totalPressureTimeSeries_(this->db().time().timeOutputValue());
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Foam::timeVaryingUniformTotalPressureFvPatchScalarField::updateCoeffs
|
void Foam::timeVaryingUniformTotalPressureFvPatchScalarField::updateCoeffs
|
||||||
(
|
(
|
||||||
const vectorField& Up
|
const vectorField& Up
|
||||||
@ -204,7 +149,7 @@ void Foam::timeVaryingUniformTotalPressureFvPatchScalarField::updateCoeffs
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
p0_ = currentValue();
|
p0_ = totalPressureTimeSeries_(this->db().time().timeOutputValue());
|
||||||
|
|
||||||
const fvsPatchField<scalar>& phip =
|
const fvsPatchField<scalar>& phip =
|
||||||
patch().lookupPatchField<surfaceScalarField, scalar>(phiName_);
|
patch().lookupPatchField<surfaceScalarField, scalar>(phiName_);
|
||||||
@ -279,10 +224,7 @@ void Foam::timeVaryingUniformTotalPressureFvPatchScalarField::write(Ostream& os)
|
|||||||
os.writeKeyword("psi") << psiName_ << token::END_STATEMENT << nl;
|
os.writeKeyword("psi") << psiName_ << token::END_STATEMENT << nl;
|
||||||
os.writeKeyword("gamma") << gamma_ << token::END_STATEMENT << nl;
|
os.writeKeyword("gamma") << gamma_ << token::END_STATEMENT << nl;
|
||||||
os.writeKeyword("p0") << p0_ << token::END_STATEMENT << endl;
|
os.writeKeyword("p0") << p0_ << token::END_STATEMENT << endl;
|
||||||
os.writeKeyword("totalPressureDataFileName")
|
totalPressureTimeSeries_.write(os);
|
||||||
<< totalPressureDataFileName_ << token::END_STATEMENT << nl;
|
|
||||||
os.writeKeyword("timeBounding")
|
|
||||||
<< timeBounding() << token::END_STATEMENT << nl;
|
|
||||||
writeEntry("value", os);
|
writeEntry("value", os);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -38,7 +38,7 @@ SourceFiles
|
|||||||
#define timeVaryingUniformTotalPressureFvPatchScalarField_H
|
#define timeVaryingUniformTotalPressureFvPatchScalarField_H
|
||||||
|
|
||||||
#include "fixedValueFvPatchFields.H"
|
#include "fixedValueFvPatchFields.H"
|
||||||
#include "timeSeries.H"
|
#include "interpolationTable.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -74,11 +74,8 @@ class timeVaryingUniformTotalPressureFvPatchScalarField
|
|||||||
//- Total pressure
|
//- Total pressure
|
||||||
scalar p0_;
|
scalar p0_;
|
||||||
|
|
||||||
fileName totalPressureDataFileName_;
|
//- Table of time vs total pressure
|
||||||
timeSeries<scalar> totalPressureTimeSeries_;
|
interpolationTable<scalar> totalPressureTimeSeries_;
|
||||||
|
|
||||||
//- Interpolate the value at the current time
|
|
||||||
scalar currentValue();
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -189,14 +186,8 @@ public:
|
|||||||
return p0_;
|
return p0_;
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Return the out-of-bounds treatment as a word
|
|
||||||
word timeBounding() const
|
|
||||||
{
|
|
||||||
return totalPressureTimeSeries_.bounding();
|
|
||||||
}
|
|
||||||
|
|
||||||
//- Return the time series used
|
//- Return the time series used
|
||||||
const timeSeries<scalar>& totalPressureTimeSeries() const
|
const interpolationTable<scalar>& totalPressureTimeSeries() const
|
||||||
{
|
{
|
||||||
return totalPressureTimeSeries_;
|
return totalPressureTimeSeries_;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -134,7 +134,7 @@ void Foam::leastSquaresVectors::makeLeastSquaresVectors() const
|
|||||||
const unallocLabelList& faceCells = p.patch().faceCells();
|
const unallocLabelList& faceCells = p.patch().faceCells();
|
||||||
|
|
||||||
// Build the d-vectors
|
// Build the d-vectors
|
||||||
vectorField pd =
|
vectorField pd =
|
||||||
mesh.Sf().boundaryField()[patchi]
|
mesh.Sf().boundaryField()[patchi]
|
||||||
/(
|
/(
|
||||||
mesh.magSf().boundaryField()[patchi]
|
mesh.magSf().boundaryField()[patchi]
|
||||||
@ -198,7 +198,7 @@ void Foam::leastSquaresVectors::makeLeastSquaresVectors() const
|
|||||||
const unallocLabelList& faceCells = p.faceCells();
|
const unallocLabelList& faceCells = p.faceCells();
|
||||||
|
|
||||||
// Build the d-vectors
|
// Build the d-vectors
|
||||||
vectorField pd =
|
vectorField pd =
|
||||||
mesh.Sf().boundaryField()[patchi]
|
mesh.Sf().boundaryField()[patchi]
|
||||||
/(
|
/(
|
||||||
mesh.magSf().boundaryField()[patchi]
|
mesh.magSf().boundaryField()[patchi]
|
||||||
@ -239,6 +239,7 @@ void Foam::leastSquaresVectors::makeLeastSquaresVectors() const
|
|||||||
|
|
||||||
// For 3D meshes check the determinant of the dd tensor and switch to
|
// For 3D meshes check the determinant of the dd tensor and switch to
|
||||||
// Gauss if it is less than 3
|
// Gauss if it is less than 3
|
||||||
|
/* Currently the det(dd[celli]) criterion is incorrect: dd is weighted by Sf
|
||||||
if (mesh.nGeometricD() == 3)
|
if (mesh.nGeometricD() == 3)
|
||||||
{
|
{
|
||||||
label nBadCells = 0;
|
label nBadCells = 0;
|
||||||
@ -279,7 +280,7 @@ void Foam::leastSquaresVectors::makeLeastSquaresVectors() const
|
|||||||
|
|
||||||
if (mesh.boundary()[patchi].size())
|
if (mesh.boundary()[patchi].size())
|
||||||
{
|
{
|
||||||
label patchFacei =
|
label patchFacei =
|
||||||
facei - mesh.boundaryMesh()[patchi].start();
|
facei - mesh.boundaryMesh()[patchi].start();
|
||||||
|
|
||||||
if (mesh.boundary()[patchi].coupled())
|
if (mesh.boundary()[patchi].coupled())
|
||||||
@ -294,14 +295,14 @@ void Foam::leastSquaresVectors::makeLeastSquaresVectors() const
|
|||||||
0.2
|
0.2
|
||||||
);
|
);
|
||||||
|
|
||||||
lsP.boundaryField()[patchi][patchFacei] =
|
lsP.boundaryField()[patchi][patchFacei] =
|
||||||
(1 - wf)
|
(1 - wf)
|
||||||
*Sf.boundaryField()[patchi][patchFacei]
|
*Sf.boundaryField()[patchi][patchFacei]
|
||||||
/V[celli];
|
/V[celli];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
lsP.boundaryField()[patchi][patchFacei] =
|
lsP.boundaryField()[patchi][patchFacei] =
|
||||||
Sf.boundaryField()[patchi][patchFacei]
|
Sf.boundaryField()[patchi][patchFacei]
|
||||||
/V[celli];
|
/V[celli];
|
||||||
}
|
}
|
||||||
@ -318,7 +319,7 @@ void Foam::leastSquaresVectors::makeLeastSquaresVectors() const
|
|||||||
<< endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -27,6 +27,7 @@ Class
|
|||||||
|
|
||||||
Description
|
Description
|
||||||
Templated base class for kinematic cloud
|
Templated base class for kinematic cloud
|
||||||
|
|
||||||
- Kinematic only
|
- Kinematic only
|
||||||
- Dispersion model
|
- Dispersion model
|
||||||
- Drag model
|
- Drag model
|
||||||
|
|||||||
@ -27,7 +27,9 @@ Class
|
|||||||
|
|
||||||
Description
|
Description
|
||||||
Kinematic parcel class with one/two-way coupling with the continuous
|
Kinematic parcel class with one/two-way coupling with the continuous
|
||||||
phase. Sub-models include:
|
phase.
|
||||||
|
|
||||||
|
Sub-models include:
|
||||||
- drag
|
- drag
|
||||||
- break-up
|
- break-up
|
||||||
- wall interactions
|
- wall interactions
|
||||||
|
|||||||
@ -27,6 +27,7 @@ Class
|
|||||||
|
|
||||||
Description
|
Description
|
||||||
Cone injection
|
Cone injection
|
||||||
|
|
||||||
- User specifies
|
- User specifies
|
||||||
- time of start of injection
|
- time of start of injection
|
||||||
- injector position
|
- injector position
|
||||||
|
|||||||
@ -54,7 +54,7 @@ bool molecule::move(molecule::trackData& td)
|
|||||||
U_ += 0.5*deltaT*A_;
|
U_ += 0.5*deltaT*A_;
|
||||||
}
|
}
|
||||||
|
|
||||||
while (td.keepParticle && !td.switchProcessor && tEnd > (SMALL*SMALL))
|
while (td.keepParticle && !td.switchProcessor && tEnd > ROOTVSMALL)
|
||||||
{
|
{
|
||||||
// set the lagrangian time-step
|
// set the lagrangian time-step
|
||||||
scalar dt = min(dtMax, tEnd);
|
scalar dt = min(dtMax, tEnd);
|
||||||
|
|||||||
@ -26,15 +26,15 @@ Class
|
|||||||
Foam::edgeFaceCirculator
|
Foam::edgeFaceCirculator
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Walks from starting face around edge. Implicit
|
Walks from starting face around edge.
|
||||||
description of edge:
|
|
||||||
|
Implicit description of edge:
|
||||||
- face
|
- face
|
||||||
- index in face. edge is always between f[index] and f[index+1]
|
- index in face. edge is always between f[index] and f[index+1]
|
||||||
- direction (cell to walk into)
|
- direction (cell to walk into)
|
||||||
|
|
||||||
Use as:
|
-# Use in-place: \n
|
||||||
|
@code
|
||||||
1) in-place:
|
|
||||||
edgeFaceCirculator circ(..);
|
edgeFaceCirculator circ(..);
|
||||||
// Optionally rotate to beginning: circ.setCanonical();
|
// Optionally rotate to beginning: circ.setCanonical();
|
||||||
|
|
||||||
@ -45,9 +45,10 @@ Description
|
|||||||
++circ;
|
++circ;
|
||||||
}
|
}
|
||||||
while (circ != circ.end());
|
while (circ != circ.end());
|
||||||
|
@endcode
|
||||||
|
|
||||||
2) like STL iterator:
|
-# Use like STL iterator: \n
|
||||||
|
@code
|
||||||
edgeFaceCirculator circ(..);
|
edgeFaceCirculator circ(..);
|
||||||
for
|
for
|
||||||
(
|
(
|
||||||
@ -58,6 +59,7 @@ Description
|
|||||||
{
|
{
|
||||||
Info<< "face:" << iter.face() << endl;
|
Info<< "face:" << iter.face() << endl;
|
||||||
}
|
}
|
||||||
|
@endcode
|
||||||
|
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
|
|||||||
@ -23,7 +23,7 @@ License
|
|||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Namespace
|
Namespace
|
||||||
Foam::compressible
|
Foam::compressible::LESModels
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Namespace for compressible LES models.
|
Namespace for compressible LES models.
|
||||||
|
|||||||
@ -23,7 +23,7 @@ License
|
|||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::incompressible::LES::DeardorffDiffStress
|
Foam::incompressible::LESModels::DeardorffDiffStress
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Differential SGS Stress Equation Model for incompressible flows
|
Differential SGS Stress Equation Model for incompressible flows
|
||||||
|
|||||||
@ -23,7 +23,7 @@ License
|
|||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::incompressible::LES::GenEddyVisc
|
Foam::incompressible::LESModels::GenEddyVisc
|
||||||
|
|
||||||
Description
|
Description
|
||||||
General base class for all incompressible models that can be implemented
|
General base class for all incompressible models that can be implemented
|
||||||
|
|||||||
@ -23,7 +23,7 @@ License
|
|||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::incompressible::LES::GenSGSStress
|
Foam::incompressible::LESModels::GenSGSStress
|
||||||
|
|
||||||
Description
|
Description
|
||||||
General base class for all incompressible models that directly
|
General base class for all incompressible models that directly
|
||||||
|
|||||||
@ -23,7 +23,7 @@ License
|
|||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Namespace
|
Namespace
|
||||||
Foam::incompressible
|
Foam::incompressible::LESModels
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Namespace for incompressible LES models.
|
Namespace for incompressible LES models.
|
||||||
|
|||||||
@ -23,7 +23,7 @@ License
|
|||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::incompressible::LES::LRRDiffStress
|
Foam::incompressible::LESModels::LRRDiffStress
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Differential SGS Stress Equation Model for incompressible flows.
|
Differential SGS Stress Equation Model for incompressible flows.
|
||||||
|
|||||||
@ -23,7 +23,7 @@ License
|
|||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::incompressible::LES::Smagorinsky
|
Foam::incompressible::LESModels::Smagorinsky
|
||||||
|
|
||||||
Description
|
Description
|
||||||
The Isochoric Smagorinsky Model for incompressible flows.
|
The Isochoric Smagorinsky Model for incompressible flows.
|
||||||
|
|||||||
@ -23,7 +23,7 @@ License
|
|||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::incompressible::LES::Smagorinsky2
|
Foam::incompressible::LESModels::Smagorinsky2
|
||||||
|
|
||||||
Description
|
Description
|
||||||
The Isochoric Smagorinsky Model for incompressible flows
|
The Isochoric Smagorinsky Model for incompressible flows
|
||||||
|
|||||||
@ -23,7 +23,7 @@ License
|
|||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::incompressible::LES::SpalartAllmaras
|
Foam::incompressible::LESModels::SpalartAllmaras
|
||||||
|
|
||||||
Description
|
Description
|
||||||
SpalartAllmaras for incompressible flows
|
SpalartAllmaras for incompressible flows
|
||||||
|
|||||||
@ -23,7 +23,7 @@ License
|
|||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::incompressible::LES::dynMixedSmagorinsky
|
Foam::incompressible::LESModels::dynMixedSmagorinsky
|
||||||
|
|
||||||
Description
|
Description
|
||||||
The Mixed Isochoric Smagorinsky Model for incompressible flows.
|
The Mixed Isochoric Smagorinsky Model for incompressible flows.
|
||||||
|
|||||||
@ -23,7 +23,7 @@ License
|
|||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::incompressible::LES::dynOneEqEddy
|
Foam::incompressible::LESModels::dynOneEqEddy
|
||||||
|
|
||||||
Description
|
Description
|
||||||
One Equation Eddy Viscosity Model for incompressible flows.
|
One Equation Eddy Viscosity Model for incompressible flows.
|
||||||
|
|||||||
@ -23,7 +23,7 @@ License
|
|||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::incompressible::LES::dynSmagorinsky
|
Foam::incompressible::LESModels::dynSmagorinsky
|
||||||
|
|
||||||
Description
|
Description
|
||||||
The Isochoric dynamic Smagorinsky Model for incompressible flows.
|
The Isochoric dynamic Smagorinsky Model for incompressible flows.
|
||||||
@ -56,7 +56,7 @@ Description
|
|||||||
m = delta^2*(4*||F(D)||^2 - F(||D||^2))
|
m = delta^2*(4*||F(D)||^2 - F(||D||^2))
|
||||||
L = dev(F(U*U) - F(U)*F(U))
|
L = dev(F(U*U) - F(U)*F(U))
|
||||||
M = delta^2*(F(||D||*dev(D)) - 4*||F(D)||*F(dev(D)))
|
M = delta^2*(F(||D||*dev(D)) - 4*||F(D)||*F(dev(D)))
|
||||||
@verbatim
|
@endverbatim
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
dynSmagorinsky.C
|
dynSmagorinsky.C
|
||||||
|
|||||||
@ -23,7 +23,7 @@ License
|
|||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::incompressible::LES::laminar
|
Foam::incompressible::LESModels::laminar
|
||||||
|
|
||||||
Description
|
Description
|
||||||
LES model for laminar incompressible flow.
|
LES model for laminar incompressible flow.
|
||||||
|
|||||||
@ -23,7 +23,7 @@ License
|
|||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::incompressible::LES::locDynOneEqEddy
|
Foam::incompressible::LESModels::locDynOneEqEddy
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Localised Dynamic One Equation Eddy Viscosity Model for incompressible
|
Localised Dynamic One Equation Eddy Viscosity Model for incompressible
|
||||||
|
|||||||
@ -23,7 +23,7 @@ License
|
|||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::incompressible::LES::mixedSmagorinsky
|
Foam::incompressible::LESModels::mixedSmagorinsky
|
||||||
|
|
||||||
Description
|
Description
|
||||||
The mixed Isochoric Smagorinsky Model for incompressible flows.
|
The mixed Isochoric Smagorinsky Model for incompressible flows.
|
||||||
|
|||||||
@ -23,7 +23,7 @@ License
|
|||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::incompressible::LES::oneEqEddy
|
Foam::incompressible::LESModels::oneEqEddy
|
||||||
|
|
||||||
Description
|
Description
|
||||||
One Equation Eddy Viscosity Model for incompressible flows
|
One Equation Eddy Viscosity Model for incompressible flows
|
||||||
|
|||||||
@ -23,7 +23,7 @@ License
|
|||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::incompressible::LES::scaleSimilarity
|
Foam::incompressible::LESModels::scaleSimilarity
|
||||||
|
|
||||||
Description
|
Description
|
||||||
General base class for all scale similarity models
|
General base class for all scale similarity models
|
||||||
|
|||||||
@ -23,7 +23,7 @@ License
|
|||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::incompressible::LES::spectEddyVisc
|
Foam::incompressible::LESModels::spectEddyVisc
|
||||||
|
|
||||||
Description
|
Description
|
||||||
The Isochoric spectral Eddy Viscosity Model for incompressible flows.
|
The Isochoric spectral Eddy Viscosity Model for incompressible flows.
|
||||||
|
|||||||
@ -23,7 +23,7 @@ License
|
|||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::incompressible::LES::vanDriestDelta
|
Foam::incompressible::LESModels::vanDriestDelta
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Simple cube-root of cell volume delta used in incompressible LES models.
|
Simple cube-root of cell volume delta used in incompressible LES models.
|
||||||
|
|||||||
@ -23,7 +23,7 @@ License
|
|||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::incompressible::LES::nuSgsWallFunctionFvPatchScalarField
|
Foam::incompressible::LESModels::nuSgsWallFunctionFvPatchScalarField
|
||||||
|
|
||||||
Description
|
Description
|
||||||
wall function boundary condition for incompressible flows
|
wall function boundary condition for incompressible flows
|
||||||
|
|||||||
@ -23,7 +23,7 @@ License
|
|||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::compressible::RAS::LRR
|
Foam::compressible::RASModels::LRR
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Launder, Reece and Rodi Reynolds-stress turbulence model for
|
Launder, Reece and Rodi Reynolds-stress turbulence model for
|
||||||
|
|||||||
@ -23,7 +23,7 @@ License
|
|||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::compressible::RAS::LaunderGibsonRSTM
|
Foam::compressible::RASModels::LaunderGibsonRSTM
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Launder-Gibson Reynolds stress turbulence model for compressible flows.
|
Launder-Gibson Reynolds stress turbulence model for compressible flows.
|
||||||
|
|||||||
@ -23,7 +23,7 @@ License
|
|||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::compressible::RAS::LaunderSharmaKE
|
Foam::compressible::RASModels::LaunderSharmaKE
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Launder and Sharma low-Reynolds k-epsilon turbulence model for
|
Launder and Sharma low-Reynolds k-epsilon turbulence model for
|
||||||
|
|||||||
@ -23,7 +23,7 @@ License
|
|||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Namespace
|
Namespace
|
||||||
Foam::compressible::RAS
|
Foam::compressible::RASModels
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Namespace for compressible RAS turbulence models.
|
Namespace for compressible RAS turbulence models.
|
||||||
|
|||||||
@ -23,7 +23,7 @@ License
|
|||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::compressible::RAS::RNGkEpsilon
|
Foam::compressible::RASModels::RNGkEpsilon
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Renormalisation group k-epsilon turbulence model for compressible flows.
|
Renormalisation group k-epsilon turbulence model for compressible flows.
|
||||||
|
|||||||
@ -23,7 +23,7 @@ License
|
|||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::compressible::RAS::SpalartAllmaras
|
Foam::compressible::RASModels::SpalartAllmaras
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Spalart-Allmaras one-eqn mixing-length model for compressible
|
Spalart-Allmaras one-eqn mixing-length model for compressible
|
||||||
|
|||||||
@ -23,7 +23,7 @@ License
|
|||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::compressible::RAS::kEpsilon
|
Foam::compressible::RASModels::kEpsilon
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Standard k-epsilon turbulence model for compressible flows
|
Standard k-epsilon turbulence model for compressible flows
|
||||||
|
|||||||
@ -23,7 +23,7 @@ License
|
|||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::compressible::RAS::kOmegaSST
|
Foam::compressible::RASModels::kOmegaSST
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Implementation of the k-omega-SST turbulence model for compressible flows.
|
Implementation of the k-omega-SST turbulence model for compressible flows.
|
||||||
|
|||||||
@ -23,7 +23,7 @@ License
|
|||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::compressible::RAS::laminar
|
Foam::compressible::RASModels::laminar
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Dummy turbulence model for laminar compressible flow.
|
Dummy turbulence model for laminar compressible flow.
|
||||||
|
|||||||
@ -23,7 +23,7 @@ License
|
|||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::compressible::RAS::realizableKE
|
Foam::compressible::RASModels::realizableKE
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Realizable k-epsilon turbulence model for compressible flows.
|
Realizable k-epsilon turbulence model for compressible flows.
|
||||||
|
|||||||
@ -23,7 +23,7 @@ License
|
|||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::compressible::RAS::mutStandardRoughWallFunctionFvPatchScalarField
|
Foam::compressible::RASModels::mutStandardRoughWallFunctionFvPatchScalarField
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Wall function boundary condition for rough walls
|
Wall function boundary condition for rough walls
|
||||||
|
|||||||
@ -23,7 +23,7 @@ License
|
|||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::incompressible::RAS::LRR
|
Foam::incompressible::RASModels::LRR
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Launder, Reece and Rodi Reynolds-stress turbulence model for
|
Launder, Reece and Rodi Reynolds-stress turbulence model for
|
||||||
|
|||||||
@ -23,7 +23,7 @@ License
|
|||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::incompressible::RAS::LamBremhorstKE
|
Foam::incompressible::RASModels::LamBremhorstKE
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Lam and Bremhorst low-Reynolds number k-epsilon turbulence model
|
Lam and Bremhorst low-Reynolds number k-epsilon turbulence model
|
||||||
|
|||||||
@ -23,7 +23,7 @@ License
|
|||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::incompressible::RAS::LaunderGibsonRSTM
|
Foam::incompressible::RASModels::LaunderGibsonRSTM
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Launder-Gibson Reynolds stress turbulence model for incompressible flows.
|
Launder-Gibson Reynolds stress turbulence model for incompressible flows.
|
||||||
|
|||||||
@ -23,7 +23,7 @@ License
|
|||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::incompressible::RAS::LaunderSharmaKE
|
Foam::incompressible::RASModels::LaunderSharmaKE
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Launder and Sharma low-Reynolds k-epsilon turbulence model for
|
Launder and Sharma low-Reynolds k-epsilon turbulence model for
|
||||||
|
|||||||
@ -23,7 +23,7 @@ License
|
|||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::incompressible::RAS::LienCubicKE
|
Foam::incompressible::RASModels::LienCubicKE
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Lien cubic non-linear k-epsilon turbulence model for incompressible flows.
|
Lien cubic non-linear k-epsilon turbulence model for incompressible flows.
|
||||||
|
|||||||
@ -23,7 +23,7 @@ License
|
|||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::incompressible::RAS::LienCubicKELowRe
|
Foam::incompressible::RASModels::LienCubicKELowRe
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Lien cubic non-linear low-Reynolds k-epsilon turbulence models for
|
Lien cubic non-linear low-Reynolds k-epsilon turbulence models for
|
||||||
|
|||||||
@ -23,7 +23,7 @@ License
|
|||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::incompressible::RAS::LienLeschzinerLowRe
|
Foam::incompressible::RASModels::LienLeschzinerLowRe
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Lien and Leschziner low-Reynolds k-epsilon turbulence model for
|
Lien and Leschziner low-Reynolds k-epsilon turbulence model for
|
||||||
|
|||||||
@ -23,7 +23,7 @@ License
|
|||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::incompressible::RAS::NonlinearKEShih
|
Foam::incompressible::RASModels::NonlinearKEShih
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Shih's quadratic non-linear k-epsilon turbulence model for
|
Shih's quadratic non-linear k-epsilon turbulence model for
|
||||||
|
|||||||
@ -23,7 +23,7 @@ License
|
|||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::incompressible::RAS::QZeta
|
Foam::incompressible::RASModels::QZeta
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Gibson and Dafa'Alla's q-zeta two-equation low-Re turbulence model
|
Gibson and Dafa'Alla's q-zeta two-equation low-Re turbulence model
|
||||||
|
|||||||
@ -23,7 +23,7 @@ License
|
|||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Namespace
|
Namespace
|
||||||
Foam::incompressible
|
Foam::incompressible::RASModels
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Namespace for incompressible RAS turbulence models.
|
Namespace for incompressible RAS turbulence models.
|
||||||
|
|||||||
@ -23,7 +23,7 @@ License
|
|||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::incompressible::RAS::RNGkEpsilon
|
Foam::incompressible::RASModels::RNGkEpsilon
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Renormalisation group k-epsilon turbulence model for incompressible flows.
|
Renormalisation group k-epsilon turbulence model for incompressible flows.
|
||||||
|
|||||||
@ -23,7 +23,7 @@ License
|
|||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::incompressible::RAS::SpalartAllmaras
|
Foam::incompressible::RASModels::SpalartAllmaras
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Spalart-Allmaras 1-eqn mixing-length model for incompressible external
|
Spalart-Allmaras 1-eqn mixing-length model for incompressible external
|
||||||
|
|||||||
@ -23,7 +23,7 @@ License
|
|||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::incompressible::RAS::kEpsilon
|
Foam::incompressible::RASModels::kEpsilon
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Standard k-epsilon turbulence model for incompressible flows.
|
Standard k-epsilon turbulence model for incompressible flows.
|
||||||
|
|||||||
@ -23,7 +23,7 @@ License
|
|||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::incompressible::RAS::kOmegaSST
|
Foam::incompressible::RASModels::kOmegaSST
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Implementation of the k-omega-SST turbulence model for incompressible
|
Implementation of the k-omega-SST turbulence model for incompressible
|
||||||
|
|||||||
@ -23,7 +23,7 @@ License
|
|||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::incompressible::RAS::laminar
|
Foam::incompressible::RASModels::laminar
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Dummy turbulence model for laminar incompressible flow.
|
Dummy turbulence model for laminar incompressible flow.
|
||||||
|
|||||||
@ -23,7 +23,7 @@ License
|
|||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::incompressible::RAS::realizableKE
|
Foam::incompressible::RASModels::realizableKE
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Realizable k-epsilon turbulence model for incompressible flows.
|
Realizable k-epsilon turbulence model for incompressible flows.
|
||||||
|
|||||||
@ -23,7 +23,7 @@ License
|
|||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::incompressible::RAS::nutStandardRoughWallFunctionFvPatchScalarField
|
Foam::incompressible::RASModels::nutStandardRoughWallFunctionFvPatchScalarField
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Wall function boundary condition for rough walls
|
Wall function boundary condition for rough walls
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user