Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Background Ultrafiltration is a process used for the concentration and purification of macromolecular solutions, particularly in the bioprocessing industries. It is a type of membrane
Background
Ultrafiltration is a process used for the concentration and purification of macromolecular solutions, particularly in the bioprocessing industries. It is a type of membrane filtration that separates particles based on their size and shape. In the feed and bleed configuration, a portion of the product stream retentate is recycled back into the feed, which increases the mass transfer coefficient in the module, leading to higher permeate filtrate flowrates, shown in Figure Typically, the flowrate through the module greatly exceeds the inlet flowrate, and thus the system can reasonably be assumed to be well mixed, ie the retentate concentration is taken to be the same as the mean concentration in the module itself. For this assignment, we look at the continuous concentration of a protein solution. Here c is the concentration of protein. It was found that no protein passes through the membrane at any time, ie permeates protein concentration cPer is equal to zero. The system can be assumed to be well mixed, which leads to the retentate concentration is equal to the mean module concentration.
For this assignment, we assume that the gel polarisation model applies, ie the permeate flux across the membrane j is:
jklncgcret
where k is the mass transfer coefficient assumed constant cg is the limiting or gel concentration constant and cret is the retentate concentration.
The solute balance for the system, assuming no proteins go through the membrane. where Vdotin is the feed volumetric flowrate, cin is the feed concentration, cret is the retentate concentration and Vdotret is the retentate flowrate where A is the membrane area.
Substituting Vdotret from the solute balance Equation
into solvent balance Equation
leads to the flux function:
jV dotinA cincret
Task :
A protein solution with a concentration of g L is fed into a singlestage continuous feed and bleed ultrafiltration system at a rate of L min The gel concentration, cg is g L The system has a mass transfer coefficient of x m s and an area of m Use the Newton method to compute the retentate concentration.
Arrange Equation and as a single equation in a form suitable for the Newtons method with cRet as the unknown variable.
SOLVE THIS USING PYTHON CODE. AND THE myfsolve function below to solve for solution cret. And graph it by importing matplotlib and numpy the import code is provided below
Importing matplotlib and numpy into python:
# essential packages
import numpy as np # to perform vector and matrix calculations
import matplotlib.pyplot as plt # for plotting results
config InlineBackend.figureformat 'retina'
And the Newton Methode python code named as myfsolve:
#my fsolve
def myfsolvefunfunprime,xargsdetailedoutputFalse:
find the root of a single variable non linear function
inputs
fun...function that takes at least one argument, ie fxab
funprime...first derivative of fun
xstarting estimate of the root
args: tuple optional,any extra arguments to fun and funprime
detailedoutput: bool, optional, if true displays Newton steps
returns
xnew... the solution result of the last iteration
exitflag.. or no solutionsolution
msgmessage on success
# termination conditions
nmax # maximum iterations
xTole # elative error between two consecutive iterates
fTole # function value
exitflag
# Loop through Newton Method
for i in rangenmax:
# get function values for fun and funprime
funxfunxargs
funprimexfunprimexargs
# Newton iteration
xnew x funx funprimex
# display iteration results
if detailedoutput:
# create header
if i:
printfiteration t xtt fx
print
else:
printfi:dtt x:ftt funx:e
# check if accuracy is reached
funxnewfunxnew,args
if npabsxnewxxnew
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started