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

Accessing Solver data for UDF

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   April 12, 2006, 13:24
Default Accessing Solver data for UDF
  #1
CFDtoy
Guest
 
Posts: n/a
Hello:

I am using an two phase eulerian model. Liquid in air. I want to obtain the cell pressure within the liquid region.

I operate a source function in the liquid domain. If I use

pvalue = C_P(c,t),

do I get mixture static pressure,If not what ?

Again, If I use C_K(c,t) for turbulent kinetic energy, I am not sure what am I actually accessing?

I am not clear how to identify my zone and how to obtain cell values for liquid and gas separately.

Please help

CFDtoy
  Reply With Quote

Old   April 12, 2006, 14:41
Default Re: Accessing Solver data for UDF
  #2
Tim Li
Guest
 
Posts: n/a
I think you should make sure the thread is in mixture level. Then you can get the mixture pressure with C_P. To access phase, you can use thread_sub_thread to obtain the thread for each phase. I am working on the UDF too. Here is my code to access the phase. Hope it well help.

int ID = 6; /* Zone ID for wall zone from Boundary Conditions panel Obtain the zone ID from boundary condition panel */

t_m = Lookup_Thread(d,ID); /* mixture level thread */

t_g = THREAD_SUB_THREAD(t_m, 0); /* gas phase thread */

t_s = THREAD_SUB_THREAD(t_m, 1); /* solid phase thread */

Tim
  Reply With Quote

Old   April 12, 2006, 22:43
Default Re: Accessing Solver data for UDF
  #3
Jun
Guest
 
Posts: n/a
Hi,

Could you use export in the file to find all data including you want?
  Reply With Quote

Old   April 12, 2006, 23:12
Default Re: Accessing Solver data for UDF
  #4
CFDtoy
Guest
 
Posts: n/a
Hi Li: Thanks for your reply. I would like to use add a momentum source only in the liquid portion of the liquid-gas mixture.

Now this source is volumetric and is not applied across the boundary.

source definition reads DEFINE_SOURCE(name, c ,t , dS, eqn) etc

I would like to add source based on the liquid static pressure. Now this source is computed in all the cells..well, i need to find out C_P only for cells with liquid. as you put it ..i guess using the zone ID would be a good idea. But again, my basic question is ..if I dont do any thread evaluation..and perform just C_P(c,t)..what do i get ?

Thanks

CFDtoy
  Reply With Quote

Old   April 13, 2006, 16:12
Default Re: Accessing Solver data for UDF
  #5
Tim
Guest
 
Posts: n/a
Sorry, I don't know how to exprot. Actually, I am newbie in UDF.

Tim
  Reply With Quote

Old   April 13, 2006, 16:38
Default Re: Accessing Solver data for UDF
  #6
Tim
Guest
 
Posts: n/a
I think it depends on what the thread 't' is passed by the Fluent solver. If you are not sure, you can get the domain that owns that thread with THREAD_DOMAIN(t), then compare the domain id with the ID number in Define/Phase panel. Or just output some variables of thread t to judge. Do I answer your question? Hope I do.

Tim
  Reply With Quote

Old   April 13, 2006, 16:45
Default Re: Accessing Solver data for UDF
  #7
Jun
Guest
 
Posts: n/a
Hi,

In the menu "File" =>"Export".
  Reply With Quote

Old   April 13, 2006, 16:52
Default Re: Accessing Solver data for UDF
  #8
Tim
Guest
 
Posts: n/a
I usually export my data to Tecplot to plot or analyse.
  Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Accessing profile data from a UDF ral007 Fluent UDF and Scheme Programming 0 March 22, 2011 11:29
Creating New Solver: For particle-laden compressible jets sankarv OpenFOAM 0 April 4, 2010 18:06
input data to a poisson solver HaKu Main CFD Forum 2 June 11, 2009 22:45
Accessing the residuals from the solver juho OpenFOAM Running, Solving & CFD 3 July 1, 2008 07:49
venturi-meter validation problem in accessing data Micheal Deren FLUENT 0 December 27, 2005 03:31


All times are GMT -4. The time now is 03:53.