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

Finding the snGrad for all the faces of all cells.

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 7, 2018, 03:19
Default Finding the snGrad for all the faces of all cells.
  #1
New Member
 
Harris Daniel S
Join Date: Oct 2017
Posts: 8
Rep Power: 9
Harris_Daniel is on a distinguished road
Hi,
I am using OpenFOAM-v1612+ and modified InterFoam solver by introducing the Fourier's Heat Equation from laplacian Foam. Now I need to calculate the snGrad for all the faces of all the cells by looping over the cells and faces. I wrote a code but there seems to be a problem with it.

I wrote the following code:

Code:
forAll(C.internalField(), cellI)
    {
        const labelList& faces = mesh.cells()[cellI];
        double Tin = Tf.ref()[cellI];
        scalarField Ti = Tin.sndGrad();
        forAll(faces,I)
        {
           const scalar Tsngrad(T.ref()[faces[I]].snGrad());
        }
    }
And got the following a error message:

Quote:
error: request for member ‘sndGrad’ in ‘Tin’, which is of non-class type ‘double’
scalarField Ti = Tin.sndGrad();

error: request for member ‘snGrad’ in ‘(& T.Foam::GeometricField<Type, PatchField, GeoMesh>::ref<double, Foam::fvPatchField, Foam::volMesh>())->Foam:imensionedField<double, Foam::volMesh>::<anonymous>.Foam::Field<double>::< anonymous>.Foam::List<double>::<anonymous>.Foam::U List<T>:perator[]<double>(((int)(& faces)->Foam::List<int>::<anonymous>.Foam::UList<T>:per ator[]<int>(CellI)))’, which is of non-class type ‘double’
const scalar Tsngrad(T.ref()[faces[CellI]].snGrad());
Please help me clear this error. I have had a look through the snGradScheme.C file but in vain.

What does sndGrad scheme return? It says that it return the sndGrad for a given cell field. Can anyone elaborate on this.

More importantly what should be the inputs to a snGrad and sndGrad scheme(I am asking about the data types).

Regards,
S. Harris Daniel.
Harris_Daniel is offline   Reply With Quote

Reply

Tags
looping over the cells, sndgrad, sngrad


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
[snappyHexMesh] SnappyHexMesh running killed! Mark JIN OpenFOAM Meshing & Mesh Conversion 7 June 14, 2022 02:37
[snappyHexMesh] Help with Snappy: no layers growing GianF OpenFOAM Meshing & Mesh Conversion 2 September 23, 2020 09:26
[snappyHexMesh] Error snappyhexmesh - Multiple outside loops avinashjagdale OpenFOAM Meshing & Mesh Conversion 53 March 8, 2019 10:42
[Other] Mesh Importing Problem cuteapathy ANSYS Meshing & Geometry 2 June 24, 2017 06:29
[snappyHexMesh] external flow with snappyHexMesh chelvistero OpenFOAM Meshing & Mesh Conversion 11 January 15, 2010 20:43


All times are GMT -4. The time now is 20:46.