during my work I had to insert some functions to make it work, it should be the same way cfdof inserts the force function. I insert the wall shear stress, mass flowrate for multiphase flow, also I edit the wall roughness and surface tension in the dictionaries,
I would like to ask if there is a way to generate those functions form cfdof directly, kindly find the example below:
Code: Select all
functions
{
inlet1
{
type surfaceFieldValue;
libs ("libfieldFunctionObjects.so");
enabled true;
writeControl timeStep;
writeInterval 1;
log true;
writeFields false;
regionType patch;
name inlet;
operation sum; //absWeightedSum; //sum; //weightedAreaAverage;
//weightField alpha.Water;
fields
(
rhoPhi
);
}
PST1
{
type surfaceFieldValue;
libs ("libfieldFunctionObjects.so");
enabled true;
writeControl timeStep;
writeInterval 1;
log true;
writeFields false;
regionType patch;
name open001;
operation sum;
//weightField alpha.Water;
fields
(
rhoPhi
);
}
PST2
{
type surfaceFieldValue;
libs ("libfieldFunctionObjects.so");
enabled true;
writeControl timeStep;
writeInterval 1;
log true;
writeFields false;
regionType patch;
name open002;
operation sum;
fields
(
rhoPhi
);
}
PST3
{
type surfaceFieldValue;
libs ("libfieldFunctionObjects.so");
enabled true;
writeControl timeStep;
writeInterval 1;
log true;
writeFields false;
regionType patch;
name open003;
operation sum;
fields
(
rhoPhi
);
}
PST4
{
type surfaceFieldValue;
libs ("libfieldFunctionObjects.so");
enabled true;
writeControl timeStep;
writeInterval 1;
log true;
writeFields false;
regionType patch;
name open004;
operation sum;
fields
(
rhoPhi
);
}
//forces
ReportingFunction
{
type forces;
libs ("libforces.so");
log true;
patches ( bridgeinvert );
p_rgh p_rgh;
U U;
rho rho;
pRef 0.0;
porosity false;
writeFields false;
CofR ( 0.0 0.0 0.0 );
binData
{
nBin 20;
direction ( 1.0 0.0 0.0 );
cumulative true;
}
}
//shearstress
wallShearStress1
{
// Mandatory entries (unmodifiable)
type wallShearStress;
libs (fieldFunctionObjects);
//runtime modifiable
patches (defaultFaces); // (wall1 "(wall2|wall3)");
// Optional (inherited) entries
writePrecision 8;
writeToFile true;
useUserTime true;
//region region0;
enabled true;
//log true;
//timeStart 0;
//timeEnd 300;
executeControl adjustableRunTime;
executeInterval 1;
writeControl adjustableRunTime;
writeInterval 25;
}
}
// ************************************************************************* //