CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (http://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Interpolation from volume field onto a surface (http://www.cfd-online.com/Forums/openfoam-programming-development/79751-interpolation-volume-field-onto-surface.html)

dasch September 2, 2010 12:44

Interpolation from volume field onto a surface
 
Hi all,

I'm trying to interpolate the values from a volumeScalarField onto a certain surface patch (this is going to be a coupling between OF and another solver - at some point). Is there a boundary condition for this kind of problem? If not, what do I have to do? I'm really stuck on this.

Thanks a lot for your help
Daniela

smcquay September 2, 2010 22:04

Daniela --

I'm trying to do something similar to test my interpolation scheme. Did you ever have much luck with this?

I started down the path of implementing my own boundary condition, but am having a hard time figuring out which end to grab the source by. I've got a renamed version of finiteVolume/fields/fvPatchFields/basic/fixedValue in my src dir, and it compiles and runs, but I don't know how to get ahold of the U to start manipulating it according to my interpolation.

Have you had much luck?

santiagomarquezd September 2, 2010 22:39

Daniela, I can't understand you want to do at all. Do you want to calculate an average of the volField and take this value for a certain patch?, Do you want to use a the values of closest cells to patch for patch faces? I you want the last one zeroGradient is enough.

Can you explain you question a little bit more?

Bye.

dasch September 3, 2010 05:56

Hi,

the solver I'm implementing is a conjugate heat transfer solver which couples a fluid region and a solid region. In the solid part I want to use my own solver and in the fluid part I'm using the buoyantBoussinesqPisoFoam. A zeroGradient BC will transfer the heat out of the fluid region, but not the other way round. If I'm using fixed Value, the heat from the boundary is transfered into the solid part but the temperature on the boundary is not changing. That's why I thought interpolation from the fluid to the boundary would be a good idea. I hope this makes it more clear.

cheers
Daniela

santiagomarquezd September 3, 2010 08:03

Daniela,

Quote:

A zeroGradient BC will transfer the heat out of the fluid region, but not the other way round.
with a zeroGradient, your patch will follow the temperature of nearest cells but without flux, because the zero neumann BC.

What kind of BC is that you want, mathematically?

Regards.

balkrishna September 7, 2010 01:16

You probably are looking for this piece of code :

volScalarField something ;
surfaceScalarField somethingf = fvc::interpolate(something) ;

Go through $FOAM_APP/solvers/multiphase/twoPhaseEulerFoam/alphaEqn.H for how it is implemented ... .


All times are GMT -4. The time now is 19:40.