how to link ANSYS Workbench TO MATLAB Using Journal Files ???
12.6 هزار بار بازدید -
3 سال پیش
-
here is the matlab code
here is the matlab code that was used in this video :
tic
clc; clear;
%% Changing the input parameters
Length = 25;
Height = 10;
% creating new journal file
fid = fopen('base journal.wbjn','r');
f = fread(fid,'*char')';
fclose(fid);
f = strrep(f,'Length' , num2str(Length));
f = strrep(f,'Height' , num2str(Height));
fid = fopen('finaljournal.wbjn','w');
fprintf(fid,'%s',f);
fclose(fid);
%% Calculations in ansys with input parameters
system('C:\"Program Files"\"ANSYS Inc"\v212\Framework\bin\Win64\RunWB2.exe -B -R finaljournal.wbjn');
%% saving the output parameter
Nusselt_no = xlsread('export data.csv','export data','D8');
toc
tic
clc; clear;
%% Changing the input parameters
Length = 25;
Height = 10;
% creating new journal file
fid = fopen('base journal.wbjn','r');
f = fread(fid,'*char')';
fclose(fid);
f = strrep(f,'Length' , num2str(Length));
f = strrep(f,'Height' , num2str(Height));
fid = fopen('finaljournal.wbjn','w');
fprintf(fid,'%s',f);
fclose(fid);
%% Calculations in ansys with input parameters
system('C:\"Program Files"\"ANSYS Inc"\v212\Framework\bin\Win64\RunWB2.exe -B -R finaljournal.wbjn');
%% saving the output parameter
Nusselt_no = xlsread('export data.csv','export data','D8');
toc
3 سال پیش
در تاریخ 1400/06/29 منتشر شده
است.
12,683
بـار بازدید شده