HW_Diffusion_BME2000
pdf
keyboard_arrow_up
School
Cornell University *
*We aren’t endorsed by this school
Course
MISC
Subject
Mechanical Engineering
Date
Jan 9, 2024
Type
Pages
5
Uploaded by ColonelScience102929
1
Name:
netID:
Collaborators:
BME 2000 Homework #9 Diffusion
Due: Wednesday,
November
8, 11:59 pm on GradeScope
Please show your work. If you use code or spreadsheets, please upload a copy.
Simulation of oxygen diffusion in a metastatic liver lesion using Ansys
Problem Specification
Consider the steady-state diffusion problem discussed in class where we solve for the concentration of
oxygen in a spherical metastatic liver lesion. Consider the case where
࠵?
=1/2 where
࠵?
is defined as
࠵? =
࠵?
!
6
|࠵?
"
|
|࠵?
",$
|
1
|࠵?
&
|
There are two parts to this HW. In part I, you’ll perform a 3D Ansys simulation using the rectangular
coordinate system (RCS). In part II, you’ll perform a 2D axisymmetric Ansys simulation using the cylindrical
coordinate system (CCS).
The RCS solution was discussed in class by Dr. Bhaskaran and is also covered in the following tutorial:
https://courses.ansys.com/index.php/courses/3d-steady-diffusion/
The videos and documents available in this tutorial are helpful for completing this homework. Note the
videos don’t have audio. For generating the Ansys simulations, use the file called
Diffusion_Geometry_Mesh.wbpz
provided on Canvas in Modules>Unit 6. When you load this file into Ansys
Workbench, you will see that we have provided you with the following:
•
Geometry for the RCS solution: This means you can skip the Geometry part of the
Geometry &
Mesh
video in the tutorial.
•
Geometry and mesh for the (Cylindrical Coordinate System) CCS solution: This means you can start
with the Setup step in Ansys Workbench. Note there is not a tutorial specifically for the CCS case.
Answer the questions that follow in the sections below.
Part I: 3D solution in rectangular coordinate system (RCS)
1.
Governing equations in RCS
a.
State the governing equation for the RCS in scalar form. Include only non-zero terms. (2 pts)
b.
What is the unknown variable in the governing equation that we need to determine through the
simulation? (2 pts)
2
2.
Boundary conditions in RCS:
There is only one boundary in this case i.e. the surface of the sphere.
What is the boundary condition at the surface of the sphere for the
࠵? =
’
!
case? (2 pts)
3.
Numerical solution strategy:
As we have seen, the idea of discretization involves determining the
primary unknowns at selected points (the cell centers in the Fluent solver) rather than everywhere in the
domain. Briefly explain the strategy used to determine the primary unknowns at the cell centers. Hint:
This has been covered in class and is in Dr. Bhaskaran’s slides. (2 pts)
4.
Expected trends:
The same problem when cast in the spherical coordinate system (SCS) is a 1D
problem that can be solved by hand. This “hand solution” or analytical solution was presented in class.
From this solution, where do you expect the concentration of oxygen to be the lowest?
What is the
concentration at this location in the hand solution? (2 pts)
You will later be checking your 3D Ansys results against these results from the 1D hand solution.
5.
Mesh for RCS
: Generate the mesh for the sphere using the guidance in the tutorial. Present a snapshot
of your mesh. How many cells (i.e. elements) does your mesh contain? (2 pts)
6.
Mathematical model setup in Fluent for RCS
: In Fluent, you need to turn on the energy equation and
turn off the flow equations (and set the viscous model to laminar).
This is covered in the online tutorial.
Why are we turning off the flow equations and turning on the energy equation? Explain briefly. (2 pts)
3
Complete the setup of the governing equations and boundary conditions in Fluent by following the
videos in the tutorial.
7.
Numerical solution in Fluent for RCS:
Obtain the numerical solution to the governing equation and
boundary condition(s) on the mesh that you generate.
a.
During the numerical solution, how many algebraic equations does the Fluent solver need to
generate and solve to find the primary unknown(s) at the cell centers? Explain briefly. (2 pts)
b.
Present a snapshot of iterative convergence that is produced by Fluent after you hit Solve. What
conclusion can you draw from this plot?
(2 pts)
8.
Post-processing in CFD Post for RCS:
Present the following results.
a.
Filled contours of the concentration (i.e. temperature) variation in the xy plane. Please include a
screenshot. (2 pts)
Where is the concentration lowest and highest in your Ansys simulation results? Do the location
and value of the lowest concentration match your expectations from question 4 above? (2 pts)
In the 1D hand solution, we have assumed that the solution is only a function of
࠵?
, the distance
from the sphere center. Explain briefly if the Ansys contours are consistent with this assumption.
(2 pts)
b.
The variation of oxygen concentration along a line from
࠵? = 0
to
࠵? = ࠵?
,
࠵?
being the sphere
radius. You can generate this plot in CFD Post by creating a line and then adding a “Chart” plot.
Plot
࠵?
(or equivalently
࠵?
) on the horizontal axis and concentration on the vertical axis. (2 pts)
Add the corresponding curve for the 1D analytical solution in the SCS provided as a CSV file in
the tutorial under the Verification step. Distinguish between the curves by providing a legend. (2
pts)
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
4
Briefly comment on the comparison between the Ansys result and the 1D analytical solution.
What would you have to do in Ansys to make the comparison better? You don’t actually have to
do it in the interest of time. (2 pts)
Export these curves as a csv file using Export option in CFD post. You will need this later to
these results to those obtained in the CCS. (2 pts)
Part II: 2D axisymmetric solution in cylindrical coordinate system (CCS).
9.
Governing equations in CCS
a.
State the governing equation for the CCS in scalar form. Include only non-zero terms. (2 pts)
b.
What is the unknown appearing in the governing equation that we need to determine through the
simulation? (2 pts)
10.
Boundary conditions in CCS:
What are the boundary conditions in terms of the unknown variable? (2
pts)
11.
Mathematical model setup in Fluent for CCS
: Complete the setup of the governing equations and
boundary conditions in Fluent. Note there are no videos for this but you should be able to figure it out
based on what you have done above in RCS and also previously for axisymmetric flow in a cylindrical
duct.
What do you have to do in Fluent to switch to CCS? (2 pts)
12.
Numerical solution in Fluent for CCS:
Obtain the numerical solution to the governing equation and
boundary condition(s) on the mesh that you generate.
a.
During the numerical solution, how many algebraic equations does the Fluent solver need to
generate and solve to find the primary unknown(s) at the cell centers? Explain briefly. (2 pts)
13.
14.
Post-processing in CFD Post for CCS:
Present the following results.
a.
Filled contours of the concentration (i.e. temperature) variation in the 2D domain. (2 pts)
5
Explain briefly if the concentration variation you get in CCS matches what you got above using
the RCS. (2 pts)
b.
The variation of oxygen concentration along a line from
࠵? = 0
to
࠵? = ࠵?
,
࠵?
being the sphere
radius. Recall from the cylindrical duct case that you have to interpret
࠵?
as the axial coordinate
while using CCS. (2 pts)
Add the corresponding curves for the 1D analytical solution in the SCS and the 3D Ansys
solution in RCS to this plot. You can do this by reading in the csv file you exported above in
question 8b.
Distinguish between the curves by adding a legend. (2 pts)
Briefly comment on the comparison between the two Ansys results and the 1D analytical
solution. What is the advantage of using the CCS compared to the RCS? Hint: Think about the
number of algebraic equations solved in each case. (2 pts)
Related Questions
Motiyo
Add explanation
arrow_forward
1. For the following concentration expressions, indicate whether they are uniform or nonuniform
and in how many dimensions (OD, 1D, 2D, or 3D), and steady or unsteady. Then for the following
control volume and origin, and table of constants, use Excel or Matlab to graph profiles that
show how concentration changes within the control volume and over time to a limit of 20 for
the following: C(x,0,0,0), C(0,y,0,0), C(0,0,z,0) and C(0,0,0,t). On each graph, show which
parameters are held constant, the CV boundaries, and the point where all four plots overlap.
20
C(x=0)
10
a
0.0001
b
0.001
| 20
0.01
k
0.1
100
All of the following functions are C(space, time) and so not necessarily just x as suggested.
a. C,(x)= C,(x = 0)x exp{- ax}
arrow_forward
Help solve this USING MATLAB
arrow_forward
permanent-magnet (pm) genera x
Bb Blackboard Learn
L STAND-ALONE.mp4 - Google Dri x
O Google Drive: ülwgjuó jc lis u
O ME526-WindEnergy-L25-Shuja.p x
O File | C:/Users/Administrator/Desktop/KFUPM%20Term%232/ME526/ME526-WindEnergy-L25-Shuja.pdf
(D Page view
A Read aloud
T) Add text
V Draw
Y Highlight
O Erase
17
of 26
Wind Farms
Consider the arrangement of three wind turbines in the following schematic in which wind
turbine C is in the wakes of turbines A and B.
Given the following:
- Uo = 12 m/s
A
-XẠC = 500 m
-XBC = 200 m
- z = 60 m
- Zo = 0.3 m
U.
-r, = 20 m
B
- CT = 0.88
Compute the total velocity deficit, udef(C) and the velocity at wind turbine C, namely Vc.
Activate Windows
Go to Settings to activate Windows.
Wind Farms (Example Answer)
5:43 PM
A 4)) ENG
5/3/2022
I!
arrow_forward
Matlab coding
arrow_forward
I need help with my MATLAB code. I am trying to plot the semi major axis and eccentricity with the following code with rungge kutta method. I have two different nnn's in the code which produce two different step sizes. So, I am wondering why both give the same exact plots for semi-major axis and eccentricity. The orbital dynamics fucntion considers J2, drag, SRP, and third body effects.
% Orbital elements obtained from TLE
inc = 63.5000118; % Inclination (degs)
raan = 19.999977; % RAAN (degs)
ecc = 0.001; % Eccentricity
argp = 120.02165342; % argument of perigee (degs)
v = 0; % True anomaly (degs)
a = 6584.697271; % Semi-major axis (km)
mu = 3.986e5;
period = (2*pi*sqrt((a^3)/mu));
% Calculating the state vector in eci frame
[x, y, z, vx, vy, vz] = kep2cart(a, ecc, inc, raan, argp, v);
Y = [x, y, z, vx, vy, vz];
options = odeset('RelTol', 1e-12, 'AbsTol', 1e-12);
nnn1 = 800;
t_step1 = period/nnn1;
m6 = 50;
h_step6 = t_step1/m6;
t_total6 = 0:h_step6:10*period;
[t6,…
arrow_forward
I need help in the following MATLAB code. How do I add the code to answer the following question "Do you find more object detections in the image than the one that is cropped out? Explain how you would discriminate that from a dead pixel, a hot pixel, or a cosmic ray event."
fname = '00095337.fit';
fInfo = fitsinfo(fname);
img = fitsread(fname);
% Crop the image to show just the object:
img_cropped = img(1980:2030,1720:1780);
% Load the labeled image
img_labeled = imread('00095337_labeled_stars.png');
img_labeled = img_labeled(102:863,605:1363,:);
% Get rid of "hot" pixels (cosmic rays, disfunctional pixels)
max_acceptable_value = 1300;
img(img>max_acceptable_value) = max_acceptable_value;
% Plot the images
f1 = figure();
tgroup1 = uitabgroup('Parent',f1);
tab(1) = uitab('Parent', tgroup1, 'Title', 'Raw image');
ax(1) = axes('parent',tab(1));
imagesc(img)
axis equal
axis([0,size(img,2),0,size(img,1)]+0.5)
colormap(gray(256));
xlabel('x [px]')
ylabel('y [px]')…
arrow_forward
I need help coding in MATLAB. I have a .txt file containing the following data. That data is saved in a file named data.txt. I am wondering how I could extract all or some of that data into another .m file. Can you show me the code.
[[5.0018696581196584, 17.863820207570207, -13.086858974358975], [5.0018696581196584, 17.863820207570207, -13.086858974358975], [5.0018696581196584, 17.863820207570207, -13.086858974358975]]
arrow_forward
Hello tutors, help me. Just answer "Let Us Try"
arrow_forward
I need help solving this problem.
arrow_forward
For the following concentration expressions, indicate whether they are uniform or nonuniform
and in how many dimensions (OD, 1D, 2D, or 3D), and steady or unsteady. Then for the following
control volume and origin, and table of constants, use Excel or Matlab to graph profiles that
show how concentration changes within the control volume and over time to a limit of 20 for
the following: C(x,0,0,0), C(0,y,0,0), c(0,0,z,0) and C(0,0,0,t). On each graph, show which
parameters are held constant, the CV boundaries, and the point where all four plots overlap.
20
C(x=0)
10
a
0.0001
b
0.001
20
0.01
y
k
0.1
100
All of the following functions are C(space, time) and so not necessarily just x as suggested.
a. C,(x)= C,(x = 0)x exp{- ax}
d. C, (x) = C, (x = 0)x exp{-ax}x exp{- by² }x exp{-cz²}x exp{- kt}
arrow_forward
Identify the lines
arrow_forward
Please help me Matlab
arrow_forward
Please do not rely too much on chatgpt, because its answer may be wrong. Please consider it carefully and give your own answer. You can borrow ideas from gpt, but please do not believe its answer.Very very grateful!
Please do not copy other's work,i will be very very grateful!!
arrow_forward
Don't Use Chat GPT Will Upvote And Give Handwritten Solution Please
arrow_forward
Please help me. thank u!
arrow_forward
Engr 215 Matlab
Fahrenheit to Celsius using multiple statements
Given a Fahrenheit value temperatureFahrenheit, write a statement that assigns temperatureCelsius with the equivalent Celsius value.
While the equation is C = 5/9 * (F - 32), as an exercise use two statements, the first of which is "fractionalMultiplier = 5/9;"]
arrow_forward
Don't Use Chat GPT Will Upvote And Give Handwritten Solution Please
arrow_forward
As shown in figure a Pepsi can and a plastic Pepsi bottle. Describe how they were manufactured
arrow_forward
SEE MORE QUESTIONS
Recommended textbooks for you

Principles of Heat Transfer (Activate Learning wi...
Mechanical Engineering
ISBN:9781305387102
Author:Kreith, Frank; Manglik, Raj M.
Publisher:Cengage Learning
Related Questions
- Motiyo Add explanationarrow_forward1. For the following concentration expressions, indicate whether they are uniform or nonuniform and in how many dimensions (OD, 1D, 2D, or 3D), and steady or unsteady. Then for the following control volume and origin, and table of constants, use Excel or Matlab to graph profiles that show how concentration changes within the control volume and over time to a limit of 20 for the following: C(x,0,0,0), C(0,y,0,0), C(0,0,z,0) and C(0,0,0,t). On each graph, show which parameters are held constant, the CV boundaries, and the point where all four plots overlap. 20 C(x=0) 10 a 0.0001 b 0.001 | 20 0.01 k 0.1 100 All of the following functions are C(space, time) and so not necessarily just x as suggested. a. C,(x)= C,(x = 0)x exp{- ax}arrow_forwardHelp solve this USING MATLABarrow_forward
- permanent-magnet (pm) genera x Bb Blackboard Learn L STAND-ALONE.mp4 - Google Dri x O Google Drive: ülwgjuó jc lis u O ME526-WindEnergy-L25-Shuja.p x O File | C:/Users/Administrator/Desktop/KFUPM%20Term%232/ME526/ME526-WindEnergy-L25-Shuja.pdf (D Page view A Read aloud T) Add text V Draw Y Highlight O Erase 17 of 26 Wind Farms Consider the arrangement of three wind turbines in the following schematic in which wind turbine C is in the wakes of turbines A and B. Given the following: - Uo = 12 m/s A -XẠC = 500 m -XBC = 200 m - z = 60 m - Zo = 0.3 m U. -r, = 20 m B - CT = 0.88 Compute the total velocity deficit, udef(C) and the velocity at wind turbine C, namely Vc. Activate Windows Go to Settings to activate Windows. Wind Farms (Example Answer) 5:43 PM A 4)) ENG 5/3/2022 I!arrow_forwardMatlab codingarrow_forwardI need help with my MATLAB code. I am trying to plot the semi major axis and eccentricity with the following code with rungge kutta method. I have two different nnn's in the code which produce two different step sizes. So, I am wondering why both give the same exact plots for semi-major axis and eccentricity. The orbital dynamics fucntion considers J2, drag, SRP, and third body effects. % Orbital elements obtained from TLE inc = 63.5000118; % Inclination (degs) raan = 19.999977; % RAAN (degs) ecc = 0.001; % Eccentricity argp = 120.02165342; % argument of perigee (degs) v = 0; % True anomaly (degs) a = 6584.697271; % Semi-major axis (km) mu = 3.986e5; period = (2*pi*sqrt((a^3)/mu)); % Calculating the state vector in eci frame [x, y, z, vx, vy, vz] = kep2cart(a, ecc, inc, raan, argp, v); Y = [x, y, z, vx, vy, vz]; options = odeset('RelTol', 1e-12, 'AbsTol', 1e-12); nnn1 = 800; t_step1 = period/nnn1; m6 = 50; h_step6 = t_step1/m6; t_total6 = 0:h_step6:10*period; [t6,…arrow_forward
- I need help in the following MATLAB code. How do I add the code to answer the following question "Do you find more object detections in the image than the one that is cropped out? Explain how you would discriminate that from a dead pixel, a hot pixel, or a cosmic ray event." fname = '00095337.fit'; fInfo = fitsinfo(fname); img = fitsread(fname); % Crop the image to show just the object: img_cropped = img(1980:2030,1720:1780); % Load the labeled image img_labeled = imread('00095337_labeled_stars.png'); img_labeled = img_labeled(102:863,605:1363,:); % Get rid of "hot" pixels (cosmic rays, disfunctional pixels) max_acceptable_value = 1300; img(img>max_acceptable_value) = max_acceptable_value; % Plot the images f1 = figure(); tgroup1 = uitabgroup('Parent',f1); tab(1) = uitab('Parent', tgroup1, 'Title', 'Raw image'); ax(1) = axes('parent',tab(1)); imagesc(img) axis equal axis([0,size(img,2),0,size(img,1)]+0.5) colormap(gray(256)); xlabel('x [px]') ylabel('y [px]')…arrow_forwardI need help coding in MATLAB. I have a .txt file containing the following data. That data is saved in a file named data.txt. I am wondering how I could extract all or some of that data into another .m file. Can you show me the code. [[5.0018696581196584, 17.863820207570207, -13.086858974358975], [5.0018696581196584, 17.863820207570207, -13.086858974358975], [5.0018696581196584, 17.863820207570207, -13.086858974358975]]arrow_forwardHello tutors, help me. Just answer "Let Us Try"arrow_forward
- I need help solving this problem.arrow_forwardFor the following concentration expressions, indicate whether they are uniform or nonuniform and in how many dimensions (OD, 1D, 2D, or 3D), and steady or unsteady. Then for the following control volume and origin, and table of constants, use Excel or Matlab to graph profiles that show how concentration changes within the control volume and over time to a limit of 20 for the following: C(x,0,0,0), C(0,y,0,0), c(0,0,z,0) and C(0,0,0,t). On each graph, show which parameters are held constant, the CV boundaries, and the point where all four plots overlap. 20 C(x=0) 10 a 0.0001 b 0.001 20 0.01 y k 0.1 100 All of the following functions are C(space, time) and so not necessarily just x as suggested. a. C,(x)= C,(x = 0)x exp{- ax} d. C, (x) = C, (x = 0)x exp{-ax}x exp{- by² }x exp{-cz²}x exp{- kt}arrow_forwardIdentify the linesarrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Principles of Heat Transfer (Activate Learning wi...Mechanical EngineeringISBN:9781305387102Author:Kreith, Frank; Manglik, Raj M.Publisher:Cengage Learning

Principles of Heat Transfer (Activate Learning wi...
Mechanical Engineering
ISBN:9781305387102
Author:Kreith, Frank; Manglik, Raj M.
Publisher:Cengage Learning