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

internalField issue!!

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   September 4, 2023, 06:03
Unhappy internalField issue!!
  #1
New Member
 
Eric Segalerba
Join Date: Dec 2021
Location: Italy
Posts: 24
Rep Power: 4
EricS is on a distinguished road
Hello everyone!

I'm trying to solve a problem with a gradient but I can't figure out how to get the value of a field, in this case Temperature, adjacent to a face.
So far I wrote this:


Code:
const scalarField& Tp = 
          patch().lookupPatchField<volScalarField, scalar>("T"); 
const scalarField& Tc = 
          patch().lookupPatchField<volScalarField, scalar>("T").internalField();
const scalarField& deltaInv = patch().deltaCoeffs(); 
const scalarField gradT_ = - (Tp-Tc)*deltaInv;
But if I write the size of Tp and Tc I get different values (namely 2000 and 80000).


I'm sure I'm doing something wrong with the "internalField()" member function, but ... what? Do you have an idea?

Thank you!
EricS is offline   Reply With Quote

 

Tags
custom bc, programing


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
internalField condition mchehab2 OpenFOAM Running, Solving & CFD 14 November 10, 2022 13:28
twoPhaseEulerFoam confined plunging jet simulation failed ves OpenFOAM Running, Solving & CFD 2 June 17, 2020 05:08
internalField nonuniform List<vector> and internalField nonuniform List <scalar> Ferdinand OpenFOAM Pre-Processing 1 January 3, 2020 12:20
ill defined primitiveEntry starting at keyword 'value' on line 197 ChangeDictionary Struggle_Achieve OpenFOAM Pre-Processing 2 December 20, 2017 03:58
Convergence issue in natural convection problem chrisf90 FLUENT 5 March 5, 2016 08:30


All times are GMT -4. The time now is 06:27.