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

Print Cp and Cv using function objects

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 9, 2023, 08:16
Default Print Cp and Cv using function objects
  #1
New Member
 
Harish Gopal
Join Date: Mar 2023
Posts: 4
Rep Power: 3
HarishZHAW is on a distinguished road
Hello All,


Hope you are having a great day !


I have a query regarding printing out gas properties like specific heats at constant pressure and volume (Cp and Cv) to the output directories during computation. I am using OF V10 for my computations.



The functionObjects method is a cool way to print out any quantity of our interest to the output directory. Therefore, I created two new function objects CpT and CvT, which essentially prints out the product of specific heats and temperatures. I basically created two copies of the functionObject for Mach number and edited it wherever necessary and changed the mathematical expressions (please see attached my function CpT files).


After this, I went to the top level Make directory '/src/functionObjects/field/' and modified the Make/files so that these two functions were added to it. (also see my Make/files document attached)


After this, I did wmake on the top level directory to generate the library 'libfieldFunctionObjects.so' - the make was fine and worked well without any errors.


However, when I try to use the CpT function object it simply does not appear in the available list of functionObjects and I get the following error when I try to use it:


--> FOAM FATAL IO ERROR:
Cannot find functionObject configuration file CpT

Available configured functionObjects:
89
(
CourantNo
Lambda2

....
...
...)


Please, I would be extremely grateful if someone can point out where I am going wrong. Any suggestions, tips and pointers would be very useful please. Am I perhaps, missing some step during compilation of the functionObjects. Please not that I am not modifying the source code in the /opt/openfoam directory but I am creating a local copy in my $WM_PROJECT_USER_DIR directory to make the modifications and then only copying the libfieldFunctionObjects.so file to the source directory in /opt/openfoam


Thanks a lot and looking forward to your response !


Harish
Attached Files
File Type: c CpT.C (2.6 KB, 11 views)
File Type: h CpT.H (2.7 KB, 3 views)
File Type: txt files.txt (2.1 KB, 4 views)
HarishZHAW is offline   Reply With Quote

Reply


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



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