<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
 <channel>
  <atom:link href="http://www.comsol.eu/community/forums/general/rss/thread/3994.rss" rel="self" type="application/rss+xml"/>
  <title>COMSOL Forums: CREATING A PERIODIC WAVE WITH flc2hs(x,scale) AND mod(a,b)</title>
  <link>http://www.comsol.eu/community/forums/general/thread/3994/</link>
  <description>Most recent forum messages</description>
  <pubDate>Sun, 04 Apr 2010 04:48:07 +0000</pubDate>
  <image>
   <title>COMSOL Forums: CREATING A PERIODIC WAVE WITH flc2hs(x,scale) AND mod(a,b)</title>
   <url>http://www.comsol.eu/shared/images/logos/comsol_logo.gif</url>
   <link>http://www.comsol.eu/community/forums/general/thread/3994/</link>
  </image>
  <item>
   <title>Re: CREATING A PERIODIC WAVE WITH flc2hs(x,scale) AND mod(a,b)</title>
   <link>http://www.comsol.eu/community/forums/general/thread/3994/#p11384</link>
   <description>Hi&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
indeed it would most probabay work, if not try to step in a concetrated way at your slope changes. You still have the modulo to make it periodic.&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
If you still have convergence problems, you could fit a smoother sin function just around your slope change. I mostly use Maple to help me formulate my math for such piecewise continuous functions&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
Good luck&lt;br /&gt;&#13;
Ivar</description>
   <pubDate>Sun, 04 Apr 2010 04:48:07 +0000</pubDate>
   <guid isPermaLink="false">3994.1270356487.11384</guid>
  </item>
  <item>
   <title>Re: CREATING A PERIODIC WAVE WITH flc2hs(x,scale) AND mod(a,b)</title>
   <link>http://www.comsol.eu/community/forums/general/thread/3994/#p11366</link>
   <description>Hi Ivar,&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
I've been working on creating this wave, and i ve decided to define it this way: &lt;br /&gt;&#13;
&lt;br /&gt;&#13;
(t*H0)*(t&amp;lt;0.01)+((0.02-t)*H0)*(t&amp;gt;0.01)&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
I've realised that what i was trying to do at the beginning was a bit complex. The result is on the attached image. I only need one period of this wave. If i need the wave to be periodic in time, i'll have problems, because this description is not ok, the resultant wave is permanently decreasing from t=0.01. I'll investigate more.&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
Thanks for the help!&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
Tomàs</description>
   <pubDate>Sat, 03 Apr 2010 13:34:36 +0000</pubDate>
   <guid isPermaLink="false">3994.1270301676.11366</guid>
  </item>
  <item>
   <title>Re: CREATING A PERIODIC WAVE WITH flc2hs(x,scale) AND mod(a,b)</title>
   <link>http://www.comsol.eu/community/forums/general/thread/3994/#p10373</link>
   <description>Hi&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
but you will not really get a &amp;quot;linear function&amp;quot; with the heaviside smooth step functions, however it will be derivable.&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
When I have a problem with a mathematical function in COMSOL, my way around is to plot it as a &amp;quot;function&amp;quot; see below&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
Good luck&lt;br /&gt;&#13;
Ivar</description>
   <pubDate>Thu, 18 Mar 2010 20:08:18 +0000</pubDate>
   <guid isPermaLink="false">3994.1268942898.10373</guid>
  </item>
  <item>
   <title>CREATING A PERIODIC WAVE WITH flc2hs(x,scale) AND mod(a,b)</title>
   <link>http://www.comsol.eu/community/forums/general/thread/3994/#p10354</link>
   <description>Hello,&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
I'm trying to build a periodical wave. I want it to be linear, with its first semiperiod as an ascendent linear function, and the second semiperiod as a descendent linear function. Just like in the attached image.&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
I am using the function flc2hs(x,scale) to define the steps that will build the wave. I have defined two diferent parts:&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
Increasing part:&lt;br /&gt;&#13;
flc2hs(t+1e-2, 1e-2) - flc2hs(t, 1e-2)&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
decreasing part:&lt;br /&gt;&#13;
flc2hs(t, 1e-2) - flc2hs(t,2e-2)&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
What i have in mind is to repeat this two steps along t with the mod(a,b) function, and to multiply them with the linear function that will define the wave form(it'll be something linearly time depending). &lt;br /&gt;&#13;
&lt;br /&gt;&#13;
Could anyone help me doing this two last steps? I've been searching for the mod(a,b) function on the program guide, but there is no explanation about it.&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
thank you very much</description>
   <pubDate>Thu, 18 Mar 2010 15:20:03 +0000</pubDate>
   <guid isPermaLink="false">3994.1268925603.10354</guid>
  </item>
 </channel>
</rss>
