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

makeWeights function at boundary faces

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 27, 2019, 06:07
Default makeWeights function at boundary faces
  #1
New Member
 
Prakash
Join Date: Dec 2018
Posts: 1
Rep Power: 0
randon is on a distinguished road
Hello all,

I am working on cell center to face center implementation in an inhouse code. I am trying out different schemes. Currently, a limiter is defined in the similar approach as limitedLinear.

\phi_{f} = \psi_{upwind} + limiter (\psi_{high order} + \psi_{upwind}) where \phi_{f} is the face center value. Then the limiter involves a cell gradient calculation in the process. So, for this gradient, I am using Gauss linear algorithm. \nabla C = \sum \phi_{f} * S_{f}

1. My primary question is, how to compute the \phi_{f} in the Gauss linear algorithm at the boundary faces ? Should I simply use the owner cell center value or use weights from makeWeights() function. If the face is internal computing weights based on owner and cell centre values is clear.

2. If the weights are to be used and facei is at boundary, owner[facei] exists but not neighbour[facei]. Then what is the value of C[neighbour[facei]] ?

Reference code : https://github.com/OpenFOAM/OpenFOAM...nterpolation.C


Code:
 
    scalarField& w = weights.primitiveFieldRef();

    forAll(owner, facei)
    {
        scalar SfdOwn = mag(Sf[facei] & (Cf[facei] - C[owner[facei]]));
        scalar SfdNei = mag(Sf[facei] & (C[neighbour[face]] - Cf[facei]));
        w[facei] = SfdNei/(SfdOwn + SfdNei);
    }

    surfaceScalarField::Boundary& wBf = weights.boundaryFieldRef();

    forAll(mesh_.boundary(), patchi)
    {
        mesh_.boundary()[patchi].makeWeights(wBf[patchi]);
    }
3. Also, could you please help me understand the makeWeights function implementaion at boundary ? I am improving my C++ and OpenFOAM programming skills. Please don't mind if the question is preliminary.

I can provide any further information that is needed. Based on your suggestions, I can also implement the value for \psi_{high order} which uses linear scheme. Thanks for your help.

Best regards.
randon 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
[Other] mesh airfoil NACA0012 anand_30 OpenFOAM Meshing & Mesh Conversion 13 March 7, 2022 17:22
[snappyHexMesh] Error snappyhexmesh - Multiple outside loops avinashjagdale OpenFOAM Meshing & Mesh Conversion 53 March 8, 2019 09:42
[snappyHexMesh] sHM layer process keeps getting killed MBttR OpenFOAM Meshing & Mesh Conversion 4 August 15, 2016 03:21
snappyhexmesh remove blockmesh geometry philipp1 OpenFOAM Running, Solving & CFD 2 December 12, 2014 10:58
Error finding variable "THERMX" sunilpatil CFX 8 April 26, 2013 07:00


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