|
[Sponsors] |
September 1, 2000, 05:04 |
1D dimension
|
#1 |
Guest
Posts: n/a
|
This is very simple questions.
Why someone define 3D variable in 1D dimension? What is the adventage of this programming skill? |
|
September 1, 2000, 05:28 |
Re: 1D dimension
|
#2 |
Guest
Posts: n/a
|
I think If you are using commercial code and if you can neglegt the variable's change in 2 of the 3-D space coordinates, according to the nature of the problem, then the assumption of 1-D for 3-D problem will save huge CPU time. If you are developing your code, then writing a 1-D code is much easier than 3-D code beside the CPU time. But you should make sure that the assumption will not have that much effect in the outcome of the simulation.
|
|
September 1, 2000, 05:42 |
Re: 1D codes
|
#3 |
Guest
Posts: n/a
|
1D codes are hugely popular in engine performance and noise simulation, where people routinely model complete systems from intake orifice to exhaust orifice in one continuous model. So long as you have good sub-models for Y junctions, sudden changes of area and perforates, you can get remarkably accurate results from a model with (e.g.) 1000 volumes or less. Good enough to predict volumetric efficiency to within a few percent and good enough to predict radiated intake and exhaust noise to within a few dB.
These models obviously run much faster than 3D models (e.g. full engine cycles in seconds) and are used to populate performance maps and even run coupled to ECU simulation software. When detailed flow behaviour in a small component is desired, people replace sections of the 1D model with bits of 3D CFD. |
|
September 1, 2000, 06:00 |
Re: 1D dimension
|
#4 |
Guest
Posts: n/a
|
Why is it so popular in modern codes for 3D problems to store 3D variables (such as velocities in x,y,z components) in an array with only one rank?
|
|
September 1, 2000, 09:13 |
Re: 1D dimension
|
#5 |
Guest
Posts: n/a
|
Storage capacity mainly. And also speed to access. Also there is a lot of subroutines that operate with one rank arrays, if you store the 2D data and the 3D data in one rank vector, you can use the same subroutine with any change.
|
|
September 1, 2000, 09:50 |
Re: 1D dimension
|
#6 |
Guest
Posts: n/a
|
1. 1D array is more appropriate for the unstructured grid 2. 1D array can save the CPU time. 3. 1D array is more appropriate for the matrix computation, for example ICCG method. 4. and go further, you can use lots of routines writen in 1D array. 5. but when you use 1D array, you'd better define all the topology in advance. 6. in my experience, one drawback of 1D array is that it is inconvieniet to make grid_based computation, such as the relationship between the coarse grid and fine grid in multigrid. ( Is it correct?) 7.1D array can make the code very neat.
Good luck |
|
September 2, 2000, 12:12 |
Re: 1D dimension
|
#7 |
Guest
Posts: n/a
|
(1). In old days,(back in 60's), the CPU was very slow. (2). So, in using T(i,j,k), the compiler will have to compute the correct memory address (linear), and it takes extra time. (3). If you un-roll it into 1-D array, say T(m), with the address computed explicitly just before T(m) in the Fortran code, then you can save the overhead time for the compiler to do it for you. (4). So, in old days, this is a standard technique to improve the speed. This is a poor man's approach. (5). I think, the current version of Fortran compiler should be smart enough to optimize it for the user in this area.(I am not sure, but in many cases, the compiler is smart enough to optimize it for you, even re-write the code). (6). For applications, where you are forced to use 1-D array because of the algorithms used, then it is a completely different story.(you don't have choice there).
|
|
September 3, 2000, 08:24 |
Re: 1D dimension
|
#8 |
Guest
Posts: n/a
|
I want to stress that the development of CPU is always behind the demands of numerical computation. You can never depend your computation on the speed of CPU, you have to use powerful algorithm to make your code faster and faster. In my opinoin, the so-called *high performance compuation * is partly based on this point.
Good luck |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
the problem about dimension | bojiezhang | OpenFOAM | 2 | October 16, 2011 01:22 |
Dimension problem | faroque | OpenFOAM Running, Solving & CFD | 5 | February 19, 2008 09:56 |
doubt regarding channel critical dimension | anandan | FLUENT | 0 | September 23, 2005 01:55 |
dimension | lucy | FLUENT | 1 | July 13, 2001 13:42 |
Dimension of model and domain for outflow | Leron | Main CFD Forum | 1 | October 31, 2000 03:09 |