|
[Sponsors] |
May 13, 2011, 16:09 |
use mesh.points().x() as boundary values
|
#1 |
New Member
Oskar
Join Date: May 2011
Posts: 6
Rep Power: 15 |
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 |
|
May 16, 2011, 05:26 |
|
#2 |
New Member
Oskar
Join Date: May 2011
Posts: 6
Rep Power: 15 |
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. |
|
May 16, 2011, 05:50 |
|
#3 |
Senior Member
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 22 |
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.
|
|
May 16, 2011, 06:34 |
|
#4 |
New Member
Oskar
Join Date: May 2011
Posts: 6
Rep Power: 15 |
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 |
|
May 16, 2011, 06:44 |
|
#5 |
Senior Member
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 22 |
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.
|
|
May 16, 2011, 07:22 |
|
#6 |
New Member
Oskar
Join Date: May 2011
Posts: 6
Rep Power: 15 |
Providing a list of values as boundary condition means that I replace a boundaryField declaration like
Code:
top{ type fixedValue; value uniform 0; } Code:
top{ type fixedValue; value (x0 x1 x2 ... xn); } If it works like this, I can define the patches in the Allrun script, and my question would be answered. thanks Oskar |
|
May 16, 2011, 07:52 |
|
#7 |
Senior Member
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 22 |
It looks something like that, with value nonuniform List<scalar> .... I suppose you can easily find an example somewhere. (See: /tutorials/incompressible/simpleFoam/pitzDailyExptInlet )
|
|
August 26, 2011, 13:03 |
|
#8 |
Senior Member
|
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. |
|
|
|
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 |