CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   DieselEngineFoam heat release (http://www.cfd-online.com/Forums/openfoam-solving/111852-dieselenginefoam-heat-release.html)

ris January 16, 2013 15:10

DieselEngineFoam heat release
 
Hello,

I am attempting to extract dQ from my simulation using simplefunctionobjects and swak4foam. I successfully implemented the following in OF2.1.x:

functions
(
volumeAverage
{
type volumeAverage;
functionObjectLibs
(
"libsimpleFunctionObjects.so"
);
verbose true;
fields
(
T
dQ
C7H16
);
factor 1;
}
);

Unfortunately due to other problems I am now using OF1.7.1 . When I add this function to the controlDict in OF1.7.1 the Temperature and C7H16 fields are successfully extracted, however I recieve the following error for dQ.

FOAM Warning :
From function probes::read()
in file volume/volumeFieldFunctionObject/volumeFieldFunctionObject.C at line 91
Unknown field dQ when reading dictionary "::volumeAverage"
Can only probe registered volScalar, volVector, volSphericalTensor, volSymmTensor and volTensor fields

Which from what I can understand, means that it cannot read/recognize dQ. Has anyone experienced this before? and does anyone know another method of extracting dQ. I have tried execFlowfuntionobjects but my thermomodel is not supported.

Many Thanks,

ris

ris January 18, 2013 13:01

Hello,

I have another question regarding extracting the liquid penetration length from the data set during runtime. Looking in spraycloud.H , I can see there is a liquidPenetration function however I am not too familiar with c++ and have trouble in trying to output this value. Please could some point me in the direction of outputting this value to a log file during runtime or a similar output to what is present in OF2.1.x.

Many Thanks,

ris.

mturcios777 January 18, 2013 13:34

dQ is not a registered field as it is only output as needed from the chemistry model (chemistry.dQ()). You would need to create a field registered with the object (say Dq) and update is every iteration with the chemistry (Dq = chemsitry.dQ()).

Have a look at the createFields.H for reactingParcelFoam (which is also used with sprayFoam) to see how to create a registered field.

As for penetration length, have a look at this post:
http://www.cfd-online.com/Forums/ope...netration.html

Its slightly different in 2.1.x, but there are still member functions for penetration that you could use (search through the code documentation here: http://www.openfoam.org/docs/cpp/). This would require you to modify the code, and I would recommend creating a new solver so as not to break the stock one.

ris January 18, 2013 13:39

Thanks for the quick response, I will attempt to get something working soon.


All times are GMT -4. The time now is 04:28.