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 initialization in vof_model(udf)

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By AlexanderZ
  • 1 Post By AlexanderZ

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 16, 2019, 00:48
Default error during initialization in vof_model(udf)
  #1
New Member
 
park juchan
Join Date: Dec 2019
Posts: 6
Rep Power: 6
juchan is on a distinguished road
Hi,

I am a beginner with ANSYS.
i just want to solve simple rectangular shape(5mm*5mm) 2d model.
Water_liq is located from the bottom of the rectangle to 2mm height and water_vap is from 2mm to 5mm.
Bottom wall is heated so evaporation occurs

I am using a UDF function to define saturation temperature according to C_VOF ( for evaporation on the interface, not on the heated wall ).
when I try to do initialization, following error message shown and fluent program automatically shut down:


// 999999: mpt_accept: error: accept failed: Invalid argument
// 999999: mpt_accept: error: accept failedMPI Application rank 0 exited before MPI_Finalize() with status 2: Invalid argument

following is my udf code;;
------------------------------------------
#include "udf.h"

DEFINE_PROPERTY(saturation_temp,c,t)
{
real sat_t;

if (C_VOF(c,t) == 1||C_VOF(c,t)== 0)
sat_t = 373;

else
sat_t = 353;

return sat_t;
}

---------------------
using above code, i just want to give cells different saturation temperature according to the C_VOF value of each cell.

if udf works well, only interface cell's saturation temp. would be 353
But, i can't solve a problem because i do not have any idea to resolve an error.....

Please give me some tips why it doesn't work.
Thank you
juchan is offline   Reply With Quote

Old   December 16, 2019, 03:10
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
code seems to be correct, check your model.
Decrease timestep size
juchan likes this.
__________________
best regards


******************************
press LIKE if this message was helpful
AlexanderZ is offline   Reply With Quote

Old   December 16, 2019, 05:43
Default
  #3
New Member
 
park juchan
Join Date: Dec 2019
Posts: 6
Rep Power: 6
juchan is on a distinguished road
To. AlexanderZ
Thanks for your opinion
i tried but it didn't work....

maybe there would be other solution,,,
juchan is offline   Reply With Quote

Old   December 16, 2019, 06:12
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
if you get this error right after initialization, may be the problem is in C_VOF macro, it may not be defined before iterations, so you may try to pre-define saturation temperature for that case
Code:
#include "udf.h"

DEFINE_PROPERTY(saturation_temp,c,t)
{
real sat_t;
sat_t = 353;
if (C_VOF(c,t) == 1||C_VOF(c,t)== 0)
sat_t = 373;

else
sat_t = 353;

return sat_t;
}
juchan likes this.
__________________
best regards


******************************
press LIKE if this message was helpful
AlexanderZ is offline   Reply With Quote

Old   December 16, 2019, 06:50
Default
  #5
New Member
 
park juchan
Join Date: Dec 2019
Posts: 6
Rep Power: 6
juchan is on a distinguished road
Thanks! AlexanderZ i understand what you advised

maybe i should find the other way to resolve error because fluent program still closed accidently in spite of your advice....
juchan is offline   Reply With Quote

Old   December 17, 2019, 01:16
Default
  #6
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
try constant value, as a first step
Code:
#include "udf.h"

DEFINE_PROPERTY(saturation_temp,c,t)
{
real sat_t;
sat_t = 353;
return sat_t;
}
if it doesn't work, it means the problem is in your settings
__________________
best regards


******************************
press LIKE if this message was helpful
AlexanderZ is offline   Reply With Quote

Old   January 22, 2020, 06:16
Default
  #7
New Member
 
park juchan
Join Date: Dec 2019
Posts: 6
Rep Power: 6
juchan is on a distinguished road
Thanks AlexanderZ

i try to have a solution after your help but i couldn't....
when i take constant saturation_temp value, there is no error
i think just c_vof makes error

if you know any other way to settle this problem, please help one more....
then it will be very important information to me

Thanks again!!
juchan is offline   Reply With Quote

Old   January 22, 2020, 21:52
Default
  #8
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
you've mentioned
Quote:
for evaporation on the interface, not on the heated wall
how do you apply your UDF to interface?
is it the only code you are using?

show latest version of code you are using, explain all settings, show error log
__________________
best regards


******************************
press LIKE if this message was helpful
AlexanderZ is offline   Reply With Quote

Old   January 23, 2020, 00:50
Default
  #9
New Member
 
park juchan
Join Date: Dec 2019
Posts: 6
Rep Power: 6
juchan is on a distinguished road
My geometry is simple 5mm*5mm square (60*60 no-biased mesh)

using patch From 0mm to 1.7mm height water-liquid(secondary phase)
from 1.7 to top water - vapor (primary phase)

i could not change my code because there is no way to find the reason of error.
Quote:
#include "udf.h"
#include "sg_mphase.h"

DEFINE_PROPERTY(saturation_temp,c,t)
{
real sat_t;
sat_t = 353;

if ( C_VOF(c,t) >0 && C_VOF(c,t) < 1 )
sat_t = 373;
else
sat_t = 353;

return sat_t;

}
This code is what i applied for changing the saturation temperature of interface
(there is no more code that i write. above one is all)

general - solver - pressure-based, absolute, transient, planar, gravity Y(-9.81)
model - vof -explicit, courant number 0.25 / energy on / viscous - laminar

i use lee model and i want to apply udf code that i posted for changing the saturation temperature of the interface

all zone's initial temperature is 350k

boundary condition is like this
bottom line is heated wall(360k)
vertical lines(left,right) are wall(no heated)
top line is out flow

when i press the 'initialize' button after apply udf code,
i could see the message like this then fluent ends all of a sudden
Quote:
999999: mpt_accept: errorrr: accept failed: No errror
MPI Application rank 0 exited before MPI_Finalize() with status 2
The f1 process could not be started
i will wait for your answer
Thanks AlexanderZ!
juchan is offline   Reply With Quote

Old   January 23, 2020, 02:48
Default
  #10
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
try this
Code:
#include "udf.h"
#include "sg_mphase.h"

DEFINE_PROPERTY(saturation_temp,c,t)
{
real sat_t;
Thread *ts;
ts = THREAD_SUB_THREAD(t,1);
sat_t = 353;

if ( C_VOF(c,ts) >0 && C_VOF(c,ts) < 1 )
sat_t = 373;
else
sat_t = 353;

return sat_t;

}

for more information:
Ansys fluent customization manual -> THREAD_SUB_THREAD

I'm not sure whether it help or not
__________________
best regards


******************************
press LIKE if this message was helpful
AlexanderZ is offline   Reply With Quote

Old   January 23, 2020, 03:55
Default
  #11
New Member
 
park juchan
Join Date: Dec 2019
Posts: 6
Rep Power: 6
juchan is on a distinguished road
AlexanderZ!! Thank you SSSSSo much
Error that makes me crazy for a huge long time disappears because of the modifications you've proposed

finally i get the great inner peach!!!

although bubbles generated from the heated bottom surface makes me a little confused, now i got the license to find the answer(udf) because there is no more errorr!!

i think maybe changing this part is the key

Quote:
if ( C_VOF(c,ts) >0 && C_VOF(c,ts) < 1 )
sat_t = 353;
else
sat_t = 373;
Thanks one more time!!
juchan is offline   Reply With Quote

Reply

Tags
c_vof, error, saturation, temperature, udf


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
finite values inside the simulation domain with hybrid initialization at t =0 sgbaek FLUENT 0 February 15, 2018 18:45
FMG initialization query Mohsin FLUENT 6 November 2, 2016 02:02
CFX Transient Initialization frossi CFX 1 June 17, 2016 09:31
Solution initialization method in ANSYS Fluent malick FLUENT 0 June 15, 2016 00:52
Full Multigrid Initialization Mr.Goodcat FLUENT 0 March 17, 2016 06:43


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