|
[Sponsors] |
August 14, 2013, 08:23 |
Extracting Liquid Penetration Length
|
#1 |
New Member
Ah Cai
Join Date: Dec 2010
Location: Malaysia
Posts: 16
Rep Power: 16 |
Hi,
I am using OF22x, sprayFoam. I would like to output the Liquid Penetration Length (LPL) to a file so that I can plot it against runTime. But, I can't seem to find the correct function for LPL. For 20x, the function to call is dieselSpray.penetration(0.95), but it does not work for sprayFoam in 22x. Any advice is appreciated. Thanks!! Ahcai |
|
August 14, 2013, 13:55 |
|
#2 |
Senior Member
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28 |
Its similar for OF22x. but instead of dieselSpray.penetration(0.95), use parcels.penetration(0.95). The member function has the same name, but the spray is now called parcels as sprayFoam is more general than dieselFoam.
|
|
August 16, 2013, 07:14 |
|
#3 |
New Member
Ah Cai
Join Date: Dec 2010
Location: Malaysia
Posts: 16
Rep Power: 16 |
||
May 15, 2014, 15:44 |
Liquid Length
|
#4 | |
Member
yes
Join Date: Apr 2014
Posts: 32
Rep Power: 12 |
Quote:
Hello Mutricios I'm also new at using openFoam so I really appreciate some advice with my issue. I was running a simulation of diesel spray in openFoam with OpenFoam 2.2.2. I need a way to extract liquid length (LL) not liquid penetration(penetracion) to get a graph like the one attach. I'm running out of sources of information because the specific of the problem. Hopping you can help. Thanks a lot my friend Kind regards |
||
May 15, 2014, 15:57 |
|
#5 |
Senior Member
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28 |
I don't believe there is a default function for calculating the liquid length, though I could be wrong. You'll have to search the Kinematic library for sprays to see if something is there. Or you'll need to add that function, which doesn't look too difficult. You'll have to follow a similar procedure that the penetration function uses, but instead of averaging with mass, just take the max of all the distances. Good luck!
|
|
May 16, 2014, 13:03 |
|
#6 |
Member
yes
Join Date: Apr 2014
Posts: 32
Rep Power: 12 |
Thanks a lot for the quick answer my friend I really appreciate your time.
Really I'm a rookie in this, but exactly where can I find the statement that, need to be added, in the main solver or in the cloud properties? Also I'm using foamLog for extract that information and bash commands for the penetration do you know a simplest way for extract the information? King regards. |
|
March 2, 2016, 17:42 |
|
#7 |
New Member
Join Date: Feb 2016
Location: Italy
Posts: 4
Rep Power: 10 |
Hi!
I am new to OpenFOAM too and I need to output LPL to a file so that I can plot it against runTime. My problem is that I really don't know what to do. I mean: how do I use parcels.penetration? I am currently using OF version 3.0.x with sprayFoam solver. Thank you in advance ^^ |
|
March 2, 2016, 23:36 |
|
#8 | |
Member
yes
Join Date: Apr 2014
Posts: 32
Rep Power: 12 |
Quote:
I use to have the same issue, so as I was recommended, you can record your simulation in a log file, when it finish you can use bash commands such as grep, to extract file, awk to manipulate data and other to extract certain lines in the log file such as penetration and time. Using this commands you can extract the penetration and the time and plot it. I suggest this commands: ps -ef |grep "" log| more » time.txt This command will extract from the log file all the coincidences of the word time in all the lines you can also do it with the Liquid penetration. awk '{$3 = $3*a; print$3}' a=1000 tim.txt » time1.txt This will print all the numbers, however the time in the log file is in seconds, a common practice is to set it in miliseconds so you can multiply for 1000. Finally past time1.txt liquid1.txt | awk'{print$1, $2}' »LL.txt This will create a txt file with two columns of time and liquid penetration and you can plot as you wish, I recommend plot in veusz, quite good ploter. Hope this help Kind Regards |
||
March 3, 2016, 04:44 |
|
#9 |
New Member
Join Date: Feb 2016
Location: Italy
Posts: 4
Rep Power: 10 |
Hi ENKIME!
Thank you very much for answering so quickly, your reply has been very helpful. I have just another question on the last command you wrote, past time1.txt liquid1.txt | awk'{print$1, $2}' »LL.txt . As I tried it as it is it gave me this error: No command 'past' found, did you mean: Command 'pat' from package 'dist' (universe) Command 'paste' from package 'coreutils' (main) Command 'nast' from package 'nast' (universe) Command 'pass' from package 'pass' (universe) Command 'last' from package 'sysvinit-utils' (main) past: command not found awk{print$1, $2}: command not found I thought I should try with paste, and as a result it gives me again the last error line, awk{print$1, $2}: command not found. Do you have any suggestion on on how can I fix it? Sorry if this is a silly question, I really have only the basis to work with OF... Thank you again ^^ I think I resolved, it seems it was just a typo. Thank you anyway ^^ Last edited by sara91; March 3, 2016 at 17:14. |
|
March 5, 2016, 23:51 |
|
#10 |
Member
yes
Join Date: Apr 2014
Posts: 32
Rep Power: 12 |
Dear Sara
Sorry my mistake the correct command is paste; typo error. Your welcome |
|
October 20, 2016, 18:28 |
|
#11 |
New Member
Luis Fernando Rua Mojica
Join Date: May 2016
Location: Monterrey - México
Posts: 10
Rep Power: 10 |
Hello friends,
I think is more simple to prepare a file from de begining of simulation. I use logfiles to write the information in each loop. There we can extract all the information what we want. the procedure is create two files, those can be taked of the solver sprayEngineFoam: logSumary.H startSummary.H They can be copied to the folder sprayFoam (a level up from the sprayEngineFoam). After that, we modify the file sprayFoam.C to call the files in the simulation. Then is necessary recompile the solver, being at the ubication of the solver we ejecute wclean and wmake. I attach the files that I prepared. I'm sorry for bad english |
|
October 20, 2016, 18:30 |
|
#12 |
New Member
Luis Fernando Rua Mojica
Join Date: May 2016
Location: Monterrey - México
Posts: 10
Rep Power: 10 |
I have a question. Why the solver deliver the LPL at 95% and not the 100%?
|
|
October 20, 2016, 18:44 |
|
#13 |
Senior Member
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28 |
95% is pretty standard for liquid spray penetration studies, as the remaining 5% of mass is vapour during injection (due to self similarity). You are free to write your own function that uses whatever fraction you like, but there isn't much point as pretty well everyone uses 95%:
http://homepages.cae.wisc.edu/~hesse...n%20andSmr.htm |
|
October 20, 2016, 18:53 |
|
#14 |
New Member
Luis Fernando Rua Mojica
Join Date: May 2016
Location: Monterrey - México
Posts: 10
Rep Power: 10 |
thanks so much!!!
|
|
April 9, 2017, 11:06 |
|
#15 | |
New Member
Alvaro
Join Date: Oct 2012
Location: Colombia
Posts: 1
Rep Power: 0 |
Quote:
Hello Mr Marco How can I extract massTotal, referring to Mass transfer phase change |
||
April 18, 2022, 10:01 |
|
#16 |
New Member
Join Date: Feb 2022
Posts: 7
Rep Power: 4 |
Hello, I have the same problem. Could you please tell me how you solved it? How did you plot the Liquid penetration?
I am new into OpenFoam and therefore I don't know how to do that |
|
Tags |
dieselspray, sprayfoam |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Liquid penetration length and lift-off length | lunar1984 | STAR-CD | 3 | October 5, 2017 06:00 |
Turbulence length scale and integral length scale | rizhang | CFX | 2 | April 22, 2016 08:22 |
ploting liquid penetration | mooyii | OpenFOAM | 2 | September 9, 2011 19:24 |
Determination of liquid length in fluent | jwillie2000 | FLUENT | 0 | August 6, 2010 12:21 |
Need some help for total liquid fraction | linus | FLUENT | 0 | December 19, 2006 04:29 |