CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   Grid size (https://www.cfd-online.com/Forums/main/925-grid-size.html)

Aldrin Wong June 20, 1999 21:46

Grid size
 
Hi,

I have a question. I've been using a multigrid Euler CFD code for say wing alone studies. Say for example that the wing is approximately 100 inches long and the smallest level of multigrid used is about 1 inch. This is sufficient to resolve the flow on the wing.

If I add a store (under the wing) of approximately 10 inches, then based on the wing analogy, I would need a grid of 0.1 inch in order to resolve the flow ! Is this correct ?

If so, the number of multigrid levels & number of grids would exceed the limit for practicality, especially when deadlines are due :(. Does anyone have a better way of doing this ?

Cheers Aldrin

John C. Chien June 21, 1999 02:35

Re: Grid size
 
(1). Yes, if you try to use the fine mesh everywhere. The mesh will be 10x10x10 times larger. (2). But, if you use the fine mesh only in the region where the resolution is needed, then you can still use coarse mesh in the rest of the flow field. In this case, you can use multi-block approach.

Patrick Godon June 21, 1999 10:24

Re: Grid size and Multigrid
 
In the first case your fine grid has a hundred points, while in the second it has a thousands. Multigrids are used for that kind of problems where the number of grid points is indeed very large. A hundred points problem does not need multigrid in that sens, but a thousand point problem does. If 1000 is too much CPU demanding, then you should try to parallelize the code. Multigrid are very easy to make parallel and you could easily gain a factor of 10-50 in speed (depending on the implementation and on the number of processors available). The parallelization can even be made easier with package like MPI, where subroutines can be called to make all the 'hard' work.

PG.

Aldrin Wong June 21, 1999 22:18

Re: Grid size and Multigrid and Parallel
 
Thanks Pat.

As an alternative to MPI, what about using say, HPF (High Performance Fortran) whereby the compiler automatically parallelizes the code for you ?

If I'm not wrong, HPF works only in shared memory systems. Does anyone here have experience with HPF ?

What are the pros and cons of using HPF vs MPI ?

Cheers Aldrin

Patrick Godon June 22, 1999 10:05

Re: Grid size and Multigrid and Parallel
 
When you use the option of the Fortran compiler to parallelize the code, the efficiency reached is limited. In the case I tested of a multigrid I got an improvement in CPU of about 10, just by using the compiling option. Of course this is also grid-size dependent and the number of processors is also a function (also the machines and compilers I used several years ago might have been already replaced by better ones).

While making the same code parallel using MPI I got another factor of a few (so a few 10s all in all, say a factor of 40 or so, using 64 processors).

I guess it would be a good start to just use the compiling option of Fortran to make the run parallel. Then vary the number of processors (increasing it) untill you get the maximum efficiency (too much processors increases the communication time and the efficiency decreases). Check that for different fine-grid size, since it is certainly size dependent. This should be fairly easy and straigthforward to do. Then only you might want to try MPI, if this does not help.

Concerning the shared memory, I guess you're right.

Cheers, Patrick.



All times are GMT -4. The time now is 06:27.