CFD Online Logo CFD Online URL
Home > Forums > OpenFOAM Programming & Development

changing matrix coeffs in a cell

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Display Modes
Old   November 12, 2012, 18:09
Default changing matrix coeffs in a cell
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)
        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:

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


Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
CGNS converters available mbeaudoin OpenFOAM Meshing & Mesh Conversion 133 July 27, 2017 04:45
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 19:09
Mass flow rate through each cell Babakjingo Main CFD Forum 0 August 21, 2011 03: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 07:14.