-
-
October 27, 2021 at 1:53 pmTJSN13579SubscriberOctober 27, 2021 at 3:42 pmGuilin SunAnsys Employee我不太明白你的意思,是说如何自动让脚本运行FDTD文件仿真?运行命令本身不能指定任何文件,哪个文件在脚本下Layout状态,哪个就可以运行。一般是线Load文件:
load - Script command
然后运行:
run - Script command
如果想进行一系列运行,需要做一系列动作。当然,也可以用字符变量设置文件名。你先试一下看看,有问题再讨论。
October 28, 2021 at 12:56 amOctober 28, 2021 at 1:11 amGuilin SunAnsys Employee"点击下图1中的run script键,会跳出图2.fsp文件名的设置":你需要将生成的文件先保存起来,有文件名才可以运行。可以用 save("abc.fsp"); run; 当一个文件调用另外一个文件时,只需要将另外一个文件名直接写在主文件中就可以,相当于子程序。因为它们都使用同一个工作空间,所有它们的变量是通用的。当然,它们最好位于同一个文件夹中。October 28, 2021 at 1:44 amOctober 28, 2021 at 3:25 amGuilin SunAnsys Employee你需要设置字符变量循环里,比如
filename="abc"+num2str(i);
save(filename+".fsp");
这样文件名就随循环变量改变了。
此外,如果想做一系列仿真而不需要每次都Load,可以用(此用法不在本贴讨论,仅提供建议):
此法适合长时间不在计算机旁想充分利用计算机仿真。
之后再load这些文件,提取数据做分析。
October 28, 2021 at 4:43 amOctober 29, 2021 at 7:23 pmGuilin SunAnsys Employee你需要做两件事:
1:生成一个矩阵记录监视器数据,比如透射率 Tt(1:nf,1:nii), nf是监视器种的频率点数, nii是扫描文件个数
2:在提取数据的Loop种这样
Tt(1:nf,ii)=transmission("monitor");
注意此时这个函数只是2D矩阵,不是Dataset,因此直接作图时看不到频率和文件数。你可以生成一个Dataset,参见
Viewing 7 reply threads- The topic ‘请问在FDTD的editor当中编辑生成的.lsf文件在运行后会跳出进行FDTD文件名的手动输入,如果想要它进行自动的命名文件名,在.lsf当中的语句是什么?’ is closed to new replies.
Ansys Innovation SpaceTrending discussionsTop Contributors-
1406
-
599
-
591
-
555
-
366
Top Rated Tags© 2025 Copyright ANSYS, Inc. All rights reserved.
Ansys does not support the usage of unauthorized Ansys software. Please visit www.ansys.com to obtain an official distribution.
-
The Ansys Learning Forum is a public forum. You are prohibited from providing (i) information that is confidential to You, your employer, or any third party, (ii) Personal Data or individually identifiable health information, (iii) any information that is U.S. Government Classified, Controlled Unclassified Information, International Traffic in Arms Regulators (ITAR) or Export Administration Regulators (EAR) controlled or otherwise have been determined by the United States Government or by a foreign government to require protection against unauthorized disclosure for reasons of national security, or (iv) topics or information restricted by the People's Republic of China data protection and privacy laws.