Chemical and Biomedical Engineering Calculations Using Python 1st Edition Jeffrey J. Heys download
Chemical and Biomedical Engineering Calculations Using Python 1st Edition Jeffrey J. Heys download
https://textbookfull.com/product/chemical-and-biomedical-
engineering-calculations-using-python-1st-edition-jeffrey-j-heys/
https://textbookfull.com/product/biomedical-engineering-
challenges-a-chemical-engineering-insight-first-edition-piemonte/
https://textbookfull.com/product/computational-nuclear-
engineering-and-radiological-science-using-python-1st-edition-
ryan-mcclarren/
https://textbookfull.com/product/introduction-to-python-for-
science-and-engineering-1st-edition-david-j-pine/
https://textbookfull.com/product/automatic-control-systems-in-
biomedical-engineering-j-fernandez-de-canete/
Formulas And Calculations For Petroleum Engineering
Cenk Temizel
https://textbookfull.com/product/formulas-and-calculations-for-
petroleum-engineering-cenk-temizel/
https://textbookfull.com/product/construction-engineering-design-
calculations-and-rules-of-thumb-1st-edition-ruwan-abey-rajapakse/
https://textbookfull.com/product/modeling-with-rules-using-
semantic-knowledge-engineering-1st-edition-grzegorz-j-nalepa-
auth/
https://textbookfull.com/product/supervised-learning-with-python-
concepts-and-practical-implementation-using-python-1st-edition-
vaibhav-verdhan/
Chemical and Biomedical Engineering
Calculations Using PythonⓇ
Chemical and Biomedical Engineering
Calculations Using PythonⓇ
Jeffrey J. Heys
Montana State University
Bozeman, Montana, USA
This edition first published 2017
© 2017 John Wiley & Sons, Inc
All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or
transmitted, in any form or by any means, electronic, mechanical, photocopying, recording or
otherwise, except as permitted by law. Advice on how to obtain permission to reuse material from
this title is available at http://www.wiley.com/go/permissions.
The right of Jeffrey J. Heys to be identified as the author of this work has been asserted in
accordance with law.
Registered Office
John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030, USA
Editorial Office
111 River Street, Hoboken, NJ 07030, USA
For details of our global editorial offices, customer services, and more information about Wiley
products visit us at www.wiley.com.
Wiley also publishes its books in a variety of electronic formats and by print-on-demand. Some
content that appears in standard print versions of this book may not be available in other formats.
Limit of Liability/Disclaimer of Warranty
The publisher and the authors make no representations or warranties with respect to the accuracy
or completeness of the contents of this work and specifically disclaim all warranties, including
without limitation any implied warranties of fitness for a particular purpose. This work is sold
with the understanding that the publisher is not engaged in rendering professional services. The
advice and strategies contained herein may not be suitable for every situation. In view of ongoing
research, equipment modifications, changes in governmental regulations, and the constant flow
of information relating to the use of experimental reagents, equipment, and devices, the reader is
urged to review and evaluate the information provided in the package insert or instructions for
each chemical, piece of equipment, reagent, or device for, among other things, any changes in the
instructions or indication of usage and for added warnings and precautions. The fact that an
organization or website is referred to in this work as a citation and/or potential source of further
information does not mean that the author or the publisher endorses the information the
organization or website may provide or recommendations it may make. Further, readers should
be aware that websites listed in this work may have changed or disappeared between when this
works was written and when it is read. No warranty may be created or extended by any
promotional statements for this work. Neither the publisher nor the author shall be liable for any
damages arising herefrom.
Library of Congress Cataloging-in-Publication Data
Names: Heys, Jeffrey J., 1974- author.
®
Title: Chemical and Biomedical Engineering Calculations Using Python / Jeffrey J. Heys.
Description: Hoboken, NJ : John Wiley & Sons, 2017. | Includes
bibliographical references and index.
Identifiers: LCCN 2016039763| ISBN 9781119267065 (cloth) | ISBN 9781119267072
(epub)
Subjects: LCSH: Engineering mathematics. | Python (Computer program language)
Classification: LCC TA330 .H49 2017 | DDC 620.00285/5133–dc23 LC record available at
https://lccn.loc.gov/2016039763
Cover design by Wiley
Cover image: © lvcandy/Getty Images, Inc.
Set in 10/12pt, Warnock by SPi Global, Chennai, India
Printed in United States
10 9 8 7 6 5 4 3 2 1
v
Contents
Preface xi
About the Companion Website xv
3 Programming Basics 31
3.1 Comparators and Conditionals 31
3.2 Iterators and Loops 34
vi Contents
5 Symbolic Mathematics 70
5.1 Introduction 70
5.2 Symbolic Mathematics Packages 71
5.3 An Introduction to SymPy 72
5.3.1 Multiple Equations 75
5.4 Factoring and Expanding Functions 76
5.4.1 Equilibrium Kinetics Example 77
5.4.2 Partial Fraction Decomposition 78
5.5 Derivatives and Integrals 78
5.5.1 Reaction Example 79
5.5.2 Symbolic Integration 80
5.5.3 Reactor Sizing Example 80
5.6 Cryptography 81
Problems 83
References 86
6 Linear Systems 87
6.1 Example Problem 88
6.2 A Direct Solution Method 91
Contents vii
7 Regression 113
7.1 Motivation 113
7.2 Fitting Vapor Pressure Data 114
7.3 Linear Regression 115
7.3.1 Alternative Derivation of the Normal Equations 118
7.4 Nonlinear Regression 119
7.4.1 Lunar Disintegration 122
7.5 Multivariable Regression 126
7.5.1 Machine Learning 127
Problems 129
References 134
9 Statistics 156
9.1 Introduction 156
9.2 Reading Data from a File 156
9.2.1 Numpy Library 157
9.2.2 CVS Library 159
9.2.3 Pandas 159
9.2.4 Parsing an Array 162
9.3 Statistical Analysis 162
9.4 Advanced Linear Regression 164
9.5 U.S. Electrical Rates Example 168
Problems 172
References 175
viii Contents
Index 255
xi
Preface
during the typical undergraduate education. The irony of this situation is that
students often do not understand the calculation being performed by the
software – they do not know the limitations of the mathematical models, they
do not know the expected accuracy of the approximate solution, and they
do not always have the intuition necessary to recognize a highly incorrect
result. Another loss associated with the rise of specialized software tools for
engineers is that it is often very difficult to find a computational tool for a new
problem. The software often works well for the limited range of problems for
which it was designed, but, if an engineer wishes to analyze something new or
include some change that takes the problem just beyond the range of problems
for which the software was design, that engineer is often “out of luck” because
no computational tool is available to help.
I do not advocate abandoning modern engineering software. I do not
advocate returning to the use of custom FORTRAN computer codes for every
problem. I do advocate that engineering students get some experience writing
short computer programs. This experience teaches one to think precisely as
computers are notoriously unforgiving when we make mistakes in our logic. It
teaches one to decompose a complex process down into small, individual steps.
This experience teaches one to develop a unique solution for a new problem
that is not handled well by existing software. Finally, the experience of creating
a computer algorithm helps to develop a recognition of when computations
are likely to be reliable and when they are not – when the computational
solution is sufficiently accurate and when it is not.
The goal of this book is to provide the reader with an understanding of
standard computational methods for approximating the solution to common
problems in Chemical and Biomedical Engineering. The book does not have a
comprehensive coverage of computational methods, but it is instead intended
to provide the introductory coverage necessary to understand the most com-
monly used algorithms. The computer language used to explore the different
computational methods is Python. The advantages of using Python include
its wide and growing popularity, large library of existing algorithms, and its
licensing as free, open source software. The final and possibly greatest advan-
tage in using Python is that it is easy to learn to write general computational
algorithms and more specialized numerical algorithms are also easy to write,
thanks to the NumPy and SciPy libraries. By the end of this book, the reader
should have a solid understanding of how to write and use computational
algorithms in Python to solve common mathematical problems in Chemical
and Biomedical Engineering.
The course that motivated the creation of this textbook is one semester
of approximately 15 weeks. It is my belief that most of this material can be
covered in that length of time. Each chapter in the textbook covers a different
topic and the book was constructed so that the material in that chapter could
be covered in approximately 1 week. There are, of course, some exceptions.
The large number of topics and short amount of time associated with a single
Preface xiii
www.wiley.com/go/heys/engineeringcalculations_python
In chemical and biological engineering, students find that the sequence of steps
outlined in Figure 1.1 is an effective problem-solving approach for the vast
majority of the problems they encounter.
In most courses, students practice all the steps outlined in Figure 1.1, but
the focus is usually on the construction of the system diagram and developing
the mathematical equations for every unique type of process that is described
in a particular course. Only limited attention is usually given to solving
the mathematical equations that arise in a particular course because the
assumption is that the student should have learned how to do that in their
mathematics courses or some other course. Many engineering curricula have
a course that is focused on the use of computers to solve the many different
types of equations that arise in a student’s engineering courses. The focus of
this textbook is just “using computers to solve the equation(s) that students
typically encounter throughout the engineering curriculum.”
The timing of a course on computational or numerical methods for solving
engineering problems varies considerably from one curriculum to the next.
One approach is to schedule the course near the end of the curriculum. As
an upper level course, students are able to review most of the engineering
principles and mathematics that they learned previously and develop a new
set of tools (specifically, computational tools) for solving those same problems.
Two disadvantages are associated with this approach. First, students do not
have the computational tools when they first learn a new engineering principle,
which limits the scope of problems they can solve to problems that can be
largely solved without a computer (i.e., problems that can be solved with paper
and pencil). The second disadvantage is that the third and fourth years of many
engineering curricula are already filled with other required courses and it is
difficult to find time for yet another course.
A second approach is to schedule the computational methods course early in
the curriculum, before students have taken most of the engineering courses in
which they learn to derive, construct, and identify the mathematical equations
they need to solve and that sometime require a computational approach.
There are also two problems with this approach. First, the students have
®
Chemical and Biomedical Engineering Calculations Using Python , First Edition. Jeffrey J. Heys.
© 2017 John Wiley & Sons, Inc. Published 2017 by John Wiley & Sons, Inc.
Companion Website: www.wiley.com/go/heys/engineeringcalculations_python
2 1 Problem Solving in Engineering
typically not taken all the required mathematics courses, and, as a result, it is
difficult to teach a computational approach to solving a differential equation
when a student is not yet familiar with differential equations or techniques
for solving them. The second disadvantage is that the student has not taken
courses on separations, kinetics, transport, and so on in which they learn to
derive or identify the appropriate mathematical equation(s) for their particular
problem. It is, of course, difficult to teach a computational approach to
solving an equation when the importance or relevance of that equation is not
known.
A third approach for addressing this dilemma is to simply not teach a
stand-alone computational methods course and instead cover the relevant
computational approaches as they are needed in each individual course. We
will continue our listing of the “top two challenges” and identify two potential
difficulties with this approach. First, instead of learning and becoming com-
fortable with two or three computational tools (i.e., mathematical software
packages), students under this format often need to learn 4 or 5 computational
tools because every one of their instructors prefers a different tool, and the
students never really become proficient with any single tool. The second
difficulty is that there are a few important concepts that play a role in many
of the various computational methods, for example, rounding error, logical
operators, and accuracy, that may never be taught if there is not a single course
focused on computational methods.
This textbook, and the course that it was originally written to support, is
focused on the second approach – a course that appears in the first year or early
in the second year of an engineering curriculum. The main reason for adopting
this approach is simply the belief that it is critical for students to understand
both the potential power and flexibility of computational methods and also the
important limitations of these methods before using them to solve problems in
engineering. For a student to use a computational tool in a course and blindly
trust that tool because they do not understand the algorithms behind the tool
is probably more destructive than never learning the tool at all. Further, to limit
a student to only problems that can be solved with paper and pencil for most of
their undergraduate education is similarly unacceptable. Addressing the lim-
itations associated with teaching computational methods before most of the
fundamental engineering and some mathematics courses is difficult. The basic
strategy employed by this book is to teach students to recognize the type of
1 Problem Solving in Engineering 3
mathematical equation they need to solve, and, once they know the type of
equation, they can take advantage of the appropriate computational approach
that is presented here (or, more likely, refer back to this book for the appropriate
algorithm for their particular equation).
There is a second, and possibly more important, reason for learning this
material early in the engineering education process. It is related to the fact that
one of the most difficult skills for many science, engineering, and mathematics
students to master is the ability to combine a number of small, simple pieces
together into a more complex framework. In most science, engineering, and
mathematics courses in high school and early in college, students learn to
find the right equation to solve the question they are asked to answer. Most
problems can be completed in one or two steps. Problems in later courses, on
the other hand, can often require 5–10 or more steps and can require multiple
pages of equations and mathematics to solve. This transition from small
problems that only require a few lines to large problems that require a few
pages can be very challenging for many science, engineering, and mathematics
students. I believe that programming in general, and numerical computations,
in particular, can be a great way to develop the skills associated with solving
larger problems. Programming requires one to combine a number of simple
logical commands and variables together into a more complex framework.
Programming develops the parts of our brains that allow us to synthesize a
number of smaller pieces into a much larger whole. A good analogy is building
something complex (e.g., the Death Star) with LEGO bricks. This process
requires one to properly and carefully combine a number of simple pieces into
a much larger structure. The entire process requires one to simultaneously
think on both the large scale (“What is my design objective?”) and the small
scale (“Will these two pieces stay connected? Are they compatible?”). This skill
is necessary for both programming and engineering. It is a skill that almost
everyone is capable of developing, but it takes practice – so, we might as well
start early!
This textbook advocates that students develop the following skills: (1) rec-
ognize the type of mathematical equation that needs to be solved – algebraic
or differential? linear or nonlinear? interpolation or regression? ordinary or
partial differential equation (PDE)?, and (2) select and implement the appro-
priate algorithm. If students are able to develop these two skills, they will be
equipped with a set of tools that will serve them well in their later engineering
courses. These tools can be used by a student to check their work, even when
they are primarily using paper and pencil to solve a problem. It is not optimal
that students learn how to approximately solve mathematical equations before
they know why the equation is relevant, but every effort is made in this book
to at least try and explain the relevance of equations when possible.
4 1 Problem Solving in Engineering
A linear function, f (x), is one that satisfies both of the following properties:
additivity: f (x + y) = f (x) + f (y).
homogeneity: f (c ⋅ x) = cf (x).
In practice, this means that the dependent variables cannot appear in
polynomials of degree two or higher (i.e., f (x) = x2 is nonlinear because
(x + y)2 ≠ x2 + y2 ), in nonlinear arguments within the function (i.e.,
f (x) = x + sin(x) is nonlinear because sin(x + y) ≠ sin(x) + sin(y)), or as
products of each other (i.e., f (x, y) = x + xy is nonlinear).
For algebraic equations, it is typically straightforward to solve linear systems
of equations, even very large systems consisting of millions of equations and
millions of unknowns. Two different methods for solving linear systems of
equations will be covered in Chapter 6. Nonlinear algebraic equations can
sometimes be solved exactly using techniques learned in algebra or using
symbolic mathematics algorithms, especially when there is only a single
equation. However, if we have more than one nonlinear equation or even a
single, particularly complex nonlinear algebraic equation (or if we are simply
6 1 Problem Solving in Engineering
Linear:
1
• single linear equation: 5 ⋅ x + 3
=x
• linear system of equations:
y
3 ⋅ x + = 10
4
x = 6 ⋅ y.
Nonlinear:
√
• single nonlinear equation: 5 ⋅ x − 13 = x
• single nonlinear equation: x2 − 8 ⋅ x − 9 = 0
• nonlinear system of equations:
y
3 ⋅ x ⋅ y + = 10
4
x−6⋅y=0
• nonlinear system of equations:
x+y=4
log(x) − 7 ⋅ y = 0.
function p(t) where the first derivative of the function, multiplied by t, plus the
second derivative of the function is equal to sin(t). If that sounds difficult, do
not worry, by the end of this textbook, you will know how to get an approximate
solution, that is, a numerical approximation of the function p(t). It is also impor-
tant to emphasize that multiplying the dependent variable p by the independent
variable t did not make the equation nonlinear. A nonlinearity only arises if, for
example, p is multiplied by itself.
dx
= x2 + 3 cos(t) (nonlinear, first-order ODE).
dt
Again, if you have not had a differential equations course, solving this
equation requires finding a function x(t) that has a derivative equal to (x(t))2
plus 3 cos(t). Do not worry if that makes your head spin, we will also cover the
solution of this class of problems.
Some examples of PDEs are included below.
𝜕T 𝜕2T
= 𝛼 2 (linear, second-order PDE).
𝜕t 𝜕x
This is an equation that describes unsteady, conductive heat transport in one
spatial dimension. You could use this equation to describe, for example, the
warming of the ground when the sun comes up in the morning, among many
other examples. Solving this equation requires finding a function T(x, t) of both
time t and space x where the first derivative with respect to time is equal to 𝛼
times the second derivative with respect to space.
𝜕m 𝜕m
m + = 0 (nonlinear, first-order PDE).
𝜕x 𝜕y
By now it is probably obvious that the standard mathematical convention is
to use 𝜕 for derivatives in a PDE while ODEs use d. The order of the equation
is determined by the order of the highest derivative.
Even though you may not have taken a differential equations course, you might
be able to solve a simplified version of the first ODE example. Try to solve
d2 p
= sin(t).
dt 2
Notice that we have eliminated the difficult term with t multiplied by the first
derivative. Let us start by integrating both sides of the equation with respect
to t:
( )
d dp
dt = sin(t)dt.
∫ dt dt ∫
(Continued)
8 1 Problem Solving in Engineering
y y
x x
(a) (b)
Figure 1.3 An example of linear (a) regression and nonlinear (b) regression for a set of data.
Problems
1.1 Determine the type (linear or nonlinear) of algebraic equation assuming
x, y, and z are unknown variables:
a) x2 + y2 =√1.0
b) x + y = 2
c) y = 2 ⋅ sin(x)
d) x + y + z2 = 0
1.3 If you want to determine the polynomial that interpolates 6 data points,
what is the minimum order polynomial that is required? Write the poly-
nomial with x as the independent variable and a, b, c, … as the unknown
coefficients.
1.4 You are asked to use regression to determine the best linear polynomial fit
for a given set of data. A colleague encourages you to determine the best
fit by minimizing the sum of the distance between each point and the line
instead of minimizing the sum of the square of the distance, which is the
standard practice. The colleague claims that this will reduce the influence
of a few outlying data points. Is the colleague correct?
1.5 You have been hired to produce an exact replacement part for a classic
Porsche because the part is no longer available. Another engineer collects
precise measurements of the location of a number of points on the surface
of the part. You need to produce a new part with corresponding points at
the same locations. Before machining the new part, you need to develop
a continuous function that fits the measurement points because the con-
tinuous function will provide a representation of the surface connecting
the points. Should you develop the continuous function using regression
or interpolation between the precisely measured locations on the surface
of the part? Why?
1.6 While studying a particular system, you collect some data on a measur-
able variable (y) versus an adjustable variable (x). Your next task is to use
References 11
Additional Resources
An understanding of how to solve differential equation problems is not required
for understanding the material in this book. However, an ability to classify or
recognize the type of equation that one is trying to solve is required. Most
differential equation textbooks include a comprehensive set of definitions that
enable the classification of mathematical equations. Some popular differential
equation textbooks for engineers are:
• Differential Equations for Engineers and Scientists by Çengel and Palm [1]
• Advanced Engineering Mathematics by Zill and Cullen [2]
• Advanced Engineering Mathematics by Kreyszig [3]
and a helpful resource for data plotting and regression using Microsoft Excel is:
• Engineering with Excel by Larsen [4].
References
1 Çengel, Y. and Palm, W. III (2013) Differential Equations for Engineers and
Scientists, McGraw-Hill, New York, NY, 1st edn.
2 Zill, D. and Cullen, M. (2006) Advanced Engineering Mathematics, Jones and
Barlett, Sudbury, MA, 3rd edn.
3 Kreyszig, E. (2011) Advanced Engineering Mathematics, John Wiley and Sons,
Inc., Hoboken, NJ, 10th edn.
4 Larsen, R.W. (2009) Engineering with Excel, Pearson Prentice Hall, Upper
Saddle River, NJ, 3rd edn.
Random documents with unrelated
content Scribd suggests to you:
Now, that Christ did die for the elect, Scripture distinctly teaches in
manifold places. He died for the elect nation of Israel, and for the
elect Church of God—the bride of Christ. But Scripture teaches more
than this. It declares that "He died for all" (2 Cor. v. 14); that "He
tasted death for every man" (Heb. ii. 9). There is no need whatever
for seeking to avoid the plain force and meaning of these and
kindred statements of inspiration. And further, we believe it to be
quite wrong to add our own words to God's words in order to
reconcile them with any particular system of doctrine. When
Scripture affirms that Christ died for all, we have no right to add the
words, "the elect." And when Scripture states that Christ "tasted
death for every man," we have no right to say, "every elect man." It
is our place to take God's word as it stands, and reverently bow to
its authoritative teaching in all things. We can no more systematize
God's word than we can systematize God Himself. His word, His
heart and His nature, are quite too deep and comprehensive to be
included within the limits of the very broadest and best constructed
human system of theology that was ever framed. We shall, ever and
anon, be discovering passages of Scripture which will not fall in with
our system. We must remember that God is love, and this love will
tell itself out to all without limit. True, God has His counsels, His
purposes and His decrees; but it is not these He presents to the poor
lost sinner. He will instruct and interest His saints about such things;
but to the guilty, heavy-laden sinner, He presents His love, His grace,
His mercy, His readiness to save, to pardon and to bless.
And let it be well remembered that the sinner's responsibility flows
out of what is revealed, and not out of what is secret. God's decrees
are secret; His nature, His character, Himself is revealed. The sinner
will not be judged for rejecting what he had no means of knowing.
"This is the condemnation, that light is come into the world, and
men loved darkness rather than light, because their deeds were evil"
(John iii. 19).
We are not writing a theological treatise; but we do feel it to be a
matter of the gravest moment to press upon the reader that his
responsibility, as a sinner, is based upon the fact that the aspect of
the salvation of God, and of the atonement of Christ, is most
distinctly and decidedly "unto all," and not merely to a certain
number of the human family. The glorious message is sent forth into
all the world. Every one who hears it is invited to come. This is
grounded upon the fact that Christ has put away sin—that the blood
of atonement has been carried into the presence of God—that the
barrier which sin presented has been flung down and abolished, and
now the mighty tide of divine love can flow freely forth to the very
vilest of the sons of men.
Such is the message; and when any one through grace believes it he
can be further told that not only has Christ put away sin, but that
also He has borne his sins—the actual sins of all His people—of all
who believe in His name. The evangelist can stand up in the midst of
assembled thousands, and declare that Christ has put away sin—that
God is satisfied—that the way is open for all; and he can whisper the
same in the ear of each and every sinner under heaven. Then, when
any one has bowed down to this testimony—when the repentant,
broken-hearted, self-judged sinner receives the blessed record—he
can be further taught that his sins were all laid on Jesus, all borne
and for ever put away by Him when He died on the cross.
This is the plain doctrine of Hebrews ix. 26, 28; and we have a
striking type of it in the two goats of Leviticus xvi. If the reader will
just turn to the passage he will find there, first, the slain goat; and
secondly, the scape-goat. The blood of the slain goat was brought
into the sanctuary and sprinkled there. This was a type of Christ
putting away sin. Then the high priest, on behalf of the
congregation, confessed all their sins upon the head of the scape-
goat, and they were borne away into a land not inhabited. This was
a type of Christ bearing the sins of His people. The two goats, taken
together, give us a full view of the atonement of Christ, which, like
the righteousness of God in Romans iii., is "unto all, and upon all
them that believe."
All this is most simple. It removes many difficulties out of the way of
the earnest seeker after peace. These difficulties arise in many cases
from the conflicting dogmas of theological systems, and have no
foundation whatever in Holy Scripture. There, all is as plain and as
clear as God can make it. Each one who hears the message of God's
free love is bound, not to say invited, to receive it; and judgment
will, most assuredly, fall upon each and all who refuse or neglect the
proffered mercy. It is utterly impossible for any one who has ever
heard the gospel, or ever had the New Testament in his hand, to get
rid of the awful responsibility that rests upon him to accept God's
salvation. Not a single soul will have to say, I could not believe,
because I was not one of the elect, and did not get power to
believe. No one will ever dare to say or even to think this. If any
could take such ground, then where were the force or the meaning
of the following burning words?—"The Lord Jesus shall be revealed
from heaven with the angels of His power, in flaming fire taking
vengeance on them that know not God, and that obey not the
gospel of our Lord Jesus Christ" (2 Thess. i. 7, 8). Will any one ever
be punished for not obeying the gospel if he is not responsible to
yield that obedience? Most assuredly not. "Shall not the Judge of all
the earth do right?"
But does God send His gospel to people merely to place them under
responsibility and increase their guilt? Far be the monstrous thought!
He sends His gospel to the lost sinner in order that he may be
saved, for God is not willing that any should perish, but that all
should come to repentance. All, therefore, who perish shall have
none but themselves to blame.
It is of the very last importance that the reader should be
established in the knowledge and practical sense of what the
atonement of Christ has accomplished for all who simply trust in
Him. It is, we need hardly say, the only basis of peace. He has put
away sin by the sacrifice of Himself; and He has borne our sins in
His own body on the tree. It is, therefore, impossible that any
question as to sin or guilt can ever arise. All has been "once and for
ever" settled by the atoning death of the Lamb of God. True it is—
alas, how true!—we all have sin in us; and we have, daily and
hourly, to judge ourselves and judge our ways. It will ever hold good
of us, so long as we are in a body of sin and death, that "in me (that
is, in my flesh) dwelleth no good thing." But then nothing can ever
touch the question of our soul's perfect and eternal acceptance. The
conscience of the believer is as completely purged from every soil
and stain as will be the whole creation by-and-by. If it were not so,
Christ could not be where He now is. He has entered into the
presence of God, there to appear for us. This leads us in the second
place to consider.
THE ADVOCACY.
Very many souls are apt to confound two things which, though
inseparably connected, are perfectly distinct, namely, advocacy and
atonement. Not seeing the divine completeness of the atonement,
they are in a certain way looking to the advocacy to do for them
what the atonement has done. We must remember that though as
to our standing we are not in the flesh but in the Spirit, yet as to the
actual fact of our condition we are in the body. We are in spirit and
by faith seated in heavenly places in Christ; but yet we are actually
in the wilderness, subject to all sorts of infirmities, liable to fail and
err in a thousand ways.
Now it is to meet our present actual state and wants that the
advocacy, or priesthood, of Christ is designed. God be praised for the
blessed provision! As those who are in the body passing through the
wilderness, we need a great High Priest to maintain the link of
communion, or to restore it when broken. Such a One we have, ever
living to make intercession for us; nor could we get on for a single
moment without Him. The work of atonement is never repeated; the
work of the Advocate is never interrupted. When once the blood of
Christ is applied to the soul by the power of the Holy Ghost, the
application is never repeated. To think of a repetition is to deny its
efficacy and to reduce it to the level of the blood of bulls and goats.
No doubt people do not see this, and most assuredly they do not
mean it; but such is the real tendency of the thought of a fresh
application of the blood of sprinkling. It may be that persons who
speak in this way really mean to put honor upon the blood of Christ,
and to give expression to their own felt unworthiness; but, in truth,
the best way to put honor upon the blood of Christ is to rejoice in
what it has done for our souls; and the best way to set forth our
own unworthiness is to feel and remember that we were so vile that
nothing but the death of Christ could avail to meet our case. So vile
were we that nothing but His blood could cleanse us. So precious is
His blood that not a trace of our guilt remains. "The blood of Jesus
Christ, God's Son, cleanseth us from all sin."
Thus it stands in reference to the very feeblest child of God whose
eye scans these lines. "All sins forgiven." Not a trace of guilt
remains. Jesus is in the presence of God for us. He is there as a High
Priest before God—as an Advocate with the Father. He has by His
atoning death rent the veil—put away sin—brought us nigh to God in
all the credit and virtue of His sacrifice, and now He lives to maintain
us by His advocacy in the enjoyment of the place and privileges into
which His blood has introduced us.
Hence the apostle says, "If any man sin, we have"—what? The
blood? Nay, but "an Advocate with the Father, Jesus Christ the
righteous." The blood has done its work, and is ever before God
according to its full value in His sight. Its efficacy is ever the same.
But we have sinned; it may be only in thought; but even that
thought is quite enough to interrupt our communion. Here is where
advocacy comes in. If it were not that Jesus Christ is ever acting for
us in the sanctuary above, our faith would most assuredly fail in
moments in the which we have in any measure yielded to the voice
of our sinful nature. Thus it was with Peter in that terrible hour of his
temptation and fall: "Simon, Simon, behold, Satan hath desired to
have you, that he may sift you as wheat: but I have prayed for thee,
that thy faith fail not: and when thou art converted (or restored),
strengthen thy brethren" (Luke xxii. 21, 32).
Let the reader note this. "I have prayed for thee, that"—What? Was
it that he might not fail? Nay, but that, having failed, his faith might
not give way. Had Christ not prayed for his poor, feeble servant, he
would have gone from bad to worse, and from worse to worst. But
the intercession of Christ procured for Peter the grace of true
repentance, self-judgment and bitter sorrow for his sin, and finally
complete restoration of his heart and conscience, so that the current
of his communion—interrupted by sin, but restored by advocacy—
might flow on as before.
Thus it is with us when, through lack of that holy vigilance which we
should ever exercise, we commit sin: Jesus goes to the Father for
us. He prays for us; and it is through the efficacy of His priestly
intercession that we are convicted and brought to self-judgment,
confession, and restoration. All is founded on the advocacy, and the
advocacy is founded on the atonement.
And here it may be well to assert, in the clearest and strongest
manner possible, that it is the sweet privilege of every believer not
to commit sin. There is no necessity whatever why he should. "My
little children," says the apostle, "these things write I unto you, that
ye sin not." This is a most precious truth for every lover of holiness.
We need not sin. Let us remember this. "Whosoever is born of God
doth not commit [or, practice] sin; for His seed remaineth in him:
and he cannot sin, because he is born of God" (1 John iii. 9).
This is the divine idea of a Christian. Alas, we do not always realize
it! but that does not, and cannot, touch the precious truth. The
divine nature, the new man, the life of Christ in the believer, cannot
possibly sin, and it is the privilege of every believer so to walk as
that nothing but the life of Christ may be seen. The Holy Ghost
dwells in the believer on the ground of redemption, in order to give
effect to the desires of the new nature, so that the flesh may be as
though it did not exist, and nothing but Christ be seen in the
believer's life.
It is of the utmost importance that this divine idea of Christian life
should be seized and maintained. People sometimes ask the
question, Is it possible for a Christian to live without committing sin?
We reply in the language of the inspired apostle, "My little children,
these things write I unto you, that ye sin not" (1 John ii. 1). And
again, quoting the language of another inspired apostle, "How shall
we, that are dead to sin, live any longer therein?" (Rom. vi. 2.) The
Christian is viewed by God as "dead to sin"; and hence, if he yields
to it he is practically denying his standing in a risen Christ. Alas, alas,
we do sin, and hence the apostle adds, "If any man sin, we have an
Advocate with the Father, Jesus Christ the righteous: and He is the
propitiation for our sins: and not for ours only, but also for the whole
world."
This gives wonderful completeness to the work on which our souls
repose. Such is the perfect efficacy of the atonement of Christ that
we have one Advocate with us in order that we may not sin, and
another Advocate with the Father if we do sin. The word rendered
"Comforter" in John xiv. 16 is rendered "advocate" in 1 John iii. 1.
We have one divine Person caring for us here, and we have another
divine Person caring for us in heaven, and all this on the ground of
the atoning death of Christ.
Will it be said that in writing thus we furnish a license for committing
sin? God forbid! We have already declared, and would insist upon,
the blessed possibility of living in such unbroken communion with
God—of walking so in the Spirit—of being so filled and occupied with
Christ—as that the flesh, or the old nature, may not appear. This we
know is not always the case. "In many things we all offend," as
James tells us. But no right-minded person, no lover of holiness, no
spiritual Christian, could have any sympathy with those who say we
must commit sin. Thank God, it is not so. But what a mercy it is,
beloved Christian reader, to know that when we do fail there is One
at the right hand of God to restore the broken link of communion!
This He does by producing in our souls, by His Spirit who dwells in
us—that "other Advocate"—the sense of failure, and leading us into
self-judgment and true confession of the wrong, whatever it be.
We say "true confession," for it must be this if it be the fruit of the
Spirit's work in the heart. It is not lightly and flippantly saying we
have sinned, and then as lightly and flippantly sinning again. This is
most sorrowful and most dangerous. We know nothing more
hardening and demoralizing than this sort of thing. It is sure to lead
to the most disastrous consequences. We have known cases of
persons living in sin and satisfying themselves by a mere lip
confession of their sin, and then going and committing the sin again
and again; and this has gone on for months and years, until God in
His faithfulness caused the whole thing to come out openly before
others.
All this is most dreadful. It is Satan's way of hardening and deceiving
the heart. Oh that we may watch against it, and ever keep a tender
conscience! We may rest assured that when a true-hearted child of
God is betrayed into sin the Holy Ghost will produce in him such a
sense of it—will lead him into such intense self-loathing, such an
abhorrence of the evil, such thorough self-judgment in the presence
of God—as that he cannot lightly go and commit the sin again. This
we may learn from the words of the apostle when he says, "If we
confess our sins, he is faithful and just to forgive us our sins, and"—
mark this weighty clause—"to cleanse us from all unrighteousness."
Here we have the precious fruit of the double advocacy. It is all
presented in its fulness in this part of the first epistle of John. If any
man sin, the blessed Paraclete on high intercedes with the Father,
pleads the full merits of His atoning work, prays for the erring one
on the ground of His having borne the judgment of that very sin.
Then the other Paraclete acts in the conscience, produces
repentance and confession, and brings the soul back into the light in
the sweet sense that the sin is forgiven, the unrighteousness
cleansed, and the communion perfectly restored. "He restoreth my
soul: He leadeth me in the paths of righteousness for His name's
sake" (Ps. xxiii. 3).
We trust the reader will be enabled to understand this great
fundamental truth. Many, we are aware, find it difficult to reconcile
the idea of intercession with the truth of a perfect atonement. If, say
they, the atonement is perfect, what need is there of intercession? If
the believer is made as white as snow by the blood of Christ—so
white that the Spirit of God can dwell in his heart—then what does
he want of a priest? If by one offering Christ has perfected for ever
all them that are sanctified, then what need have these perfected
and sanctified ones of an advocate? Surely we must either admit the
thought of an imperfect atonement or deny the need of advocacy?
Such is the reasoning of the human mind, but such is not the faith of
Christians. Scripture does most surely teach us that the believer is
washed as white as snow; that he is accepted in the Beloved—
complete in Christ—perfectly forgiven and perfectly justified through
the death and resurrection of Christ; that he can never come into
judgment, but is passed from death unto life; that he is not in the
flesh, but in the Spirit—not in the old creation, but in the new—not a
member of the first Adam, but of the last; that he is dead to sin,
dead to the world, dead to the law, because Christ has died, and the
believer has died in Him. All this is largely unfolded and constantly
insisted upon by the inspired writers. Scores of passages might
easily be quoted in proof, were it needful.
But then there is another aspect of the Christian which must be
taken into account. He is not in the flesh as to the ground of his
standing, but he is in the body as to the fact of his condition. He is
in Christ as to his standing, but he is also in the world as to the fact
of his existence. He is surrounded by all sorts of temptations and
difficulties, and he is in himself a poor feeble creature full of
infirmities, not sufficient even to think anything as of himself. Nor is
this all. Each true Christian is ever ready to acknowledge that in him,
that is, in his flesh, there dwelleth no good thing. He is saved, thank
God, and all is eternally settled; but then he has, as a saved one, to
get through the wilderness; he has to labor to enter into God's rest,
and here it is that priesthood comes in. The object of priesthood is
not to complete the work of atonement, inasmuch as that work is as
perfect as the One who accomplished it. But we have to be carried
through the wilderness and brought into the rest that remains for
the people of God, and for this end we have a great High Priest who
is passed into the heavens, Jesus the Son of God. His sympathy and
succor are ours, and we could not get on for one moment without
them. He ever liveth to make intercession for us, and by His ministry
in the heavenly sanctuary He sustains us day by day in the full credit
and value of His atoning work. He lifts us up when we fall, restores
us when we wander, repairs the link of communion when snapped
by our carelessness. In a word, He appears in the presence of God
for us, and there carries on an uninterrupted service on our behalf,
in virtue of which we are maintained in the integrity of the
relationship into which His atoning death has introduced us.
Thus much as to the atonement and advocacy. It only remains for us
to treat of the advent. We wish specially to remind the reader that in
treating of the death of Christ we have left wholly untouched one
grand point therein, namely, our death in Him.[3] This we may, if
God permit, go into on another occasion. It is immensely important
as the power of deliverance from indwelling sin as well as from this
present evil world and from the law. There are many who merely
look to the death of Christ for pardon and justification, but they do
not see the precious and emancipating truth of their having died in
Him and their deliverance in consequence from the power of sin in
them. This latter is the secret of victory over self and the world, and
of deliverance from every form of legality and mere fleshly pietism.
Thus we have glanced at two of the weighty subjects presented to
us in the closing verses of Heb. ix., namely, first, the precious
atoning death of our Lord Jesus Christ in its two aspects; and
secondly, His all-prevailing advocacy at God's right hand for us. It
only remains for us to consider in the third place
HIS ADVENT,
which is here presented to us in immediate connection with those
great foundation truths which have already engaged our attention,
and which, moreover, are held and prized by all true Christians. Is it
true that Christ hath appeared in this world to put away sin by the
sacrifice of Himself? and to bear the sins of the many who through
grace put their trust in Him? Is it true that He has passed into the
heavens and taken His seat on the throne of God, there to appear
for us? Yes, blessed be God, these are grand, vital and fundamental
verities of the Christian faith. Well, then, it is equally true that He
shall appear again, apart from the question of sin, unto salvation.
"As it is appointed unto men once to die, but after this the
judgment: so Christ was once offered to bear the sins of many; and
unto them that look for Him shall He appear the second time apart
from sin unto salvation."
Here, then, we have the matter most definitely stated. As truly as
Christ hath appeared on this earth—as truly as He lay in the manger
of Bethlehem—was baptized in the waters of Jordan—was anointed
with the Holy Ghost—was tempted of the devil in the wilderness—
went about doing good, and healing all that were oppressed of the
devil—groaned, and wept, and prayed in Gethsemane—hung upon
Calvary's accursed tree, and died, the Just for the unjust—was laid in
the dark, silent tomb—rose victorious on the third day—ascended
into the heavens, there to appear in the presence of God for His
people—so truly shall He appear ere long in the clouds of heaven to
receive His people to Himself. If we refuse one we must refuse all. If
we question one we must question all. If we are unsettled as to one
we must be unsettled as to all, inasmuch as all rest upon precisely
the same basis, namely, the Holy Scriptures. How do I know that
Jesus hath appeared? Because Scripture tells me so. How do I know
that He doth appear? Because Scripture tells me so. How do I know
that He shall appear? Because Scripture tells me so.
In a word, then, the doctrine of the atonement, the doctrine of the
advocacy, and the doctrine of the advent all rest on one and the
same irrefragible foundation, namely, the simple declaration of the
word of God, so that if we receive one we must receive all.
How is it then that while the Church of God in all ages has held and
prized the doctrines of atonement and advocacy, she has practically
lost sight of the doctrine of the advent? How comes it to pass that
while the first two are regarded as essential, the last is deemed non-
essential? Nay, we may go further and say, how is it that while a
man who does not hold the first two is regarded as a heretic, and
justly so, yet the man who holds the last is by many regarded as
hardly sound in the faith or bringing in strange doctrine?
What answer can we give to these questions? Alas! alas! the Church
has ceased to look for her Lord. Atonement and advocacy are held
because they concern us; but the advent has been virtually let slip,
although it so deeply concerns Him. It is due to the One who
suffered and died on this earth that He should reign; to the One who
wore a crown of thorns that He should wear a crown of glory; to the
One who humbled Himself to the very dust of death that He should
be exalted and that every knee should yet bow before Him.
Most surely this is so; and the God and Father of our Lord Jesus
Christ will see to it and bring it to pass in His own appointed time.
"Sit Thou at My right hand, until I make Thine enemies Thy
footstool" (Ps. cx; Heb. i). The moment is rapidly approaching when
that blessed One who is now hidden from the eyes of men shall
appear in glory. Every eye shall see Him. As surely as He hung upon
the cross and is now seated on the throne, so surely shall He appear
in glory.
Reader, seeing these things are so, art thou among the number of
"those that look for Him?" This is a solemn question. There are those
who look for Him and there are those who do not. Now it is to the
former that He shall appear unto salvation. He will come and receive
His people unto Himself, that where He is, there they may be also
(John xiv). These are His own loving words, spoken at the moment
of His departure for the solace and comfort of His sorrowing
disciples. He counted on their being troubled at the thought of His
leaving them, and He seeks to comfort them by the assurance of His
coming back. He does not say, Let not your hearts be troubled, for
you shall soon follow Me. No; but "I will come again."
This is the proper hope of the Christian. Christ is coming. Are we
ready? Are we looking for Him? Do we miss Him? Do we mourn His
absence? It is impossible that we can be in the true attitude of
waiting for Him if we do not feel His absence. He is coming. He may
be here to-night. Ere another sun arises the voice of the archangel
and the blast of the trumpet may be heard in the air. And what
then? Why then the sleeping saints—all who have departed in the
faith of Christ—all the redeemed of the Lord whose ashes repose in
the graveyards and cemeteries around us or in the mighty depths of
the ocean—all these shall rise. The living saints shall be changed in a
moment, and all shall ascend up to meet the Lord in the air (1 Cor.
xv. 51-54; 1 Thess. iv. 13-v. 11).
But what of the unconverted—the unbelieving—the unrepentant—
the unprepared? What of all such? Ah! this is a question of awful
solemnity. It makes the heart sink to reflect upon the case of those
who are still in their sins—of those who have turned a deaf ear to all
the entreaties and all the warnings which God in His long-suffering
mercy has sent to them from week to week and year to year—of
those who have sat under the sound of the gospel from their earliest
days, and who have become, as we say, gospel-hardened. How
dreadful will be the condition of all such when the Lord comes to
receive His own! They shall be left behind to fall under the deep and
dark delusion which God will assuredly send upon all who have
heard and rejected the gospel. And what then? What is to follow this
deep and dark delusion? The deeper and darker damnation of the
lake that burneth with fire and brimstone.
Oh! shall we not sound a note of alarm in the ears of our fellow-
sinners? Shall we not more earnestly and solemnly warn them to flee
from the wrath to come? Shall we not seek by word and deed—by
the double testimony of the lips and the life—to set before them the
weighty fact that "the Lord is at hand"? May we feel it more deeply,
and then we shall exhibit it more faithfully. There is immense moral
power in the truth of the Lord's coming if it be really held in the
heart and not merely in the head. If Christians only lived in the
habitual expectation of the advent it would tell amazingly upon the
unconverted around them.
May the Holy Ghost revive in the hearts of all God's people the
blessed hope of their Lord's return, that they may be as men that
wait for their Lord, that when He cometh and knocketh they may
open unto Him immediately!
"THE TWO MUSTS."
In our Lord's discourse with Nicodemus He twice makes use of the
word "must"—a word of immense depth and moral power in both
cases. Let us ponder it for a few moments; for, though but a word of
one syllable, it contains a volume of most precious evangelical truth
in whichever light we view it.
I. And first, then, we read, "Marvel not that I said unto thee, Ye
must be born again." Here we have the total setting aside of man in
his very best estate. If I must be born again, if I must have a new
life, a new nature, then it matters not in the smallest degree what I
can or cannot boast of. Man, as born of a woman, enters this world
with the image of his fallen parent stamped upon him. Man, as he
came from the hand of his Creator, was made in the "image of God."
Man, as he issues from the womb of his mother, bears the image
and likeness of a fallen creature. Hence the force of our Lord's
expression, "Ye must be born again." It is not said, Ye must mend,
ye must try and be better, ye must alter your mode of living, ye must
turn over a new leaf. Had it been thus, Nicodemus would never have
asked, "How can these things be?" A man of the Pharisees would
have understood any or all of these things. A change of conduct, a
change of character, any moral reform, any self-improvement, is
perfectly intelligible to a Pharisee of every age; but to be told "Ye
must be born again" can only be understood by one who has
reached the end of himself and his doings; who has been brought to
see that in him, that is in his flesh, dwelleth no good thing; who sees
himself as a thorough bankrupt without a certificate, who can never
again set up on his own account. He must get a new life to which
the verdict of bankruptcy cannot apply, and he must trade in the
wealth of another, on which creditors have no possible claim.
There is immense power in this little word "must." It bears upon all
alike. It speaks to the drunkard, and says, "You must be born
again." It addresses the most rigid teetotaler, and says, "You must
be born again." It speaks to every class, to every condition, to every
grade and shade of character, to man in every rank and every clime,
to every creed and every denomination, in its own clear, emphatic,
sweeping style, and says, "You must be born again." It bears down
with far more weight upon the conscience than any appeal that
could be made on the ground of moral conduct. It does not interfere
in the least with the question of moral reform, in any one of its many
phases. It allows as broad a margin as any philanthropist or moral
reformer may desire. It does not disturb the various distinctions
which society, public opinion, law or equity has established. It leaves
all these things perfectly untouched, but it raises its clear and
commanding voice above them all, and says to the sinner—to man
as born of a woman—to the worst and to the best of men, "You
must be born again." It demands not reformation, but regeneration;
not amendment, but a new life.
II. What then, it may be asked, are we to do? Whither are we to
turn? How are we to get this new life? Our Lord's second "must"
furnishes the reply. "As Moses lifted up the serpent in the
wilderness, even so must the Son of man be lifted up: that
whosoever believeth in Him should not perish, but have eternal life."
This makes all plain. A second Man has entered the scene. There are
two men and two musts. As to the first man, he must be born again,
and as to the second Man, He must be lifted up. In a word, the
Cross is the grand solution of the difficulty, the divine answer to the
"How?" Am I completely struck down by the first "must"? Am I
overwhelmed by the insuperable difficulty which it proposes to me?
Am I on the very verge of despair as I contemplate the apparent
impossibility of what, nevertheless, must be? Oh then, with what
power does the second "must" fall on my heart! "The Son of man
must be lifted up." Why must He? Because I must have new life, and
this life is in the Son, but it could only be mine through His death.
The death of the second Man is the only ground of life to the first—
life to me. One look at Christ, is lifted up for me, is life eternal. The
soul that simply believes on the Son of God, as dead and risen, is
"born of water and of the Spirit;" he hath everlasting life—he is
passed from death unto life, from the old creation into the new, from
the first man to the Second, from guilt to righteousness, from
condemnation to favor, from darkness to light, from Satan to God.
May God the Spirit unfold to the reader's heart the beauty and
power, the depth, the comprehensiveness, and moral glory of the
two "musts."
"For the grace of God that bringeth salvation hath appeared to all
men, teaching us that, denying ungodliness and worldly lusts, we
should live soberly, righteously, and godly, in this present world;
looking for that blessed hope, and the glorious appearing of the
great God and our Saviour Jesus Christ; who gave Himself for us,
that He might redeem us from all iniquity, and purify unto Himself a
peculiar people, zealous of good works" (Titus ii. 11-14).
The veil is rent:—our souls draw near
Unto a throne of grace;
The merits of the Lord appear,
They fill the holy place.
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
textbookfull.com