|October 20, 2015, 04:28||
boundary conditions effect on Matrix coefficients
Join Date: Oct 2015
Posts: 8Rep Power: 2
I am trying to understand how openfoam generates the matrices for the differential operators.
I have programmed a simple example for the laplacian operator:
// Define a matrix that contains the coefficients of the Laplacian fvScalarMatrix TEqnLaplaciano ( fvm::laplacian(DT, T) ); // Extract source term, matrix diagonal, upper and lower nonzero elements and their indices scalarField& source_ = TEqnLaplaciano.source(); scalarField& lower_ = TEqnLaplaciano.lower(); scalarField& upper_ = TEqnLaplaciano.upper(); scalarField& diag_ = TEqnLaplaciano.diag(); const unallocLabelList& l_ = TEqnLaplaciano.lduAddr().lowerAddr(); const unallocLabelList& u_ = TEqnLaplaciano.lduAddr().upperAddr(); Info<< "\n diagvalues: \n " << diag_ << endl; Info<< "\n lowervalues: \n " << lower_ << endl; Info<< "\n lowerAddr: \n " << l_ << endl; Info<< "\n Uppervalues: \n " << upper_ << endl; Info<< "\n UpperAddr: \n " << u_ << endl; Info<< "\n sourcevalues: \n " << source_ << endl;
* Matrix Diagonal terms
* Matrix out of diagonal terms
* Indices of the out of diagonal terms
* source terms (right hand side of the linear system) (zero in my example)
But the effect of the boundary conditions is not yet included in the matrix and source term that I get.
My question is:
How can I get the contribution (coefficients and indices) of the Boundary Conditions to the matrix coefficients (diag and out-of-diag) and to the source term?
Thanks in advance for your help.
|Thread||Thread Starter||Forum||Replies||Last Post|
|Setting the height of the stream in the free channel||kevinmccartin||CFX||10||July 9, 2015 21:36|
|CGNS Boundary conditions using SU2||denzell||SU2||2||February 20, 2015 15:33|
|Error finding variable "THERMX"||sunilpatil||CFX||8||April 26, 2013 07:00|
|How the boundary conditions are disposed into the matrix coefficient?||mxylondon||OpenFOAM||1||March 1, 2013 17:03|
|Matrix coefficients from boundary conditions how||tehache||OpenFOAM Running, Solving & CFD||10||October 16, 2011 18:26|