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

OpenFoam TEqn.diag() doesn't include the boudnary coefficients?

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 3 Post By invadoria

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 22, 2020, 21:50
Default OpenFoam TEqn.diag() doesn't include the boudnary coefficients?
  #1
Senior Member
 
ztdep's Avatar
 
p ding
Join Date: Mar 2009
Posts: 427
Rep Power: 19
ztdep is on a distinguished road
Send a message via Yahoo to ztdep Send a message via Skype™ to ztdep
Hello, I write a simple heat conduction solver on square domain with 4x4 grids and the solver can give correct results.
The four sides of the domain have the first kind boundary conditions.

But when I output the matrix coefficients. It seems the matrix diagonal doesn't include the boudnary coefficients?


for(label faceI=0;faceI<TEqn.diag().size(); faceI++)
{
Info<<TEqn.diag()[faceI]<<" "<<faceI<<nl;
}

the output is
-0.2 0
-0.3 1
-0.3 2
-0.2 3
-0.3 4
-0.4 5
-0.4 6
-0.3 7
-0.3 8
-0.4 9
-0.4 10
-0.3 11
-0.2 12
-0.3 13
-0.3 14
-0.2 15
what I have missing?
ztdep is offline   Reply With Quote

Old   September 29, 2020, 05:13
Default
  #2
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
A question... what is a 4 x 4 grid for you? Do you have 4 cells or how does it look like? A short picture will give us the answer. It seems you do have 4 cells in one row and 3 cols so 12 cells in total. If this is correct then I can directly give you the answer.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   September 30, 2020, 02:30
Default
  #3
New Member
 
invadoria's Avatar
 
Ender Demirel
Join Date: Jun 2009
Location: Turkey
Posts: 20
Rep Power: 16
invadoria is on a distinguished road
The following document is useful for the contribution of the boundary conditions to the diagonal term.


https://www.foamacademy.com/wp-conte...2018matrix.pdf
Tobi, dlahaye and Gerry Kan like this.
invadoria is offline   Reply With Quote

Reply


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
Error: request for volScalarField T from objectRegistry region0 failed RGS OpenFOAM Programming & Development 1 July 25, 2021 16:12
OpenFOAM Training Jan-Jul 2017, Virtual, London, Houston, Berlin CFDFoundation OpenFOAM Announcements from Other Sources 0 January 4, 2017 06:15
Generating the lift and drag coefficients with openFOAM JackJewell OpenFOAM 0 June 14, 2016 09:36
OpenFOAM v3.0.1 Training, London, Houston, Berlin, Jan-Mar 2016 cfd.direct OpenFOAM Announcements from Other Sources 0 January 5, 2016 03:18
OpenFOAM Training, London, Chicago, Munich, Sep-Oct 2015 cfd.direct OpenFOAM Announcements from Other Sources 2 August 31, 2015 13:36


All times are GMT -4. The time now is 10:42.