|
[Sponsors] |
February 6, 2013, 19:46 |
interpolation
|
#1 |
Senior Member
Vishal Nandigana
Join Date: Mar 2009
Location: Champaign, Illinois, U.S.A
Posts: 208
Rep Power: 18 |
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 |
|
February 7, 2013, 13:59 |
|
#2 |
Member
|
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 |
|
February 7, 2013, 17:50 |
|
#3 |
Senior Member
Vishal Nandigana
Join Date: Mar 2009
Location: Champaign, Illinois, U.S.A
Posts: 208
Rep Power: 18 |
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 |
|
February 7, 2013, 17:54 |
|
#4 |
Senior Member
Vishal Nandigana
Join Date: Mar 2009
Location: Champaign, Illinois, U.S.A
Posts: 208
Rep Power: 18 |
attached the blockmesh file
|
|
February 8, 2013, 05:16 |
|
#5 |
Member
|
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 |
|
|
|
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 |