<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="pt-BR">
	<id>http://fiscomp.if.ufrgs.br/index.php?action=history&amp;feed=atom&amp;title=Cahn1ddiflog</id>
	<title>Cahn1ddiflog - Histórico de revisão</title>
	<link rel="self" type="application/atom+xml" href="http://fiscomp.if.ufrgs.br/index.php?action=history&amp;feed=atom&amp;title=Cahn1ddiflog"/>
	<link rel="alternate" type="text/html" href="http://fiscomp.if.ufrgs.br/index.php?title=Cahn1ddiflog&amp;action=history"/>
	<updated>2026-04-10T12:44:13Z</updated>
	<subtitle>Histórico de revisões para esta página neste wiki</subtitle>
	<generator>MediaWiki 1.39.4</generator>
	<entry>
		<id>http://fiscomp.if.ufrgs.br/index.php?title=Cahn1ddiflog&amp;diff=8355&amp;oldid=prev</id>
		<title>Leomigotto em 03h52min de 1 de outubro de 2022</title>
		<link rel="alternate" type="text/html" href="http://fiscomp.if.ufrgs.br/index.php?title=Cahn1ddiflog&amp;diff=8355&amp;oldid=prev"/>
		<updated>2022-10-01T03:52:42Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;pt-BR&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Edição anterior&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Edição das 00h52min de 1 de outubro de 2022&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Linha 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Linha 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;code &lt;/del&gt;lang = &amp;quot;python&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;source &lt;/ins&gt;lang = &amp;quot;python&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;import numpy as np&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;import numpy as np&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;import matplotlib.pyplot as plt&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;import matplotlib.pyplot as plt&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l91&quot;&gt;Linha 91:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Linha 91:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;plt.yscale(&amp;quot;log&amp;quot;)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;plt.yscale(&amp;quot;log&amp;quot;)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;plt.savefig(f&amp;quot;.\\1d\\aaaaa{t:.6f}.png&amp;quot;, dpi = tamanho)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;plt.savefig(f&amp;quot;.\\1d\\aaaaa{t:.6f}.png&amp;quot;, dpi = tamanho)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;code&lt;/del&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;source&lt;/ins&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Leomigotto</name></author>
	</entry>
	<entry>
		<id>http://fiscomp.if.ufrgs.br/index.php?title=Cahn1ddiflog&amp;diff=8354&amp;oldid=prev</id>
		<title>Leomigotto: Criou página com '&lt;code lang = &quot;python&quot;&gt; import numpy as np import matplotlib.pyplot as plt from scipy.fft import rfft, irfft, rfftfreq import os def cahnexp1d(cc, c1, c2):     cc1 = np.copy(cc...'</title>
		<link rel="alternate" type="text/html" href="http://fiscomp.if.ufrgs.br/index.php?title=Cahn1ddiflog&amp;diff=8354&amp;oldid=prev"/>
		<updated>2022-10-01T03:52:24Z</updated>

		<summary type="html">&lt;p&gt;Criou página com &amp;#039;&amp;lt;code lang = &amp;quot;python&amp;quot;&amp;gt; import numpy as np import matplotlib.pyplot as plt from scipy.fft import rfft, irfft, rfftfreq import os def cahnexp1d(cc, c1, c2):     cc1 = np.copy(cc...&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Página nova&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;code lang = &amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import numpy as np&lt;br /&gt;
import matplotlib.pyplot as plt&lt;br /&gt;
from scipy.fft import rfft, irfft, rfftfreq&lt;br /&gt;
import os&lt;br /&gt;
def cahnexp1d(cc, c1, c2):&lt;br /&gt;
    cc1 = np.copy(cc)*c1&lt;br /&gt;
    cc2 = np.copy(cc)*c2&lt;br /&gt;
    cc3 = np.copy(cc**3)*c1&lt;br /&gt;
    for i in range(l):&lt;br /&gt;
            n = i - 2&lt;br /&gt;
            cc[n] =   (   2*(cc1[n] - cc3[n]) + (cc3[n-1] + cc3[n+1] -1*(cc1[n-1] + cc1[n+1]))&lt;br /&gt;
                            -1*(cc2[n-2] + cc2[n+2] + 6*cc2[n])&lt;br /&gt;
                            +(4*cc2[n-1] + 4*cc2[n+1])&lt;br /&gt;
                        ) + cc[n]&lt;br /&gt;
    return cc&lt;br /&gt;
&lt;br /&gt;
def cahnfourier1d(cc, k2, k4):&lt;br /&gt;
    cct = rfft(cc)&lt;br /&gt;
    cct3 = rfft(cc**3 - cc)&lt;br /&gt;
    cct = cct + difd*dt*(-k2*(cct3) - k4*cct)&lt;br /&gt;
    cc = irfft(cct)&lt;br /&gt;
    return cc&lt;br /&gt;
&lt;br /&gt;
np.random.seed(4)&lt;br /&gt;
&lt;br /&gt;
xmin = 0&lt;br /&gt;
&lt;br /&gt;
xmax = 1&lt;br /&gt;
&lt;br /&gt;
tmin = 0&lt;br /&gt;
&lt;br /&gt;
tmax = 0.5&lt;br /&gt;
&lt;br /&gt;
dt = 1/22000000&lt;br /&gt;
&lt;br /&gt;
dx = 1/128&lt;br /&gt;
&lt;br /&gt;
difd = 1&lt;br /&gt;
&lt;br /&gt;
gamma = (3.4/128)**2&lt;br /&gt;
&lt;br /&gt;
l = int((xmax/dx))&lt;br /&gt;
&lt;br /&gt;
k  = rfftfreq(l, dx/(2*np.pi))&lt;br /&gt;
&lt;br /&gt;
c1 = difd*dt/(dx**2)&lt;br /&gt;
&lt;br /&gt;
c2 = gamma*c1/(dx**2)&lt;br /&gt;
&lt;br /&gt;
k2 = k**2&lt;br /&gt;
&lt;br /&gt;
k4 = (k2**2)*gamma&lt;br /&gt;
&lt;br /&gt;
ccexp = np.random.rand(l)*2 - 1&lt;br /&gt;
&lt;br /&gt;
ccfourier = np.copy(ccexp)&lt;br /&gt;
&lt;br /&gt;
t = 0&lt;br /&gt;
&lt;br /&gt;
tamanho = l/2&lt;br /&gt;
&lt;br /&gt;
plt.figure(figsize=(8, 8))&lt;br /&gt;
&lt;br /&gt;
plt.yscale(&amp;quot;log&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
os.makedirs(f&amp;quot;.\\1d&amp;quot;, exist_ok = True)&lt;br /&gt;
&lt;br /&gt;
dif1, dif2, dif3, dif4 = [], [], [], []&lt;br /&gt;
&lt;br /&gt;
tt = np.arange(dt, tmax + dt, dt)&lt;br /&gt;
u = 0&lt;br /&gt;
while (t &amp;lt; tmax):&lt;br /&gt;
    ccfourier = cahnfourier1d(ccfourier, k2, k4)&lt;br /&gt;
    ccexp = cahnexp1d(ccexp, c1, c2)&lt;br /&gt;
    if u%1000 == 0:&lt;br /&gt;
        diferenca = abs(ccexp-ccfourier)&lt;br /&gt;
        diferencas = [diferenca[0], diferenca[42], diferenca[75], diferenca[103]]&lt;br /&gt;
        dif1.append(diferencas[0])&lt;br /&gt;
        dif2.append(diferencas[1])&lt;br /&gt;
        dif3.append(diferencas[2])&lt;br /&gt;
        dif4.append(diferencas[3])&lt;br /&gt;
    t = round(t + dt, int(-np.log10(dt) + 5))&lt;br /&gt;
    u+=1&lt;br /&gt;
tt = np.linspace(dt, tmax, len(dif1))&lt;br /&gt;
plt.title(f&amp;quot;Tempo final: {t:.7f}&amp;quot;)&lt;br /&gt;
plt.plot(tt, dif1)&lt;br /&gt;
plt.plot(tt, dif2)&lt;br /&gt;
plt.plot(tt, dif3)&lt;br /&gt;
plt.plot(tt, dif4)&lt;br /&gt;
plt.yscale(&amp;quot;log&amp;quot;)&lt;br /&gt;
plt.savefig(f&amp;quot;.\\1d\\aaaaa{t:.6f}.png&amp;quot;, dpi = tamanho)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Leomigotto</name></author>
	</entry>
</feed>