In fact, the command you use will mount the disk image, but there are two problems I see.
Before I get into those I want to clarify to all readers (as I had this problem), the following command will mount a disk image:
hdiutil attach image_name.sparseimage -mountpoint mount_point
where you specify
mount_point to your liking.
Here are the problems with your specific case that I see:
1) You are not mounting it in the bash_profile. You are creating an alias. You must run the alias first to mount the disk image (with
of22 in your case).
2) Seems like you've done #1 because you get the error message "no mountable filesystem". This is probably because the disk image is using a relative path, which means you must run
of22 from the parent directory (which seems to be your home directory in this case).
Try changing the command to
hdiutil attach "$HOME/Documents/OF.sparseimage" -mountpoint "$HOME/OpenFOAM"
Notice the addition of "$HOME".