Problem after erasing the HD of a brand new Mac (OS X Yosemite) with Disk Utility I cannot reinstall OS X Yosemite now, as there's no hard drive I could see. 

I had erased the HD with the idea that it will create a new partition but it didn't, so now I can't see a hard disk on disk utility. I have tried with diskutil command, but didn't succeed.
Basically you have a CoreStorage Logical Volume Group without a CoreStorage Logical Volume now. You may delete your Logical Volume Group (-> step 4) or restore a Logical Volume (-> step 7).

Requirements: Booted to Recovery Mode


Please quit Disk Utility.
Open Utilities/Terminal in the menubar
Enter diskutil cs list and hit enter. The output will look like this:

CoreStorage logical volume groups (1 found)
|
+-- Logical Volume Group 5B8350BF-20EF-4199-82E6-129EFF19E9EB
    =========================================================
    Name:         Macintosh HD
    Status:       Online
    Size:         250640592384 B (250.2 GB)
    Free Space:   6111232 B (6.1 MB)
    |
    +-&lt; Physical Volume 907FCDE2-0C62-4951-A39E-36F19244FDB7
    |   ----------------------------------------------------
    |   Index:    0
    |   Disk:     disk0s2
    |   Status:   Online
    |   Size:     250634481152 B (250.2 GB)

To delete the Logical Volume Group enter:

diskutil cs delete lvgUUID 


The lvgUUID is the UUID of the Logical Volume Group and usually the first listed.
In the above example:

diskutil cs delete 5B8350BF-20EF-4199-82E6-129EFF19E9EB


This will delete your CoreStorage LVG and reformat it as an unencrypted HFS+ volume.
Enter exit, hit enter and quit Terminal
Open Disk Utility to format your disk like you want.
After step 3 you may create alternatively a new CoreStorage Logical Volume in your orphaned LVG by entering:

diskutil cs createVolume lvgUUID jhfs+ NewVolName Size


Using the above example

diskutil cs createVolume 5B8350BF-20EF-4199-82E6-129EFF19E9EB jhfs+ MyMac 100%


would create a new full sized (≈ 249.5 GB) Journaled HFS+ volume with the name 'MyMac'