|
[Sponsors] |
May 30, 2011, 14:50 |
addCmptAvBoundaryDiag method
|
#1 |
Senior Member
Santiago Marquez Damian
Join Date: Aug 2009
Location: Santa Fe, Santa Fe, Argentina
Posts: 452
Rep Power: 24 |
Hi FOAMers, I would like to do a question about the A() method in fvMatrix class. From the theory we know it represents the values of matrix diagonal coefficients, which, I suppose, have the contribution of BC's. Usually, before linear systems are solved BC contributions are added to diagonal coeffs. via addBoundaryDiag method so you can recover the same matrix as you can assemble by hand. Nevertheless is you take this coeffs. they will be different of those you can obtain by the A() method. Checking the code in fvMatrix.C we have, for A()
Code:
00638 template<class Type> 00639 Foam::tmp<Foam::volScalarField> Foam::fvMatrix<Type>::A() const 00640 { 00641 tmp<volScalarField> tAphi 00642 ( 00643 new volScalarField 00644 ( 00645 IOobject 00646 ( 00647 "A("+psi_.name()+')', 00648 psi_.instance(), 00649 psi_.mesh(), 00650 IOobject::NO_READ, 00651 IOobject::NO_WRITE 00652 ), 00653 psi_.mesh(), 00654 dimensions_/psi_.dimensions()/dimVol, 00655 zeroGradientFvPatchScalarField::typeName 00656 ) 00657 ); 00658 00659 tAphi().internalField() = D()/psi_.mesh().V(); 00660 tAphi().correctBoundaryConditions(); 00661 00662 return tAphi; 00663 } Code:
00605 template<class Type> 00606 Foam::tmp<Foam::scalarField> Foam::fvMatrix<Type>::D() const 00607 { 00608 tmp<scalarField> tdiag(new scalarField(diag())); 00609 addCmptAvBoundaryDiag(tdiag()); 00610 return tdiag; 00611 } Code:
00134 template<class Type> 00135 void Foam::fvMatrix<Type>::addCmptAvBoundaryDiag(scalarField& diag) const 00136 { 00137 forAll(internalCoeffs_, patchI) 00138 { 00139 addToInternalField 00140 ( 00141 lduAddr().patchAddr(patchI), 00142 cmptAv(internalCoeffs_[patchI]), 00143 diag 00144 ); 00145 } 00146 } My questions are: 1. Why "true" BC influenced diagonal coeffs aren't used? 2. Why the contributions are calculated this way instead? All help will be appreciated. Regards.
__________________
Santiago MÁRQUEZ DAMIÁN, Ph.D. Research Scientist Research Center for Computational Methods (CIMEC) - CONICET/UNL Tel: 54-342-4511594 Int. 7032 Colectora Ruta Nac. 168 / Paraje El Pozo (3000) Santa Fe - Argentina. http://www.cimec.org.ar |
|
June 1, 2011, 19:18 |
|
#2 |
Senior Member
Santiago Marquez Damian
Join Date: Aug 2009
Location: Santa Fe, Santa Fe, Argentina
Posts: 452
Rep Power: 24 |
Any clues??
__________________
Santiago MÁRQUEZ DAMIÁN, Ph.D. Research Scientist Research Center for Computational Methods (CIMEC) - CONICET/UNL Tel: 54-342-4511594 Int. 7032 Colectora Ruta Nac. 168 / Paraje El Pozo (3000) Santa Fe - Argentina. http://www.cimec.org.ar |
|
March 21, 2014, 07:36 |
|
#3 |
Member
Hua
Join Date: May 2012
Posts: 31
Rep Power: 14 |
maybe because the internalCoeff are (1,1,1) or (0,0,0),and the Ap is the same for U,V,W equation,
so using cmptAv is reasonable. |
|
December 26, 2020, 09:29 |
|
#4 |
Senior Member
anonymous
Join Date: Jan 2016
Posts: 416
Rep Power: 14 |
Hi!
Facing the same problem (same in the H() operator). Anyone knows it? Thanks! Regő |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Gmsh] discretizer - gmshToFoam | Andyjoe | OpenFOAM Meshing & Mesh Conversion | 13 | March 14, 2012 05:35 |
Comparison: Finite Volume Method vs. Analytic Method | m-fry | Main CFD Forum | 1 | April 20, 2010 15:40 |
Code for most powerfull FDV Method | D.S.Nasan | Main CFD Forum | 6 | September 4, 2008 03:08 |
Help about the preconditioner in gmres method | Dan Gao | Main CFD Forum | 3 | July 5, 2008 02:18 |
hess-smith method and fvm method | yangqing | FLUENT | 0 | March 20, 2002 20:25 |