CFD Online Logo CFD Online URL
Home > Forums > OpenFOAM Programming & Development

ReactingParcel Temperature

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree2Likes
  • 1 Post By ecbmxer
  • 1 Post By dkxls

LinkBack Thread Tools Display Modes
Old   July 16, 2014, 16:52
Default ReactingParcel Temperature
Clint Bedick
Join Date: May 2011
Posts: 38
Rep Power: 7
ecbmxer is on a distinguished road
When running a simulation in reactingParcelFoam, thermo and kinematic quantities are solved for in the parcel. However, in the wall interaction libraries where I am working, the parcel is considered a "KinematicParcel". From looking in the other classes, "KinematicParcel" inherits "ThermoParcel".

I have a particle, p, for which I can easily access kinematic quantities of velocity (p.U())), density (p.rho()), etc from within the LocalInteraction.C file. However, the methods p.T() and p.Cp() do not work.

It says:

error: class Foam::KinematicCloud<Foam::Cloud<Foam::KinematicPa rcel<Foam:article> > >:arcelType has no member named T

If I directly output p to a textfile with the "<<" operator, I can see all the quantities though, including temperature and cp.

How can I access temperature and cp?

ecbmxer is offline   Reply With Quote

Old   July 17, 2014, 14:37
Clint Bedick
Join Date: May 2011
Posts: 38
Rep Power: 7
ecbmxer is on a distinguished road
Still working with this. I looked in the patch post processing function to see if there was any example of working with the parcel thermo data, but it does the same thing as I have been doing, using '<<' to directly output the parcel "p" to a file. When I do this, here is what I get:

(0.0283123515 0.02859002651 0.00127) 12807 47865 2 0 8 1 -1 1 3.005301369e-05 0 (-1.410597984 -1.062876124 0) 4900 0.01934490271 0 (0 0 0) 1215.803714 850 6.964000442e-11 3(0 0 1) 0() 0() 1(1)

This contains everything you could want to know about the parcel currently identified as having impacted the patch of interest. You can see the temperature is right there! I just cannot access it. Very frustrating.
ecbmxer is offline   Reply With Quote

Old   July 20, 2014, 10:49
Clint Bedick
Join Date: May 2011
Posts: 38
Rep Power: 7
ecbmxer is on a distinguished road
Bumping up for some help! Does anyone know how the KinematicParcel and ThermoParcel classes interact?
ecbmxer is offline   Reply With Quote

Old   July 26, 2014, 08:21
Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 9,648
Blog Entries: 39
Rep Power: 99
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Greetings Clint,

I've read your posts above a couple of times and I haven't managed to figure out where I should be looking at to try and help you.
Can you please provide more details? Namely:
  1. Have you made any modification on the solver itself?
  2. Are you modifying the wall interaction directly in OpenFOAM's source code, or are you creating your own library?
  3. Where exactly are the files you're looking into and what specific code are you referring to? And example of where you're trying to modify the code would make it easier to understand
Best regards,
wyldckat is offline   Reply With Quote

Old   July 26, 2014, 12:27
Clint Bedick
Join Date: May 2011
Posts: 38
Rep Power: 7
ecbmxer is on a distinguished road
Hi wyldckat,

Thanks alot for the response! I actually solved this issue of accessing particle temperature with the help of a colleague. What I am doing is modifying the wall interaction library to implement my own "coefficient of restitution" model, as a function of particle and wall parameters. I am not modifying the solver.

Since this post, instead of modifying the existing library (which is what I was originally doing), I copied the whole "LocalInteraction" wall model and compiled a "DepositionLocalInteraction" library. This way my model would be independent of the original OpenFOAM installation. In my cloud properties file, instead of saying "patchInteractionModel localInteraction", I say "patchInteractionModel DepositionLocalInteraction" and it uses my library.

But the problem I was having with accessing wall temperature was related to the way the patch interaction libraries are compiled for ALL parcel types, including a purely kinematicParcel, which does not have temperature. There are a couple of files "makeBasicReactingParcelSubmodels" and "makeParcelPatchInteractionModels", that call functions for all of the parcel types.

I am only going to use this with a "reactingParcel" (actually the multiphase variant), so by removing all of the other parcel types that won't be used, it allows particle temperature to be accessed with the "p.T()" method. So I made a "makeDepositionSubmodel" file, that just calls one function to make the submodels only for my reactingParcel type:

makePatchInteractionModelType(DepositionLocalInter action, basicReactingMultiphaseCloud);

Where, DepositionLocalInteraction is my new version of the original OpenFOAM class LocalInteraction. I am able to then compile the new library and put it in the FOAM_USER_LIBBIN, where I can include it in my controlDict.

I hope that all made sense. If anybody has further questions, let me know.
wyldckat likes this.
ecbmxer is offline   Reply With Quote

Old   July 28, 2014, 06:09
Senior Member
dkxls's Avatar
Join Date: Feb 2011
Location: Helsinki, Finland
Posts: 156
Rep Power: 11
dkxls will become famous soon enough
I basically described already several times how to implement your own Lagrangian sub-models.
I guess the last time here for a patch-interaction model:
try to creat Splash in PatchInteractionModel

Anyways, seems you have figured it out on your own.

Btw, it's much easier to read your posts and give you help, when you use [CODE] tags (for source code and error messages) and mention the OpenFOAM version.
wyldckat likes this.
dkxls is offline   Reply With Quote


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with zeroGradient wall BC for temperature - Total temperature loss cboss OpenFOAM 10 March 5, 2015 07:57
Calculation of the Governing Equations Mihail CFX 7 September 7, 2014 06:27
whats the cause of error? immortality OpenFOAM Running, Solving & CFD 11 April 22, 2014 12:32
is internalField(U) equivalent to zeroGradient? immortality OpenFOAM Running, Solving & CFD 7 March 29, 2013 02:27
Static Temperature / Opening Temperature JulianP CFX 6 March 23, 2013 17:03

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