×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Viscosity as a function of coordinates

Viscosity as a function of coordinates

Viscosity as a function of coordinates

(OP)
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!

RE: Viscosity as a function of coordinates

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

RE: Viscosity as a function of coordinates

(OP)
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%). "

RE: Viscosity as a function of coordinates

RTFM on the *DIM,,TABLE command. In fldata7 it says:

Quote (ANSYS Help file fldata7):


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

RE: Viscosity as a function of coordinates

(OP)
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

RE: Viscosity as a function of coordinates

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:

Quote (fldata7):


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.

Quote:

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

RE: Viscosity as a function of coordinates

(OP)
Thanks Drej, I will try do find a Fortran compiler. What a pity, that's not the easiest way...

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources