|
[Sponsors] |
How to interpret the arguments of fvc::grad function in OpenFOAM8? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 25, 2022, 13:58 |
How to interpret the arguments of fvc::grad function in OpenFOAM8?
|
#1 |
Member
|
Hello dear CFDonline community.
I'm trying to decipher line 109 in interfaceProperties.C file in OpenFOAM8. Here's the line itself: Code:
// Cell gradient of alpha const volVectorField gradAlpha(fvc::grad(alpha1_, "nHat")); Code:
"nHat" Since it's taken in quotation marks, I conclude this is a variable of the string type. I couldn't find this variable anywhere in the interfaceProperties.C file or interfaceProperties.H file, therefore I went to the definition file of fvc::grad() function which is called fvcGrad.C (the function is defined on lines 68-80 in the file). The function takes 3 arguments: Code:
const tmp<GeometricField<Type Code:
fvsPatchField Code:
surfaceMesh>>& tssf The second thing I don't understand is what these 3 arguments are and which one corresponds to "nHat". Thank you in advance. Ivan |
|
October 26, 2022, 05:55 |
|
#2 |
Member
Join Date: Jan 2022
Location: Germany
Posts: 72
Rep Power: 4 |
I believe here is a strong misunderstanding. I would highly recommend to you, to take a C++ Tutorial.
The function you quoted is: Code:
template<class Type> tmp<GeometricField<typename outerProduct<vector,Type>::type, fvPatchField,volMesh>> grad ( const tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>& tssf ) { typedef typename outerProduct<vector, Type>::type GradType; tmp<GeometricField<GradType, fvPatchField, volMesh>> Grad ( fvc::grad(tssf()) ); tssf.clear(); return Grad; } |
|
Tags |
fvc::grad(), twophaseflow |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[mesh manipulation] refineMesh Error | mohsen.boojari | OpenFOAM Meshing & Mesh Conversion | 3 | March 1, 2018 23:07 |
is internalField(U) equivalent to zeroGradient? | immortality | OpenFOAM Running, Solving & CFD | 7 | March 29, 2013 02:27 |
How to install CGNS under windows xp? | lzgwhy | Main CFD Forum | 1 | January 11, 2011 19:44 |
Problem with compile the setParabolicInlet | ivanyao | OpenFOAM Running, Solving & CFD | 6 | September 5, 2008 21:50 |
Droplet Evaporation | Christian | Main CFD Forum | 2 | February 27, 2007 07:27 |