|
[Sponsors] |
April 19, 2013, 10:23 |
how can define a depth-dependent property?
|
#1 |
Senior Member
|
Hi everybody,
If I want to define the viscosity or gravity acceleration or anything else as a function of depth, what should I do? in example, g=ay^2+b, where y is the height from bottom surface. I searched the internet but I couldn't find anything. anybody knows how can I do it? can I use pos().y, which is used in groovyBC? thanks a lot Mostafa Mahmoudi |
|
April 21, 2013, 03:46 |
|
#2 |
Senior Member
Lieven
Join Date: Dec 2011
Location: Leuven, Belgium
Posts: 299
Rep Power: 22 |
I don't know if it helps you, but you can access the coordinates as (e.g. z-coordinate)
Code:
const volScalarField& Cz = mesh.C().component(vector::Z); Code:
g = a*sqr(Cs)+b I have never worked with groovyBC so I can't help you with that. Cheers, L |
|
April 21, 2013, 08:40 |
|
#3 | |
Senior Member
|
Quote:
Thank you for your reply. I think your post is what I want. I will test it. Best Mostafa |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Installing OF 1.6 on Mac OS X | gschaider | OpenFOAM Installation | 129 | June 19, 2010 09:23 |
Missing math.h header | Travis | FLUENT | 4 | January 15, 2009 11:48 |
Free surface boudary conditions with SOLA-VOF | Fan | Main CFD Forum | 10 | September 9, 2006 12:24 |
UDF FOR UNSTEADY TIME STEP | mayur | FLUENT | 3 | August 9, 2006 10:19 |
Geometrical dependent physical property | Jiri Novak | FLUENT | 4 | October 24, 2005 12:08 |