-
-
July 2, 2019 at 10:47 pm
Luis Enrique
SubscriberHi everyone!
I 've working with a udf to simulate the viscosity of alumiunium in function of temperarture and strain rate. Neverthless, the macros C_STRAIN_RATE_MAG(c, t) its not working. When I write the macros fluent show a divergence problems. (I atached the udf)
#include "udf.h"
#include "mem.h"
#define Q 176867 //J/mol
#define A 4.46e+13
#define n 5.86
#define R 8.314 //J/molK
#define alpha 0.0118
DEFINE_PROPERTY(cell_viscosity, c, t)
{
real temp = C_T(c, t);
real mu_lam;
real Z;
real Flow_stress;
real x;
real strain;
if (strain < 0)
{
strain = 10;
}
else
{
strain = C_STRAIN_RATE_MAG(c, t);
}
Z = pow((strain), (Q / (R*temp)));
x = pow((Z / A), (1. / n));
Flow_stress = (1. / alpha)*(log(x + sqrt(pow(x, 2) + 1.)));
mu_lam = Flow_stress / (3.*strain);
if (mu_lam > 0)
return mu_lam;
}
But when I use a constante value of strain rate, the udf works perfect and match whith my had writing calculus ( I atached the another udf)
#include "udf.h"
#include "mem.h"
#define Q 176867 //J/mol
#define A 4.46e+13
#define n 5.86
#define R 8.314 //J/molK
#define alpha 0.0118
DEFINE_PROPERTY(cell_viscosity, c, t)
{
real temp = C_T(c, t);
real mu_lam;
real Z;
real Flow_stress;
real x;
real strain = 10;
Z = pow((strain), (Q / (R*temp)));
x = pow((Z / A), (1. / n));
Flow_stress = (1. / alpha)*(log(x + sqrt(pow(x, 2) + 1.)));
mu_lam = Flow_stress / (3.*strain);
if (mu_lam > 0)
return mu_lam;
}
I hope someone could help me, thanks by advanced.
-
July 3, 2019 at 5:38 am
DrAmine
Ansys EmployeePerhaps you need to provide limiters and/or tune a bit URF's, time scales, etc..
You need also to provide a well educated standard value for start...
-
July 10, 2019 at 5:02 pm
Luis Enrique
SubscriberHi everyone, the problem was that fluent need a inmediatly viscosity value to begin the simulation, because the strain rate value is zero en the t=0. Only implement a if condition and works perfect
-
- You must be logged in to reply to this topic.

Boost Ansys Fluent Simulations with AWS
Computational Fluid Dynamics (CFD) helps engineers design products in which the flow of fluid components is a significant challenge. These different use cases often require large complex models to solve on a traditional workstation. Click here to join this event to learn how to leverage Ansys Fluids on the cloud, thanks to Ansys Gateway powered by AWS.

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 non-zero exit code of : 2
- Difference between K-epsilon and K-omega Turbulence Model
- Time Step Size and Courant Number
- Mesh Interfaces in ANSYS FLUENT
- error in cfd post
-
3694
-
2564
-
1765
-
1236
-
592
© 2023 Copyright ANSYS, Inc. All rights reserved.