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

Negative Cell volume

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 21, 2021, 14:16
Default Negative Cell volume
  #1
New Member
 
Mohammed
Join Date: Sep 2018
Posts: 15
Rep Power: 8
mohkh is on a distinguished road
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
Attached Images
File Type: png Artery .PNG (16.3 KB, 8 views)
File Type: png CaptureA.PNG (16.0 KB, 5 views)
File Type: png CaptureB.PNG (16.0 KB, 4 views)
Attached Files
File Type: c combined.c (1.3 KB, 2 views)

Last edited by mohkh; March 22, 2021 at 13:25.
mohkh is offline   Reply With Quote

Old   March 22, 2021, 06:59
Default
  #2
New Member
 
moh
Join Date: Jan 2014
Posts: 20
Rep Power: 12
tahar is on a distinguished road
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);
}
tahar is offline   Reply With Quote

Old   March 22, 2021, 13:33
Default
  #3
New Member
 
Mohammed
Join Date: Sep 2018
Posts: 15
Rep Power: 8
mohkh is on a distinguished road
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
mohkh is offline   Reply With Quote

Old   March 23, 2021, 14:41
Default
  #4
New Member
 
Mohammed
Join Date: Sep 2018
Posts: 15
Rep Power: 8
mohkh is on a distinguished road
Hi tahar
Please any news from your side
thanks
mohkh is offline   Reply With Quote

Old   March 23, 2021, 19:10
Default
  #5
New Member
 
moh
Join Date: Jan 2014
Posts: 20
Rep Power: 12
tahar is on a distinguished road
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
tahar is offline   Reply With Quote

Old   March 24, 2021, 04:11
Default Dynamic mesh Negative cell volume
  #6
New Member
 
Mohammed
Join Date: Sep 2018
Posts: 15
Rep Power: 8
mohkh is on a distinguished road
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.
Attached Images
File Type: png Capture1.PNG (149.3 KB, 3 views)
File Type: png Capture2.PNG (52.6 KB, 5 views)
File Type: png Artery .PNG (16.3 KB, 4 views)
mohkh is offline   Reply With Quote

Old   March 24, 2021, 04:55
Default
  #7
New Member
 
moh
Join Date: Jan 2014
Posts: 20
Rep Power: 12
tahar is on a distinguished road
I DO NOT understand if you need to deforme the tube or the elbow
tahar is offline   Reply With Quote

Old   March 24, 2021, 04:57
Default
  #8
New Member
 
Mohammed
Join Date: Sep 2018
Posts: 15
Rep Power: 8
mohkh is on a distinguished road
The tube is the elbow but I want to give you an image to my issue
Thanks
mohkh is offline   Reply With Quote

Old   March 24, 2021, 05:37
Default
  #9
New Member
 
moh
Join Date: Jan 2014
Posts: 20
Rep Power: 12
tahar is on a distinguished road
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
tahar is offline   Reply With Quote

Old   March 24, 2021, 05:58
Default
  #10
New Member
 
Mohammed
Join Date: Sep 2018
Posts: 15
Rep Power: 8
mohkh is on a distinguished road
no R(t) is working according to the radius, not to the axis
mohkh is offline   Reply With Quote

Old   March 26, 2021, 11:17
Default
  #11
New Member
 
moh
Join Date: Jan 2014
Posts: 20
Rep Power: 12
tahar is on a distinguished road
Quote:
Originally Posted by mohkh View Post
no R(t) is working according to the radius, not to the axis
fluent understand Rx(t) as NODE_X(v)

and Ry(t) as NODE_y(v)


try just to set me an imagination of your deformable elbow for a given amplitude and frequency
tahar is offline   Reply With Quote

Old   March 26, 2021, 13:03
Default
  #12
New Member
 
Mohammed
Join Date: Sep 2018
Posts: 15
Rep Power: 8
mohkh is on a distinguished road
I am working on it. I will update you immediately
mohkh is offline   Reply With Quote

Old   April 12, 2021, 22:04
Default
  #13
New Member
 
Mohammed
Join Date: Sep 2018
Posts: 15
Rep Power: 8
mohkh is on a distinguished road
Dear Tahar
Ry(t)= NODE (v)
Or Ry= NOD (u)
Just to be sure
Thanks
mohkh is offline   Reply With Quote

Reply

Tags
fluent - udf, fluent 14 to fluent 15.


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
[Other] refineWallLayer Error Yuby OpenFOAM Meshing & Mesh Conversion 2 November 11, 2021 12:04
Update Dynamic mesh failed- Negative cell volume detected kywong5 Fluent UDF and Scheme Programming 0 April 24, 2017 09:57
How to use "translation" in solidBodyMotionFunction in OpenFOAM rupesh_w OpenFOAM Running, Solving & CFD 5 August 16, 2016 05:27
[blockMesh] blockMesh error - Negative Volume Block adoledin OpenFOAM Meshing & Mesh Conversion 2 June 22, 2016 11:44
Cells with t below lower limit Purushothama Siemens 2 May 31, 2010 22:58


All times are GMT -4. The time now is 23:51.