-
-
February 18, 2022 at 8:54 amlschulerSubscriber
Hi everyone,
I am trying to run an electrothermal analysis in batch mode from Matlab. I have set up my problem in worbench and mechanical. I am doing first an electrical analysis and the heat generation by Joule effect is the load of the thermal problem.
From mechanical, I have exported the input file of the electrical problem so that I can run it in batch mode. However, mechanical needs to solve the electrical problem to be able to write the thermal problem input file, because the heat generation is directly written to the input file.
The problem is that I want to run multiple simulations with changes on some parameter values. Thus the load of the thermal problem will vary. Is it a way to have mechanical import the electrical results so it can recalculate the heat generation for each simulation?
I would also like to be able to modify the electrical results (the voltage) from Matlab. So I guess the ideal solution would be to give as an input to the thermal problem an array containing the voltage of each node (or at least element) that will be the load of the thermal problem. Is it possible to do this?
I don't know if I'am making myself clear.
Thanks for the help,
Louis
February 18, 2022 at 6:54 pmwrbulatAnsys EmployeeHi Louis
One thing you should be able to do to simplify the effort is to use a thermoelectric analysis system (rather than linking Joule heat calculated from a DC current conduction analysis to a thermal analysis).
Thermoelectric analyses use coupled field element types that automate bidirectional thermoelectric coupling. This accounts (in one analysis rather than two) for the nonlinear response that results when temperature dependent electrical resistivity and/or thermal conductivity are used.
I don't know how to use MATLAB to call another executable. My guess is that you're supplying MATLAB with the ds.dat (text file) written by Mechanical. That is, you're using MATLAB to call MAPDL (the solver executable used by Mechanical to calculate results) and direct MAPDL to read in the ds.dat file written by Mechanical. If this is what you are doing, it would probably help to know how to initiate a MAPDL batch run as described in the following section in the Help:
The ds.dat is an ASCII text file that Mechanical writes. It contains commands that the MAPDL solver reads. These commands direct MAPDL to create the model (mesh, element types, material properties, boundary conditions, analysis options, etc.). If you can locate the command(s) within ds.dat that assign the excitation/BC that you want parameterized, you can edit the numerical value specified in the command and replace it with a parameter (a name you make up). You can then specify the value of that parameter in the system call to the MAPDL executable:
I would imagine that MATLAB provides a way to vary the value of the parameter referenced in the string that calls the MAPDL executable.
Best Bill
February 21, 2022 at 8:34 amlschulerSubscriberHi Bill
Thank you for your time and your detailed anser.
I don't think that I can use a thermoelectric analysis for my problem because I need to perform the electrical analysis first before changing parameters values for the thermal analysis. Also, I would like to perform a transient thermal analysis, and it looks like a thermoelectric anaysis is a steady state one.
However, I think I found the answer to my problem with the LDREAD command, which loads the results from another analysis.
Regarding the .dat file, it is indeed what I do. I use Matlab to modify the .dat file and to call Mechanical APDL.
Best Louis
February 21, 2022 at 9:32 amErik KostsonAnsys EmployeeHi Louis
'I don't think that I can use a thermoelectric analysis for my problem because I need to perform the electrical analysis first before changing parameters values for the thermal analysis. Also, I would like to perform a transient thermal analysis, and it looks like a thermoelectric anaysis is a steady state one.'
We can convert the thermoelectric analysis in workbench/mechanical to transient by inserting the
antype,trans and
timint,on
command.
'However, I think I found the answer to my problem with the LDREAD command, which loads the results from another analysis.'
This is OK for one way coupling, for two way coupling (so say the temperatures influence the electric conduction, etc) we need the thermoelectric analysis which is fully coupled.
All the best
Erik
Viewing 3 reply threads- The topic ‘batch mode for coupled analysis’ is closed to new replies.
Ansys Innovation SpaceTrending discussions- At least one body has been found to have only 1 element in at least 2 directions
- Error when opening saved Workbench project
- How to apply Compression-only Support?
- Geometric stiffness matrix for solid elements
- Frictional No separation contact
- Image to file in Mechanical is bugged and does not show text
- Timestep range set for animation export
- Script Error Code:800a000d
- Elastic limit load, Elastic-plastic limit load
- Element has excessive thickness change, distortion, is turning inside out
Top Contributors-
1406
-
599
-
591
-
550
-
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.
-