Hi
I am trying to perform an optimization using GA and for that I need to use the ansys and matlab.
how to I link ansys and matlab?
Does anyone have this software( Ansys aaS Matlab toolbox)?
dear Abolfazl Faramarzi
See the following links. Maybe it can be useful.
https://www.mathworks.com/matlabcentral/answers/301848-how-to-connect-the-ansys-workbench-to-matlab-to-perform-the-optimization-loop-in-matlab-please
https://www.mathworks.com/matlabcentral/fileexchange/53032-interactive-link-between-matlab-and-ansys
HI Abolfazl Faramarzi
if you are using APDL you ca easily call Asys via Matlab using the following lie (you may change it according to your computer):
!SET KMP_STACKSIZE=15000k & "C:\Program Files\ANSYS Inc\Var145\ANSYS\bin\winx64\ansys145.exe" -b -p ANSYS -i C:\Users\kouider\Desktop\Ansys_INSIC_article_2\GA_opt_harVarester\model_opt.txt -o C:\Users\kouider\Desktop\Ansys_INSIC_article_2\GA_opt_harVarester\ansys_out.txt
I can help you more if you provide more details about your works
i the followig a exemple of a fitess fuctio that i have performed usig matla
function fit = fitness( Var )
% This function called the designed parameters as an input file
% The output is the energy
%==============================================================
% make sure the chromosome has no repeated coordinate couple (xi,yi)
for i=1:numel(Var)-3
if (Var(i)& Var(i+1))== (Var(i+2)& Var(i+3))
Var(i) = 10^(-1).*randi(4,1,1)+randi([0 1],1,1)*0.05;
end
%===============================================================
% Prepare the coordinate for the next use in ansys
Var1=Var(1);
Var2=Var(2);
Var3=Var(3);
Var4=Var(4);
Var5=Var(5);
Var6=Var(6);
Var7=Var(7);
Var8=Var(8);
fid=fopen('parametre.inp','w+');
fprintf(fid,'Var1=%f\n',Var1);
fprintf(fid,'Var2=%f\n',Var2);
fprintf(fid,'Var3=%f\n',Var3);
fprintf(fid,'Var4=%f\n',Var4);
fprintf(fid,'Var5=%f\n',Var5);
fprintf(fid,'Var6=%f\n',Var6);
fprintf(fid,'Var7=%f\n',Var7);
fprintf(fid,'Var8=%f\n',Var8);
;
fclose(fid);
% Calculate the Varalue on the obj function
format long
fidn=fopen('VarLG.txt','r');
Varlt=fscanf(fidn,'%g',[130 1]);
fclose(fidn);
R=1e7;
for i=1:129
eng(i)=(trapz([i-1 i],[Varlt(i).^2 Varlt(i+1).^2]))./(2*R);
fit=sum(eng);
Dear Abolfazi,
I suggest you to see link and attached files on topic.
Article Designing cricket bats using parametric modeling and genetic...
Best regards
I want to know more about Uranium ore deposits in world.
11 August 2024 6,720 0 View
I want to know more about diamond ore deposits in world.
11 August 2024 2,167 1 View
We assume that the difference is huge and that it is not possible to compare the two spaces. The R^4 mathematical space considers time as an external controller and the space itself is immobile in...
10 August 2024 6,678 14 View
If Banks do not provide credit facility, what are the options available for FPOs and impact on producer’s income?
10 August 2024 8,198 5 View
I used eye tracking to examine how participants from two different populations (A and B) react to an image. Participants in population A exhibit larger pupil sizes over time, but they also have...
10 August 2024 3,229 0 View
What are a “Farmers Producer Organization” (FPO) and its essential features?
10 August 2024 477 5 View
I have been doing the m6A dot blot for a while with no improvement, I am extracting the RNA, and I can see the dots although the three biological replicas give a different reading on the memberan...
10 August 2024 8,539 5 View
How do interactions between the biosphere, the carbon cycle, and the water cycle impact global warming and interaction between the atmosphere and the hydrosphere?
09 August 2024 3,291 2 View
I have input a moment load in module load Abaqus, i put my moment load on the node surface (using reference point). I have define moment in history output and make a set for moment too. But the...
08 August 2024 4,831 4 View
How is energy cycled through the Earth's climate system and how do matter cycle and energy flow through the rock cycle?
08 August 2024 8,162 0 View
I need to model an anisotropic material in which the Poisson's ratio ν_12 ≠ ν_21 and so on. Therefore, the elastic compliance matrix wouldn't be a symmetric one. In ANSYS APDL, for TB,ANEL...
09 August 2024 5,048 2 View
My name is Apurva Saoji. I am a Ph.D scholar in Computer engineering in India. I am looking for international expert in reviewing my PhD thesis, "Competitive Optimization Techniques to Minimize...
07 August 2024 4,600 2 View
I am new to Micromechanics and having similar problem with understanding the implementation of the formula's. I would appreciate if anyone can guide me on how to go about getting a scalar value...
30 July 2024 969 0 View
I am not able to find how I can provide tangential stiffness in ansys workbench The normal stiffness option is there. But how I can enter tangential stiffness I have read somewhere tangential...
29 July 2024 2,032 2 View
Please, what is the memory consumption of the Matlab function quad tree decomposition procedure [S = qtdecomp(I)] with respect to the input set I?
27 July 2024 5,455 2 View
Hello. I have the geometry of a blade in CAD file (stp) and I want to prepare the blade for meshing with turboGrid. I must import this file into designModeler and then transfer to the...
27 July 2024 356 3 View
Hello, I am a research scholar currently working on a project involving image segmentation, and I am interested in using differential evolution for this purpose . I would greatly appreciate it if...
25 July 2024 9,926 1 View
Hello!!! I want to implement the Swerling characteristics functions (CF) directly in MATLAB without using its Fourier integral pairs...the Swerling CFs are actually Laplace Transform of the signal...
23 July 2024 4,925 1 View
Currently I need to calculate detection probabilities (PD) from radar cross section (RCS) data. Beta distribution parameters for this RCS data are calculated and will be used in Swerling0...
22 July 2024 868 0 View
Actually, I'm having trouble implementing the plot of the flutter region for the whirl prop system with 2 DOF (Influences of structural damping and propeller—pivot point distance on whirl flutter...
21 July 2024 5,047 2 View