

August 11, 2019 at 4:41 pmNiteshDubeySubscriber
I have loaded a UDF for the spatial variation of viscosity in my simulation. I am getting these errors. Need the help of experts. Any help will be highly appreciated.
My UDF is:
/*********************************************************************
UDF that simulates spatially dependent viscosity property
**********************************************************************/
#include "udf.h"
#define a 20105467790.5412
#define b 2.692576799425
#define c 5083.56137738767
#define d 84995.6051593393
#define e 2230225.26461472
#define f 852890049.062181
#define g 502636694.742164
DEFINE_PROPERTY(cell_viscosity, cell,thread)
{
real mu;
real y, z;
real ZB[ND_ND];
C_CENTROID(ZB,cell,thread);
y=ZB[1]; /* y cooridnate*/
z=ZB[2]; /* z cooridnate*/
mu=1.21  2.71*(a + b*(z0.006) + c*pow(z0.006,2.) + d*pow(z0.006,3.) + e*pow(z0.006,4.) + f*pow(z0.006,5.) + g/(y+0.52347)) +
25.46*pow((a + b*(z0.006) + c*pow(z0.006,2.) + d*pow(z0.006,3.) + e*pow(z0.006,4.) + f*pow(z0.006,5.) + g/(y+0.52347)),2.);
return mu;
}
I did the following checks:
1. Mesh quality is good
2. Discretization scheme is secondorder for momentum and pressure. For gradient, it is leastsquares cellbased.
Divergence detected in AMG solver: xmomentum Stabilizing ymomentum to enhance linear solver robustness.
Divergence detected in AMG solver: ymomentum Stabilizing zmomentum to enhance linear solver robustness.
Divergence detected in AMG solver: zmomentum Stabilizing pressure correction to enhance linear solver robustness.
Divergence detected in AMG solver: pressure correction
Divergence detected in AMG solver: xmomentum
Divergence detected in AMG solver: ymomentum
Divergence detected in AMG solver: zmomentum
Divergence detected in AMG solver: pressure correction
Error at host: floating point exception
Error at Node 0: floatingpoint exception
Error at Node 1: floatingpoint exception
===============Message from the Cortex Process================================
Compute processes interrupted. Processing can be resumed.
==============================================================================
Error: floating point exception
Error Object: #f

August 12, 2019 at 12:03 pmRobAnsys Employee
Plot the function in Excel and see how it looks. Whenever I see coefficients with that many significant figures I always expect the curve to be very different to what you're expecting.
Also remember that UDFs use SI units: your coordinates are in metres regardless of the units in your model.

 You must be logged in to reply to this topic.
Earth Rescue – An Ansys Online Series
The climate crisis is here. But so is the human ingenuity to fight it. Earth Rescue reveals what visionary companies are doing today to engineer radical new ideas in the fight against climate change. Click here to watch the first episode.
Ansys Blog
Subscribe to the Ansys Blog to get great new content about the power of simulation delivered right to your email on a weekly basis. With content from Ansys experts, partners and customers you will learn about product development advances, thought leadership and trends and tips to better use Ansys tools. Sign up here.
 Suppress Fluent to open with GUI while performing in journal file
 Floating point exception in Fluent
 What are the differences between CFX and Fluent?
 Heat transfer coefficient
 Getting graph and tabular data from result in workbench mechanical
 The solver failed with a nonzero exit code of : 2
 Difference between Kepsilon and Komega Turbulence Model
 Time Step Size and Courant Number
 Mesh Interfaces in ANSYS FLUENT
 error in cfd post

2616

2098

1323

1108

461
© 2023 Copyright ANSYS, Inc. All rights reserved.