|
[Sponsors] |
What is the value of fvc::grad(U) at boundaries? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 11, 2018, 09:41 |
What is the value of fvc::grad(U) at boundaries?
|
#1 |
Member
Emad Tandis
Join Date: Sep 2010
Posts: 77
Rep Power: 16 |
Hello
I am working on a elastic solver in which I need to calculate grad(U) at boundaries. I just read the code of gaussGrad.C and concluded that value of grad(U) at boundaries must be equal to patchInternalField value of grad(U), since it is zeroGradientType. But I got different experience. I need to know how grad(U) works at boundaries. Any help will be appreciated |
|
May 11, 2018, 12:50 |
|
#2 |
Member
Emad Tandis
Join Date: Sep 2010
Posts: 77
Rep Power: 16 |
I found the reason!
gradScheme class uses a function named "correctBoundaryCondition(vf,fGrad)" using which the gGrad at boundary is corrected by snGrad at boundaries. I hope it can be of use for fellows. |
|
May 15, 2018, 08:44 |
|
#3 | |
Member
Emad Tandis
Join Date: Sep 2010
Posts: 77
Rep Power: 16 |
Quote:
I need to calculate tangential component of grad(U) at boundaries more accurately. I guess that at boundary, it uses zero gradient condition for this component. Am I right? Is there any way to handle that or I have to develop a code by myself? Thanks |
||
May 31, 2018, 07:24 |
Gradient along the boundary
|
#4 |
Member
Zhiheng Wang
Join Date: Mar 2016
Posts: 72
Rep Power: 10 |
Let say You got T a parameter at boundary , or volScalarField or If you want Grad on surface as surfaceScalarField
surfaceScalarField SnGrad ( fvc::snGrad(T) /// Normal component of Grad T ); volScalarField SnVolGrad ( IOobject ( "SnVolGrad", runTime.timeName(), mesh ), mesh, dimensionedScalar("SnVolGrad", T.dimensions()/dimLength, 0.0) ); forAll(T.boundaryField(), patchi) { SnVolGrad.boundaryFieldRef()[patchi] = SnGrad.boundaryField()[patchi]; } SnVolGrad.write(); ///////////////////////////////////////////////////////////////////////////////////////////////////// volVectorField GradientY ( IOobject ( "GradientY", runTime.timeName(), mesh ), fvc::grad(T) ); GradientY.write(); volScalarField GradientX ( IOobject ( "GradientX", runTime.timeName(), mesh ), fvc::grad(T)().component(0) ); GradientX.write(); volScalarField Grad_T ( IOobject ( "Grad_T", runTime.timeName(), mesh ), mesh, dimensionedScalar("Grad_T", T.dimensions()/dimLength, 0.0) ); forAll(SnVolGrad.boundaryField(),patchi) { Grad_T.boundaryFieldRef()[patchi] = GradientX.boundaryFieldRef()[patchi] + SnVolGrad.boundaryFieldRef()[patchi]; } Grad_T.write(); Find suitable way any of above should work |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Mapped vs Cyclic Boundaries in OpenFOAM | arsenis | OpenFOAM Running, Solving & CFD | 1 | February 8, 2023 22:13 |
[ICEM] Can I define periodic boundaries in an unstructured mesh? | Aoki | ANSYS Meshing & Geometry | 11 | September 14, 2018 02:52 |
2D Rotating Detonation Engine Periodic Boundaries | whitet86 | FLUENT | 2 | June 25, 2015 12:04 |
Setting Flow/Pressure Boundaries in Floworks | Eran | FloEFD, FloWorks & FloTHERM | 3 | August 11, 2009 05:23 |
periodic boundaries - flow through a net | PK | FLUENT | 0 | July 12, 2007 12:58 |