# Problem for 2D Initial Condition HDF5 Files

**URL:** <https://gpusph.discourse.group/t/problem-for-2d-initial-condition-hdf5-files/181>\
**Category:** Applications\
**Created:** [January 4, 2023, 8:00pm UTC](https://gpusph.discourse.group/t/problem-for-2d-initial-condition-hdf5-files/181 "2023-01-04T20:00:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![MGYBY](https://yyz2.discourse-cdn.com/free1/user_avatar/gpusph.discourse.group/mgyby/32/130_2.png) [@MGYBY](https://gpusph.discourse.group/u/MGYBY)\
**Post date:** [January 4, 2023, 8:00pm UTC](https://gpusph.discourse.group/t/problem-for-2d-initial-condition-hdf5-files/181/1 "2023-01-04T20:00:36Z")

</div>

Hello all,

I am new to GPUSPH and my application is the wave propagation in two dimensions (2D). My initial water surface is a sinusoidal function of spatial coordinates and the typical implementation of such initial condition is to use Crixus to generate a .h5sph file to be read in GPUSPH using “addHDF5File” command. For me, the .h5sph file could be successfully generated, but when I run the main simulation program, GPUSPH started to complain:

## FATAL: non-zero z world size: spurious particles generated in the z direction?

MPI\_ABORT was invoked on rank 0 in communicator MPI\_COMM\_WORLD  
with errorcode 1.

## NOTE: invoking MPI\_ABORT causes Open MPI to kill all MPI processes. You may or may not see output from other processes, depending on exactly when Open MPI kills them.

It seems that GPUSPH cannot handle the .h5sph file in 2D. I also tested similar cases in 3D and there was no problem processing .h5sph files.

Can anyone suggest a reasonable method to use addHDF5File command in 2D?

Thanks in advance.

BYY

---

<div class="post-metadata">

**Author:** ![giuseppe.bilotta](https://yyz2.discourse-cdn.com/free1/user_avatar/gpusph.discourse.group/giuseppe.bilotta/32/72_2.png) [@giuseppe.bilotta](https://gpusph.discourse.group/u/giuseppe.bilotta)\
**Post date:** [January 4, 2023, 8:48pm UTC](https://gpusph.discourse.group/t/problem-for-2d-initial-condition-hdf5-files/181/2 "2023-01-04T20:48:34Z")

</div>

Hello @MGYBY and thanks for your interest in GPUSPH. I assume you’re using the `spheric2022` branch of GPUSPH, since you’re testing 2D support.

I’m afraid Crixus hasn’t been updated to automatically support the recent addition of lower dimensionality in GPUSPH, so you will probably need to do some manual adjustment.

Take into account that GPUSPH uses the x and y components when running 2D problems (with y being the vertical direction usually), so if your Crixus geometry uses x and z instead you should be able to fix this by rotating your geometry so it’s in the xy plane instead.

Note also that I’m not sure if Crixus correctly sets the particle mass and volume for pure 2D problems, so you may want to consider other options for the definition of your geometries, such as the built-ins in GPUSPH.

---

<div class="post-metadata">

**Author:** ![MGYBY](https://yyz2.discourse-cdn.com/free1/user_avatar/gpusph.discourse.group/mgyby/32/130_2.png) [@MGYBY](https://gpusph.discourse.group/u/MGYBY)\
**Post date:** [January 5, 2023, 7:08pm UTC](https://gpusph.discourse.group/t/problem-for-2d-initial-condition-hdf5-files/181/3 "2023-01-05T19:08:59Z")

</div>

Hello @giuseppe.bilotta ,

Thanks for the reply. You are correct. I am using the spheric2022 branch and I appreciate that the development team included the 2D feature recently. Your suggestions are quite inspiring and I will take these ideas into consideration.

BYY
