⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 timefunc.txt

📁 pic 模拟程序!面向对象
💻 TXT
字号:
Boundaries can exhibit time dependent behavior.Which boundary exhibits what behavior depends on theboundary, but it is usually pretty clear.Equipotentials have a time dependent voltage,beam emitters have time dependent currents.The time dependency is a function of the formEnvelope(t) * Sinusoid(t)when time_function_flag = 0See "String Time Functions" below for time_function_flag = 1The envelope function looks like this:  magnitude   |   |a1 |                **********   |               *          *   |              *            *   |             *              *   |            *                *   |           *                  *a0 | **********                    ********   |   |----------+-----+--------+-----+------------    t   0    --------->|      	              tdelay              |<--->|	              trise                    |<------>|        tpulse                             |<--->|  tfallSo the parameters controlling the envelope function are:a0 a1 tdelay trise tpulse and tfall.The sinusoid is parameterized by:Sinusoid(t) = A*sin(2*pi*frequency*t + phase) + CThe parameters of the sinusoid are:phasefrequencyACYou can modify the behavior of the timefunctionyourself if these parameters aren't sufficient for yourpurposes.The file is physics/timefunc.hString Time FunctionsA facility has been added which will allow you to put inmore flexible functions of time which you may need, whichdoesn't fit in the Sinusoid * Envelope template providedabove.To do this, you add:time_function_flag = 1F = <your function here>to the boundary you want to control.Most of the usual mathematical functions are understood:as of now the variables you can use are:"t":  the current simulation timeF = sin(t)F = sin(t) * cos(t)F = sin(t)^2F = 10e9* (t%1e-9) (an explanation of this last:  the % operator means "divide and take  the remainder" so that (t%1e-9) takes the values of 0 to 1e-9 in  a periodic fashion of period 1e-9.  Using this operator you can make  an arbitrary function periodic:)F = exp( t%1e-10)In addition, these special functions are added, to make pulsefunctions:pulse(t,tdelay,trise,tpulse,tfall)   :  like the envelope function abovestep(x)	:  returns 0 if x < 0 and returns 1 otherwiseramp(x) :  returns 0 if x < 0 and returns x otherwiseSee evaluator.txt for additional information.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -