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

interpolation

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 6, 2013, 19:46
Default interpolation
  #1
Senior Member
 
Vishal Nandigana
Join Date: Mar 2009
Location: Champaign, Illinois, U.S.A
Posts: 208
Rep Power: 18
nandiganavishal is on a distinguished road
Dear Foamers,

I would like to solve the following equation

fvm::laplacian(eps,Phi) == -alpha * Z1*C1-alpha*Z2*C2

where eps is spatially varying.

I have essentially two different values for eps. I know the value of eps at certain positions, which is "eps_1". The positions are obtained from another software. At all other positions, the value of eps is "eps_2." Hence, the eps variation is not exactly at the same point as the mesh defined in the OpenFOAM. I would like to know the following.

1. How to interpolate the eps at the mesh points in OpenFOAM ? Please provide the sytax for the same or let me know a suitable example where I could find one !!

2. How to provide the spatial eps variation directly in the initial guess (0 folder) folder in OpenFOAM after the first step.

Please let me know !!

Thanks

Regards

Vishal
nandiganavishal is offline   Reply With Quote

Old   February 7, 2013, 13:59
Default
  #2
Member
 
Duong A. Hoang
Join Date: Apr 2009
Location: Delft, Netherlands
Posts: 93
Rep Power: 17
duongquaphim is on a distinguished road
Send a message via Yahoo to duongquaphim
Hi,

I think you can find the answers for your questions pretty easy by googling this. However, here you might find the answer:

Question 1: I think you can take a look at http://openfoamwiki.net/index.php/Op...tion_(OpenFOAM). There are explanations on different ways of interpolation implemented in OF.

Question 2: I think you can just create a new field (usually in createFields.H) as any scalar field (like pressure) and initialize it as you do with other fields.

Hope this answers your questions.

Duong
duongquaphim is offline   Reply With Quote

Old   February 7, 2013, 17:50
Default
  #3
Senior Member
 
Vishal Nandigana
Join Date: Mar 2009
Location: Champaign, Illinois, U.S.A
Posts: 208
Rep Power: 18
nandiganavishal is on a distinguished road
Hi Duaong,

Thanks for the reply. I got your point for my second question.

However, regarding my first question, I read the interpolation schemes, but I still do not understand how to code it in openfoam. For instance attached is the positions file obtained from another software, and the meshfile generated by the openfoam blockmesh. For each position read from the positions file, I would like to assign a value of eps = 2 at the nearest neighbour cell center position. Correct me if I am wrong, the value of eps = 2 should be assigned at the cell center position and at the cell face right !! Finally at all other mesh points the value should be eps = 80

Can you please write the code in openFOAM language as to how to implement the above algorithm from the attached files.

Thanks

Regards
Vishal
Attached Files
File Type: txt xy.txt (512 Bytes, 6 views)
nandiganavishal is offline   Reply With Quote

Old   February 7, 2013, 17:54
Default
  #4
Senior Member
 
Vishal Nandigana
Join Date: Mar 2009
Location: Champaign, Illinois, U.S.A
Posts: 208
Rep Power: 18
nandiganavishal is on a distinguished road
attached the blockmesh file
Attached Files
File Type: txt blockmesh.txt (1.5 KB, 3 views)
nandiganavishal is offline   Reply With Quote

Old   February 8, 2013, 05:16
Default
  #5
Member
 
Duong A. Hoang
Join Date: Apr 2009
Location: Delft, Netherlands
Posts: 93
Rep Power: 17
duongquaphim is on a distinguished road
Send a message via Yahoo to duongquaphim
Hi Vishal,

I do not have a good answer for you at the moment. But reading the page http://openfoamwiki.net/index.php/PointVolInterpolation, I think what you might want to do is to first assign your eps values to the correct points in OF mesh as you mentioned. Then you compose a pointField based on those values. And you might use pointVolInterpolation::interpolate(phi); to do the interpolation. Again, I do not sure if this will work but might be good to give a try.

Duong
duongquaphim 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
Help on 2D interpolation in StarCCM+ madhuri Siemens 1 May 30, 2017 03:20
Interpolation Error on FAM Mesh with Cyclic BCs ngj OpenFOAM Bugs 1 August 9, 2011 06:12
urgent help needed (rhie-chow interpolation problem) Ardalan Main CFD Forum 2 March 18, 2011 15:22
Surface interpolation schemes and parallelization jutta OpenFOAM Running, Solving & CFD 0 February 25, 2010 14:32
momentum interpolation for collocated grid Hadian Main CFD Forum 4 December 25, 2009 07:25


All times are GMT -4. The time now is 11:09.