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

Need help with scalarFields and vector usage

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 25, 2011, 19:22
Question Need help with scalarFields and vector usage
  #1
New Member
 
Fabian
Join Date: Jun 2011
Posts: 1
Rep Power: 0
Nausea is on a distinguished road
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
Nausea is offline   Reply With Quote

Old   June 27, 2011, 04:17
Default
  #2
Senior Member
 
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,266
Blog Entries: 1
Rep Power: 24
nimasam is on a distinguished road
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 )
nimasam 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



All times are GMT -4. The time now is 06:54.