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

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

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 13, 2011, 16:09
Default use mesh.points().x() as boundary values
  #1
New Member
 
Oskar
Join Date: May 2011
Posts: 6
Rep Power: 15
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, 05:26
Default
  #2
New Member
 
Oskar
Join Date: May 2011
Posts: 6
Rep Power: 15
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 06:36.
oskarb is offline   Reply With Quote

Old   May 16, 2011, 05:50
Default
  #3
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 22
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, 06:34
Default
  #4
New Member
 
Oskar
Join Date: May 2011
Posts: 6
Rep Power: 15
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, 06:44
Default
  #5
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 22
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, 07:22
Default
  #6
New Member
 
Oskar
Join Date: May 2011
Posts: 6
Rep Power: 15
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, 07:52
Default
  #7
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 22
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, 13:03
Default
  #8
Senior Member
 
Bernhard Linseisen
Join Date: May 2010
Location: Heilbronn
Posts: 183
Blog Entries: 1
Rep Power: 16
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


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
Wind turbine simulation Saturn CFX 60 July 17, 2024 06:45
mesh file for flow over a circular cylinder Ardalan Main CFD Forum 7 December 15, 2020 14:06
error when calculating values at boundary using refCast prabhu OpenFOAM 7 March 12, 2018 09:31
inlet velocity boundary condition murali CFX 5 August 3, 2012 09:56
Accessing boundary values DoHander FLUENT 0 January 7, 2010 09:44


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