use mesh.points().x() as boundary values
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 |
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 |
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,
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 |
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.
|
Providing a list of values as boundary condition means that I replace a boundaryField declaration like
Code:
top{ Code:
top{ If it works like this, I can define the patches in the Allrun script, and my question would be answered. thanks Oskar |
It looks something like that, with value nonuniform List<scalar> .... I suppose you can easily find an example somewhere. (See: /tutorials/incompressible/simpleFoam/pitzDailyExptInlet )
|
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. |
All times are GMT -4. The time now is 11:50. |