|
[Sponsors] |
November 25, 2014, 22:49 |
Access level-set function in UDF
|
#1 |
New Member
Join Date: Sep 2009
Posts: 19
Rep Power: 17 |
Hi Experts,
For multiphase problem in Ansys Fluent, if the coupling of volume-of-fluid and level-set methods is used, I wonder how to access the value of level-set function in User-Defined Functions. Thank you! Actually, VOF can be accessed by using function C_VOF(c,t) as mentioned in UDF manual, but I can't find similar thing for level-set function. |
|
November 26, 2014, 04:10 |
|
#2 |
Senior Member
B_Kia
Join Date: May 2014
Location: Ir
Posts: 123
Rep Power: 12 |
hi friend
use this : C_LSF(c,t) it returns level set function in cell good luck |
|
November 26, 2014, 04:14 |
|
#3 |
Senior Member
B_Kia
Join Date: May 2014
Location: Ir
Posts: 123
Rep Power: 12 |
by the way there are some functions too like C_LSF_M1(c,t) or C_LSF_RG(c,t)
|
|
November 26, 2014, 05:59 |
|
#4 |
New Member
Join Date: Sep 2009
Posts: 19
Rep Power: 17 |
Hi HyperNova,
Thank you very much for your help! It works perfectly. One note for who has same problem: beside of "udf.h", the "sg_ls.h" header file need to be included in source file. More information of "sg_ls.h" header file can be found in the install folder, for ex. C:\Program Files\ANSYS Inc\v150\fluent\fluent15.0.0\src |
|
November 26, 2014, 16:51 |
|
#5 |
Senior Member
B_Kia
Join Date: May 2014
Location: Ir
Posts: 123
Rep Power: 12 |
yes my friend , before i answer your quastion i looked there to find it , i beilive that there is access to any kind of data that fluent produces , i am happy that your problem is solved , wish you luck , forgive my bad english
|
|
November 26, 2014, 16:57 |
|
#6 |
Senior Member
B_Kia
Join Date: May 2014
Location: Ir
Posts: 123
Rep Power: 12 |
let me ask you a quastion my friend , when you turn on level set function does it increase the accuracy in interface capturing ? what does it do exactly ? i will be thankfull if you explain it
|
|
November 27, 2014, 00:24 |
|
#7 |
New Member
Join Date: Sep 2009
Posts: 19
Rep Power: 17 |
Hi HyperNova,
In my test case with bubble bursting, the coupling VOF and LS gives "better" results than just using VOF (in comparison the interface evolution with the other results in literature). I have just finished one test case, so I can't comment which one gives better results in general. I found from literature that: VOF is good at mass conservation, while LS has advantage in precise gradient calculation of curvature. So the coupling VOF and LS will combine both of their advantages. Some papers talk about this subject, if you are interested, can be found from internet, for ex.: Nichita et al., A level set method coupled with a volume of fluid method for modeling of gas-liquid interface in bubbly flow, J. of Fluids Eng., August 2010, Vol. 132, 081302 |
|
November 27, 2014, 02:11 |
|
#8 |
Senior Member
B_Kia
Join Date: May 2014
Location: Ir
Posts: 123
Rep Power: 12 |
hi my friend , i am working on modelling bubble plume too , so interesting that we are working the same problem , so i think it is better that i turn on level set too for better free surface capturing , actually i have problem in free surface, after some time steps artificial velocity at free surface become bigger and bigger , i dont know why i tried scalable wall function but it didnt help , if you mind i send photos of my solution, you may have idea to solve it , thank you
|
|
November 30, 2014, 02:26 |
|
#9 |
New Member
Join Date: Sep 2009
Posts: 19
Rep Power: 17 |
Hi HyperNova,
Did you solve your problem by coupling VOF and LS? 3 mesh layers are used for interface description. You can reduce time step value and refine mesh. |
|
November 30, 2014, 03:15 |
|
#10 |
Senior Member
B_Kia
Join Date: May 2014
Location: Ir
Posts: 123
Rep Power: 12 |
Hi my dear friend
actually not i think there is bug in fluent when modelling bubble plume with vof coupled dpm , when the flow rate of air injecting to water (dpm flowrate) is small fluent produce false results ! but this deos not happen when the flow rate is bigger of my test case , my flow rate is 4.0833e-06 kg/s , i sent 2 photos of my problem , i will appreciate if you take a look to them , thanks |
|
November 30, 2014, 04:28 |
|
#11 |
New Member
Join Date: Sep 2009
Posts: 19
Rep Power: 17 |
Hi HyperNova,
Sorry. I have no ideas, no experience on your problem. Let's waiting comments from the other members. Or consulting some other studies like: http://e-collection.library.ethz.ch/...h-26091-02.pdf Good luck! |
|
November 30, 2014, 04:39 |
|
#12 |
Senior Member
B_Kia
Join Date: May 2014
Location: Ir
Posts: 123
Rep Power: 12 |
hi tinhhtt,
i wanna ask what your works about ? you've mentioned before your works about bubble bursting at free surface , are you modelling the behavior of fluid ? i would appreciate if you give me a little detail , because i am working on bubble plume too , thanks |
|
November 30, 2014, 04:50 |
|
#13 |
New Member
Join Date: Sep 2009
Posts: 19
Rep Power: 17 |
My test case is quite simple: bubble bursting at free surface. Just one bubble is considered. Simulation is carried out from the moment that small hole have been formed on the top of bubble.
|
|
November 30, 2014, 15:10 |
|
#14 |
Senior Member
B_Kia
Join Date: May 2014
Location: Ir
Posts: 123
Rep Power: 12 |
does bubble bursting at free surface has significant impact on surrounding fluid ? in my work i delete bubble when the arrive to free surface , is this your MSc thesis ? or research work or PhD ? thanks
i wanna confess your work is very interesting for me Last edited by wyldckat; November 30, 2014 at 15:39. Reason: posted few minutes apart |
|
December 3, 2014, 02:12 |
|
#15 |
New Member
Join Date: Sep 2009
Posts: 19
Rep Power: 17 |
Hi,
I'm not sure if are there any relation between your 2 attached figs with the "spurious currents". But for the VOF method, if the surface tension force computation is inaccurate, the spurious currents can be generated at the interface. Hope that point could be useful! |
|
December 4, 2014, 04:42 |
|
#16 |
Senior Member
B_Kia
Join Date: May 2014
Location: Ir
Posts: 123
Rep Power: 12 |
hi tinhtt,
i think you are right and they are ''spurious currents'' , at the first they do not exist but after interface starts to move they generate and may become bigger and bigger , especially near walls , i use 0.072 N/m for surface tension and here is my setting for vof /solve/set> surface-tension Use node based smoothing [yes] Number of smoothings [25] ''( default value is 1 )'' Smoothing relaxation Factor [1] Use vof gradients at the nodes for curvature calculation? [yes] i do not know any else setting exist that i should change ? by default fluent compute vof every time step , i made it every iteration but it slows computation very much and i am not sure it really helps share your idea please , thank you very much |
|
December 5, 2014, 08:44 |
|
#17 |
New Member
Join Date: Sep 2009
Posts: 19
Rep Power: 17 |
Hi,
If VOF could not give good results, your problem likely needs further tools. I recommend to combine all of these factors: - Use defaut parameters of VOF - Activate LS (in Multiphase model panel, select VOF model, and enable Coupling LS+VOF) - Refine mesh - Reduce time step Hope that could help! |
|
June 10, 2018, 02:47 |
|
#18 | |
New Member
YIN
Join Date: Apr 2018
Posts: 1
Rep Power: 0 |
Quote:
I am trying to store the level set function to a UDS. So I used "C_UDSI(c,t,1)=C_LSF(c,t);" in my DEFINE_ADJUST macro. But when I run the calculation in Fluent. It showed "received a fatal signal (segmentation fault)". So do you know what is wrong? Thank you very much~ |
||
June 12, 2018, 04:36 |
|
#19 | |
Senior Member
B_Kia
Join Date: May 2014
Location: Ir
Posts: 123
Rep Power: 12 |
Quote:
|
||
Tags |
level set function, udf |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Other] mesh airfoil NACA0012 | anand_30 | OpenFOAM Meshing & Mesh Conversion | 13 | March 7, 2022 18:22 |
[blockMesh] non-orthogonal faces and incorrect orientation? | nennbs | OpenFOAM Meshing & Mesh Conversion | 7 | April 17, 2013 06:42 |
[snappyHexMesh] Snap the mesh from a level set function instead of a STL surface | ginette | OpenFOAM Meshing & Mesh Conversion | 2 | April 5, 2011 11:21 |
Env variable not set | gruber2 | OpenFOAM Installation | 5 | December 30, 2005 05:27 |
How to set environment variables | kanishka | OpenFOAM Installation | 1 | September 4, 2005 11:15 |