The physiological simulation at the tissue and organ level typically involves the handling of partial differential equations (PDEs). Boundary conditions and in cases like pharmacokinetics, distributed parameters add to the complexity of the PDE solution. These factors make most PDE solutions and their corresponding program codes tailored for specific problems. We propose a general approach for handling PDEs in computational models using a replacement scheme for discretization. This method allows for the handling of the different PDE types. The replacement scheme involves substituting all the partial differential terms with the numerical solution equations. Once the model equations are discretized with the numerical solution scheme, instances of the equations are generated to undergo dependency analysis. The result of the dependency analysis is then used to determine the simulation loop structure and generate the program code.