{"id":1071,"date":"2018-04-27T23:30:11","date_gmt":"2018-04-28T03:30:11","guid":{"rendered":"http:\/\/underthehood.blogwyrm.com\/?p=1071"},"modified":"2023-05-07T06:43:06","modified_gmt":"2023-05-07T10:43:06","slug":"continuum-mechanics-2-material-derivative-numerical-examples","status":"publish","type":"post","link":"https:\/\/underthehood.blogwyrm.com\/?p=1071","title":{"rendered":"Continuum Mechanics 2 &#8211; Material Derivative Numerical Examples"},"content":{"rendered":"<p>Last month\u2019s post began a detailed study of continuum mechanics by looking at the general structure of the formalism and the specific linkage between the Lagrangian point-of-view, which co-moves along with a material element, and the Eulerian point-of-view, which focuses on specific locations and times as material elements move into and out of these locations.<\/p>\n<p>The material derivative,<\/p>\n<p>\\[ \\frac{d}{dt} f = \\frac{\\partial f}{\\partial t} + \\vec v \\cdot \\vec \\nabla f \\; , \\]<\/p>\n<p>provides the connection between these points-of-view, relating the time rate-of-change of the field $$f(t,\\vec r)$$ as seen by the material element to the derivatives of the field at the instant that element passes through the position $$\\vec r$$.<\/p>\n<p>While the derivation of the material derivative given in the last post is mathematically correct, its abstract nature is difficult to internalize.\u00a0 This post presents the material derivative in a variety of contexts to drive home the equivalence between the two points-of-view.<\/p>\n<p>The physical model employed, consists of a material element, a small bit of fluid or elastic material (with enough internal cohesion that is stays as a discernable element), in motion around the Earth, which is, in turn, heated by the Sun.\u00a0 The temperature that the element sees varies as it moves relative to the Earth-Sun line and with time as the Earth moves along its own orbit around the Sun, getting closer or further as the seasons change.<\/p>\n<p>For simplicity, the geometry will be assumed 2-dimensional and will be, predominantly, described in plane polar coordinates $$r$$ and $$\\theta$$.<\/p>\n<p>The trajectory will be written as a product a radius function $$R(t) = R_0 + at$$ and a simple linear function for the polar angle $$\\Theta = \\omega t$$ associated with uniform circular motion ($$a$$ and $$\\omega$$ are constants.\u00a0 Depending on the context, the resulting trajectory may be expressed in either cartesian form as<\/p>\n<p>\\[ \\vec R(t) = (R_0 + at) \\left[ \\cos(\\omega t) \\hat e_x + \\sin (\\omega t) \\hat e_y \\right] \\;\\]<\/p>\n<p>and<\/p>\n<p>\\[ \\vec V(t) = (R_0 + at) \\left[ -\\sin(\\omega t) \\hat e_x + \\cos(\\omega t) \\hat e_y \\right] \\\\ + at \\left[ \\cos(\\omega t) \\hat e_x + \\sin(\\omega t) \\right] \\hat e_y \\; , \\]<\/p>\n<p>for the position and velocity, respectively, or<\/p>\n<p>\\[ \\vec R(t) = (R_0 + at) \\hat e_r(t) \\; \\]<\/p>\n<p>and<\/p>\n<p>\\[ \\vec V(t) = (R_0 + at) \\hat e_{\\theta}(t) + at \\hat e_r(t) \\; , \\]<\/p>\n<p>for the same in polar form.<\/p>\n<p>Similarly, the temperature field will be written in separable form as a product of 3 functions, $$T_r$$, $$T_{\\theta}$$, and $$T_t$$, which are functions solely of $$r$$, $$\\theta$$, and $$t$$, respectively.\u00a0 This last assumption, done for convenience, represents no loss of generality.\u00a0 The specific form of each of these will be tailored to each of the three scenarios presented below.<\/p>\n<p>In each scenario, the rate-of-change seen by the element (Lagrangian point-of-view) is calculated by the following process.\u00a0 The position and velocity of the element is evaluated at tabulated times to produce an ephemeris, the temperature is measured at each of the ephemeris points, and then the time rate-of-change of the measured temperature is constructed by using the central difference approximation to the derivative given by<\/p>\n<p>\\[ \\frac{d}{dt} T = \\frac{T(t+\\Delta t) &#8211; T(t-\\Delta t)}{2 t} \\; .\\]<\/p>\n<p>These values for the time rate-of-change define \u2018truth\u2019 in the Lagrangian point-of-view and will be the values against which we will judge the material derivative computation in the Eulerian point-of-view.<\/p>\n<h1>Scenario 1 \u2013 Time-independent Temperature Field Encountered in a Circular Orbit<\/h1>\n<p>In this scenario, the material element moves in a circular orbit ($$a=0$$) through the temperature field, defined by<\/p>\n<p>\\[ T(t,r,\\theta) = T_0 (1 + \\Delta T \\cos(\\theta) ) \\exp\\left(-r\/r_0\\right) \\equiv T_{\\theta} T_r \\; .\\]<\/p>\n<p>This field is an elementary model of a hot Earth radiating its heat into space with a colder side (centered on $$\\theta = \\pi$$) pointing away from the Sun.<\/p>\n<p>The element\u2019s motion through the field (the colorbar maps the color to the temperature)<\/p>\n<p><a href=\"http:\/\/underthehood.blogwyrm.com\/wp-content\/uploads\/2018\/04\/Material_Derivative_Scenario1_polarplot.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1066\" src=\"http:\/\/underthehood.blogwyrm.com\/wp-content\/uploads\/2018\/04\/Material_Derivative_Scenario1_polarplot.png\" alt=\"\" width=\"857\" height=\"768\" srcset=\"https:\/\/underthehood.blogwyrm.com\/wp-content\/uploads\/2018\/04\/Material_Derivative_Scenario1_polarplot.png 857w, https:\/\/underthehood.blogwyrm.com\/wp-content\/uploads\/2018\/04\/Material_Derivative_Scenario1_polarplot-300x269.png 300w, https:\/\/underthehood.blogwyrm.com\/wp-content\/uploads\/2018\/04\/Material_Derivative_Scenario1_polarplot-768x688.png 768w, https:\/\/underthehood.blogwyrm.com\/wp-content\/uploads\/2018\/04\/Material_Derivative_Scenario1_polarplot-810x726.png 810w\" sizes=\"auto, (max-width: 857px) 100vw, 857px\" \/><\/a><\/p>\n<p>leads us to expect a periodic variation in time of the measured temperature, even though the underlying field is static (i.e. time-independent).<\/p>\n<p>The gradient of the field, presented in the best way for numerical programming, is given by:<\/p>\n<p>\\[ \\vec \\nabla T = T_{\\theta} T_{r,r} \\hat e_r + \\frac{1}{r} T_{\\theta,\\theta} T_r \\hat e_{\\theta} \\; , \\]<\/p>\n<p>where:<\/p>\n<p>\\[ T_{r,r} \\equiv \\frac{\\partial T_r}{\\partial r} = -\\frac{1}{r_0} \\exp\\left(-r\/r_0\\right) \\; \\]<\/p>\n<p>and<\/p>\n<p>\\[ T_{\\theta,\\theta} \\equiv \\frac{\\partial T_{\\theta}}{\\partial \\theta} = -T_0 \\Delta T \\sin(\\theta) \\; .\\]<\/p>\n<p>The velocity in this scenario is entirely in the polar angle direction and is given by<\/p>\n<p>\\[ \\vec V = R_0 \\omega \\hat e_{\\theta} \\; .\\]<\/p>\n<p>Since there is no explicit time dependence in the field, the right-hand or Eulerian side of the material derivative is<\/p>\n<p>\\[ \\vec V \\cdot \\vec \\nabla T = &#8211; R_0 \\omega \\frac{1}{R(t)} T_0 \\Delta T \\sin(\\omega t) \\exp\\left( -R(t)\/r0 \\right) \\; \\, \\]<\/p>\n<p>where, it should be emphasized, the field gradients are evaluated at the instantaneous position of the material element.<\/p>\n<p>Comparison of this expression to the Lagrangian truth from the central differences shows excellent agreement.<\/p>\n<p><a href=\"http:\/\/underthehood.blogwyrm.com\/wp-content\/uploads\/2018\/04\/Material_Derivative_Scenario1_Temperature_plot.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1070\" src=\"http:\/\/underthehood.blogwyrm.com\/wp-content\/uploads\/2018\/04\/Material_Derivative_Scenario1_Temperature_plot.png\" alt=\"\" width=\"857\" height=\"803\" srcset=\"https:\/\/underthehood.blogwyrm.com\/wp-content\/uploads\/2018\/04\/Material_Derivative_Scenario1_Temperature_plot.png 857w, https:\/\/underthehood.blogwyrm.com\/wp-content\/uploads\/2018\/04\/Material_Derivative_Scenario1_Temperature_plot-300x281.png 300w, https:\/\/underthehood.blogwyrm.com\/wp-content\/uploads\/2018\/04\/Material_Derivative_Scenario1_Temperature_plot-768x720.png 768w, https:\/\/underthehood.blogwyrm.com\/wp-content\/uploads\/2018\/04\/Material_Derivative_Scenario1_Temperature_plot-810x759.png 810w\" sizes=\"auto, (max-width: 857px) 100vw, 857px\" \/><\/a><\/p>\n<h1>Scenario 2 \u2013 Time-independent Temperature Field Encountered in an Out-spiral Trajectory<\/h1>\n<p>In this scenario, the underlying temperature field remains the same but the trajectory is an outgoing spiral ($$a&gt;0$$)<\/p>\n<p><a href=\"http:\/\/underthehood.blogwyrm.com\/wp-content\/uploads\/2018\/04\/Material_Derivative_Scenario2_polarplot.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1068\" src=\"http:\/\/underthehood.blogwyrm.com\/wp-content\/uploads\/2018\/04\/Material_Derivative_Scenario2_polarplot.png\" alt=\"\" width=\"857\" height=\"746\" srcset=\"https:\/\/underthehood.blogwyrm.com\/wp-content\/uploads\/2018\/04\/Material_Derivative_Scenario2_polarplot.png 857w, https:\/\/underthehood.blogwyrm.com\/wp-content\/uploads\/2018\/04\/Material_Derivative_Scenario2_polarplot-300x261.png 300w, https:\/\/underthehood.blogwyrm.com\/wp-content\/uploads\/2018\/04\/Material_Derivative_Scenario2_polarplot-768x669.png 768w, https:\/\/underthehood.blogwyrm.com\/wp-content\/uploads\/2018\/04\/Material_Derivative_Scenario2_polarplot-810x705.png 810w\" sizes=\"auto, (max-width: 857px) 100vw, 857px\" \/><\/a><\/p>\n<p>and thus there are both radial and polar components of the velocity given by<\/p>\n<p>\\[ V_r = a t \\]<\/p>\n<p>and<\/p>\n<p>\\[ V_{\\theta} = (R_0 + a t) \\omega \\; ,\\]<\/p>\n<p>respectively.<\/p>\n<p>The Eulerian side of the material derivative now becomes<\/p>\n<p>\\[ \\vec V \\cdot \\vec \\nabla T = &#8211; a t \\frac{1}{r_0} \\exp\\left(-r\/r_0\\right) T_0 (1 + \\Delta T \\cos(\\omega t)) \\\\ &#8211; (R_0 + at) \\omega \\frac{1}{R(t)} T_0 \\Delta T \\sin(\\omega t) \\exp\\left( -R(t)\/r0 \\right) \\; . \\]<\/p>\n<p>The measured temperature computed along the trajectory shows an overall, but not monotonic, decrease in the value, with the small bump upwards occurring when the material element swings to the hot side.\u00a0 The time rate-of-change calculated in both ways again shows excellent agreement.<\/p>\n<p><a href=\"http:\/\/underthehood.blogwyrm.com\/wp-content\/uploads\/2018\/04\/Material_Derivative_Scenario2_Temperature_plot.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1069\" src=\"http:\/\/underthehood.blogwyrm.com\/wp-content\/uploads\/2018\/04\/Material_Derivative_Scenario2_Temperature_plot.png\" alt=\"\" width=\"857\" height=\"776\" srcset=\"https:\/\/underthehood.blogwyrm.com\/wp-content\/uploads\/2018\/04\/Material_Derivative_Scenario2_Temperature_plot.png 857w, https:\/\/underthehood.blogwyrm.com\/wp-content\/uploads\/2018\/04\/Material_Derivative_Scenario2_Temperature_plot-300x272.png 300w, https:\/\/underthehood.blogwyrm.com\/wp-content\/uploads\/2018\/04\/Material_Derivative_Scenario2_Temperature_plot-768x695.png 768w, https:\/\/underthehood.blogwyrm.com\/wp-content\/uploads\/2018\/04\/Material_Derivative_Scenario2_Temperature_plot-810x733.png 810w\" sizes=\"auto, (max-width: 857px) 100vw, 857px\" \/><\/a><\/p>\n<h1>Scenario 3 \u2013 Time-dependent Temperature Field Encountered in an Out-spiral Trajectory<\/h1>\n<p>In this final scenario every possible variation is covered.\u00a0 The trajectory is the same out-spiral used in Scenario 2.\u00a0 To the spatial variation of the temperature field is added a simple time-dependence so that the temperature field is now:<\/p>\n<p>\\[ T(t,r,\\theta) = T_r T_{\\theta} exp(-t^2\/\\tau^2) \\; .\\]<\/p>\n<p>The material derivative now includes a time variation of the field and the Eulerian form is<\/p>\n<p>\\[ \\frac{\\partial T}{\\partial t} + \\vec V \\cdot \\vec \\nabla T = -\\frac{2t}{\\tau^2} T_t T_r T_{\\theta} &#8211; a t \\frac{1}{r_0} T_t T_r T_{\\theta} \\\\ &#8211; (R_0 + at) \\omega \\frac{1}{R(t)} T_0 \\Delta T \\sin(\\omega t) T_t T_r \\; , \\]<\/p>\n<p>where $$T_r$$ and $$T_{\\theta}$$ are evaluated at the ephemeris point of the material element $$\\vec R(t)$$.<\/p>\n<p>Once again, the agreement is excellent, demonstrating in a concrete fashion, the equivalence of Lagrangian and Eulerian points-of-view.<\/p>\n<p><a href=\"http:\/\/underthehood.blogwyrm.com\/wp-content\/uploads\/2018\/04\/Material_Derivative_Scenario3_Temperature_plot.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1067\" src=\"http:\/\/underthehood.blogwyrm.com\/wp-content\/uploads\/2018\/04\/Material_Derivative_Scenario3_Temperature_plot.png\" alt=\"\" width=\"857\" height=\"793\" srcset=\"https:\/\/underthehood.blogwyrm.com\/wp-content\/uploads\/2018\/04\/Material_Derivative_Scenario3_Temperature_plot.png 857w, https:\/\/underthehood.blogwyrm.com\/wp-content\/uploads\/2018\/04\/Material_Derivative_Scenario3_Temperature_plot-300x278.png 300w, https:\/\/underthehood.blogwyrm.com\/wp-content\/uploads\/2018\/04\/Material_Derivative_Scenario3_Temperature_plot-768x711.png 768w, https:\/\/underthehood.blogwyrm.com\/wp-content\/uploads\/2018\/04\/Material_Derivative_Scenario3_Temperature_plot-810x750.png 810w\" sizes=\"auto, (max-width: 857px) 100vw, 857px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Last month\u2019s post began a detailed study of continuum mechanics by looking at the general structure of the formalism and the specific linkage between the Lagrangian point-of-view, which co-moves along&#8230; <a class=\"read-more-button\" href=\"https:\/\/underthehood.blogwyrm.com\/?p=1071\">Read more &gt;<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1071","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/underthehood.blogwyrm.com\/index.php?rest_route=\/wp\/v2\/posts\/1071","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/underthehood.blogwyrm.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/underthehood.blogwyrm.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/underthehood.blogwyrm.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/underthehood.blogwyrm.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1071"}],"version-history":[{"count":15,"href":"https:\/\/underthehood.blogwyrm.com\/index.php?rest_route=\/wp\/v2\/posts\/1071\/revisions"}],"predecessor-version":[{"id":2007,"href":"https:\/\/underthehood.blogwyrm.com\/index.php?rest_route=\/wp\/v2\/posts\/1071\/revisions\/2007"}],"wp:attachment":[{"href":"https:\/\/underthehood.blogwyrm.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1071"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/underthehood.blogwyrm.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1071"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/underthehood.blogwyrm.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1071"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}