|
[Sponsors] |
error during initialization in vof_model(udf) |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 16, 2019, 01:48 |
error during initialization in vof_model(udf)
|
#1 |
New Member
park juchan
Join Date: Dec 2019
Posts: 6
Rep Power: 7 |
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 |
|
December 16, 2019, 04:10 |
|
#2 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
code seems to be correct, check your model.
Decrease timestep size
__________________
best regards ****************************** press LIKE if this message was helpful |
|
December 16, 2019, 06:43 |
|
#3 |
New Member
park juchan
Join Date: Dec 2019
Posts: 6
Rep Power: 7 |
To. AlexanderZ
Thanks for your opinion i tried but it didn't work.... maybe there would be other solution,,, |
|
December 16, 2019, 07:12 |
|
#4 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
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; }
__________________
best regards ****************************** press LIKE if this message was helpful |
|
December 16, 2019, 07:50 |
|
#5 |
New Member
park juchan
Join Date: Dec 2019
Posts: 6
Rep Power: 7 |
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.... |
|
December 17, 2019, 02:16 |
|
#6 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
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; }
__________________
best regards ****************************** press LIKE if this message was helpful |
|
January 22, 2020, 07:16 |
|
#7 |
New Member
park juchan
Join Date: Dec 2019
Posts: 6
Rep Power: 7 |
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!! |
|
January 22, 2020, 22:52 |
|
#8 | |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
you've mentioned
Quote:
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 |
||
January 23, 2020, 01:50 |
|
#9 | ||
New Member
park juchan
Join Date: Dec 2019
Posts: 6
Rep Power: 7 |
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:
(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:
Thanks AlexanderZ! |
|||
January 23, 2020, 03:48 |
|
#10 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
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 |
|
January 23, 2020, 04:55 |
|
#11 | |
New Member
park juchan
Join Date: Dec 2019
Posts: 6
Rep Power: 7 |
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:
|
||
Tags |
c_vof, error, saturation, temperature, udf |
Thread Tools | Search this Thread |
Display Modes | |
|
|
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 19:45 |
FMG initialization query | Mohsin | FLUENT | 6 | November 2, 2016 03:02 |
CFX Transient Initialization | frossi | CFX | 1 | June 17, 2016 10:31 |
Solution initialization method in ANSYS Fluent | malick | FLUENT | 0 | June 15, 2016 01:52 |
Full Multigrid Initialization | Mr.Goodcat | FLUENT | 0 | March 17, 2016 07:43 |