CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

writeObjects, internal energy

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 22, 2022, 14:33
Default writeObjects, internal energy
  #1
New Member
 
cbarring
Join Date: Sep 2014
Posts: 5
Rep Power: 12
cbarring is on a distinguished road
Hi All. I am trying to write the internal energy that is calculated in a compressible flow calculation (compressibleInterFoam). Previously, I have written density data using code in controlDict. See this code below.

I want to extract internal energy. Inside the code below, have tried using "e", "thermo:e", etc. Nothing works. Does anybody have any suggestions?

Regards

---- Successful code for extracting density data, placed at bottom of controlDict ----

functions
{
writeObjects1
{
type writeObjects;
libs ( "libutilityFunctionObjects.so" );
objects
(
// list of fields/variables to be written
thermo:rho
);
writeControl writeTime;
writeInterval 1;
}
}
cbarring is offline   Reply With Quote

Old   February 26, 2022, 21:55
Default
  #2
New Member
 
Join Date: Dec 2021
Location: Darmstadt
Posts: 6
Rep Power: 5
dkaddar is on a distinguished road
Maybe I am missing something, but the solver does not solve an energy equation but the temperature equation instead.


However, if the internal energy is indeed calculated by the solver, it would be registered in the object database. To see all the fields available in the database, add a "dummy" variable to the function object. Run the case and check your simulation log at the time step where the function object writes out the fields. You should see an error that "dummy" could not be found and get a list of all the registered objects (and thus the ones available to you).
dkaddar is offline   Reply With Quote

Old   February 27, 2022, 19:53
Default
  #3
New Member
 
cbarring
Join Date: Sep 2014
Posts: 5
Rep Power: 12
cbarring is on a distinguished road
Hi dkaddar: Thanks very much for your reply. This is most useful.
cbarring is offline   Reply With Quote

Reply

Tags
controldict, internal energy, writeobjects


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
using chemkin JMDag2004 OpenFOAM Pre-Processing 2 March 8, 2016 23:38
Internal Energy equation in viscous compressible floe equations mihirmakwana6 Main CFD Forum 8 August 18, 2015 06:11
Decrease of internal energy Tobard FLUENT 6 July 11, 2011 22:04
Internal fan - energy used pk FLUENT 0 April 22, 2008 08:01
Why FVM for high-Re flows? Zhong Lei Main CFD Forum 23 May 14, 1999 14:22


All times are GMT -4. The time now is 13:59.