Skip to content

Conversation

@fenggao-git
Copy link

@adowling2 adowling2 changed the title Add files via upload Feng (Project 1) Dec 5, 2023
@adowling2 adowling2 changed the base branch from main to contributed-notebooks December 6, 2023 13:39
Copy link
Contributor

@adowling2 adowling2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see feedback below.

"id": "zEE6J3UhC1vu"
},
"source": [
"### 1A Calculating Alcohol Ingestion\n",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing "." to be consistent with other subsection titles.

"id": "rFj5qSrOM1H9"
},
"source": [
"**Discussion:**"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please provide answers to all discussion questions.

"source": [
"This function solves the ODE for dCa/dt, dCb/dt, and dBAC/dt that you made in part 1B.\n",
"\n",
"**Its important to note that this ODE assumes that a person of \"m\" weight drinks \"n\" number of drinks on a moderatley full stomach at a given rate then stops.**"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please rephrase. I think you are saying that $k_1$ and $k_2$ in the model assume a [fill in details about person] consumes [fill in] drinks. Make this statement more specific.

{
"cell_type": "markdown",
"source": [
"## 1D. Example of Forward Euler Method for ODEs\n",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This contribution is confusing. Is the main goal to practice forward Euler? Or is the main goal to compare the full kinetic and simplified kinetic models? Please make this more clear. If the later, remove the forward Euler and restructure to emphasize comparing different models. Use the same integration scheme as earlier in the notebook.

},
"outputs": [],
"source": [
"def SolveODE(CT, tmax, f):\n",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change function name to solve_ode. Best practice in Python is to not capitalize function names (that often means classes).

},
"outputs": [],
"source": [
"def Model_info(n, m, tmax):\n",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a more descriptive function name. Model_info is ambiguous.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Likewise, the doc string does not explain what the function does.

"# Add your solution here\n",
"### BEGIN SOLUTION\n",
"# Plot CA and BAC\n",
"fig, ax1 = plt.subplots(figsize=(6.4, 4), dpi=100)\n",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The font sizes in the axes labels and axes numbers are too small. Please see the instructions for publication quality plots.

"id": "VK-3NOub6R64"
},
"source": [
"**Discussion:**"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please provide answers to all discussion questions.

{
"cell_type": "code",
"source": [
"def forward_euler(k, C0, tmax, dt):\n",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function combines the logic for Euler's method with the specifics of the model. This is NOT best practice. Instead, we want to separate the logic for the general numerical method from the model details. Please see examples on the class website. Alternately, please remove Euler's method to instead focus on comparing the models.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants