<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>张鹏博客 &#187; CFD</title>
	<atom:link href="http://www.zhangpeng.info/tag/cfd/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.zhangpeng.info</link>
	<description>简单生活，分享快乐</description>
	<lastBuildDate>Sun, 15 Jan 2012 14:22:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Thermal numerical method：Improved Euler method</title>
		<link>http://www.zhangpeng.info/2010/thermal-numerical-method-improved-euler-method/</link>
		<comments>http://www.zhangpeng.info/2010/thermal-numerical-method-improved-euler-method/#comments</comments>
		<pubDate>Thu, 07 Jan 2010 02:36:41 +0000</pubDate>
		<dc:creator>张鹏</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[Study]]></category>
		<category><![CDATA[CFD]]></category>
		<category><![CDATA[matlab]]></category>

		<guid isPermaLink="false">http://www.zhangpeng.info/?p=234</guid>
		<description><![CDATA[The idea of Euler method is to use an approximation yn stands for the real y(xn) and then use the inverse multiply  a step to calculate the yn+1. When we use a small step &#8216;h&#8217;, we will gain a curve similar to the real line. For more accurate, we improve the Euler method and it [...]]]></description>
			<content:encoded><![CDATA[<p>The idea of Euler method is to use an approximation y<sub>n </sub>stands for the real y(x<sub>n</sub>) and then use the inverse multiply  a step to calculate the y<sub>n+1</sub>. When we use a small step &#8216;h&#8217;, we will gain a curve similar to the real line. For more accurate, we improve the Euler method and it let us calculate with less works.<span id="more-234"></span></p>
<p>We first use the Euler method to get a <span style="text-decoration: overline;">y</span><sub>n+1 </sub>in the Improved Euler method. Then we use another method to amend the <span style="text-decoration: overline;">y</span><sub>n+1</sub> to let it more similar to the real y<sub>n+1</sub>.</p>
<p>We express this new Improved Euler method by these two formulas:</p>
<p>y<sub>n+1</sub> = <span style="text-decoration: overline;">y</span><sub>n</sub> + hf (x<sub>n</sub> , y<sub>n</sub> )<br />
 y<sub>n+1</sub> = y<sub>n</sub> + h*[f (x<sub>n</sub> , y<sub>n</sub> )+f (x<sub>n+1</sub> , <span style="text-decoration: overline;">y</span><sub>n+1</sub> )]/2</p>
<p>When use computer for calculation in some <a href="http://www.articleinput.com/e/s/s/Engineering/" target="_blank">engineering</a> field, you should show the relationship between &#8216;y&#8217; and &#8216;x&#8217;. You need also give a &#8216;h&#8217;.</p>
<h2>A example to use Improved Euler method for solving heat transfer problem:(Use Matlab)</h2>
<div id="attachment_211" class="wp-caption alignright" style="width: 460px"><a href="http://zhangpeng.info/wp-content/uploads/2009/12/euler.GIF"><img class="size-medium wp-image-211" title="euler" src="http://zhangpeng.info/wp-content/uploads/2009/12/euler-450x186.GIF" alt="Improved Euler method used in heat transfer calculation" width="450" height="186" /></a><p class="wp-caption-text">Euler method used in heat transfer calculation</p></div>
<p><strong>Question</strong>: As the figure shows. T<sub>∞</sub>=1500℃，T<sub>w</sub>=500 ℃, T<sub>0</sub>=20℃, a thermocouple which diameter is 1mm exposed in the air. The surface coefficient of heat transfer h=200W(m<sup>2</sup>/K)，ε=0.2. Thermocouple oxidation will create energy at a rate of q=1000W/m<sup>3</sup>.  Determine the relation ship between temperature of <a href="http://www.zhangpeng.info/2009/new-type-of-thermocouple/">thermocouple</a> and time. [additional properties of thermocouple:ρ=8000kg/m<sup>3</sup>，c=0.38kJ/(kg*K)，λ=50W/(m*K)]</p>
<p><strong>Answer</strong>: We use Improved Euler Question to solve this problem.  www.zhangpeng.info</p>
<p>The source code in Matlab here:</p>
<blockquote><p><code>function [x,y]=eulerg(x,y,h,N)<br />
 x=zeros(1,N+1);<br />
 y=zeros(1,N+1);<br />
 x(1)=0;<br />
 y(1)=293;<br />
 for n=1:N<br />
 x(n+1)=x(n)+h;<br />
 ybar=y(n)+h*dyfun(x(n),y(n));<br />
 y(n+1)=y(n)+(h/2)*(dyfun(x(n),y(n))+dyfun(x(n),ybar));<br />
 end<br />
 plot(x,y,'red');<br />
 function m=dyfun(x,y)<br />
 m=1/304+75/19*(1773-y)+(6.804e-8)/304*(1773^4-y^4);</code></p>
</blockquote>
<p>To create a new file in Matlab writing these codes and save it. Input some properties, for example eulerg(0,293,0.001,1000), and you will gain the relationship line between &#8216;y&#8217; and &#8216;x&#8217;.</p>
<p>You can transfer this example in any other similar <a href="http://www.articleinput.com/e/a/title/The-basic-work-site-settings-are-not-part-of-the-productive-work-process/" target="_blank">work process</a> by just change some part of this example function. I&#8217;m glad to discuss with you if you have any questions.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.zhangpeng.info/2010/thermal-numerical-method-improved-euler-method/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

