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

Error during interpreting UDF for VoF

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

Like Tree1Likes
  • 1 Post By pakk

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 25, 2015, 10:24
Unhappy Error during interpreting UDF for VoF
  #1
Member
 
Rafal
Join Date: Aug 2013
Location: CK
Posts: 36
Rep Power: 12
vekh is on a distinguished road
Hello!
I want to write UDF which will return coordinates of specific VoF fraction - let say alpha from = 0.5 to 0.55. I wrote UDF with use of C_VOF(cell, pt[]) but there was an error message label "store_vof_norm" not found.
Then I was try to interpret UDF from Ansys manual:
Code:
/*******************************************************************
   This UDF is an implementation of the degassing boundary condition
*******************************************************************/
 
 #include "udf.h"
 #include "sg.h"
 #include "sg_mphase.h"
 #include "flow.h"
 #include "mem.h"
 #include "metric.h"
 
 DEFINE_SOURCE(degassing_source, cell, thread, dS, eqn)
 {
    real source;
    Thread *tm = THREAD_SUPER_THREAD(thread);
    source = -C_R(cell,thread)*C_VOF(cell,thread)/CURRENT_TIMESTEP ;
    C_UDMI(cell,tm,0) = source;
    dS[eqn] = -C_R(cell,thread)/CURRENT_TIMESTEP;
    return source;
 }
 
 DEFINE_SOURCE(x_prim_recoil, cell, tp, dS, eqn)
 {
    real source;
    Thread *tm = THREAD_SUPER_THREAD(tp);
    Thread *ts;
    ts = THREAD_SUB_THREAD(tm,1);
    source = -C_R(cell,ts)*C_VOF(cell,ts)/CURRENT_TIMESTEP*C_U(cell,tp);  
   dS[eqn] =-C_R(cell,ts)*C_VOF(cell,ts)/CURRENT_TIMESTEP;
    return source;
 }
  
 DEFINE_SOURCE(x_sec_recoil, cell, ts, dS, eqn)
 {
    real source;
    Thread *tm = THREAD_SUPER_THREAD(ts);
    source = -C_R(cell,ts)*C_VOF(cell,ts)/CURRENT_TIMESTEP*C_U(cell,ts);
    dS[eqn] = -C_R(cell,ts)*C_VOF(cell,ts)/CURRENT_TIMESTEP;
    return source;
 }
 
 DEFINE_SOURCE(y_prim_recoil, cell, tp, dS, eqn)
 {
    real source;
    Thread *tm = THREAD_SUPER_THREAD(tp);
    Thread *ts;
    ts = THREAD_SUB_THREAD(tm,1);
    source = -C_R(cell,ts)*C_VOF(cell,ts)/CURRENT_TIMESTEP*C_V(cell,tp);
    dS[eqn] =-C_R(cell,ts)*C_VOF(cell,ts)/CURRENT_TIMESTEP;
    return source;
 }
 
  DEFINE_SOURCE(y_sec_recoil, cell, ts, dS, eqn)
 {
    real source;  Thread *tm = THREAD_SUPER_THREAD(ts);
    source = -C_R(cell,ts)*C_VOF(cell,ts)/CURRENT_TIMESTEP*C_V(cell,ts);
   dS[eqn] = -C_R(cell,ts)*C_VOF(cell,ts)/CURRENT_TIMESTEP;
    return source;
 }
 
 DEFINE_SOURCE(z_prim_recoil, cell, tp, dS, eqn)
 {
    real source;
    Thread *tm = THREAD_SUPER_THREAD(tp);
    Thread *ts;
    ts = THREAD_SUB_THREAD(tm,1);
    source = -C_R(cell,ts)*C_VOF(cell,ts)/CURRENT_TIMESTEP*C_W(cell,tp);
    dS[eqn] =-C_R(cell,ts)*C_VOF(cell,ts)/CURRENT_TIMESTEP;
    return source;
 }
 
  DEFINE_SOURCE(z_sec_recoil, cell, ts, dS, eqn)
 {
    real source;
    Thread *tm = THREAD_SUPER_THREAD(ts);
    source = -C_R(cell,ts)*C_VOF(cell,ts)/CURRENT_TIMESTEP*C_W(cell,ts);
   dS[eqn] = -C_R(cell,ts)*C_VOF(cell,ts)/CURRENT_TIMESTEP;
    return source;
 }
I want just to try if that will work but there is again error:
Quote:
Error: D:\\Fluent\\Testy\\test3.c: line 80: label "store_vof_norm" not found (pc=33).
Error: D:\\Fluent\\Testy\\test3.c: line 80: label "store_vof_norm" not found (pc=180).
Error: D:\\Fluent\\Testy\\test3.c: line 80: label "store_vof_norm" not found (pc=256).
Error: D:\\Fluent\\Testy\\test3.c: line 80: label "store_vof_norm" not found (pc=336).
Error: D:\\Fluent\\Testy\\test3.c: line 80: label "store_vof_norm" not found (pc=412).
Error: D:\\Fluent\\Testy\\test3.c: line 80: label "store_vof_norm" not found (pc=506).
Error: D:\\Fluent\\Testy\\test3.c: line 80: label "store_vof_norm" not found (pc=582).
Error: D:\\Fluent\\Testy\\test3.c: line 80: label "store_vof_norm" not found (pc=662).
Error: D:\\Fluent\\Testy\\test3.c: line 80: label "store_vof_norm" not found (pc=738).
Error: D:\\Fluent\\Testy\\test3.c: line 80: label "store_vof_norm" not found (pc=832).
Error: D:\\Fluent\\Testy\\test3.c: line 80: label "store_vof_norm" not found (pc=908).
Error: D:\\Fluent\\Testy\\test3.c: line 80: label "store_vof_norm" not found (pc=988).
Error: D:\\Fluent\\Testy\\test3.c: line 80: label "store_vof_norm" not found (pc=1064).
Is there any special action to perform before interpreting such UDF or there is some kind of different error. I will be grateful for any tip.
vekh is offline   Reply With Quote

Old   May 25, 2015, 19:24
Default
  #2
`e`
Senior Member
 
Join Date: Mar 2015
Posts: 892
Rep Power: 18
`e` is on a distinguished road
Some macros require compiling the UDF instead of interpreting, try compiling your UDF. The examples provided in the UDF manual should work.
`e` is offline   Reply With Quote

Old   May 25, 2015, 20:20
Default
  #3
Member
 
Rafal
Join Date: Aug 2013
Location: CK
Posts: 36
Rep Power: 12
vekh is on a distinguished road
Thanks for reply. I'll try to do this tomorrow.

Update:
It works! Thank you man!

Last edited by vekh; May 26, 2015 at 06:24.
vekh is offline   Reply With Quote

Old   March 16, 2017, 10:05
Default how to solve.
  #4
New Member
 
Xuzhi Du
Join Date: Mar 2017
Posts: 3
Rep Power: 9
Ronnie-Du is on a distinguished road
But how do you solve it. I also encountered such a problem.
Ronnie-Du is offline   Reply With Quote

Old   March 17, 2017, 08:49
Default
  #5
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 26
pakk will become famous soon enough
The first post shows the problem.
The second post shows the solution.
The third post confirms that the solution works.
The fourth post is you, asking what is the solution.
The fifth post is the one you are reading now.
Ronnie-Du likes this.
pakk is offline   Reply With Quote

Old   February 15, 2018, 02:08
Default store_vof_norm
  #6
New Member
 
Meisam
Join Date: Oct 2017
Posts: 4
Rep Power: 8
Meisam1300 is on a distinguished road
Hello all,
I encountered the error " store_vof_norm" not found when interpreting my file in fluent 16.2
I also compiled the udf code successfully but I am still getting the same error when interpreting.
can anyone help me to fix it ?
Thank you in advance.
Meisam1300 is offline   Reply With Quote

Old   February 15, 2018, 03:40
Default
  #7
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 26
pakk will become famous soon enough
The solution is to compile... which you have already done succesfully.

So, use the compiled version, and don't try the interpreted one.
pakk is offline   Reply With Quote

Old   February 16, 2018, 13:29
Default store_vof_norm
  #8
New Member
 
Meisam
Join Date: Oct 2017
Posts: 4
Rep Power: 8
Meisam1300 is on a distinguished road
Thank you Pakk.
The problem is that when I compile and load it successfully and I want to call the udf file for boundary conditions I receive the error "no udf function is loaded".
Can you help me fix it. ?
Thank you again
Meisam1300 is offline   Reply With Quote

Old   February 19, 2018, 05:28
Default
  #9
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 26
pakk will become famous soon enough
Does you code include a boundary condition? The code above only has source conditions...

Otherwise: are you sure that compiling went fine? Did you check the screen if any errors showed up?
pakk is offline   Reply With Quote

Old   March 12, 2018, 01:57
Post
  #10
New Member
 
Lee
Join Date: Feb 2018
Posts: 12
Rep Power: 8
Lee 小亢 is on a distinguished road
hello~
I want to use the degassing boundary for my case, but I don't know how to load this UDF to the layer of cells next to the outlet as Fluent UDF manual told,
can you help me?
Thx a lot~
Lee 小亢 is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
the DEFINE_MASS_TRANSFER is only a interpreting udf IN ANSYS 14.0 fangdian Fluent UDF and Scheme Programming 7 April 19, 2016 03:53
syntax error while interpreting the UDF rohit chothave Fluent UDF and Scheme Programming 2 July 13, 2013 11:09
parse error while interpreting udf Kristin Fluent UDF and Scheme Programming 3 March 15, 2012 06:43
parse error with interpreting UDF ivanbuz Fluent UDF and Scheme Programming 2 August 13, 2009 18:29
interpreting UDF Muhammad Shakaib FLUENT 1 January 24, 2006 10:58


All times are GMT -4. The time now is 08:39.