Labfans是一个针对大学生、工程师和科研工作者的技术社区。 | 论坛首页 | 联系我们(Contact Us) |
![]() |
|
![]() |
#1 |
高级会员
注册日期: 2019-11-21
帖子: 3,006
声望力: 66 ![]() |
![]()
为了生成包含所需结果的输出文件(.rwo格式),我们必须运行使用参数文件(.rwd格式)的报告程序的可执行文件。输出文件是ReportBHP1.rwo,此文件将包含导出的变量。
现在要在Matlab中实现此功能,下面是一个小脚本,简要说明了我要实现的目标。每种实现都调用CMG(软件)并提取数据。 for nr=1:NREAL dlmwrite(鈥楶ERM.INC鈥?PERM(:,nr),鈥檇elimiter鈥?鈥橽n鈥?; % Writes the permeability file for each realization system('mx200810.exe -f ReservoirModel_CMGBulider.dat') % Calls CMG system('report.exe /f ReportBHP1.rwd /o ReportBHP1.rwo') % Calls Parameter file and generates output file [TIME(:,j),BHP1(:,j)]=textread('ReportBHP1.rwo','%f\t%f','headerlines',5); % reading the time and BHP from output file generated for well 1 end 我所有软件所需的.exe和.dll文件都位于我的ReservoirModel_CMGBulider.dat文件所在的文件夹中。因此,我通过所有这些文件所在的文件夹运行.m文件。 我能够生成输出(.rwo)文件。但是,在Matlab的命令窗口中显示的软件仿真报告中有一个错误,如下所示: "...STOP: Unable to open the following file as data file: 'ReservoirModel_CMGBuilder.dat' Check path name for spaces, special character or a total length greater than 256 characters Cannot find data file named 'ReservoirModel_CMGBuilder.dat' Date and Time of End of Run: ..... ans = 0" 我认为它只读取一次.dat文件,然后覆盖其余实现中的第一个实现结果。因此,所有实现的结果都与第一个实现相同。我需要纠正此错误的帮助。 回答: 首先,如果我之前的回答还可以,您可以接受吗?谢谢! 其次,您是否像以前一样尝试过对所有文件使用完整路径名? 更多&回答... |
![]() |
![]() |