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

 May 30, 2011, 13:50 addCmptAvBoundaryDiag method #1 Senior Member     Santiago Marquez Damian Join Date: Aug 2009 Location: Santa Fe, Santa Fe, Argentina Posts: 418 Rep Power: 14 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 00639 Foam::tmp Foam::fvMatrix::A() const 00640 { 00641 tmp 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 }``` D() method is called, which is: Code: ```00605 template 00606 Foam::tmp Foam::fvMatrix::D() const 00607 { 00608 tmp tdiag(new scalarField(diag())); 00609 addCmptAvBoundaryDiag(tdiag()); 00610 return tdiag; 00611 }``` BC's contribution is done via addCmptAvBoundaryDiag: Code: ```00134 template 00135 void Foam::fvMatrix::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 }``` which calls cmptAv. This method assigns the average of vector contribution components as the number that is added to diagonal coefficients. 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. Post-doctoral Fellow Research Center for Computational Mechanics (CIMEC) - CONICET/FICH-UNL T.E.: 54-342-4511594 Ext. 1005 Güemes 3450 - (3000) Santa Fe Santa Fe - Argentina http://www.cimec.org.ar

 June 1, 2011, 18:18 #2 Senior Member     Santiago Marquez Damian Join Date: Aug 2009 Location: Santa Fe, Santa Fe, Argentina Posts: 418 Rep Power: 14 Any clues?? __________________ Santiago MÁRQUEZ DAMIÁN, Ph.D. Post-doctoral Fellow Research Center for Computational Mechanics (CIMEC) - CONICET/FICH-UNL T.E.: 54-342-4511594 Ext. 1005 Güemes 3450 - (3000) Santa Fe Santa Fe - Argentina http://www.cimec.org.ar

 March 21, 2014, 07:36 #3 New Member     Hua Join Date: May 2012 Posts: 25 Rep Power: 5 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.

 Thread Tools Display Modes Linear Mode

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

 Similar Threads Thread Thread Starter Forum Replies Last Post Andyjoe Open Source Meshers: Gmsh, Netgen, CGNS, ... 13 March 14, 2012 05:35 m-fry Main CFD Forum 1 April 20, 2010 14:40 D.S.Nasan Main CFD Forum 6 September 4, 2008 02:08 Dan Gao Main CFD Forum 3 July 5, 2008 01:18 yangqing FLUENT 0 March 20, 2002 20:25

All times are GMT -4. The time now is 05:19.