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

G equation query

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 15, 2016, 15:58
Smile G equation query
  #1
New Member
 
Johnny
Join Date: Nov 2015
Posts: 26
Rep Power: 10
zwu249 is on a distinguished road
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.
zwu249 is offline   Reply With Quote

Old   January 18, 2016, 13:00
Default
  #2
Member
 
ywang89's Avatar
 
Yunliang Wang
Join Date: Dec 2015
Location: Convergent Science, Madison WI
Posts: 58
Rep Power: 10
ywang89 is on a distinguished road
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
__________________
Yunliang Wang
Applications Manager

CONVERGECFD
ywang89 is offline   Reply With Quote

Old   January 18, 2016, 17:00
Default
  #3
New Member
 
Johnny
Join Date: Nov 2015
Posts: 26
Rep Power: 10
zwu249 is on a distinguished road
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?
zwu249 is offline   Reply With Quote

Old   January 19, 2016, 10:52
Default
  #4
Member
 
ywang89's Avatar
 
Yunliang Wang
Join Date: Dec 2015
Location: Convergent Science, Madison WI
Posts: 58
Rep Power: 10
ywang89 is on a distinguished road
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.
__________________
Yunliang Wang
Applications Manager

CONVERGECFD
ywang89 is offline   Reply With Quote

Old   January 19, 2016, 14:42
Default
  #5
New Member
 
Johnny
Join Date: Nov 2015
Posts: 26
Rep Power: 10
zwu249 is on a distinguished road
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.
zwu249 is offline   Reply With Quote

Old   February 22, 2016, 15:23
Default
  #6
New Member
 
Johnny
Join Date: Nov 2015
Posts: 26
Rep Power: 10
zwu249 is on a distinguished road
I was wondering if I could possibly get some detailed descriptions for the function of these shared prototypes used in G-equation.
zwu249 is offline   Reply With Quote

Old   February 22, 2016, 15:44
Default
  #7
Member
 
ywang89's Avatar
 
Yunliang Wang
Join Date: Dec 2015
Location: Convergent Science, Madison WI
Posts: 58
Rep Power: 10
ywang89 is on a distinguished road
Quote:
Originally Posted by zwu249 View Post
I was wondering if I could possibly get some detailed descriptions for the function of these shared prototypes used in G-equation.

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
__________________
Yunliang Wang
Applications Manager

CONVERGECFD
ywang89 is offline   Reply With Quote

Old   February 22, 2016, 16:19
Default
  #8
New Member
 
Johnny
Join Date: Nov 2015
Posts: 26
Rep Power: 10
zwu249 is on a distinguished road
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"
zwu249 is offline   Reply With Quote

Old   February 22, 2016, 16:38
Default
  #9
New Member
 
Johnny
Join Date: Nov 2015
Posts: 26
Rep Power: 10
zwu249 is on a distinguished road
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.
zwu249 is offline   Reply With Quote

Old   February 22, 2016, 17:40
Default
  #10
Member
 
ywang89's Avatar
 
Yunliang Wang
Join Date: Dec 2015
Location: Convergent Science, Madison WI
Posts: 58
Rep Power: 10
ywang89 is on a distinguished road
Please see my replies below.

Quote:
Originally Posted by zwu249 View Post
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.
A. In CONVERGE 2.3, we have the multizone ceq model. This can speed up the simulation significantly if there are many species.

2. "SHARED_transfer_work_vect();", calculate the governing equation?
A. This function transfers variable values at the parallel boundaries to the neighbour Ranks. For example, when you want to calculate the derivatives of a variable at the parallel boundaries, you need the variable values on other Ranks. After this function call, all the neighbouring variable values are available on the current Rank.

3. "SHARED_set_passive_bound(stream_index, index_g_eqn);"
A. This function sets up the boundary values for g_value. If you use a different index rather than index_g_eqn you can set up the BC for another passive too.

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"?
A. This function links the fluid node "tot_active_list[kk]" to the list "autoign_list_head". Here it marks all the fluid cells that will ignite with the G-eqn model

5. "SHARED_broadcast_int_wrapper"
A. This function broadcasts a integer variable or array to all the rest Ranks. Please refer to the MPI functions for more details
Thanks!

Yunliang
__________________
Yunliang Wang
Applications Manager

CONVERGECFD
ywang89 is offline   Reply With Quote

Old   February 22, 2016, 17:42
Default
  #11
Member
 
ywang89's Avatar
 
Yunliang Wang
Join Date: Dec 2015
Location: Convergent Science, Madison WI
Posts: 58
Rep Power: 10
ywang89 is on a distinguished road
Quote:
Originally Posted by zwu249 View Post
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.

We will take a close look at this.

Thanks,

Yunliang
__________________
Yunliang Wang
Applications Manager

CONVERGECFD
ywang89 is offline   Reply With Quote

Old   February 23, 2016, 18:23
Default
  #12
Member
 
ywang89's Avatar
 
Yunliang Wang
Join Date: Dec 2015
Location: Convergent Science, Madison WI
Posts: 58
Rep Power: 10
ywang89 is on a distinguished road
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
__________________
Yunliang Wang
Applications Manager

CONVERGECFD
ywang89 is offline   Reply With Quote

Old   February 23, 2016, 23:51
Default
  #13
New Member
 
Johnny
Join Date: Nov 2015
Posts: 26
Rep Power: 10
zwu249 is on a distinguished road
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.
zwu249 is offline   Reply With Quote

Old   February 25, 2016, 15:01
Default
  #14
New Member
 
Johnny
Join Date: Nov 2015
Posts: 26
Rep Power: 10
zwu249 is on a distinguished road
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.
zwu249 is offline   Reply With Quote

Old   February 25, 2016, 17:25
Default
  #15
Member
 
ywang89's Avatar
 
Yunliang Wang
Join Date: Dec 2015
Location: Convergent Science, Madison WI
Posts: 58
Rep Power: 10
ywang89 is on a distinguished road
Quote:
Originally Posted by zwu249 View Post
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.
The variables used in post.in are lam_flamespeed and tur_flamespeed for laminar and turbulent flame speeds. What do you mean "the 2d results"? What do you mean "3D output value is different"? Do you mean that the values that you outputted to the screen are a constant value but the values in the post files are not? If you can send me your case files and some plots or results, that will be great.

Thanks,

Yunliang

ywang@convergecfd.com
__________________
Yunliang Wang
Applications Manager

CONVERGECFD
ywang89 is offline   Reply With Quote

Old   February 25, 2016, 17:49
Default
  #16
New Member
 
Johnny
Join Date: Nov 2015
Posts: 26
Rep Power: 10
zwu249 is on a distinguished road
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.
zwu249 is offline   Reply With Quote

Reply

Tags
combustion model


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
rotational and inviscid Mike Main CFD Forum 40 November 9, 2023 06:03
mass flow in is not equal to mass flow out saii CFX 12 March 19, 2018 05:21
How to add bodyforce in momentum equation in viscoelasticFluidFoam? arshoon OpenFOAM Running, Solving & CFD 0 April 9, 2013 10:03
Need help:about energy equation in CFX Stein CFX 4 July 2, 2009 22:31
Diffusion Equation izardy amiruddin Main CFD Forum 2 July 4, 2002 08:14


All times are GMT -4. The time now is 10:32.