
[Sponsors] 
Accelerate the assembling of 3D convection matrix 

LinkBack  Thread Tools  Search this Thread  Display Modes 
December 22, 2005, 07:52 
Accelerate the assembling of 3D convection matrix

#1 
Guest
Posts: n/a

Hello everybody,
I have to solve 3D time dependent Navier Stokes equations with finite element method. There are 68921 nodes and in each node I have to calculate velocity field (u,v,w) and pressure (p). After every time step I have to calculate the convection (or advection) matrix because the velocity field has changed and, the assembling of this convection matrix takes a lot of time, more than solve the velocity system and the pressure system (I work with a decoupled method). Could someone give me an advice to accelerate its computation?. Thankyou very much, best regards and Merry Christmas! Isabel 

December 22, 2005, 08:02 
Re: Accelerate the assembling of 3D convection mat

#2 
Guest
Posts: n/a

If you're working with an explicit method, you can use the following aproximation:
x direction: Conv(u,v,w) = Grad_x(u*u) + Grad_y(v*u) + Grad_z(w*u) and so on for the y and z directions. This way you would have a geometric matrix for the convective term regards Márcio 

December 22, 2005, 08:25 
Re: Accelerate the assembling of 3D convection mat

#3 
Guest
Posts: n/a

Hy Isabel,
Why don't you try to use elementbyelement (EBE) data structure and avoid the need to assembly your matrices? It's very simple to implement and use and you'll cut a lot of time and memory storage. By the way, are you using iterative or direct linear solver? I'm asking for that because if you're using an iterative solver you'll need to implement a specific matrixvector routine to compute it in an EBE way. But it's also easy to do... Cheers and Merry Christmas! Renato. 

December 22, 2005, 10:21 
Re: Accelerate the assembling of 3D convection mat

#4 
Guest
Posts: n/a

A neat trick we use is that of assembling using 'tensor' forms instead of 'matrix' forms. This often seems to vectorise rather well under the compiler.
diaw... 

December 22, 2005, 10:55 
Re: Accelerate the assembling of 3D convection mat

#5 
Guest
Posts: n/a

When using elementbyelement (or edgebyedge) data structures we can reach vectorization (or OpenMP parallelism) after applying some kind of mesh coloring algorithm. In this case, the elements (or edges) are reordered and grouped in such a way that none of the elements inside a group/block share the same node.
Regards Renato. 

December 22, 2005, 11:41 
Re: Accelerate the assembling of 3D convection mat

#6 
Guest
Posts: n/a

Hi!
I am using an iterative method to solve the momentum equation. Renato, could you give any references where the EBE scheme and matrixvector method are explained and that explains how not assembling the nonlinear convection term, i.e. <u*gradu,v> (in Finite Element Method nomenclature)? I would be really greatful. Thankyou. Isa 

December 22, 2005, 12:22 
Re: Accelerate the assembling of 3D convection mat

#7 
Guest
Posts: n/a

The idea behind EBE data structure is not so complicated to understand and I'll try to sketch something here:
* * * STORING THE MATRIX * * *  Imagine you have a mesh with a mesh formed by triangles with 1 degrees of freedom per node. In order to build your "stiffness" matrix you'll have to perform a loop over the elements computing the contributions of the mass, convective, diffusive terms, etc... . Thus, instead of assembling the coefficients you'll store each element matrix separately to use later inside the iterative solver for the matrixvector product. Therefore, you'll need an array like the following: A(nnoel*ngl, nnoel*ngl, nel) (instead of A(neq,neq) in a assembled solution) where: nel is the number of elements, nnoel is the number of nodes per element (3 for linear triangles), ngl is the number of degrees of freedom (1 in this example) and neq the number of active equations.  The vector force will remain by neq as you're used in your assembled solution. * * * USING THE EBE FOR MATRIXVECTOR PRODUCT * * *  In order to perform the matvec product in your iterative solver see the following pseudocode: z < A*x DO i=1,nel c. recover number of equations from your connectivity matrix (IEN) c. recover local vector force coefficients (from x) c. recover elementbased stiffness coefficients (from A) c. multiply your element gathered matrix and vector (A*x) c. scatter your multiplication (in z) ENDDO I've found the following link where Marek Behr discusses EBE related issues http://www.cats.rwthaachen.de:8080/pdf/paral21.pdf Cheers Renato 

Thread Tools  Search this Thread 
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Convection with Shell Conduction  Corentin  FLUENT  7  January 30, 2012 13:12 
natural convection problem with radiation  jorien  CFX  0  October 14, 2011 09:26 
Force can not converge  colopolo  CFX  13  October 4, 2011 22:03 
OpenFOAM version 1.6 details  lakeat  OpenFOAM Running, Solving & CFD  42  August 26, 2009 21:47 
Coupled vs Seg  Natural vs. Forced Convection  Alex  Siemens  5  December 12, 2007 04:58 