TAGGED: fdtd
-
-
September 23, 2021 at 2:56 am
fanyandong18
Subscriber目前已经生成了一个保存了结果的ldf文件,但我按照loaddata函数编写的程序运行后无法利用FDTD软件得到数据。我按照官网上的代码所写的代码如下(只更改了引号内的文件名字):
September 23, 2021 at 4:25 pmGuilin Sun
Ansys Employee文件名没有带后缀,你测试下列脚本看看:
x=1;
y=2;
z=[x,y];
savedata("xyz.ldf",x,y,z);
clear;
loaddata("xyz.ldf");
?x;
?y;
?z;
September 24, 2021 at 1:21 amfanyandong18
Subscriber孙老师,首先非常感谢您的回答!
测试后,您这个脚本是可以读出x,y,z的变量的值的。但我在所写程序里加ldf后,测试后显示的结果仍与之前相同,是因为读取监视器的数据相比于读取变量需要额外的代码么?
我是用以下代码保存数据的:
savedcard("Eydata210923.ldf");September 24, 2021 at 1:56 amGuilin Sun
Ansys Employee你没有说的savedcard。你没有指明监视器,你看看这个,是记录监视器R上的信息
savedcard("monitor_data","::model::R");
clear;
loaddata("monitor_data");
::R
?transmission("R");
result:
-0.0388852
-0.0340457
-0.0326862
-0.0326463
-0.0348996
-0.0372415
-0.0478474
-0.0397707
-0.038591
-0.0126177
-0.0167368
-0.021846
-0.0221318
-0.0410318
-0.0723811
-0.0755585
-0.0753344
-0.0601548
-0.0403141
-0.0415049
-0.0535013
-0.0632525
-0.0615998
-0.0612153
-0.0489284
-0.0242565
-0.0158769
-0.0290652
-0.0424264
-0.0509999
-0.0528542
-0.0529405
-0.048306
-0.0388395
-0.0431727
-0.0605985
-0.0675639
-0.0607338
-0.0425089
-0.035889
-0.0349184
-0.0396746
-0.0386653
-0.0347583
-0.0339536
-0.037343
-0.0353017
-0.0304326
-0.0277788
-0.0254664
-0.0255647
提取电场:
E=getresult("R","E");
f=E.f;
Ex=E.Ex;
?Ex(1,1,1,2);
result:
0.00269472+0.00528958i
这种保存相当于直接对监视器操作。你再试一下。
September 24, 2021 at 2:49 amfanyandong18
Subscriber孙老师,首先非常感谢您的快速回复!
首先我按照您的方法 savedcard("monitor_data","::model::r"); 保存了我一个文件中监视器r中的数据,但接下来的代码我无论是在一个含有名为r监视器的无数据仿真文件还是在一个空白的仿真文件中运行后均显示以下错误:
loaddata("monitor_data");
::r
?transmission("r");
Error: prompt line 1: in transmission, no d-card named r was found with the necessary data
所保存的监视器r里原本包含的数据有:
并且直接在监视器r有数据的文件中进行 ?transmission("r"); 以及提取电场操作都是可以得到对应值的。September 24, 2021 at 3:26 amGuilin Sun
Ansys Employee下载安装最新版吧,我这里测试没有问题。再有问题,请告知你计算机操作系统版本。Viewing 5 reply threads- The topic ‘如何用loaddata函数打开保存好的ldf文件’ is closed to new replies.
Innovation SpaceTrending discussionsTop Contributors-
6535
-
1906
-
1463
-
1311
-
1022
Top Rated Tags© 2026 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.

