CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Tangential component of gradient of scalar field at surface (http://www.cfd-online.com/Forums/openfoam-solving/59773-tangential-component-gradient-scalar-field-surface.html)

 tehache March 23, 2007 07:14

Hi, To implement a thermo

Hi,

To implement a thermocapilllary convection boundary condition, I need the gradient of temperature tangential to the surface. I know how to get the temperature patchfield, and also the gradient normal to the surface, but how to get the tangential component?
fvc::grad seems not to work on fvPatchFields, I tried this:

const fvPatchField<scalar>& TB =
lookupPatchField<volscalarfield,>("T");

results in:

no matching function for call to 'grad(const Foam::fvPatchField<double>&

I could declare and compute temperature gradient as a volfield all over the volume, but I thought this should only be my last ressort, in order to save memory.

Thank you very much for any hint!

Thomas

 eugene March 23, 2007 08:58

Unfortunately, calculating the

Unfortunately, calculating the volume gradient is the only out-of-the-box option. To calculate patch tangential gradients would require a finiteArea formulation, which is not currently integrated to the level that would make it simple to employ.

 Sherlock_1812 June 4, 2013 02:27

Any luck?

Hi Thomas,

Were you able to implement grad T tangentially? I'm also having a problem with that.

Regards

Srivaths

 immortality June 4, 2013 02:51

hi Srivathsan
Why do you need tangential component instead of normal one?

 Sherlock_1812 June 4, 2013 05:07

want grad T along a curved surface

Hi ehsan

I am also working on a similar problem as Thomas. I would like to have the gradient of temperature tangential to the surface for simulating thermo-capilary effect on a curved surface.

 Sherlock_1812 July 4, 2013 07:13

Quote:
 Originally Posted by eugene (Post 190098) Unfortunately, calculating the volume gradient is the only out-of-the-box option. To calculate patch tangential gradients would require a finiteArea formulation, which is not currently integrated to the level that would make it simple to employ.
Hi Eugene,

Is it possible to take the definition of fixedGradient boundary condition and map it along a patch (to get a gradient along the surface)?

What does transformFvPatchField do? Does it help here?