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

SprayFoam, vapor penetration shorter than the liquid penetration

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 13, 2018, 09:13
Default SprayFoam, vapor penetration shorter than the liquid penetration
  #1
New Member
 
heruitian
Join Date: Jun 2018
Posts: 6
Rep Power: 8
heruitian is on a distinguished road
Hi,
I am trying to simulate the n-dodecane evaporation based on sprayFoam in OF. The ambient temperature and pressure is 900K, 3.96MPa respectively. With the C12H26 file in each time documents, I define the vapor penetration just like the definition in other commercial software(converge). But the vapor penetration is shorter than the liquid penetration in the initial time,about 0.3ms. It's unacceptable in the experiments. I wonder if there're mistakes in the definition of vapor penetration or the problems of the setup values, such as KHRT parameters in OF,which can let the droplet evaporate faster in the initial time? Also, I try to add ORourke model, distortedspheredrag model. But the problem is still there. Could anyone give me a hand? I will be really grateful.
Thank you!
heruitian is offline   Reply With Quote

Old   June 13, 2018, 20:40
Default
  #2
Senior Member
 
zhangyan's Avatar
 
Yan Zhang
Join Date: May 2014
Posts: 120
Rep Power: 12
zhangyan is on a distinguished road
Can you show your code about vapor penetration?
__________________
https://openfoam.top
zhangyan is offline   Reply With Quote

Old   June 13, 2018, 21:18
Default
  #3
New Member
 
heruitian
Join Date: Jun 2018
Posts: 6
Rep Power: 8
heruitian is on a distinguished road
Quote:
Originally Posted by zhangyan View Post
Can you show your code about vapor penetration?
Dear zhangyan,
Thank you for your reply. I want to upload the definition document but the problem is that I don't define it in OF. So it's not convenient to understand. Can I explain it for you with the core code?

The definition of the vapor penetration is "maximum distance from the nozzle outlet to where the fuel mass is 0.1%" by Sandia lab.

Actually I output the center of meshes and write a really simple script outside OF to read the "c12h26" document. The code searches the values which are larger than 0.001 in "c12h26", and find the relative positions in "mesh center.txt". At the end, the farthest position is obtained by each "c12h26" document, which is the vapor penetration. Here is the core code.

If I cannot explain it clearly, please let me know. Thank you very much!







if float(lines[22+i])>0.001:
if y[i]>max_y:
max_y = y[i]
f_.write(iter+','+str(max_y)+'\r\n')
f.close()
f_.close()
heruitian is offline   Reply With Quote

Old   June 13, 2018, 21:26
Default
  #4
Senior Member
 
zhangyan's Avatar
 
Yan Zhang
Join Date: May 2014
Posts: 120
Rep Power: 12
zhangyan is on a distinguished road
I think you are right. But I cannot find what the trouble is.
Here is my codes for outputting vapor penetration in OF solver. I hope it helps.
Code:
    const dictionary& subModelDict = parcels.subModelProperties();
    vector position = subModelDict.subDict
    (
        "injectionModels"
    ).subDict("model1").lookup("position");

    vector direction = subModelDict.subDict
    (
        "injectionModels"
    ).subDict("model1").lookup("direction");


    scalar vaporPenetration(0);

    const word fuel(thermo.lookup("fuel"));
    const label fuelIndex(composition.species()[fuel]);

    forAll (Y[fuelIndex],cellI)
    {
        if (Y[fuelIndex][cellI] >= 0.001)
        {
            vector raw = position - mesh.C()[cellI];
            if (mag(raw&direction) > vaporPenetration)
            {
                vaporPenetration = mag(raw&direction);
            }    
        }
    }

    reduce(vaporPenetration, maxOp<scalar>());
__________________
https://openfoam.top
zhangyan is offline   Reply With Quote

Old   June 13, 2018, 21:52
Default
  #5
New Member
 
heruitian
Join Date: Jun 2018
Posts: 6
Rep Power: 8
heruitian is on a distinguished road
Hi zhangyan,
I wonder if there is the problem in the "spraycloudsproperties/injectionmodel/flowtype". I use both the "pressureDriven velocity" and "flowrateanddischarge" respectively. The phenomenon that the liquid penetration is larger than the vapor one is not so obviouly with the "pressureDriven velocity" type. Thank you!
heruitian is offline   Reply With Quote

Old   August 29, 2018, 14:41
Default
  #6
New Member
 
Will
Join Date: Aug 2018
Posts: 2
Rep Power: 0
tatan is on a distinguished road
Hello,
thank you zhangyan for showing us your code. I am also using sprayFoam to simulate a n-heptane injection and want to examine the vapor penetration.



The problem is that i'm using the coneNozzleInjection model, where the parcels are sprayed in an angle to conical shape and this direction at which i want to measure the penetration is not identical with the nozzle direction.


I already tried to specify the vector as the injection direction but this didn't work well. Does anyone have an idea how to output the vapor penetration in this case?

Thanks in advance!
tatan is offline   Reply With Quote

Old   August 18, 2020, 10:15
Default
  #7
rmn
New Member
 
Roman Reinhardt
Join Date: Jun 2020
Location: Germany
Posts: 4
Rep Power: 6
rmn is on a distinguished road
Hi guys,

I want to extract the vapor penetration length of a n-heptane injection as well, post simulation (sprayFoam).

My goal is to get VPL along the axis of injection.
So basically I want to do the same as heruitian described above.

But I cannot make out how to extract the values for the center line of my mesh, which is also the injection axis (x-axis).

My time directories contain a "C7H16" file each, which contains the values of the volScalarField for each cell. But which cell has which position?

I hope some of you guys can help the little OpenFOAM-Newbie that I am.

Thank you.

Greetings,
Roman
rmn is offline   Reply With Quote

Old   August 19, 2020, 04:18
Default
  #8
Senior Member
 
zhangyan's Avatar
 
Yan Zhang
Join Date: May 2014
Posts: 120
Rep Power: 12
zhangyan is on a distinguished road
Quote:
Originally Posted by rmn View Post
Hi guys,

I want to extract the vapor penetration length of a n-heptane injection as well, post simulation (sprayFoam).

My goal is to get VPL along the axis of injection.
So basically I want to do the same as heruitian described above.

But I cannot make out how to extract the values for the center line of my mesh, which is also the injection axis (x-axis).

My time directories contain a "C7H16" file each, which contains the values of the volScalarField for each cell. But which cell has which position?

I hope some of you guys can help the little OpenFOAM-Newbie that I am.

Thank you.

Greetings,
Roman
Have a look at this solver:
https://github.com/ZhangYanTJU/ZYsprayFoam
__________________
https://openfoam.top
zhangyan is offline   Reply With Quote

Old   August 20, 2020, 10:58
Default
  #9
rmn
New Member
 
Roman Reinhardt
Join Date: Jun 2020
Location: Germany
Posts: 4
Rep Power: 6
rmn is on a distinguished road
Quote:
Originally Posted by zhangyan View Post
Have a look at this solver:
https://github.com/ZhangYanTJU/ZYsprayFoam
Hi Yan,

thank you for your reply.

Basically I know what I have to do,
but my problem still is to understand where the connection between the scalarfield of my fuel and the cell vectors/coordinates is made.
I can't see any links there in my case data.

Which entry from the fuel scalar field belongs to which cell?

From your code:

if (Y_fuel[cellI] >= 0.001)
{
vector raw = position - mesh.C()[cellI];
if (mag(raw&direction) > vaporPenetration)
{
vaporPenetration = mag(raw&direction);


I don't understand how I can make that link between my values and the position/cell in my mesh.
I almost feel like if I'm missing some data there.

Can you give me some more information about that?
I really want to understand the background instead of just using your solver.

Thank you,

Roman
rmn is offline   Reply With Quote

Reply

Tags
evaporation, penetration, sprayfoam


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
Extracting Liquid Penetration Length ahcai007 OpenFOAM Running, Solving & CFD 15 April 18, 2022 09:01
Fluctuating Liquid Penetration for Wedge sprayFoam ahcai007 OpenFOAM Running, Solving & CFD 15 March 22, 2018 02:53
Liquid penetration length a.elwardany FLUENT 0 March 28, 2015 04:11
Add liquid length to sprayFoam solver ENKIME OpenFOAM Running, Solving & CFD 0 May 14, 2014 13:11
ploting liquid penetration mooyii OpenFOAM 2 September 9, 2011 18:24


All times are GMT -4. The time now is 21:52.