|
[Sponsors] |
June 25, 2011, 19:22 |
Need help with scalarFields and vector usage
|
#1 |
New Member
Fabian
Join Date: Jun 2011
Posts: 1
Rep Power: 0 |
Hi there,
I am new to the community and looking for some insight in the topics of OpenFOAM. I already read in this forum and it looks like there are some very nice people around here solving problem after problem (: . So here is mine: I wrote a class for patch movement and with it itīs possible to move the patch after a function given as a high grade polynome. The polynom is variable. The question now is, how can i read the polynom coefficients input which should be placed in the "pointDisplacement" file into OpenFOAMīs dict? I thought about listing the coefficient in a vector, but it turned out standard vectors in OpenFoam are limited to 3 dimensions. Is there a way to overcome this? Another idea was to place the coefficients in a scalarField, but I do not have any clue how to initialize or work with scalarFields. Could somebody provide some code for correct usage of scalarField? Or are these 2 approaches totally wrong and there is another nice and easy way to get a lot of scalars as a list into openfoam? I would be very happy if someone could help me. Thanks and greetings Fabian |
|
June 27, 2011, 04:17 |
|
#2 |
Senior Member
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,266
Blog Entries: 1
Rep Power: 24 |
two rough ideas:
1) look in fan boundary condition, it uses a function by read polynome coefficient from Dic 2) maybe u should assign a dynamic list ( look for append ) |
|
|
|