Module[ { A = 40 acre, h = 30 ft, por = 0.3, Swi = 0.38, Boi = 1.2, pini = 6000 psi, pbubble = 930 psi, rf = 0.23, cr = 310^-6 1/psi, cw = 210^-6 1/psi, co = 5*10^-5 1/psi, porvoli, watvoli, OOIP, Np, porvol2, watvol2, Bo2, fmatbal2, soldp2 }, (calculations) porvoli = Ahpor; watvoli = porvoli Swi; OOIP = porvoli (1 - Swi)/Boi; Np = OOIP rf; (functions of depletion)porvol2[dp_] = porvoli Exp[-cr dp]; watvol2[dp_] = watvoli Exp[+cw dp]; Bo2[dp_] = Boi Exp[+co dp]; (material balance equation) fmatbal2[Np, dp] = (OOIP - Np) == (porvol2[dp] - watvol2[dp])/Bo2[dp]; soldp2 = dp /. Solve[fmatbal2[Np, dp], dp] // First // Simplify; Grid[{{"Final pressure calculated by using exponential approximation \ is", (pini - soldp2)/psi, "psi"}}, Frame -> All] // nf ] I am a new user of Mathematica for only two weeks. When I am trying to use the exponential approximation and solve function to calculate dp, it outputs:
ConditionalExpression[0.000145(9.2597*10^6 - (0. + \(4.332*10^10) I) C[1]), C[1] \[Element] Integers]
I have searched conditionalexpression in documentations and online, I tried to use "normal" and set the conditionalexpression to real, but it doesn't work at all. The program is supposed to solve for dp and output just a number. It works for my linear approximation code, but not for the exponential. How to do that for this case?