CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Community Contributions (https://www.cfd-online.com/Forums/openfoam-community-contributions/)
-   -   [swak4Foam] swakFoam - expressionField (https://www.cfd-online.com/Forums/openfoam-community-contributions/152041-swakfoam-expressionfield.html)

marluc April 22, 2015 12:24

swakFoam - expressionField
 
Hi,

I would like to evaluate run-time the total kinetic energy through a function object:

Code:

kineticEnergy
{
    type expressionField;
    outputControl timeStep;
    outputInterval 1;
    fieldName kineticEnergy;
    expression "U&U+k";
    autowrite true;
}

At the beginning of controlDict I've added the following libs:
Code:

libs
(
    "libmyIncompressibleRASModels.so"
    "libsimpleFunctionObjects.so"
    "libsimpleSwakFunctionObjects.so"
    "libOpenFOAM.so"
    "libgroovyBC.so"
);

OF complains that expressionField is not a valid entry. I've correctly compiled swakFoam, in fact I can use all its other entries.

Here the result of the "banana test":
Code:

Valid functions are :

54
(
correctThermo
dumpSwakExpression
dumpSwakGlobalVariable
dynamicFunctionObjectListProxy
executeIfEnvironmentVariable
executeIfExecutableFits
executeIfFunctionObjectPresent
executeIfObjectExists
executeIfOpenFOAMVersionBiggerEqual
executeIfParallelSerial
executeIfStartTime
executeIfSwakExpression
fieldDistribution
functionObjectListProxy
initPotentialFlow
initSwakFunctionObject
listRegisteredObjects
loadCompressibleTurbulenceModel
loadIncompressibleTurbulenceModel
loadPsiThermoModel
loadRhoThermoModel
loadSLGThermoModel
panicDump
patchAverage
patchExpression
patchExpressionDistribution
patchFieldDistribution
patchFieldFlow
patchIntegrate
patchMassFlow
patchMassFlowAverage
patchProbes
probes
readAndUpdateFields
readGravitation
recalcPhi
recalcThermoHe
setDeltaTByTimeline
sets
surfaces
swakExpression
swakExpressionAverageDistribution
swakExpressionDistribution
trackDictionary
volumeAverage
volumeIntegrate
volumeMinMax
writeAdditionalFields
writeAndEndFieldRange
writeAndEndSwakExpression
writeFieldsOften
writeIfFieldOutside
writeIfSwakExpression
writeOldTimesOnSignal
)

Can someone help?

Thanks in advance.
Luca

marluc April 22, 2015 12:50

swakFoam - expressionField [SOLVED]
 
Hi,

I've found the mistake. I didn't add the libswakFunctionObjects.so to libs.
Luca


All times are GMT -4. The time now is 06:35.