1. A computer system for modeling an oilfield having a subterranean formation and an underground reservoir therein, comprising: a repository storing a geomechanical model for representing at least a portion of the subterranean formation and the reservoir, the geomechanical model comprising a stress equation and a fluid flow equation; a processor and memory storing instructions which when executed by the processor cause execution of functionalities for: combining the stress equation and the fluid flow equation into a matrix equation by: converting a combination of the stress equation and the fluid flow equation into an integral form; and converting the integral form into a discrete form based on a finite element method; solving the stress equation and the fluid flow equation simultaneously; configuring a neural network associated with the geomechanical model; and calculating stress and elastic and plastic strains at various locations using the neural network.