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

PROBLEMS WITH THE MACRO C_STRAIN_RATE_MAG(c, t)

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 4, 2019, 14:52
Default PROBLEMS WITH THE MACRO C_STRAIN_RATE_MAG(c, t)
  #1
New Member
 
Chihuahua
Join Date: Mar 2019
Posts: 2
Rep Power: 0
le.martinez is on a distinguished road
Hi 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.
le.martinez is offline   Reply With Quote

Old   July 22, 2020, 06:05
Default
  #2
New Member
 
Elke Jukic
Join Date: Jun 2020
Posts: 2
Rep Power: 0
elkeju is on a distinguished road
Hi,

Did you already solved your problem? I'm stucked with the same issue and i do not really know how to implement a if condition for t=0.

Thanks in advance!
elkeju 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
[ICEM] Problems with coedge curves and surfaces tommymoose ANSYS Meshing & Geometry 6 December 1, 2020 12:12
Needed Benchmark Problems for FSI Mechstud Main CFD Forum 4 July 26, 2011 13:13
Macro Trouble -Winows Explorer Crashes with Macro Martin Castillo FLUENT 1 July 25, 2007 05:18
macro not function! guang ai Siemens 0 July 25, 2004 19:53
Call a macro from a macro Flav Siemens 2 July 1, 2004 06:42


All times are GMT -4. The time now is 20:14.