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

Simulating bloodflow, error AMG solver

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 6, 2018, 04:51
Default Simulating bloodflow, error AMG solver
  #1
New Member
 
Eva
Join Date: Nov 2018
Posts: 1
Rep Power: 0
Research_Eva is on a distinguished road
Hi everyone,

Hope someone can help me! I'm new to CFD and currently trying to simulate bloodflow in the large arteries around the human heart.

I wrote an UDF defying the mass flow over time during a heartbeat which is intepreted without problems. But when I intitialize the solution I directly get an error saying:

Error: Divergence detected in AMG solver: ads-0
Error Object: #f

Before, with use of another UDF I had no problems. It's with the same anatomy and Mesh so I think the problem is in the UDF and not in the geometry.
Does anyone have tips on how to solve this problem?

Thank you in advance!

This is my current UDF:

// UDF for specifying time dependant mass flow inlet profile boundary condition
// Mass flow inlet with diastolic backflow (regurgitation)

#include "udf.h"//file that contains definitions for define functions and fluent operations
#define PI 3.141592654
#define Systtime 0.67// systolic time 2/3 of whole heartbeat
#define HR 114 // Heart rate (beats/minute)
#define Qmax_mass 0.1582 // maximum mass flow during systole (kg/s)
#define Dystime 0.33//diastolic time 1/3 of whole heartbeat
#define Qmaxd_mass 0.1131 // maximum mass flow (backflow) during diastole (kg/s)

DEFINE_PROFILE(inlet_massflow,th,i)
{
face_t f;
begin_f_loop(f,th)
double t = CURRENT_TIME; //t is the local time within each period

{
if(t <= (1/3)*Systtime*60/HR)
F_PROFILE(f,th,i) = Qmax_mass*sin((0.5*PI/((1/3)*Systtime*60/HR))*t);

if((t <= (27/30)*Systtime*60/HR) && (t > (1/3)*Systtime*60/HR))
F_PROFILE(f,th,i) = Qmax_mass*sin((0.5*PI/((17/30)*Systtime*60/HR))*(t+(7/30)*Systtime*60/HR));

if((t <= (27/30)*Systtime*60/HR+(1/4)*Dystime*60/HR) && (t > (27/30)*Systtime*60/HR))
F_PROFILE(f,th,i) = Qmaxd_mass*-sin((0.5*PI/((1/4)*Dystime*60/HR))*(t-(27/30)*Systtime*60/HR));

else
F_PROFILE(f,th,i) = 0.5*Qmaxd_mass*sin((PI/((3/4)*Dystime*60/HR))*(t-((27/30)*Systtime+(1/4)*Dystime-3*(3/8)*Dystime)*60/HR))-0.5*Qmaxd_mass;
}
end_f_loop(f,th);
}
Research_Eva is offline   Reply With Quote

Reply


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
[ANSYS Meshing] Help with element size sandri_92 ANSYS Meshing & Geometry 14 November 14, 2018 07:54
Quarter Burner mesh with periosic condition SamCanuck FLUENT 2 August 31, 2011 11:34
Working directory via command line Luiz CFX 4 March 6, 2011 20:02
why the solver reject it? Anyone with experience? bearcat CFX 6 April 28, 2008 14:08
Error during Solver cfd guy CFX 4 May 8, 2001 06:04


All times are GMT -4. The time now is 07:54.