登 录
註 冊
论坛
微波仿真网
注册
登录论坛可查看更多信息
微波仿真论坛
>
CST 专区
>
CST
>
如何在CST MWS瞬态仿真中加入余弦波激励?
发帖
回复
4956
阅读
8
回复
[建模]
如何在CST MWS瞬态仿真中加入余弦波激励?
离线
jqpros
UID :628
注册:
2007-01-01
登录:
2020-05-09
发帖:
117
等级:
仿真二级
0楼
发表于: 2007-11-14 22:14:29
关键词:
CST
仿真
设置
端口
激励
比如利用waveport或者是plane wave激励时如何能将端口的default设置为余弦波激励呢?是否需要用到宏?或者瞬态仿真中是否支持余弦波激励呢? ..
,k9.1kjO*)
AkO-PL
未注册仅能浏览
部分内容
,查看
全部内容及附件
请先
登录
或
注册
共
条评分
离线
CST2006
CST-china官方代表
UID :3302
注册:
2007-06-07
登录:
2008-11-14
发帖:
41
等级:
仿真新人
1楼
发表于: 2007-11-17 12:48:42
(!Fu5m=<8
可以在port type中选择Selection,然后再点击Excitation List,在打开的对话框中设置即可。
共
1
条评分
学着坚强
rf币
+5
您热心助人
2007-11-17
离线
cc300
UID :5520
注册:
2007-10-20
登录:
2016-06-25
发帖:
20
等级:
仿真新人
2楼
发表于: 2007-11-17 14:49:45
P|;f>*^Y
自定义脉冲激励就可以解决啊。。
共
条评分
离线
jqpros
UID :628
注册:
2007-01-01
登录:
2020-05-09
发帖:
117
等级:
仿真二级
3楼
发表于: 2007-11-17 21:40:49
GH`y-Ul'K
New Excitation Signal >>User Defined>>此时会出现VBS编程的画面,但是如何通过编程来定义单频点的余弦函数激励呢?瞬态仿真支持单频点仿真吗?因为在瞬态仿真中,仿真的停止是依据能量在所激励的结构中消逝到足够小的时候来界定的,如果是单频点的余弦波激励那么能量将会最终在结构中达到一个稳态,试问这种激励瞬态仿真支持吗?
B|'}HBkP
试着用了上上楼的方法,通过导航树观察激励信号仍然是一个正弦调制的高斯脉冲,因此仍然 in doubt中。
共
条评分
离线
CST2006
CST-china官方代表
UID :3302
注册:
2007-06-07
登录:
2008-11-14
发帖:
41
等级:
仿真新人
4楼
发表于: 2007-11-20 13:52:48
15yiDI o
定义了VBA激励信号后,要在port type中选择Selection,然后再点击Excitation List,在打开的对话框中激活Activitate选项进行同时激励,然后将Signal选择为自定义的余弦信号即可。
s)KlKh
CST中有个专门介绍如何自定义激励信号的HowTo(帮助文档)。还有疑问的话,邮件到CST问也可以的。
共
条评分
离线
jqpros
UID :628
注册:
2007-01-01
登录:
2020-05-09
发帖:
117
等级:
仿真二级
5楼
发表于: 2007-11-21 09:23:36
Er~KX3vF
谢谢楼上的回复。宏定义功能还没试过,因此不知如何去定义激励信号。达人们,给点提示吧。
&DGz/o
' userdefined excitation function
}k%6X@
.Hqq!&
Option Explicit
}kvix{
Zf!Q4a"
Function ExcitationFunction(dtime As Double) As Double
!s1<)%Jt
DH+kp$,}
'Assign the excitation signal value for the given time to the function name.
T:{r*zLSN
FVrB#Hw~
ExcitationFunction = 0.0
"D_:`@V(
l~]] RgU
End Function
Wd)\r.pJ
tR'RB@kJ
' -------------------------------------------------------------------------------------------------
M`'DD-Q
' Main: This function serves as a main program for testing purposes. (runs and plots the function)
8Z9>h:c1
' You need to rename this function to "Main" for debugging the excitation function.
Q}lCQK/g
'
;iKtv+"
' Please adjust the time step width and the number of time steps accordingly.
JXe~ 9/!
'
[[AO6.Z
' PLEASE NOTE that a userdefined excitation file (*.usf) must not contain a main program for
L@AFt)U
' proper execution by the framework. Therefore please ensure to rename this function
)/)u.$pi
' to e.g. "Main2" before the Transient Solver is started
A~a 3bCX+"
' -------------------------------------------------------------------------------------------------
Nr>UZlU8
54>0Dv??H
Sub Main2
L f"!:]
Dim tmax As Double, ntstep As Long
@U5gxK*
CV"}(1T
' -------------- PLEASE ADJUST THE SETTINGS BELOW ----------------------
<zn)f@W
tmax = 10.0
a"U3h[;$y
ntstep = 100
;2`6eyr
' -------------- PLEASE ADJUST THE SETTINGS ABOVE ----------------------
SIrNZ^I
+39uKOrZ
Dim signal As Object, n As Long, tstep As Double
C@`#@1X
Set signal = Result1D("")
l5H5!$3~
signal.Initialize ntstep
,IboPh&Q78
tstep = tmax / ntstep
`+\$
^t gjs$M|
For n=0 To ntstep-1
{*GBUv5
signal.SetXY(n, n * tstep, ExcitationFunction(n * tstep))
1[Yl8W%pj
Next n
v(.mM9>
#n|5ng|CJ
signal.Save GetProjectBaseName() + GetProjectBaseNameSeparator() + "excitation function.sig"
,s3|
signal.AddToTree "Excitation Signals\Userdefined Functions\signal1_plot"
zc)nDyn
SelectTreeItem "Excitation Signals\Userdefined Functions\signal1_plot"
E#(e2Z=
ResultTree.RefreshView
4uoZw3O
End Sub
共
条评分
离线
zhoufei510
UID :64539
注册:
2010-08-08
登录:
2011-05-03
发帖:
93
等级:
仿真一级
6楼
发表于: 2011-03-06 11:37:00
我在自定义脉冲中定义了一个正弦调制的脉冲,能出来plot,但我怎么让这个自定义的脉冲作为激励源呢?也就是怎么把自定义的脉冲调出来?拜求回答,以下是宏语言
qdpi-*2
' userdefined excitation function
3^wHL:u
V^Z5i]zT
Option Explicit
*l =f=
BrSvkce
Function ExcitationFunction(dtime As Double) As Double
"0PsCr}!
[Y*>x2X
'Assign the excitation signal value for the given time to the function name.
qQ)1+^
Dim E As Double,f As Double,t As Double,d As Double
uQ_C<ii"W
f=3e9
@hA`f4^
t=1.5e-9
1gBLJ0q
d=7.0711e-10
M-h+'G
E=1e5
IowXVdm@6
ExcitationFunction = E*Cos(2*pi*f*dtime)*Exp(-(dtime-t)^2/d^2)
n!Y_SPg
$[`rY D/.
End Function
/Lr`Aka5
].J;8}
' -------------------------------------------------------------------------------------------------
Ow> u!P!
' Main: This function serves as a main program for testing purposes. (runs and plots the function)
y(g]:#
' You need to rename this function to "Main" for debugging the excitation function.
aG;F=e
'
)ddJ\:
' Please adjust the time step width and the number of time steps accordingly.
"TaLvworb4
'
2C:u)}R7D
' PLEASE NOTE that a userdefined excitation file (*.usf) must not contain a main program for
9b=0 4aWHm
' proper execution by the framework. Therefore please ensure to rename this function
qVfn(rZ
' to e.g. "Main2" before the Transient Solver is started
HM)D/CO,?
' -------------------------------------------------------------------------------------------------
|z3!3?%R
L$O\fhO?
Sub Main
Vv(buG
Dim tmax As Double, ntstep As Long
[8Y7Q5Had
Ot47.z
' -------------- PLEASE ADJUST THE SETTINGS BELOW ----------------------
XTX/vbge3m
tmax =10e-9
/hqn>t
ntstep =100
deYv&=SPl
' -------------- PLEASE ADJUST THE SETTINGS ABOVE ----------------------
:atd_6
0^V<,CAV
Dim signal As Object, n As Long, tstep As Double
%.`u2'^
Set signal = Result1D("")
y[l{ UBue:
signal.Initialize ntstep
p({@t=L3g
tstep = tmax / ntstep
ZJWpb
V]J"v#!{
For n=0 To ntstep-1
<S7SH-{_\
signal.SetXY(n, n * tstep, ExcitationFunction(n * tstep))
#Swc>jYc
Next n
*j&\5|^V
[N~7PNd S
signal.Save GetProjectBaseName() + GetProjectBaseNameSeparator() + "excitation function.sig"
K:<Viz
signal.AddToTree "Excitation Signals\Userdefined Functions\signal2_plot"
D1-w>Y#
SelectTreeItem "Excitation Signals\Userdefined Functions\signal2_plot"
|(Wwh$
ResultTree.RefreshView
h9m|f|cH
End Sub
n[!QrEeR},
共
条评分
离线
jellyfancy
UID :66914
注册:
2010-09-25
登录:
2021-04-26
发帖:
459
等级:
积极交流四级
7楼
发表于: 2011-03-07 11:13:38
回 5楼(jqpros) 的帖子
Option Explicit
G~&q
V0,5c`H c
Function ExcitationFunction(dtime As Double) As Double
/;q3Q#
vfc5M6Vm)<
'Assign the excitation signal value for the given time to the function name.
K-*ZS8
>W/mRv&
ExcitationFunction =cos(2*3.14*dtime)
$@{d\@U
*pS3xit~
End Function
fRk'\jzT
\N? lG q
类似上面这样将你的余弦激励加入, 如果你想看波形,就将下面的Sub Main2改为Sub Main,运行一下看看结果,如果结果波形不对,则需要修改tmax,最后波形正确后,
将Sub Main改回Sub Main2,保存即可
共
2
条评分
hefang
技术分
+1
积极参与讨论+技术分 论坛感谢您的参与
2011-03-07
hefang
rf币
+10
积极参与讨论+技术分 论坛感谢您的参与
2011-03-07
Everything is possible!
离线
jellyfancy
UID :66914
注册:
2010-09-25
登录:
2021-04-26
发帖:
459
等级:
积极交流四级
8楼
发表于: 2011-03-07 11:16:03
回 6楼(zhoufei510) 的帖子
你这个自定义源plot之后,需要将Sub Main改回Sub Main2,然后保存。因为Sub Main仅作调试用
共
条评分
Everything is possible!
发帖
回复