logo

Difference Equations : Python code | Question and Answer

Create a python code to calculate how many hours the safety team can work based on the given toxic exposure model.

14 Pages1941 Words22 Views
   

Added on  2022-09-01

Difference Equations : Python code | Question and Answer

Create a python code to calculate how many hours the safety team can work based on the given toxic exposure model.

   Added on 2022-09-01

ShareRelated Documents
Running head: Difference Equations
Difference Equations
Student Name:
Student ID:
University Name:
Paper Code:
Difference Equations : Python code | Question and Answer_1
Difference Equations2
Table of Contents
Question 1........................................................................................................................................3
Question 2.1.....................................................................................................................................4
Question 2.2.....................................................................................................................................5
Question 2.3.....................................................................................................................................8
Bibliography....................................................................................................................................9
Appendix........................................................................................................................................10
Question 1 Python code.............................................................................................................10
Question 2.1 Python code..........................................................................................................10
Question 2.2 Python code..........................................................................................................11
Question 2.3 Python code..........................................................................................................14
Difference Equations : Python code | Question and Answer_2
Difference Equations3
Question 1
Solution:
Suppose that the cloth of the suit can neutralize 30% of the toxic chemical contained
within it per hour. Suppose that during periods of exposure, the suit encounters 12 mg of the
chemical per hour. Suppose that standards for human indicate that such suits are safe for use
until they contain 35 mg of the toxic chemical.
We can model the amount of chemical in the suits using the difference equation:
Where:
n = time in hours
an = amount of chemical in the suit after n hours
a0= 0
Figure 1: Graph with amount of chemical in the suits over time
an=0.7 an1+12
Difference Equations : Python code | Question and Answer_3
Difference Equations4
According to figure 1 it can be said that up to 5 hours the safety team can work without
having to change their suits. In figure 1 the orange line shows the border or the threshold, up to
which the suits are safe for use, if exceeded then it be harmful for the humans.
The python code for the same has been attached in the appendix section of the report
which can be run using spyder IDE also proper comments has been added to each line for proper
understanding.
Question 2.1
Solution:
A density dependence model is built to predict population dynamics, both with and
without a delay (or time lag)
Using a=0.001, R=2, b=2, N0=4 and with 100 time-steps the graph has been shown below-
Figure 2: Graph showing density dependent model with and without delay
Difference Equations : Python code | Question and Answer_4

End of preview

Want to access all the pages? Upload your documents or become a member.