\documentclass[11pt,reqno]{article}
\usepackage{graphicx}
\usepackage{xspace}
\usepackage{doublespace}
\usepackage{calc,ifthen}
\usepackage{version}
\usepackage{array}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{lscape}
\usepackage[raggedright,figtopcap,TABTOPCAP,tight]{subfigure}
\usepackage{fancyhdr}
\usepackage{lastpage}
\usepackage{amsmath_jsb}
\usepackage[notcite,saferef,notref]{saferef_jsb}
\usepackage{url_jsb}
\usepackage{float_jsb}
\usepackage{variables_jsb2}
\usepackage{jsb}
\headheight 0.in %added 1/25/90
\headsep 0.in %added 1/25/90
\textheight 9.in %from 8.in before 1/25/90
\textwidth 6.46in
\oddsidemargin 0.02in
\evensidemargin 0.02in
\parskip 0.6ex


\setstretch{1.2}
\renewcommand{\arraystretch}{1.2}
\begin{document}

%From SRD final report
\include{JSB_definitions.1999-09-02}

\excludeversion{test}
\excludeversion{comment}

\setlength{\topmargin}{-0.5in}
\setlength{\headsep}{0.5in}
\pagestyle{fancy}
\lhead{\textsc{PeGn624a}}
\chead{Compositional Modeling - Application to Enhanced Oil Recovery }
\rhead{Spring 2009}
\lfoot{}
\cfoot{\thepage\ of \pageref{LastPage}}
\rfoot{}

%========  v TitlePage v =======================
{\huge\textbf{\textsc{PeGn624} Homework \# 11}}
\begin{itemize}
\item Assigned: 2009-02-13
\item Due: 2009-02-20
\end{itemize}


%========  v Definitions v =======================

\refname{figure}{Figure}{Figures}
\refname[Fig]{figure}{Fig.}{Figs.}
\refname[Figure]{figure}{Figure}{Figures}

\refname{table}{Table}{Tables}
\refname[Tab]{table}{Table}{Tables}
\refname[Table]{table}{Table}{Tables}

\refname{section}{Section}{Sections}
\refname[Sec]{section}{Sec.}{Secs.}
\refname[Section]{section}{Section}{Sections}

\refname{equation}{Eq.}{Eqs.}
\refname[Eq]{equation}{Eq.}{Eqs.}
\refname[Equation]{equation}{Equation}{Equations}

\newcommand{\XX}{\textsf{X}}
\newcommand{\fug}{\mathfrak{f}}
\newcommand{\ff}{\textsf{f}}
\newcommand{\liq}{\textsc{l}}
\newcommand{\vap}{\textsc{v}}

\newcolumntype{R}{>{$}r<{$}}
\newcolumntype{C}{>{$}c<{$}}

%========  v Main Paper v =======================

\section{Question 1: Right-Hand-Side Expansion}

The primary variables are $P_o$, $S_o$, $T$.
When $T<T_s$, $S_g=0$ and $T_s$ is used as the fourth primary variable.
When $T\geq T_s$, $S_g$ is used as the fourth primary variable.

\subsection{Part (a): Water Equation for $T< T_s$}
\Eqref{water} represents the right-hand-side of the water component equation.
Expand the finite difference operators in \Eqref{water} in terms of the primary variables for a 1D problem.
Collect terms for $\delta P_o$, $\delta S_o$, $\delta T$, and $\delta T_s$.

\begin{equation} \label{water}
\textsf{RHSW} =
  \frac{\textsf{VR}}{\Delta t} \Delta_{t} \left( \phi (S_w \xi_w X_{w1} + S_g \xi_g Y_{w1} \right) 
\end{equation}

\subsection{Part (b): Oil Equation for $T< T_s$}
\Eqref{oil} represents the right-hand-side of the oil component equation.
Expand the finite difference operators in \Eqref{oil} in terms of the primary variables for a 1D problem.
Collect terms for $\delta P_o$, $\delta S_o$, $\delta T$, and $\delta T_s$.

\begin{equation} \label{oil}
\textsf{RHSO} =
  \frac{\textsf{VR}}{\Delta t} \Delta_{t} \left( \phi (S_o \xi_o X_{o2} \right)
\end{equation}

\subsection{Part (c): Water Equation for $T\geq T_s$}
\Eqref{water} represents the right-hand-side of the water component equation.
Expand the finite difference operators in \Eqref{water} in terms of the primary variables for a 1D problem.
Collect terms for $\delta P_o$, $\delta S_o$, $\delta T$, and $\delta S_g$.

\subsection{Part (d): Water Equation for $T\geq T_s$}
\Eqref{water} represents the right-hand-side of the water component equation.
Expand the finite difference operators in \Eqref{water} in terms of the primary variables for a 1D problem.
Collect terms for $\delta P_o$, $\delta S_o$, $\delta T$, and $\delta S_g$.

\section{Question 2: Alternate Right-Hand-Side Expansion}

\begin{equation} \label{water2}
A =  
  \left( \phi (S_w \xi_w X_{w1} + S_g \xi_g Y_{w1} \right)
\end{equation}

\begin{equation}\label{NR}
  A^{\ell+1} = A^{\ell} 
  + \left( \PD{A}{P_o} \right)^{\ell} \delta P_o
  + \left( \PD{A}{T} \right)^{\ell} \delta T
  + \left( \PD{A}{S_o} \right)^{\ell} \delta S_o
  + \left( \PD{A}{S_g} \right)^{\ell} \delta S_g
\end{equation}

\subsection{Part (a): Water Equation for $T\geq T_s$}
Expand \Eqref{water} using the following approach.  
Start with \Eqref{water2}.  Evaluate $A^{\ell+1}$ using \Eqref{NR}.
Expand the finite difference operators in \Eqref{water} in terms of the primary variables for a 1D problem.
Collect terms for $\delta P_o$, $\delta S_o$, $\delta T$, and $\delta S_g$.
Prove that the result is the same as 1(c).


\end{document}






