CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > Siemens > STAR-CCM+

NEED HELP for position field function!!

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By abdul099

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 24, 2012, 09:56
Exclamation NEED HELP for position field function!!
  #1
New Member
 
Join Date: Mar 2012
Posts: 8
Rep Power: 14
EnronZhang is on a distinguished road
Hey guys, I am currently working on a project about the oil spill tank. I am wondering if there is a field function which is relatively corresponding to the global coordinate?

That means, if I have known X and Y in the Cartesian coordinate, is it possible to create a field function to obtain the Z?

Thank you so much in advance!!
EnronZhang is offline   Reply With Quote

Old   October 24, 2012, 14:46
Default
  #2
Senior Member
 
Join Date: Oct 2009
Location: Germany
Posts: 636
Rep Power: 22
abdul099 is on a distinguished road
Maybe. What exactly do you want to achieve? How should your result look like?
__________________
We do three types of jobs here:
GOOD, FAST AND CHEAP
You may choose any two!
abdul099 is offline   Reply With Quote

Old   October 24, 2012, 14:47
Default
  #3
Senior Member
 
siara817's Avatar
 
siamak rahimi ardkapan
Join Date: Jul 2010
Location: Copenhagen, Denmark
Posts: 220
Rep Power: 18
siara817 is on a distinguished road
You can generate easily a field function by right clicking on Tools/ Field functions and select New. Then open the Definition node. But, how does Z variable depend on the value of X and Y theoretically? Do you have some equation that gives you the value of Z according to X and Y?
siara817 is offline   Reply With Quote

Old   October 25, 2012, 11:23
Default
  #4
New Member
 
Join Date: Mar 2012
Posts: 8
Rep Power: 14
EnronZhang is on a distinguished road
Quote:
Originally Posted by siara817 View Post
You can generate easily a field function by right clicking on Tools/ Field functions and select New. Then open the Definition node. But, how does Z variable depend on the value of X and Y theoretically? Do you have some equation that gives you the value of Z according to X and Y?
Hi siara, that's what I want to generate. For instance, I have a tank which is full of oil and water inside. It is two phase model. Of course, the oil is on top of the water as its light density. In this case, the top boundary surface is not flat, instead, it is inclined plane. I would like to create a field function to obtain all the Z values on this top surface to determine the the oil domain. Since the top surface of the tank is inclined, the oil thickness is variable. But I want to define the oil thickness to be constant in 2mm under the tank's top surface. How should I create this field function? Thank you for your help in advance.
EnronZhang is offline   Reply With Quote

Old   October 25, 2012, 11:24
Default
  #5
New Member
 
Join Date: Mar 2012
Posts: 8
Rep Power: 14
EnronZhang is on a distinguished road
Quote:
Originally Posted by abdul099 View Post
Maybe. What exactly do you want to achieve? How should your result look like?
Hi abdul, that's what I want to generate. For instance, I have a tank which is full of oil and water inside. It is two phase model. Of course, the oil is on top of the water as its light density. In this case, the top boundary surface is not flat, instead, it is inclined plane. I would like to create a field function to obtain all the Z values on this top surface to determine the the oil domain. Since the top surface of the tank is inclined, the oil thickness is variable. But I want to define the oil thickness to be constant in 2mm under the tank's top surface. How should I create this field function? Thank you for your help in advance.
EnronZhang is offline   Reply With Quote

Old   October 25, 2012, 15:17
Default
  #6
Senior Member
 
siara817's Avatar
 
siamak rahimi ardkapan
Join Date: Jul 2010
Location: Copenhagen, Denmark
Posts: 220
Rep Power: 18
siara817 is on a distinguished road
Ok, I assume that you know what is the equation for the surface according to the viscosity of surface. Then you can put X and Y to get the Z value.
You can show scalar variables by $ and vectors by $$. to find more about programming, search in the help "field function programming reference"
siara817 is offline   Reply With Quote

Old   October 26, 2012, 17:30
Default
  #7
Senior Member
 
Join Date: Oct 2009
Location: Germany
Posts: 636
Rep Power: 22
abdul099 is on a distinguished road
Quote:
Originally Posted by EnronZhang View Post
I want to define the oil thickness to be constant in 2mm under the tank's top surface.
Do you want this to be an initial condition or a boundary condition?
When the top surface is just inclined but flat, I would create a coordinate system parallel to the plane. Than you can reference the Z-coordinate directly. Something like $$Position("Coordinate System 1")[2]. Not fully sure about the syntax, I don't have the user guide open right now, but I'm pretty sure you'll find it.
When the top surface is corrugated, it's much more complicated, so I'm too lazy to explain it when it's not necessary
amolrajan likes this.
__________________
We do three types of jobs here:
GOOD, FAST AND CHEAP
You may choose any two!
abdul099 is offline   Reply With Quote

Reply

Tags
coordinate, field function, position


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
problems after decomposing for running alessio.nz OpenFOAM 7 March 5, 2021 05:49
Position Field Function amish STAR-CCM+ 2 January 6, 2012 10:54
Field function cannot be evaluated on region pauloabeck STAR-CCM+ 2 April 28, 2011 19:40
Force Report help~ or maybe Custom Field Function sailor FLUENT 0 April 13, 2011 04:45
latest OpenFOAM-1.6.x from git failed to compile phsieh2005 OpenFOAM Bugs 25 February 9, 2010 05:37


All times are GMT -4. The time now is 18:53.