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

 October 28, 2005, 14:13 Hi All, I wanted to implem #1 Member   diablo80@web.de Join Date: Mar 2009 Posts: 93 Rep Power: 9 Hi All, I wanted to implement a new scheme, and I was trying to understand the following structure (taken from fvmlaplacian scheme): fvm.upper() = deltaCoeffs.internalField()*gammaMagSf.internalFie ld(); fvm.negSumDiag(); How the "classical" coeficients (-1 2 -1) that multiply "u(i-1) u(i) u(i+1)" fit in these lines? Well, I suppose the "-1" is attributed to fvm.upper() (throught the value of deltaCoeff*GammaSf), and then somehow must go to the lower() also (probably inside negSumDiag()) but I am still not very familiar with fvm.upper() addressing. Looks like you just need to say fvm.upper() = to your scalarField, as if their addressing was completely compatible. Digging in the code, I found the negSumDiag(), which do this: const scalarField& Lower = ((const lduMatrix&)(*this)).lower(); const scalarField& Upper = ((const lduMatrix&)(*this)).upper(); scalarField& Diag = diag(); const unallocLabelList& l = lduAddr_.lowerAddr(); const unallocLabelList& u = lduAddr_.upperAddr(); for (register label face=0; face

 October 28, 2005, 18:01 Sorry to say it, but you're a #2 Senior Member   Hrvoje Jasak Join Date: Mar 2009 Location: London, England Posts: 1,783 Rep Power: 22 Sorry to say it, but you're a bit off. This kind of matrix format is sometimes called an "arrow" format. Here, the diagonal, upper and lower triangle are stored in separate arrays. It is nice and compact and saves you a lot over the CR format in the case of symmetric matrices. There are 3 arrays: - one for the diagonal, the size of the matrix - one for the upper triangle, the size of the nomber of off-diag coefficients - one for the lower triangle, see above For the off-diagonal entries, the l and u gives you the row and column of the (off-diag) coefficient position. Additionally, for the standard FVM, the faces in the mesh are re-ordered in such a way that they directly map into the off-diag coefficiant array. In short, the l and u for each face give you the owner and neighbour cell index and all is well. Also, everything is ordered such that you visit the faces in the proper "row" order and that the face owner cell index is always lower than the neighbour (I like my life to be tidy) :-) When you try to address the diagonal fro the off-diagonal, the row-diag will be diag[l[face]]. Please note that this is being rewritten at the moment to give more flexibility, but the basic matrix format will remain the same. Enjoy, Hrv fumiya and songwukong like this. __________________ Hrvoje Jasak Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk

 November 1, 2005, 10:29 Hi Hrv, In src/OpenFOAM/matri #3 Member   Leosding Join Date: Mar 2009 Posts: 51 Rep Power: 9 Hi Hrv, In src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduAddressing.H, description: There exists an alternative way of ..., This reduces the size of owner addressing from a list over all edges to a list over all points + 1. I think it should be "to a list over all points - 1".

 November 3, 2005, 06:35 Nope, The alternative forma #4 Senior Member   Hrvoje Jasak Join Date: Mar 2009 Location: London, England Posts: 1,783 Rep Power: 22 Nope, The alternative format stores the start of each row and the row indices go until the start of the next row. Thus, n+1. You could potentially imply that the first row starts on zero and keep checking the size of the array to reduce the storage, but this considerably complicates the looping and in my opinion is not worth saving 2 integers. Hrv songwukong likes this. __________________ Hrvoje Jasak Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk

 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 marziolettich OpenFOAM Running, Solving & CFD 2 February 19, 2008 06:04 Z FLUENT 1 March 31, 2005 14:54 Y FLUENT 0 March 19, 2005 12:58 phi FLUENT 0 March 4, 2005 10:23 P FLUENT 3 February 3, 2005 11:10

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