Astra is a non commercial program, but is still a powerfull program for linear particle accelerator simulations, and especially its space charge calculation has nothing to envy to its competitors. Few algorithms solve Poisson equation with a three dimensional grid, and few of them try to adapt the meshing to the bunch. The two dimensionnal space charge algorithm of Astra, has proven satisfying results for the last years. Nevertheless, a complete description of the beam requires a three dimensional approach, as the beam is not likely to have or keep revolution symmetry. A three dimensional space charge algorithm has been implemented by Klaus Flottmann. Nevertheless, his first version was not adaptating the grid to the bunch in case of a rotated bunch, typically a bunch at the exit of a dipole. From his original 3D space charge algorithm, I corrected small bugs, and implemented a solution to adapt the meshing to the bunch, and thus, increase the quality of the problem resolution for a same amount of grid cells. Throughout this document, we tried to show the validity of our algorithm, with, or without rotation of the bunch. We presented briefly small results concerning different components, trying to focus on the comparison between space charge runs, and runs without space charge. From this, we saw that space charge effects are not negligible, and they clearly introduce modifications in the phase space. From the study of the compressor, this appeared clear. For the two cases, the minimal compression is obtained for the same correlated energy spread, but the compression factor will be at least ten time smaller with space charge effects. Even in a simple drift, space charge effects are non negligible. From our analysis, it appeared necessary to find a way to change the modelization of dipoles in Astra before trying to compare experimental results with simulations. Hopefully our algorithm and our work will help the understanding and the estimation of space charge effects in particle beams.