|
[Sponsors] |
May 31, 2018, 09:00 |
grad of a GeometricFiel
|
#1 |
New Member
Join Date: May 2018
Posts: 1
Rep Power: 0 |
Hello everyone,
I am trying to code a new surface interpolation scheme for alpha in OpenFOAM. For this new scheme, I need to calculate the gradient of alpha. But I have a problem. Indeed, I use the existing blended scheme as starting point. But, the argumentat at the entrance is a GeometricField<Type, fvPatchField, volMesh>. And when I am trying the command fvc::grad() (I included fvc.H) it doesn’t work. Does someone have a solution to this problem ? |
|
June 2, 2018, 23:11 |
|
#2 |
Senior Member
Fumiya Nozaki
Join Date: Jun 2010
Location: Yokohama, Japan
Posts: 266
Blog Entries: 1
Rep Power: 18 |
You might want to check the source code of the existing interpolation schemes that use the gradient operation such as linearUpwind:
https://github.com/OpenFOAM/OpenFOAM...s/linearUpwind Code:
tmp<fv::gradScheme<scalar>> gradScheme_ ( fv::gradScheme<scalar>::New ( mesh, mesh.gradScheme(gradSchemeName_) ) ); for (direction cmpt = 0; cmpt < pTraits<Type>::nComponents; cmpt++) { tmp<volVectorField> tgradVf = gradScheme_().grad(vf.component(cmpt), gradSchemeName_); const volVectorField& gradVf = tgradVf();
__________________
[Personal]
|
|
Tags |
geometricfiel grad scheme |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Why define a grad Scheme when using linearUpwind? | Benedikt | OpenFOAM Pre-Processing | 2 | August 10, 2019 08:19 |
Drag Coefficient Gradient: 0 in 2d adjoint optimization | tomp1993 | SU2 Shape Design | 11 | August 1, 2019 15:14 |
Does <cache{ grad ( U ) }> affect somehow my turbulence | fimbull | OpenFOAM Running, Solving & CFD | 0 | August 1, 2017 08:20 |
A simple question about adding Div and Grad of a source term to the momentum equation | adkar | Main CFD Forum | 5 | May 23, 2016 17:31 |
gauss grad no correction for coupled boundary??!! | doubtsincfd | OpenFOAM | 0 | December 19, 2011 18:19 |