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 while using UDF

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 2, 2020, 02:46
Default Error during initialization while using UDF
  #1
Member
 
Dnyanesh Mirikar
Join Date: Jul 2019
Posts: 35
Rep Power: 6
DnyanMiri is on a distinguished road
I want to write UDF for wall heat flux boundary condition. When I initialize the setup it gets closed (in both serial and parallel mode) with error
Node 0: Process 2532: Received signal SIGSEGV.
MPI Application rank 0 exited before MPI_Finalize()

My UDF code is
#include "udf.h"
//Heat generation model from Mahamud and Park (Lumped heat capacity model)

DEFINE_HEAT_FLUX(Heat_gen,f,t,c0,t0,cid,cir)
{
#define I 24.984
#define EntCoeff -0.3
real Re;
real T = C_T(f,t);
real Td; //temperature in degree celcius
real Qirr;
real Qent;
real Qt;

Td=T-273.16;
Re=12.407-0.5345*Td+0.0134*Td*Td-0.0001*Td*Td*Td; //T in degree celcius and Re in milli ohms
Qirr=(I*I)*Re/1000; // Watt per metre square
Qent=-I*(Td+273.16)*EntCoeff/1000; // Watt per metre square
Qt=Qirr+Qent;
}

Please suggest a possible solution for this, I'm new to UDF. Thanks
DnyanMiri is offline   Reply With Quote

Old   January 3, 2020, 00:49
Default
  #2
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 33
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
Code:
#include "udf.h"
#define I 24.984
#define EntCoeff -0.3
//Heat generation model from Mahamud and Park (Lumped heat capacity model)

DEFINE_HEAT_FLUX(Heat_gen,f,t,c0,t0,cid,cir)
{

real Re;
real T = C_T(f,t);
real Td; //temperature in degree celcius
real Qirr;
real Qent;
real Qt;

Td=T-273.16;
Re=12.407-0.5345*Td+0.0134*Td*Td-0.0001*Td*Td*Td; //T in degree celcius and Re in milli ohms
Qirr=(I*I)*Re/1000; // Watt per metre square
Qent=-I*(Td+273.16)*EntCoeff/1000; // Watt per metre square
Qt=Qirr+Qent;
}
__________________
best regards


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

Reply

Tags
heat flux fluent udf, udf

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
does Hyperthreading affect the application of UDF? SJSW Fluent UDF and Scheme Programming 11 October 10, 2018 23:28
Error code: 126 when loading parallel UDF Coop Fluent UDF and Scheme Programming 0 July 13, 2018 09:33
UDF - Error while Solution Initialization QuocHung_Phan Fluent UDF and Scheme Programming 2 October 11, 2013 04:03
I need UDF help. S.Whitney FLUENT 0 October 15, 2007 12:29
UDF, UDF, UDF, UDF Luc SEMINEL Main CFD Forum 0 November 25, 2002 05:01


All times are GMT -4. The time now is 20:47.