cell_dependencies$19ce8f1c-dde2-445f-9ec0-40ccf92e85b1precedence_heuristic cell_id$19ce8f1c-dde2-445f-9ec0-40ccf92e85b1downstream_cells_mapupstream_cells_map@md_strgetindex$0aac480a-960e-4527-ba8c-1b6bcbe7e1feprecedence_heuristic cell_id$0aac480a-960e-4527-ba8c-1b6bcbe7e1fedownstream_cells_mapupstream_cells_map@md_strgetindex$d3fd07b8-0fef-4e7f-b27e-172519fa5ecaprecedence_heuristiccell_id$d3fd07b8-0fef-4e7f-b27e-172519fa5ecadownstream_cells_mapPlotsupstream_cells_map$53a7e44d-c430-4eba-b7a6-43c593ed2deaprecedence_heuristic cell_id$53a7e44d-c430-4eba-b7a6-43c593ed2deadownstream_cells_mapupstream_cells_map@md_strgetindex$80869746-c520-45d8-a155-971644d51d03precedence_heuristic cell_id$80869746-c520-45d8-a155-971644d51d03downstream_cells_mapupstream_cells_map@md_strgetindexcell_execution_order$d3fd07b8-0fef-4e7f-b27e-172519fa5eca$53a7e44d-c430-4eba-b7a6-43c593ed2dea$0aac480a-960e-4527-ba8c-1b6bcbe7e1fe$19ce8f1c-dde2-445f-9ec0-40ccf92e85b1$80869746-c520-45d8-a155-971644d51d03last_hot_reload_timeprocess_statusreadypathO/home/runner/work/sahu-lab.github.io/sahu-lab.github.io/teach/che348/ps08-qs.jlpluto_versionv1.0.3cell_order$d3fd07b8-0fef-4e7f-b27e-172519fa5eca$53a7e44d-c430-4eba-b7a6-43c593ed2dea$0aac480a-960e-4527-ba8c-1b6bcbe7e1fe$19ce8f1c-dde2-445f-9ec0-40ccf92e85b1$80869746-c520-45d8-a155-971644d51d03julia_versionv1.11.9published_objectsnbpkgwaiting_for_permission,waiting_for_permission_but_probably_disabled²installed_versions!__internal_julia_manifest_version1.11.9Plots1.40.8__internal_julia_version1.11.9terminal_outputsnbpkg_sync; Waiting for other notebooks to finish Pkg operations... === Resolving... === ┌ Warning: Pkg operation failed. Fixing stdlib dependencies and trying again... └ @ GracefulPkg ~/.julia/packages/GracefulPkg/GQ6My/src/apply strategies.jl:96 Resolving... ===  No Changes to `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_cmoivcmqbn/Project.toml`  No Changes to `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_cmoivcmqbn/Manifest.toml` Instantiating... === Precompiling... === Waiting for notebook process to start... Done. Starting precompilation...Plots; Waiting for other notebooks to finish Pkg operations... === Resolving... === ┌ Warning: Pkg operation failed. Fixing stdlib dependencies and trying again... └ @ GracefulPkg ~/.julia/packages/GracefulPkg/GQ6My/src/apply strategies.jl:96 Resolving... ===  No Changes to `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_cmoivcmqbn/Project.toml`  No Changes to `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_cmoivcmqbn/Manifest.toml` Instantiating... === Precompiling... === Waiting for notebook process to start... Done. Starting precompilation...enabledìinstantiated÷restart_recommended_msgrestart_required_msginstall_time_nsΤybusy_packagescell_inputs$19ce8f1c-dde2-445f-9ec0-40ccf92e85b1cell_id$19ce8f1c-dde2-445f-9ec0-40ccf92e85b1codeCmd""" - For a given temperature $$T < T_{\textrm{c}}$$, plot the van der Waals equation of state. In this example, choose $$T = 0.25$$ - From your plot, you should notice that the coexistence pressure will intersect the van der Waals curve three times. However, we don't know what the coexistence pressure is - Guess some value of the coexistence pressure, which we will call $$\bar{p}$$. Numerically determine the three volumes where $$p^{}_{\text{vdW}} = \bar{p}$$. In doing so, you can use the plot to help you. - Numerically determine the difference of the areas of region I and region II in the above figure, for your chosen value of $$\bar{p}$$. Adjust $$\bar{p}$$ manually (by hand) until the difference in areas is less than $$10^{-4}$$. Make sure you use at least 100 elements in your area calculation. """metadatashow_logsèdisabled®skip_as_script«code_folded$0aac480a-960e-4527-ba8c-1b6bcbe7e1fecell_id$0aac480a-960e-4527-ba8c-1b6bcbe7e1fecodemd""" ## Maxwell construction $$\textcolor{red}{\texttt{[8]}}$$ As you will learn in your thermodynamics course, the portions of the van der Waals equation between the two spinodal points you calculated last week are unstable, and thus unphysical. In what follows, we would like to understand how the van der Waals equation of state predicts phase coexistince between a liquid phase (low specific volume) and a vapor phase (high specific volume). At any temperature $$T < T_{\text{c}}$$, we employ the [Maxwell construction](https://en.wikipedia.org/wiki/Maxwell_construction). Consider, for example, the isotherm below. ![](https://upload.wikimedia.org/wikipedia/commons/a/a9/VdW_subcritical_Isotherm.png) The curved, dashed grey line between points E and C is unphysical. We calculate the pressure of vapor--liquid coexistence by realizing that the chemical potentials of the two phases are equal at equilibrium. With some thermodynamic manipulations, one can show that the equality of chemical potentials requires the area of region I be equal to that of region II. In what follows, we will numerically determine the phase coexistence pressure at some temperature $$T < T_{\text{c}}$$. """metadatashow_logsèdisabled®skip_as_script«code_folded$d3fd07b8-0fef-4e7f-b27e-172519fa5ecacell_id$d3fd07b8-0fef-4e7f-b27e-172519fa5ecacodebegin using Plots endmetadatashow_logsèdisabled®skip_as_script«code_folded$53a7e44d-c430-4eba-b7a6-43c593ed2deacell_id$53a7e44d-c430-4eba-b7a6-43c593ed2deacodeFmd""" # Q2. Van der Waals fluid (continued) $$\textcolor{red}{\texttt{[14]}}$$ We continue our analysis of the van der Waals fluid, with a dimensionless equation of state given by ```math p \, = \, \dfrac{T}{v - 1} \, - \, \dfrac{1}{v^2} ~. ``` Please feel free to copy or reuse any functions from last week's solutions. """metadatashow_logsèdisabled®skip_as_script«code_folded$80869746-c520-45d8-a155-971644d51d03cell_id$80869746-c520-45d8-a155-971644d51d03codemd""" ## Conceptual question $$\textcolor{red}{\texttt{[6]}}$$ Notice that in trying to find a good estimate of $$\bar{p}$$, you likely had to try many different values. Instead, let's think about how you'd determine $$\bar{p}$$ numerically. How would you determine the coexistence pressure using the bisection method? How would you determine it using fixed-point iteration? Please be specific, providing enough (written) details so that we are convinced that you could implement this if asked to. """metadatashow_logsèdisabled®skip_as_script«code_foldedënotebook_id$992a398e-9d9d-11f1-1ca9-85f8449a96f2bondscell_results$19ce8f1c-dde2-445f-9ec0-40ccf92e85b1queued¤logsrunning¦outputbody
persist_js_state¤mimetext/htmllast_run_timestampAڢ,Χhas_pluto_hook_features¬rootassigneecell_id$19ce8f1c-dde2-445f-9ec0-40ccf92e85b1depends_on_disabled_cells§runtime 20published_object_keysdepends_on_skipped_cells§errored$0aac480a-960e-4527-ba8c-1b6bcbe7e1fequeued¤logsrunning¦outputbody

Maxwell construction $\textcolor{red}{\texttt{[8]}}$

As you will learn in your thermodynamics course, the portions of the van der Waals equation between the two spinodal points you calculated last week are unstable, and thus unphysical. In what follows, we would like to understand how the van der Waals equation of state predicts phase coexistince between a liquid phase (low specific volume) and a vapor phase (high specific volume). At any temperature $T < T_{\text{c}}$, we employ the Maxwell construction. Consider, for example, the isotherm below.

The curved, dashed grey line between points E and C is unphysical. We calculate the pressure of vapor–liquid coexistence by realizing that the chemical potentials of the two phases are equal at equilibrium. With some thermodynamic manipulations, one can show that the equality of chemical potentials requires the area of region I be equal to that of region II. In what follows, we will numerically determine the phase coexistence pressure at some temperature $T < T_{\text{c}}$.

persist_js_state¤mimetext/htmllast_run_timestampAڢ,ghas_pluto_hook_features¬rootassigneecell_id$0aac480a-960e-4527-ba8c-1b6bcbe7e1fedepends_on_disabled_cells§runtime published_object_keysdepends_on_skipped_cells§errored$d3fd07b8-0fef-4e7f-b27e-172519fa5ecaqueued¤logsrunning¦outputbodypersist_js_state¤mimetext/plainlast_run_timestampAڢ,Uҷhas_pluto_hook_features¬rootassigneecell_id$d3fd07b8-0fef-4e7f-b27e-172519fa5ecadepends_on_disabled_cells§runtimeH둵published_object_keysdepends_on_skipped_cells§errored$53a7e44d-c430-4eba-b7a6-43c593ed2deaqueued¤logsrunning¦outputbodyb

Q2. Van der Waals fluid (continued) $\textcolor{red}{\texttt{[14]}}$

We continue our analysis of the van der Waals fluid, with a dimensionless equation of state given by

$$p \, = \, \dfrac{T}{v - 1} \, - \, \dfrac{1}{v^2} ~.$$

Please feel free to copy or reuse any functions from last week's solutions.

persist_js_state¤mimetext/htmllast_run_timestampAڢ,has_pluto_hook_features¬rootassigneecell_id$53a7e44d-c430-4eba-b7a6-43c593ed2deadepends_on_disabled_cells§runtimepublished_object_keysdepends_on_skipped_cells§errored$80869746-c520-45d8-a155-971644d51d03queued¤logsrunning¦outputbody

Conceptual question $\textcolor{red}{\texttt{[6]}}$

Notice that in trying to find a good estimate of $\bar{p}$, you likely had to try many different values. Instead, let's think about how you'd determine $\bar{p}$ numerically. How would you determine the coexistence pressure using the bisection method? How would you determine it using fixed-point iteration? Please be specific, providing enough (written) details so that we are convinced that you could implement this if asked to.

persist_js_state¤mimetext/htmllast_run_timestampAڢ,ȓhas_pluto_hook_features¬rootassigneecell_id$80869746-c520-45d8-a155-971644d51d03depends_on_disabled_cells§runtime&published_object_keysdepends_on_skipped_cells§errored©shortpathps08-qs.jllast_save_timeAڢ,vin_temp_dir¨metadata