CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

accessing C_VOF from EXECUTE_AT_END

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 11, 2019, 13:49
Default accessing C_VOF from EXECUTE_AT_END
  #1
New Member
 
RD
Join Date: Oct 2018
Posts: 8
Rep Power: 8
RD03 is on a distinguished road
Hi,
I am trying to access C_VOF from EXECUTE_AT_END macro. I'm getting a fatal error when I run the solver. It is compiling fine. Can anybody help me? and I'm also confused with the zone id and domain id.
here the udf:
DEFINE_EXECUTE_AT_END(alpha)
{
Domain *d;
Thread *t;
Thread **pt;
cell_t c;
int zone_ID=1;
Thread *mixture_thread = Lookup_Thread(d,zone_ID);
pt = THREAD_SUB_THREADS(mixture_thread);

d = Get_Domain(1);

thread_loop_c(t,d)
{
begin_c_loop(c,t)
{

C_UDMI(c,t,0)= C_VOF(c,pt[1]);

C_UDMI(c,t,1)= C_LIQF(c,pt[1]);
}
end_c_loop(c,t)
}
}
RD03 is offline   Reply With Quote

Old   February 11, 2019, 22:34
Default
  #2
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
which model do you use for this simulation?
Multiphase?
Solidification?
You should explain in details if you wanna get help

Do you know, that:
C_LIQF is available only in fluid cells and only if solidification is turned ON

best regards
AlexanderZ is offline   Reply With Quote

Old   February 12, 2019, 05:14
Default
  #3
New Member
 
RD
Join Date: Oct 2018
Posts: 8
Rep Power: 8
RD03 is on a distinguished road
Hi AlexanderZ,
I am trying to model melting of phase change material I have separate domain from geometry for air and pcm. I'm using VOF and melting/solidification model in fluent. I want to access the C_VOF and C_LIQF for both the domain( air and pcm).
RD03 is offline   Reply With Quote

Old   February 12, 2019, 22:48
Default
  #4
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
what kind of error did you get?

did you defined 2 UDMs in FLuent GUI?

best regards
AlexanderZ is offline   Reply With Quote

Old   February 13, 2019, 09:35
Default
  #5
New Member
 
RD
Join Date: Oct 2018
Posts: 8
Rep Power: 8
RD03 is on a distinguished road
Dear ALexandarZ,
I have specified UDMI in GUI.
RD03 is offline   Reply With Quote

Old   February 13, 2019, 09:37
Default
  #6
New Member
 
RD
Join Date: Oct 2018
Posts: 8
Rep Power: 8
RD03 is on a distinguished road
I'm getting a segmentation fault when fluent iteration starts.
RD03 is offline   Reply With Quote

Old   February 14, 2019, 00:39
Default
  #7
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
i dont have much experience in multiphase simulations

may be
Code:
int zone_ID=1;
is a problem. Are you sure, that ID=1 is your fluid zone?
To check this value in fluent GUI go to Cell Zone Conditions, select fluid zone, you will get ID value there.

put it in UDF

best regards
AlexanderZ is offline   Reply With Quote

Old   February 14, 2019, 00:48
Default
  #8
New Member
 
RD
Join Date: Oct 2018
Posts: 8
Rep Power: 8
RD03 is on a distinguished road
Dear AlexanderZ,
Thanks for your response. I have checked with the zone ID and it worked. Thank you.
RD03 is offline   Reply With Quote

Reply


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
Accessing data from sixDoFRigidBodyMotionState outside sixDoFRigidBodyMotion Hannes_Kiel OpenFOAM Programming & Development 0 March 28, 2015 09:41
accessing thermophysical properties on a lower level romant OpenFOAM Programming & Development 4 October 28, 2013 09:25
How to define a Macro accessing rad intensity Grey FLUENT 0 May 21, 2007 01:12
Problem accessing Temp. Gradient . . . Satish FLUENT 16 December 16, 2003 14:44
In UDF, accessing pressure value..urgent!! prasanth FLUENT 2 July 19, 2003 08:30


All times are GMT -4. The time now is 18:41.