Negative Cell volume
4 Attachment(s)
Dear All
I am trying to simulate blood flow inside an elbow artery as in the attached file. I have used a UDF for the inlet and wall as a dynamic mesh because I am trying to get movement to the wall according to the pulse flow. I had finished my mesh but when I started the simulation I got an error (Error: Update-Dynamic-Mesh failed. Negative cell volume detected. Error: Update-Dynamic-Mesh failed. Negative cell volume detected. Error Object: #f). Please how can you help me? Note: UDF as an attached file. Thanks in advance |
first of all you have to correct your udf
then try to use preview zone motion to ensure you have the correct deformation and as final step use preview mesh motion to see your mesh updating So you have some errors in your UDF remove #include"udf.h" from the ligne 20 #define D 300e-6 pipe diametre is already defined as NODE_X(v), NODE_y(v) so you do not need it tray to explaine what you need exactly i tray to modifie your udf #include "udf.h" #define D 300e-6 /* Pipe diameter */ #define l 2400e-6 /* Pipe length */ #define freq 1/0.8 /* frequency */ DEFINE_PROFILE(unsteady_velocity, thread, position) { face_t f; real t = CURRENT_TIME; begin_f_loop(f, thread) { F_PROFILE(f, thread, position) = 0.01 + 0.005*sin(7.85*t); } end_f_loop(f, thread) } /************************************************** ********************* udfexample.c UDF for specifying steady-state velocity profile boundary condition ************************************************** **********************/ DEFINE_GRID_MOTION(grid_both, domain, dt, time, dtime) { face_t f; Thread *tf = DT_THREAD((Dynamic_Thread *)dt); int n; Node *v; real x; real y; SET_DEFORMING_THREAD_FLAG(THREAD_T0(tf)); begin_f_loop(f, tf) { f_node_loop(f, tf, n) { v = F_NODE(f, tf, n); if (NODE_POS_NEED_UPDATE(v)) { NODE_POS_UPDATED(v); if (NODE_Y(v) > (D/2.0)) { NODE_X(v) = NODE_X(v); NODE_Y(v) =NODE_X(v)+ amplitude * sin(2*M_PI*freq*CURRENT_TIME); } else { NODE_X(v) = NODE_X(v); NODE_Y(v) =NODE_y(v); } } } } end_f_loop(f,tf); } |
Dear tahar
Thank you for your replay I hope to modify my UDF and I have uploaded some pictures That refer to my set up. I am applying pulse flow at the inlet of artery which is F_PROFILE(f, thread, position) = 0.01 + 0.005*sin(7.85*t); and the movement of wall is NODE_Y(v) =NODE_X(v)+ amplitude * sin(2*M_PI*freq*CURRENT_TIME);I I applied everything. my program is working very good with steady-state but when I applied to transient I got the problem which is NCV. my cell size is 2*10^-6 my time step is 1*10^-9 Please could you send me your email to send you my mesh as well? Best regrads |
Hi tahar
Please any news from your side thanks |
try to use diplay zone motion to see the wall deformation without mesh deformation if the deformation is OK then try to modified the spring factor to 0.1 in smothing panel
|
Dynamic mesh Negative cell volume
3 Attachment(s)
Dear all
@Tahar The aim of this study is to simulate of the blood flow in as an elastic blood vessel. Assumption of rigid blood vessel wall decreases and expanding according to the results especially when the vessel undergoes quite large deformations. During the cardiac cycle, the fluid flow induces forces from the time-varying blood pressure. Pulsatile flow profile was implemented via User Defined Function (UDF) to mimic the cardio-ac cycle. V(t) = amplitude +sin(ωt) ω=2πF,F=1/T Pressure profile was implemented via User Defined Function (UDF) to mimic the cardio-ac cycle. R(t) = amplitude +sin(ωt+θ) My set up: D=300µm T=0.8 s Geometry attached file. I am suffering from NCV even when I start with preview zone motion. |
I DO NOT understand if you need to deforme the tube or the elbow
|
The tube is the elbow but I want to give you an image to my issue
Thanks |
i think your equation R(t) is wrong it is appropriate for staight tube
you need to develope an equation which has the form : Rx(t)= Ry(t) = you have to fined the correct MATH equation for your problem then you can interpret as udf |
no R(t) is working according to the radius, not to the axis
|
Quote:
and Ry(t) as NODE_y(v) try just to set me an imagination of your deformable elbow for a given amplitude and frequency |
I am working on it. I will update you immediately
|
Dear Tahar
Ry(t)= NODE (v) Or Ry= NOD (u) Just to be sure Thanks |
All times are GMT -4. The time now is 23:10. |