# udf segmentation violation when hooked

 User Name Remember Me Password
 Register Blogs Members List Search Today's Posts Mark Forums Read

 October 22, 2009, 05:14 solution and new pb #2 New Member   christophe Join Date: Aug 2009 Posts: 24 Rep Power: 9 I realized that, in the last part, u=F_U_M1(f,thread); v=F_V_M1(f,thread); w=F_W_M1(f,thread); should become u=F_U(f,thread); v=F_V(f,thread); w=F_W(f,thread); By correcting this mistake, I have no more segmentation violation message when hooking the UDF, but I have one when initializing. Anybody got a clue why?

 October 26, 2009, 22:36 #3 Member   Krishna Join Date: Oct 2009 Posts: 34 Rep Power: 9 I have'nt gone through the code properly but their is a mistake in the if statement. if(t=0) should be replaced by if(t==0). regards

 October 27, 2009, 00:37 #4 New Member   christophe Join Date: Aug 2009 Posts: 24 Rep Power: 9 Thank you, I have made the correction. But I still have the segmentation violation message.

 October 27, 2009, 02:49 #5 Member   Krishna Join Date: Oct 2009 Posts: 34 Rep Power: 9 SQR(float) does'nt exist in C language. Use sqrt() to find square root.

 October 27, 2009, 03:36 #6 New Member   christophe Join Date: Aug 2009 Posts: 24 Rep Power: 9 Thank you for your comment. with the correction things are in progress: I can go through the initialize step. But then, when I start to iterate, I have again a segmentation violation message.

 October 27, 2009, 03:56 #7 Member   Krishna Join Date: Oct 2009 Posts: 34 Rep Power: 9 What is that you want to assign at the boundary? Write the expression and constraints.

 October 27, 2009, 04:39 #8 New Member   christophe Join Date: Aug 2009 Posts: 24 Rep Power: 9 I have created 2 udfs to express inlet and outlet conditions. The udf at the inlet provides the velocity (it's a pulsatile flow, the aim is to model blood flow in pulmonary artery). I tested it separately, no pb. The second one (the one shown here) is aimed at expressing a pressure boundary condition at the outlets. By getting the volume flow rate Q at the outlet at the former time step (that's why I need to separate t=0) I want to compute the pulmonary vascular resistance R by using the formula based on experimental results: R = 0.5+(15.5/Q) as Fluent cannot interpret directly this resistance, I compute the pressure p at the outlets by using the formula: p=RxQ where this time Q is the current volume flow rate at the outlets. I think the pb come from the fact that I am requesting a data from a former time step (Q).

 October 29, 2009, 07:09 #9 New Member   christophe Join Date: Aug 2009 Posts: 24 Rep Power: 9 it seems I solved the pb by using UDM instead of F_U_M1 functions. thank you again for your help.

 June 25, 2012, 05:46 #10 Member   Satish Gupta Join Date: Jun 2012 Posts: 30 Rep Power: 6 I have written the UDF for convective b.c using DEFINE_PROFILE.........Can any1 tell me how to apply it at outlet

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post gento FLUENT 1 April 15, 2016 15:59 Prashanth Fluent UDF and Scheme Programming 4 July 10, 2012 10:39 Corentin FLUENT 1 February 13, 2011 02:07 visuja Fluent UDF and Scheme Programming 0 April 23, 2009 22:23 wasan FLUENT 0 December 23, 2008 12:37

All times are GMT -4. The time now is 12:38.

 Contact Us - CFD Online - Top