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

changing matrix coeffs in a cell

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 12, 2012, 18:09
Default changing matrix coeffs in a cell
  #1
New Member
 
Join Date: Sep 2009
Posts: 15
Rep Power: 0
Mjoelnir is on a distinguished road
Hi Foamers,

i want to change the fvmatrix coeffs for a specific cell.(for this matrix)
Code:
        fvScalarMatrix TEqn         (             fvm::ddt(T)             + fvm::div(phi, T)             - fvm::laplacian(DT, T)         );
i know how to access the the upper() and lower() diag. But i dont know where the source terms are added to the equation. I already looked up the source code of the class gaussConvectionscheme.

My idea for solving this problem would be to interpolate the faces of the cells and the calculate the the upper() and lower(). Here an example for the fvm::div:

Code:
fvm.lower() = -weights.internalField()*faceFlux.internalField(); fvm.upper() = fvm.lower() + faceFlux.internalField(); fvm.negSumDiag();
but how to interpolate a face (not the whole mesh) with the scheme described in fvschemes?

how are the fvmatrix.source() terms described for div and laplacian?

and is there a more elegant way?
Mjoelnir 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
[CGNS] CGNS converters available mbeaudoin OpenFOAM Meshing & Mesh Conversion 137 December 14, 2018 05:20
gradient calculation of cell centered finite volume method zhengjg Main CFD Forum 10 November 12, 2012 00:13
Help Me, what's the Cell Above in 3D. gomane8 Main CFD Forum 0 September 10, 2011 20:09
Mass flow rate through each cell Babakjingo Main CFD Forum 0 August 21, 2011 04:18
If I know one cell in the fluent ,how to find some other neigbor cell of it . wwt650420 FLUENT 0 March 23, 2011 12:12


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