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

introducing a new fluid into openFoam

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 1, 2011, 02:20
Exclamation introducing a new fluid into openFoam
  #1
New Member
 
Alireza Zamani Aghaie
Join Date: May 2011
Location: Mashhad, Iran
Posts: 4
Rep Power: 14
arza is on a distinguished road
Hello Everybody

I need to introduce a new fuel in dieselFoam solver (like Marine Fuel Oil (MFO) or bio-diesel). I have all the thermophysical properties of this new fuel.
Would you please help me on this. How can I introduce this new fluid?
arza is offline   Reply With Quote

Old   July 1, 2011, 03:37
Default
  #2
New Member
 
Joel Lehikoinen
Join Date: Jun 2011
Posts: 26
Rep Power: 14
joel.lehikoinen is on a distinguished road
I've never used dieselFoam so I've no idea if it works the same way as with other solvers. In the other solvers, you specify the thermophysical properties of the fluid in the constant/thermophysicalProperties file. The syntax was renewed for OF-2.0.0., see
http://openfoam.com/version2.0.0/the...opertiesSyntax
joel.lehikoinen is offline   Reply With Quote

Old   July 4, 2011, 17:24
Default
  #3
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28
mturcios777 will become famous soon enough
For dieselFoam, the thermophysicalProperties file has an entry called liquidComponents where you specify what the liquid in the simulation is, as well as the coefficients for the thermophysical models. There are many predefined liquids in $FOAM_SRC/thermophysicalModels/liquids (for OF 1.6 at least, in 2.0 I think its now in $FOAM_SRC/properties/liquids)

If you are going to be using this new liquid quite often, I suggest making a new liquid for OpenFOAM by navigating to $FOAM_SRC/thermophysicalModels/liquids, copying over the liquid that is closest to the one you want to implement (likely C7H16), and making the following changes:

1) Change every occurrence of C7H16 to the name of the new fuel you are implementing. This includes the source filenames and the directory name, and they must all be consistent.

2) Navigate back to the liquids directory and run
Code:
wmake libso
to remake the library (this is for OF 1.6, in 2.0 you may need to move to the properties directory and execute this command)

2.5) If you missed anything in Step 1, you will get errors telling you where things went wrong. Once you are able to build the library with no errors, run a dieselFoam case with the "new" liquid (still just regular C7H16) to test that it works.

3) Once you have a new library to play with, go to the .C file and start changing the constants in the first constructor to match the new fuel. You can read the documentation for the file at http://foam.sourceforge.net/docs/cpp/a07803_source.html (the form hasn't changed from OF 1.6). Click on liquidProperties for an explanation of the liquidProperties constructor. You'll need to construct the other thermophysical quantities such as density and vapourPressure from the NSRDS functions, which are also listed in the .C file.

4) Continue recompiling and testing until the library compiles properly, You should now have a brand new liquid accessible in OpenFOAM.

Its not trivial, but relatively straightforward, Good luck
mturcios777 is offline   Reply With Quote

Old   May 29, 2012, 06:30
Default
  #4
New Member
 
Peter Bishop
Join Date: Jan 2012
Posts: 20
Rep Power: 14
PeterBishop is on a distinguished road
I know this is an hold post, but I'm trying to introduce a new liquid in Openfoam to simulate LOx spray injection with sparyFoam. I'm experiencing some problem to find the reference book for NSRDS functions of Daubert and Danner, is there an alternative way to obtain the polynomial coeffcients?
Is there another reference?

Thanks
PeterBishop is offline   Reply With Quote

Old   February 5, 2016, 06:28
Default
  #5
New Member
 
Moritz
Join Date: Nov 2015
Posts: 16
Rep Power: 10
Momo1805 is on a distinguished road
Hey Peter,

did you succeed with the coefficients for the NSRDS functions? Because I am currently facing the same issue

Please let me know if you or anyone found a way to solve this

Cheers
Momo1805 is offline   Reply With Quote

Old   October 4, 2016, 12:34
Default how to find liquidProperties for liquid.C
  #6
Member
 
SM
Join Date: Dec 2010
Posts: 97
Rep Power: 15
canopus is on a distinguished road
I have created a new liquid namely C3H8O3 (glycerol) by copying one of the existing liquids from OF as described here.

It works also but now I want to change the values that I find in C3H8O3.C

Where do I get the values like those below for glycerol or say any other substance?

Code:
Foam::C3H8O3::C3H8O3()
:
    liquidProperties
    (
        44.096,
        369.83,
        4.248e+6,
        0.2, 0.276,
        85.47,
        1.685e-4,
        231.11,
        0.0,
        0.1523,
        1.31e+4
    ),
    rho_(60.6628672, 0.27453, 369.83, 0.29359),
    pv_(59.078, -3492.6, -6.0669, 1.0919e-05, 2.0),
    hl_(369.83, 662395.682148041, 0.78237, -0.77319, 0.39246, 0.0),
    Cp_
    (
        369.83,
        9.48470319647089,
        2576.87772133527,
        95.3560311677331,
       -131.535634282099
    ),
    h_(0.0, 0.0, 0.0, 0.0, 0.0, 0.0),
    Cpg_(1177.43105950653, 4364.34143686502, 1626.5, 2648.76632801161, 723.6),
    B_
    (
        0.00255578737300435,
       -2.24963715529753,
       -102276.850507983,
        7.00743831640058e+15,
       -1.59878447024673e+18
    ),
    mu_(-6.9281, 420.76, -0.63276, -1.713e-26, 10.0),
    mug_(2.4993e-07, 0.68612, 179.34, -8254.6),
    K_(0.26755, -0.00066457, 2.774e-07, 0.0, 0.0, 0.0),
    Kg_(-1.12, 0.10972, -9834.6, -7535800),
    sigma_(369.83, 0.05092, 1.2197, 0.0, 0.0, 0.0),
    D_(147.18, 20.1, 44.096, 28) // note: Same as nHeptane
{}
canopus is offline   Reply With Quote

Old   August 6, 2018, 19:06
Default
  #7
Member
 
Join Date: Oct 2015
Posts: 63
Rep Power: 10
Scram_1 is on a distinguished road
Hi Canopus!
Did you manage to figure out the coefficients for Glycerol?

Best,
Scram_1
Scram_1 is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Gmsh] 2D Mesh Generation Tutorial for GMSH aeroslacker OpenFOAM Meshing & Mesh Conversion 12 January 19, 2012 04:52
Cross-compiling OpenFOAM 1.7.0 on Linux for Windows 32 and 64bits with Mingw-w64 wyldckat OpenFOAM Announcements from Other Sources 3 September 8, 2010 07:25
Summer School on Numerical Modelling and OpenFOAM hjasak OpenFOAM 5 October 12, 2008 14:14
My Revised "Time Vs Energy" Article For Review Abhi Main CFD Forum 2 July 9, 2002 10:08
Terrible Mistake In Fluid Dynamics History Abhi Main CFD Forum 12 July 8, 2002 10:11


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