<?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.com/community/forums/general/rss/thread/32066.rss" rel="self" type="application/rss+xml"/>
  <title>COMSOL Forums: Expression for voltage under parameters??</title>
  <link>http://www.comsol.com/community/forums/general/thread/32066/</link>
  <description>Most recent forum messages</description>
  <pubDate>Sun, 07 Oct 2012 18:54:32 +0000</pubDate>
  <image>
   <title>COMSOL Forums: Expression for voltage under parameters??</title>
   <url>http://www.comsol.com/shared/images/logos/comsol_logo.gif</url>
   <link>http://www.comsol.com/community/forums/general/thread/32066/</link>
  </image>
  <item>
   <title>Re: Expression for voltage under parameters??</title>
   <link>http://www.comsol.com/community/forums/general/thread/32066/#p87574</link>
   <description>Thank you very much sir.</description>
   <pubDate>Sun, 07 Oct 2012 18:54:32 +0000</pubDate>
   <guid isPermaLink="false">32066.1349636072.87574</guid>
  </item>
  <item>
   <title>Re: Expression for voltage under parameters??</title>
   <link>http://www.comsol.com/community/forums/general/thread/32066/#p87553</link>
   <description>Hi&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
You can define &amp;quot;parameters&amp;quot; in the first Global Definition node (add a Parameter node by a &amp;quot;right click&amp;quot; on the node). A Parameter is read once at the beginning of the COMSOL solving sequence, and can be referred to later in a function or other occasions. A parameter value might be overwriten by COMSOl if you are using the same name further down in the node tree.&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
Many single character names are already defined by COMSOL as internal variables, and a Parameter should not have the same name as a Dependent Variable, and V is mostly already defined as &amp;quot;Volts&amp;quot; in COMSOL ACDC.&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
I mostly use long names or add some prefix or suffix to distinguish my own parameters from COMSOL numerous variable names.&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
Note check the doc on Parameters and Variables, as variables can be adressed and recalcualted during processing and are defined either as Global or as &amp;quot;local&amp;quot; Variables which are normally NOT constant values, these should be set to Parameters&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
Then you have units, a parameter as &lt;br /&gt;&#13;
V0 = 2[V] &lt;br /&gt;&#13;
(where the &amp;quot;=&amp;quot; is implicit and not appearing in the GUI) is valid and gives the value of 2 to V0 and tags the variable with units &amp;quot;Volts&amp;quot; and note that units should be defined between square braquets&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
V0 = 2V &lt;br /&gt;&#13;
&lt;br /&gt;&#13;
will flag red (=error) as [V] is the correct way to define units &lt;br /&gt;&#13;
&lt;br /&gt;&#13;
if you combine equations with variables, and the units do finally NOT match, COMSOL will flag the formula with an orange color to indicate a WARNING (not an error) of inconsitence units&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
 &lt;br /&gt;&#13;
&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
--&lt;br /&gt;&#13;
Good luck&lt;br /&gt;&#13;
Ivar</description>
   <pubDate>Sun, 07 Oct 2012 01:00:33 +0000</pubDate>
   <guid isPermaLink="false">32066.1349571633.87553</guid>
  </item>
  <item>
   <title>Expression for voltage under parameters??</title>
   <link>http://www.comsol.com/community/forums/general/thread/32066/#p87516</link>
   <description>Am a beginner in comsol and i wish to declare parameters to my model.The input to my model is voltage and when i key in 'V' under the expression coloumn in parameters,the alphabet turns red.It says unknown variable,please help me sort out this issue.&lt;br /&gt;&#13;
Thanks in advance.</description>
   <pubDate>Sat, 06 Oct 2012 17:25:35 +0000</pubDate>
   <guid isPermaLink="false">32066.1349544335.87516</guid>
  </item>
 </channel>
</rss>
