The oral route is the most common choice for drug administration because of several advantages such as convenience, low cost, and high patient compliance, and the demand and investment in research and development for oral drugs continue to grow. The rate of dissolution and gastric emptying of the dissolved active pharmaceutical ingredient (API) into the duodenum is modulated by gastric motility, physical properties of the pill, and the contents of the stomach, but current in-vitro procedures for assessing dissolution of oral drugs are limited in their ability to recapitulate this process. This is particularly relevant for disease conditions, such as gastroparesis, that alter the anatomy and/or physiology of the stomach. In-silico models of gastric biomechanics offer the potential for overcoming these limitations of existing methods. In the current study we employ a biomimetic in-silico simulator based on the realistic anatomy and morphology of the stomach (referred to as "StomachSim"), to investigate and quantify the effect of body posture and stomach motility on drug bioavailability. The simulations show that changes in posture can potentially have a significant (up to 83%) effect on the emptying rate of the API into the duodenum. Similarly, reduction in antral contractility associated with gastroparesis can also be found to significantly reduce the dissolution of the pill as well as emptying of the API into the duodenum. The simulations show that for an equivalent motility index, reduction in gastric emptying due to neuropathic gastroparesis is larger by a factor of about five compared to myopathic gastroparesis.