|
[Sponsors] |
January 15, 2016, 16:58 |
G equation query
|
#1 |
New Member
Johnny
Join Date: Nov 2015
Posts: 26
Rep Power: 11 |
I am glad that there is a CONVERGE forum now and the staffs from Convergent science are available here. I have got three questions about the G-equation UDF to ask. One is about the G-equation example you provided, I tried to simulate the same case using the no-UDF solver and the UDF solver loaded G-equation UDF example file you provided without any changes. But the results got some differences between the two solvers. So is the G-equation implementation in the no-UDF solver is same as the default G-equation UDF example file you provided in your website?
The second question is about the laminar flame speed calculation. We all know that one option is using the user table. But how can I get the format of the table? The last one is about the G-equation UDF example file for the different Operating system. I used corresponding UDF files for Windows and Linux, respectively. Both of them can create the Dynamic link library. But only on Linux it can work well while on Windows it got an abnormal termination. By the way, the version of the software I use is the 2.2.0 version with issued date 101915. Thanks. Looking forward to your reply. |
|
January 18, 2016, 14:00 |
|
#2 |
Member
Yunliang Wang
Join Date: Dec 2015
Location: Convergent Science, Madison WI
Posts: 58
Rep Power: 10 |
Hi Jack,
Thank you for your questions. Here are my answers to your questions. A1: The default G-eqn UDFs are the same as in the main code. If you got different results I suspect you are using different version of UDFs. Can you double check if the release date of your UDFs is the same as the release date of CONVERGE? A2: Different users use different formats for the flame speed calculation. That's why we did not specify the format for the flame speed calculation. With the G-eqn UDF, the laminar flame speed can be defined as any prescribed function of unburned temperature, pressure, equivalence ratio, and dilution mass fraction. It may be a good idea to accept one format in the main code so that people may use the table to calculate the flame speed without using the UDFs. A3. Windows UDFs work in the same way as the Linux UDFs. Different versions of the OS and Visual Studio may be the problem. If you can send us your case files we can debug the problem for you. Yunliang |
|
January 18, 2016, 18:00 |
|
#3 |
New Member
Johnny
Join Date: Nov 2015
Posts: 26
Rep Power: 11 |
Thank you, Yunliang.
Q1: I think I use the same version because I only have one version with issued date 101915. Anyway, I will set up the comparison of the two cases and run them again to see what will happen. Q2: Got it. But if we use the table, it does need a function to do interpolation. Forget it, I have got a new method to implement my idea. Q3. Now I couldn't use CONVERGE on Windows. If possible, I will send you the case later. Thanks a lot. One more question. Can you tell me what does the "global_work_vect" array mean? I guess it represents the gradient G. But I couldn't understand the meaning of the statement"if(global_work_vect[kk*3+FLAME_IN_CELL]>0.5||global_work_vect[kk*3+NEIGHBOR_CELL]>0.5)" in user_combust_g_eqn.c. What's the physical significance for the 0.5? |
|
January 19, 2016, 11:52 |
|
#4 |
Member
Yunliang Wang
Join Date: Dec 2015
Location: Convergent Science, Madison WI
Posts: 58
Rep Power: 10 |
global_work_vect[] is a common array that can be used for any subroutines. In this subroutine the values of global_work_vect[] are between [0:1]. We use it
to check whether the cell is within the flame or not with the level-set method. |
|
January 19, 2016, 15:42 |
|
#5 |
New Member
Johnny
Join Date: Nov 2015
Posts: 26
Rep Power: 11 |
Yes, indeed. I am so stupid, it is obvious to identify that from the name of the array element. Thanks for your help and for being so helpful.
|
|
February 22, 2016, 16:23 |
|
#6 |
New Member
Johnny
Join Date: Nov 2015
Posts: 26
Rep Power: 11 |
I was wondering if I could possibly get some detailed descriptions for the function of these shared prototypes used in G-equation.
|
|
February 22, 2016, 16:44 |
|
#7 | |
Member
Yunliang Wang
Join Date: Dec 2015
Location: Convergent Science, Madison WI
Posts: 58
Rep Power: 10 |
Quote:
Hello There, There are many shared functions in prototype_shared.h. However, most of them can not be viewed by the users but can be called by the UDFs. If you can list a few of them, I may explain to you what the functions do. Thanks, Yunliang |
||
February 22, 2016, 17:19 |
|
#8 |
New Member
Johnny
Join Date: Nov 2015
Posts: 26
Rep Power: 11 |
Thanks, Dr Wang. Please see the functions below.
1. "SHARED_combust_multizone_ceq(stream_index); ". for all I know, I don't think we have a multizone ceq model. 2. "SHARED_transfer_work_vect();", calculate the governing equation? 3. "SHARED_set_passive_bound(stream_index, index_g_eqn);" 4. "SHARED_push_fluid_node(tot_active_list[kk],&autoign_list_head,1);", making the G combustion start when the unburned cell temperature above the "t_cut_temp"? 5. "SHARED_broadcast_int_wrapper" |
|
February 22, 2016, 17:38 |
|
#9 |
New Member
Johnny
Join Date: Nov 2015
Posts: 26
Rep Power: 11 |
P.S. I found that maybe you made a mistake in the "user_calc_laminar_flame_speed" function. for the Gulder and Metghalchi correlation, you use the same formula to calculate temperature exponent and the pressure exponent. For I know, the formula is only for Metghalchi model, while the constant g_eqn_temp_exponent and g_eqn_pres_exponent we input should be directly used for Gulder model. Please check it.
|
|
February 22, 2016, 18:40 |
|
#10 | |
Member
Yunliang Wang
Join Date: Dec 2015
Location: Convergent Science, Madison WI
Posts: 58
Rep Power: 10 |
Please see my replies below.
Quote:
Yunliang |
||
February 22, 2016, 18:42 |
|
#11 | |
Member
Yunliang Wang
Join Date: Dec 2015
Location: Convergent Science, Madison WI
Posts: 58
Rep Power: 10 |
Quote:
We will take a close look at this. Thanks, Yunliang |
||
February 23, 2016, 19:23 |
|
#12 |
Member
Yunliang Wang
Join Date: Dec 2015
Location: Convergent Science, Madison WI
Posts: 58
Rep Power: 10 |
Yes you are correct, the user_calc_laminar_flame_speed function is incorrect. The temp and pres exponent equations should only be for the Metghalchi model and the Gulder should have constants. Here are the small changes for lines from 475 to 484:
if(laminar_flamespeed_flag==1) /* Metghalchi */ { met_alpha=g_eqn_temp_exponent-0.8*(equiv_ratio-1.0); met_beta =g_eqn_pres_exponent+0.22*(equiv_ratio-1.0); } if(laminar_flamespeed_flag==2) /* Gulder */ { met_alpha=g_eqn_temp_exponent; met_beta =g_eqn_pres_exponent; } Before, the first if statement was done for both Meghalchi and Gulder. Now, for Gulder it is the variables you set in combust.in that are the temp and pres exponents only and for Metgalchi only, the exponents will also be equiv_ratio dependent. Thanks, Yunliang |
|
February 24, 2016, 00:51 |
|
#13 |
New Member
Johnny
Join Date: Nov 2015
Posts: 26
Rep Power: 11 |
Well. I had changed the statement, thanks for you review, now I know I did the right thing. And thanks for your explanation for the functions.
|
|
February 25, 2016, 16:01 |
|
#14 |
New Member
Johnny
Join Date: Nov 2015
Posts: 26
Rep Power: 11 |
Which variables represent the laminar flame speed and turbulent flame speed in the post.in file when I turn on and output them? I found when I use a constant laminar flame speed(laminar flame speed flag=0), the 3D output value is the value I provided. when I set the laminar flame speed flag=1 or 2(Gulder or Metgh model), changed the laminar flame speed subroutine to use a constant value same as the first method provide, the 2d result is same, but only the 3D output value is different(also changed the value of global_lam_flamespeed array). So I know both of the two methods are ok, but I was just wondering if I use the second method (flag=1 or 2), is the 3d output correct? because it's hard to check when we use the correlations. especially for the turbulent flame speed.
|
|
February 25, 2016, 18:25 |
|
#15 | |
Member
Yunliang Wang
Join Date: Dec 2015
Location: Convergent Science, Madison WI
Posts: 58
Rep Power: 10 |
Quote:
Thanks, Yunliang ywang@convergecfd.com |
||
February 25, 2016, 18:49 |
|
#16 |
New Member
Johnny
Join Date: Nov 2015
Posts: 26
Rep Power: 11 |
Sorry, My bad. The "2d result" I mean the 2d plot, pressure, HRR etc. The "3D out value" is the visualization results of laminar and turbulent flame speed in the Ensight. Actually, I didn't output the value to the screen or the customized .out file, I only check the overall parameters, i.e. pressure and HRR, and I think both of the methods are implemented well in the simulation because the results are same. Only the output results for the laminar and turbulent flame speed in Ensight is different between the two methods. So I was only wondering the 3D visualization results. In fact, I don't need to change the subroutine if I want to use a constant laminar flame speed. I use this method instead of using the laminar speed flag=0 option since I forgot we have this option, haha. Then I found this problem.
|
|
Tags |
combustion model |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
rotational and inviscid | Mike | Main CFD Forum | 40 | November 9, 2023 07:03 |
mass flow in is not equal to mass flow out | saii | CFX | 12 | March 19, 2018 06:21 |
How to add bodyforce in momentum equation in viscoelasticFluidFoam? | arshoon | OpenFOAM Running, Solving & CFD | 0 | April 9, 2013 11:03 |
Need help:about energy equation in CFX | Stein | CFX | 4 | July 2, 2009 23:31 |
Diffusion Equation | izardy amiruddin | Main CFD Forum | 2 | July 4, 2002 09:14 |