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

UDF for linear elasticity of arterial wal

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 1, 2012, 12:27
Default UDF for linear elasticity of arterial wal
  #1
New Member
 
Nina Philipova
Join Date: Jul 2012
Posts: 11
Rep Power: 14
n.phililipova is on a distinguished road
I have to program UDF for linear elastic wall and parabolic velocity profile at the inlet.
I found this script:

#include "udf.h"

/*Define Wall Deformation*/
DEFINE_GRID_MOTION( elastic_wall, domain, dynamic_thread, time, dtime)
{
/*Model Constants*/

/*Elasticity Parameters*/
real E = 400000; /*Young's Modulus (Pa)*/
real vp = .499; /*Poisson's Ratio*/
real h = .0055; /*Wall Thinkness (m)*/

/*Reference Values*/
real Pref = 0;


/*Variable Declarations*/

/*Fluent Data Access*/
Thread *tf = DT_THREAD(dynamic_thread);
face_t f;
Node *v;
int n;

/*Model Variables*/
real P; /*Wall Pressure*/
real r; /*Radius at wall*/
real NV_VEC(dr); /*Wall Increment*/
real Dw; /*Wall Distensibility*/


/*Set deforming flag on adjacent cell zone */

SET_DEFORMING_THREAD_FLAG(THREAD_T0(tf)); /*??Need to look up exacty what this is doing??*/


/*Loop Over Faces*/

begin_f_loop( f, tf )
{
/*Compute Pressure on the face*/
P = -F_P( f, tf ); /*??Minus sign to account for face orientation??*/
Message ("Face Pressure = %f\n", P);

/*Loop Over Nodes*/
f_node_loop(f,tf,n)
{
/*Assign Node Value*/
v = F_NODE(f,tf,n);

/*Check if node needs to be updated*/
if (NODE_POS_NEED_UPDATE (v))
{
/* Indicate that node position has been updated*/
NODE_POS_UPDATED(v);

/*Compute Wall Distensibility*/
r = NODE_Y(v); /*??Does NODE_Y(v) access radial positiion in axisymmetric??*/
Dw = r*(1-vp*vp) / (E*h);

/*Increment Wall*/
NV_D( dr, =, 0, r*Dw*( P - Pref ),0 );
NV_V( NODE_COORD(v), +=, dr);

/*Debugging*/
Message ("Radius: %f, Deflection: %f\n", r, dr[1] );

}/*end if statement*/

}/*end node loop*/

}/*end face loop*/
end_f_loop( f, tf )

}/*end DEFINE_GRID_MOTION*/

I think that parabolic velocity equation has to estimate the change in radius.
I will be grateful to anyone, who can gives any assistance!
Wish success to everyone!

e-mail: philipova@imbm.bas.bg

Last edited by n.phililipova; July 1, 2012 at 12:29. Reason: forget to post e-mail
n.phililipova is offline   Reply With Quote

Old   July 1, 2012, 12:35
Default
  #2
New Member
 
Nina Philipova
Join Date: Jul 2012
Posts: 11
Rep Power: 14
n.phililipova is on a distinguished road
Please I need help as soon as possible
n.phililipova is offline   Reply With Quote

Reply

Tags
udf and programming


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
Source Term UDF VS Porous Media Model pchoopanya Fluent UDF and Scheme Programming 1 August 28, 2013 07:12
UDF parallel error: chip-exec: function not found????? shankara.2 Fluent UDF and Scheme Programming 1 January 16, 2012 23:14
How to add a UDF to a compiled UDF library kim FLUENT 3 October 26, 2011 22:38
UDF...UDF...UDF...UDF Luc SEMINEL FLUENT 0 November 25, 2002 05:03
UDF, UDF, UDF, UDF Luc SEMINEL Main CFD Forum 0 November 25, 2002 05:01


All times are GMT -4. The time now is 16:44.