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

Interpolate from internalField to patch

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 29, 2017, 11:59
Default Interpolate from internalField to patch
  #1
New Member
 
Join Date: Aug 2016
Posts: 19
Rep Power: 9
mtgoncalves is on a distinguished road
I can obtain the normal vector of a quantity at each face center using

surfaceScalarField dpdn = linearInterpolate(-(fvc::ddt(U) + fvc::div(phi, U) - fvc::laplacian(nu, U))) & (mesh.Sf()/mag(mesh.Sf()));

But how do I restrict this computation to a single patch only? I tried to do this but it does not work:

surfaceScalarField dpdn = linearInterpolate(-(fvc::ddt(U) + fvc::div(phi, U) - fvc::laplacian(nu, U))) & mesh.boundaryMesh()[boundary_label("numericalBoundary")].faceNormals()

What am I doing wrong?
mtgoncalves 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
y+ and u+ values with low-Re RANS turbulence models: utility + testcase florian_krause OpenFOAM 114 August 23, 2023 05:37
Near wall treatment in k-omega SST Arnoldinho OpenFOAM Running, Solving & CFD 38 March 8, 2017 13:48
[mesh manipulation] Importing Multiple Meshes thomasnwalshiii OpenFOAM Meshing & Mesh Conversion 18 December 19, 2015 18:57
[Gmsh] Import gmsh msh to Foam adorean OpenFOAM Meshing & Mesh Conversion 24 April 27, 2005 08:19
Multicomponent fluid Andrea CFX 2 October 11, 2004 05:12


All times are GMT -4. The time now is 14:04.