ENH: Initial testing updates

This commit is contained in:
Andrew Heather
2016-09-26 09:28:31 +01:00
parent 1fbcb686ff
commit ad1e798293
17 changed files with 89 additions and 103 deletions

View File

@ -96,10 +96,8 @@ timeVaryingMappedFixedValueFvPatchField
&& mapMethod_ != "nearest" && mapMethod_ != "nearest"
) )
{ {
FatalIOErrorInFunction FatalIOErrorInFunction(dict)
( << "mapMethod should be one of 'planarInterpolation'"
dict
) << "mapMethod should be one of 'planarInterpolation'"
<< ", 'nearest'" << exit(FatalIOError); << ", 'nearest'" << exit(FatalIOError);
} }
@ -248,7 +246,8 @@ void Foam::timeVaryingMappedFixedValueFvPatchField<Type>::checkTable()
// Reread values and interpolate // Reread values and interpolate
fileName samplePointsFile fileName samplePointsFile
( (
this->db().time().caseConstant() this->db().time().path()
/this->db().time().caseConstant()
/"boundaryData" /"boundaryData"
/this->patch().name() /this->patch().name()
/"points" /"points"
@ -356,7 +355,8 @@ void Foam::timeVaryingMappedFixedValueFvPatchField<Type>::checkTable()
// Reread values and interpolate // Reread values and interpolate
fileName valsFile fileName valsFile
( (
this->db().time().caseConstant() this->db().time().path()
/this->db().time().caseConstant()
/"boundaryData" /"boundaryData"
/this->patch().name() /this->patch().name()
/sampleTimes_[startSampleTime_].name() /sampleTimes_[startSampleTime_].name()

View File

@ -72,7 +72,8 @@ Foam::turbulentDFSEMInletFvPatchVectorField::interpolateBoundaryData
fileName valsFile fileName valsFile
( (
this->db().time().caseConstant() this->db().time().path()
/this->db().time().caseConstant()
/"boundaryData" /"boundaryData"
/patchName /patchName
/"0" /"0"

View File

@ -137,12 +137,10 @@ bool Foam::functionObjects::yPlus::execute()
const volScalarField::Boundary& d = nwd.y(); const volScalarField::Boundary& d = nwd.y();
// nut needed for wall function patches // nut needed for wall function patches
const volScalarField::Boundary& nutBf = model.nut()().boundaryField(); tmp<volScalarField> tnut = model.nut();
const volScalarField::Boundary& nutBf = tnut().boundaryField();
// nuEff nu and U needed for plain wall patches // U needed for plain wall patches
const volScalarField::Boundary& nuEffBf =
model.nuEff()().boundaryField();
const volScalarField::Boundary& nuBf = model.nu()().boundaryField();
const volVectorField::Boundary& UBf = model.U().boundaryField(); const volVectorField::Boundary& UBf = model.U().boundaryField();
const fvPatchList& patches = mesh_.boundary(); const fvPatchList& patches = mesh_.boundary();
@ -167,9 +165,9 @@ bool Foam::functionObjects::yPlus::execute()
d[patchi] d[patchi]
*sqrt *sqrt
( (
nuEffBf[patchi] model.nuEff(patchi)
*mag(UBf[patchi].snGrad()) *mag(UBf[patchi].snGrad())
)/nuBf[patchi]; )/model.nu(patchi);
} }
} }
} }

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2015-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2015-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -25,7 +25,7 @@ Class
Foam::functionObjects::runTimeControl Foam::functionObjects::runTimeControl
Group Group
grpJobControlFunctionObjects grpUtilitiesFunctionObjects
Description Description
Controls when the calculation is terminated based on satisfying Controls when the calculation is terminated based on satisfying
@ -120,9 +120,6 @@ public:
//- Execute, currently does nothing //- Execute, currently does nothing
virtual bool execute(); virtual bool execute();
//- Called when time was set at the end of the Time::operator++
virtual void timeSet();
//- Calculate the runTimeControl and write //- Calculate the runTimeControl and write
virtual bool write(); virtual bool write();
}; };

View File

@ -56,10 +56,11 @@ functions
{ {
sensitivityAnalysis sensitivityAnalysis
{ {
functionObjectLibs ( "libutilityFunctionObjects.so" ); functionObjectLibs ("libfieldFunctionObjects.so");
type psiReactionsSensitivityAnalysis; type psiReactionsSensitivityAnalysis;
outputControl outputTime; writeControl writeTime;
enabled true;
} }
} }
// ************************************************************************* // // ************************************************************************* //

View File

@ -55,9 +55,9 @@ functions
{ {
timeStep timeStep
{ {
type coded; type coded;
libs ("libutilityFunctionObjects.so"); libs ("libutilityFunctionObjects.so");
name setDeltaT; name setDeltaT;
code code
#{ #{

View File

@ -57,8 +57,8 @@ functions
fieldAverage fieldAverage
{ {
type fieldAverage; type fieldAverage;
functionObjectLibs ("libfieldFunctionObjects.so"); libs ("libfieldFunctionObjects.so");
outputControl outputTime; writeControl writeTime;
fields fields
( (
U U

View File

@ -59,7 +59,7 @@ functions
externalCoupled externalCoupled
{ {
// Where to load it from (if not already in solver) // Where to load it from (if not already in solver)
functionObjectLibs ("libjobControl.so"); libs ("libfieldControl.so");
type externalCoupled; type externalCoupled;

View File

@ -56,19 +56,10 @@ functions
H2O H2O
{ {
type scalarTransport; type scalarTransport;
libs ("libsolverFunctionObjects.so");
functionObjectLibs ("libutilityFunctionObjects.so");
resetOnStartUp no; resetOnStartUp no;
region cabin; region cabin;
// employ schemes used by U to the scalar transport equation
// note: field name is given by the name of the function, in this case
// 'scalar1'
autoSchemes no;
fvOptions fvOptions
{ {
} }
@ -77,9 +68,9 @@ functions
fileUpdate fileUpdate
{ {
type timeActivatedFileUpdate; type timeActivatedFileUpdate;
functionObjectLibs ("libutilityFunctionObjects.so"); libs ("libutilityFunctionObjects.so");
outputControl timeStep; writeControl timeStep;
outputInterval 1; writeInterval 1;
region cabin; region cabin;
fileToUpdate "$FOAM_CASE/system/solverControls"; fileToUpdate "$FOAM_CASE/system/solverControls";

View File

@ -56,10 +56,10 @@ functions
massFlux massFlux
{ {
type faceSource; type faceSource;
functionObjectLibs ("libfieldFunctionObjects.so"); libs ("libfieldFunctionObjects.so");
enabled yes; enabled yes;
outputControl timeStep; //outputTime; writeControl timeStep; //writeTime;
outputInterval 1; writeInterval 1;
log yes; log yes;
valueOutput no; valueOutput no;
source patch; source patch;

View File

@ -50,26 +50,26 @@ functions
Q1 Q1
{ {
type Q; type Q;
functionObjectLibs ("libutilityFunctionObjects.so"); functionObjectLibs ("libfieldFunctionObjects.so");
outputControl outputTime; writeControl writeTime;
} }
vorticity1 vorticity1
{ {
type vorticity; type vorticity;
functionObjectLibs ("libutilityFunctionObjects.so"); functionObjectLibs ("libfieldFunctionObjects.so");
outputControl outputTime; writeControl writeTime;
} }
yPlus yPlus
{ {
type yPlus; type yPlus;
functionObjectLibs ("libutilityFunctionObjects.so"); functionObjectLibs ("libfieldFunctionObjects.so");
outputControl outputTime; writeControl writeTime;
} }
fieldAverage1 fieldAverage1
{ {
type fieldAverage; type fieldAverage;
functionObjectLibs ( "libfieldFunctionObjects.so" ); functionObjectLibs ( "libfieldFunctionObjects.so" );
outputControl outputTime; writeControl writeTime;
timeStart 8.5; timeStart 8.5;
fields fields

View File

@ -1,8 +1,8 @@
postPro1 postPro1
{ {
type runTimePostProcessing; type runTimePostProcessing;
functionObjectLibs ("librunTimePostProcessing.so"); libs ("librunTimePostProcessing.so");
outputControl outputTime; writeControl writeTime;
output output
{ {
name image; name image;

View File

@ -14,6 +14,7 @@ nLines 10;
start (-0.0205 0.001 0.00001); start (-0.0205 0.001 0.00001);
end (-0.0205 0.0251 0.00001); end (-0.0205 0.0251 0.00001);
fields (p k U); fields (p k U);
U U;
// Must be last entry // Must be last entry
#includeEtc "caseDicts/postProcessing/visualization/streamlines.cfg" #includeEtc "caseDicts/postProcessing/visualization/streamlines.cfg"

View File

@ -49,32 +49,31 @@ functions
{ {
forceCoeffs1 forceCoeffs1
{ {
type forceCoeffs; type forceCoeffs;
libs ("libforces.so" );
writeControl writeTime;
writeFields true;
functionObjectLibs ( "libforces.so" ); patches (body);
outputControl outputTime; p p;
writeFields true; U U;
rho rhoInf; // Indicates incompressible
patches (body); log true;
pName p; rhoInf 1; // Redundant for incompressible
UName U; liftDir (0 1 0);
rhoName rhoInf; // Indicates incompressible dragDir (1 0 0);
log true; CofR (3.5 0 0); // Axle midpoint on ground
rhoInf 1; // Redundant for incompressible pitchAxis (0 0 1);
liftDir (0 1 0); magUInf 10;
dragDir (1 0 0); lRef 4; // Wheelbase length
CofR (3.5 0 0); // Axle midpoint on ground Aref 1; // Estimated
pitchAxis (0 0 1); porosity on;
magUInf 10;
lRef 4; // Wheelbase length
Aref 1; // Estimated
porosity on;
binData binData
{ {
nBin 20; // output data into 20 bins nBin 20; // output data into 20 bins
direction (1 0 0); // bin direction direction (1 0 0); // bin direction
cumulative yes; cumulative yes;
} }
} }
} }

View File

@ -8,34 +8,31 @@
forceCoeffs1 forceCoeffs1
{ {
type forceCoeffs; type forceCoeffs;
libs ("libforces.so");
writeControl writeTime;
writeFields true;
functionObjectLibs ( "libforces.so" ); patches (body);
p p;
outputControl outputTime; U U;
rho rhoInf; // Indicates incompressible
writeFields true; log true;
rhoInf 1; // Redundant for incompressible
patches (body); liftDir (0 1 0);
pName p; dragDir (1 0 0);
UName U; CofR (3.5 0 0); // Axle midpoint on ground
rhoName rhoInf; // Indicates incompressible pitchAxis (0 0 1);
log true; magUInf 10;
rhoInf 1; // Redundant for incompressible lRef 4; // Wheelbase length
liftDir (0 1 0); Aref 1; // Estimated
dragDir (1 0 0); porosity on;
CofR (3.5 0 0); // Axle midpoint on ground
pitchAxis (0 0 1);
magUInf 10;
lRef 4; // Wheelbase length
Aref 1; // Estimated
porosity on;
binData binData
{ {
nBin 20; // output data into 20 bins nBin 20; // output data into 20 bins
direction (1 0 0); // bin direction direction (1 0 0); // bin direction
cumulative yes; cumulative yes;
} }
} }

View File

@ -57,11 +57,12 @@ functions
minMax minMax
{ {
type fieldMinMax; type fieldMinMax;
functionObjectLibs ("libfieldFunctionObjects.so"); libs ("libfieldFunctionObjects.so");
outputControl timeStep; //outputTime; writeControl timeStep; //writeTime;
fields (U); fields (U);
} }
} }
// ************************************************************************* // // ************************************************************************* //

View File

@ -21,7 +21,7 @@ minMax
type fieldMinMax; type fieldMinMax;
// Where to load it from (if not already in solver) // Where to load it from (if not already in solver)
functionObjectLibs ("libfieldFunctionObjects.so"); libs ("libfieldFunctionObjects.so");
// Log to output (default: false) // Log to output (default: false)
log true; log true;