Limitation in grid size
Hi I am working on solutions of navier stokes equation for two dimensional domain. My programs crashes above grid size of 120*120. I am using a 32 bit processor and the dev C compiler from bloodshed.Is it the compiler problem or do I need to go for a higher config. hardware? Thanks in advance.
|
Re: Limitation in grid size
Do you use static or dynamic allocation. If you are using static memory allocation then change it to dynamic allocation.
|
Re: Limitation in grid size
if you pass the step of compilation means that you no have problem in compilation, sometimes if your configuration is big, your program crashes in low memory. if you work with FV, you have to take attention on CFL nomber,you must to work sometimes with small CFL
EMCAS |
Re: Limitation in grid size
The program passes the compilation step but then it crashes as soon as I run it.I think the code is not wrong because the same code works for grid sizes below 120 by 120.The criterion for time step has also been satisfied (for both convection and diffusion cases).What exactly is the cause for crashing of program? In all there are 34 such two dimensional arrays.
|
Re: Limitation in grid size
There are a number of reasons - just because the code runs for grids below 120x120 doesn't mean that the code is error free. You could have an array dimensioned improperly and the error doesn't show up until you increase the grid size. You could be trying to allocate too much space off the stack and running into a stack size limitation. There is no single cause. You need to put in some print statements and figure out exactly where in the code the error is occurring.
|
Re: Limitation in grid size
Finally I found the solution...But somebody please explain me the reason... The program worked even for larger grid size when I declared all the variables globally outside the main function.But when I declare them inside the main function the program works well only upto 120*120.
Thanks to all for all the suggestions. |
Re: Limitation in grid size
Test
|
All times are GMT -4. The time now is 10:33. |