CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM

use mesh.points().x() as boundary values

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   May 13, 2011, 15:09
Default use mesh.points().x() as boundary values
  #1
New Member
 
Oskar
Join Date: May 2011
Posts: 6
Rep Power: 6
oskarb is on a distinguished road
Hello,
can some1 plz answer how to use one of the mesh point coordinate components as boundary patchField? I have to solve a volScalarField that equals the x coordinate everywhere on the boundary.
After searching the Wiki I think groovyBC could be used for this purpose, but do the "official" fvPatchFields allow such a function?

Additionally I would like to ask how to define a volVectorField that equals the surface normal vector everywhere on the boundary?

thx
Oskar
oskarb is offline   Reply With Quote

Old   May 16, 2011, 04:26
Default
  #2
New Member
 
Oskar
Join Date: May 2011
Posts: 6
Rep Power: 6
oskarb is on a distinguished road
Hello again,
is there no solution to use mesh coordinates as boundary conditions without installing groovyBC?

Is it possible to write interpolated mesh.points().x() as a surfaceScalarField to disk and then map this field onto the boundary patch (directMappedFixedValue?)? Does an example exist how to use nonuniform values as boundary condition?

thanks
Oskar

Last edited by oskarb; May 16, 2011 at 05:36.
oskarb is offline   Reply With Quote

Old   May 16, 2011, 04:50
Default
  #3
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 12
Bernhard is on a distinguished road
Of course the are a lot of possibilities to do this, but what is the problem with groovyBC? You give expressions for the value or gradient at a patch. If this is what you want, than I would go for groovyBC.
Bernhard is offline   Reply With Quote

Old   May 16, 2011, 05:34
Default
  #4
New Member
 
Oskar
Join Date: May 2011
Posts: 6
Rep Power: 6
oskarb is on a distinguished road
Bernhard,
there is no problem with groovyBC in general. It is simply not included in my primary openfoam installation, and i cannot compile binaries on that system.

Please describe one of the lots of possibilities how to use the values from a surfaceScalarField on disk as boundary condition.

thx
Oskar
oskarb is offline   Reply With Quote

Old   May 16, 2011, 05:44
Default
  #5
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 12
Bernhard is on a distinguished road
If you are not allowed to compile anything, than the fun part of OpenFOAM is not available, and there are not a lot of options left. You can provide a list of values as a boundary condition, but this is quite cumbersome, especially if you want to change anything later on in your case.
Bernhard is offline   Reply With Quote

Old   May 16, 2011, 06:22
Default
  #6
New Member
 
Oskar
Join Date: May 2011
Posts: 6
Rep Power: 6
oskarb is on a distinguished road
Providing a list of values as boundary condition means that I replace a boundaryField declaration like

Code:
top{
  type fixedValue;
  value uniform 0;
}
with

Code:
top{
  type fixedValue;
  value (x0 x1 x2 ... xn);
}
or what is the correct syntax for such a value list?
If it works like this, I can define the patches in the Allrun script, and my question would be answered.

thanks
Oskar
oskarb is offline   Reply With Quote

Old   May 16, 2011, 06:52
Default
  #7
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 12
Bernhard is on a distinguished road
It looks something like that, with value nonuniform List<scalar> .... I suppose you can easily find an example somewhere. (See: /tutorials/incompressible/simpleFoam/pitzDailyExptInlet )
Bernhard is offline   Reply With Quote

Old   August 26, 2011, 12:03
Default
  #8
Senior Member
 
Bernhard Linseisen
Join Date: May 2010
Location: Magdeburg/Geneva
Posts: 176
Blog Entries: 1
Rep Power: 7
Linse is on a distinguished road
Although not concerning the setting of the specific values:
Are you sure you cannot use groovyBC (or swak4foam, which includes groovyBC by now)?
Just give it a try to install! It might be highly useful sometime else for playing with OF...

In my case it installed nicely into my own, accessible folder, while I do not have write-access to any of the system-wide installation directories. Just see if you have access to $FOAM_USER_APPBIN and $FOAM_USER_LIBBIN - which actually should point to directories within your own directories on the system.
Linse is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Wind turbine simulation Saturn CFX 34 October 16, 2014 05:27
inlet velocity boundary condition murali CFX 5 August 3, 2012 08:56
error when calculating values at boundary using refCast prabhu OpenFOAM 6 June 29, 2012 03:48
mesh file for flow over a circular cylinder Ardalan Main CFD Forum 6 April 17, 2010 23:40
Accessing boundary values DoHander FLUENT 0 January 7, 2010 09:44


All times are GMT -4. The time now is 20:09.