Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Viscosity as a function of coordinates

Status
Not open for further replies.

meshparts

Mechanical
Feb 17, 2005
490
Hi!

I am trying to define a fluid in ANSYS-CFD whith a viscosity as a function of the x-coordinate. Is there anybody who can tell me, what I am doing wrong? :

*dim, visctab, table, 2, 1, 1, x
visctab(1,0)=0 ! 1st x-coordinate
visctab(2,0)=1.5 ! 2nd x-coordinate
visctab(1,1)=80e-6 ! Viscosity at the 1st x-coordinate
visctab(2,1)=20e-6 ! Viscosity at the 2nd x-coordinate

flda,prot,visc, %visctab%

Then I get these error message:

"Specified fluid not found in property database. Use FLDA,prot to reselect a valid fluid type, or add the desired fluid to the fluid property database manually. VISCTAB."

Thank you very much!
 
Replies continue below

Recommended for you

This is not my field but you cannot define a system property like this in ANSYS as a table function. Table functions are used to define time dependent input data such as force vs time; displacement vs. time; etc.


------------
See faq569-1083 for details on how to make best use of Eng-Tips.com
 
That's courious... In the description of the FLDA7 command sais:

"... if your fluid properties can be expressed as a table, you can enter a table name. To enter a table name, you must first define a TABLE type array parameter using the *DIM command. Note that you must enclose the table name in
% symbols in the FLDATA7 command line (e.g., FLDATA7,PROT,DENS,%tabname%). "
 
RTFM on the *DIM,,TABLE command. In fldata7 it says:

ANSYS Help file fldata7 said:
FLDATA7

Value
Fluid property type.

You can enter one of the values shown below, or if your fluid properties can be expressed as a table, you can enter a table name. To enter a table name, you must first define a TABLE type array parameter using the *DIM command. Note that you must enclose the table name in % symbols in the FLDATA7 command line (e.g., FLDATA7,PROT,DENS,%tabname%). For more information on defining tables, see TABLE Type Array Parameters in the ANSYS APDL Programmer's Guide.

You don't have a problem with the "being able to specify as a table" bit. However, the problem you have is how to associate this so-called x-coordinate to your model viscosity using this method. How do you intend to do that? The implied statement in the above is "a function of TIME i.e.

"...if your fluid properties can be expressed as a table (as a function of TIME), you can enter a table name."

Otherwise, how will ANSYS know that you require viscosity to be a function of an "x-coordinate"? It won't.


------------
See faq569-1083 for details on how to make best use of Eng-Tips.com
 
Hi Drej,

Thank you for your reply!

I thought, by defining as primary variable the x-variable it will know:

*dim, visctab, table, 2, 1, 1, x

hier a pargraph from ansys manual:

"

9.2.6.1. Using a Fluid Property Table

If working interactively, you define a new table prior to using the table to apply loads. You can define a table interactively via the Utility Menu> Parameters> Array Parameters> Define/Edit menu path, or in batch mode via the *DIM command. If working interactively, you will be asked to define the table through a series of dialog boxes. If working in batch mode, you need to define the table before issuing any of the loading commands.

When you define the table, you can define the following primary variables:

Temperature (TEMP)

Pressure (PRESSURE)

Time (TIME)

X-coordinate (X)

Y-coordinate (Y)

Z-coordinate (Z)

Velocity (VELOCITY)

Reference X-coordinate (Xr) (ALE formulation only)

Reference Y-coordinate (Yr) (ALE formulation only)

Reference Z-coordinate (Zr) (ALE formulation only)

"

Regards
Alex
 
It appears that you can only associate this with a boundary condition. The important part here is Boundary Conditions, since primary variables are asoociated with these and do not appear to be associated with material properties (such as viscosity).

Take a look at:

Theory Reference> Chapter 7. Fluid Flow>
7.6. Fluid Properties> 7.6.2. Viscosity
...
...
Table: For the table type, you enter viscosity data as a function of temperature (using the MPTEMP and MPDATA commands).

The above is, I know, the TABLE parameter in the fldat command. But there is nothing else mentioned regarding the use of viscosity as a function of...(anything other than temperature).

However, doing a search on Google brought up several hits on viscosity as a function of... (something), which all pointed to an ANSYS UPF. See:

Advanced Analysis Techniques Guide> Chapter 12. User-Programmable Features and Nonstandard Uses >

and scroll down to "User Viscosity".


Also, do a search in the ANSYS help for UserVisLaw or go to fldata7 in the help and scroll down to:

fldata7 said:
USRV — This choice for viscosity activates the user-programmable subroutine, USERVISLAW. In this routine, you can define your own constitutive relationship between viscosity and other variables such as position, time, temperature, pressure, velocity, velocity gradients, etc. For details, see the ANSYS, Inc. Theory Reference, the ANSYS Fluids Analysis Guide, and the Guide to ANSYS User Programmable Features

— The USERVISLAW subroutine uses the four coefficients you specify via the FLDATA8,NOMI,VISC command, the FLDATA9,COF1,VISC command, the FLDATA10,COF2,VISC command, and the FLDATA11,COF3,VISC command.

7.6.2. Viscosity
User-Defined Viscosity: In recognition of the fact that the viscosity models described above can not satisfy the requests of all users, a user-programmable subroutine (UserVisLaw) is also provided with access to the following variables: position, time, pressure, temperature, velocity component, velocity gradient component. See the Guide to ANSYS User Programmable Features and User Routines and Non-Standard Uses in the ANSYS Advanced Analysis Techniques Guide for information about user written subroutines.

Hope this helps, not sure how much more I can extract from the help file.


------------
See faq569-1083 for details on how to make best use of Eng-Tips.com
 
Thanks Drej, I will try do find a Fortran compiler. What a pity, that's not the easiest way...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor