CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

viscosity as a function of x or y

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By Jung

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 25, 2016, 06:57
Default viscosity as a function of x or y
  #1
New Member
 
mohsen cheraghi
Join Date: Jun 2010
Location: Switzerland
Posts: 28
Rep Power: 15
mohsen cheraghi is on a distinguished road
Hello all,

I'm going to implement the viscosity as a function of space. Could you help me?

Thank you,
Mohsen
mohsen cheraghi is offline   Reply With Quote

Old   December 25, 2016, 20:05
Default
  #2
New Member
 
Join Date: Sep 2012
Location: seoul
Posts: 3
Rep Power: 13
Jung is on a distinguished road
Quote:
Originally Posted by mohsen cheraghi View Post
Hello all,

I'm going to implement the viscosity as a function of space. Could you help me?

Thank you,
Mohsen


you can access cell position like this

forAll(mesh.C(),celli){
mesh.C()[celli][0] <- cell x position
mesh.C()[celli][1] <- cell y position
mesh.C()[celli][2] <- cell z position
}
mohsen cheraghi likes this.
Jung 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
[Other] mesh airfoil NACA0012 anand_30 OpenFOAM Meshing & Mesh Conversion 13 March 7, 2022 17:22
[snappyHexMesh] How to define to right point for locationInMesh Mirage12 OpenFOAM Meshing & Mesh Conversion 7 March 13, 2016 14:07
Running UDF with Supercomputer roi247 FLUENT 4 October 15, 2015 13:41
latest OpenFOAM-1.6.x from git failed to compile phsieh2005 OpenFOAM Bugs 25 February 9, 2010 04:37
OpenFoam 14 installation problem gfcoppola OpenFOAM Installation 20 November 2, 2007 13:38


All times are GMT -4. The time now is 12:40.