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

how can define a depth-dependent property?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 19, 2013, 10:23
Default how can define a depth-dependent property?
  #1
Senior Member
 
adambarfi's Avatar
 
Mostafa Mahmoudi
Join Date: Jan 2012
Posts: 322
Rep Power: 15
adambarfi is on a distinguished road
Send a message via Yahoo to adambarfi Send a message via Skype™ to adambarfi
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
adambarfi is offline   Reply With Quote

Old   April 21, 2013, 03:46
Default
  #2
Senior Member
 
Lieven
Join Date: Dec 2011
Location: Leuven, Belgium
Posts: 299
Rep Power: 22
Lieven will become famous soon enough
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);
You can use this in the computation of parameters as
Code:
g = a*sqr(Cs)+b
The createFields.H file is a good place to put this if g remains constant during the simulation.

I have never worked with groovyBC so I can't help you with that.

Cheers,

L
Lieven is offline   Reply With Quote

Old   April 21, 2013, 08:40
Default
  #3
Senior Member
 
adambarfi's Avatar
 
Mostafa Mahmoudi
Join Date: Jan 2012
Posts: 322
Rep Power: 15
adambarfi is on a distinguished road
Send a message via Yahoo to adambarfi Send a message via Skype™ to adambarfi
Quote:
Originally Posted by Lieven View Post
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);
You can use this in the computation of parameters as
Code:
g = a*sqr(Cs)+b
The createFields.H file is a good place to put this if g remains constant during the simulation.

I have never worked with groovyBC so I can't help you with that.

Cheers,

L
Dear Lieven,

Thank you for your reply. I think your post is what I want. I will test it.

Best
Mostafa
adambarfi 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
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


All times are GMT -4. The time now is 22:35.