@MichaelOkereke Now I have finished my simulation in Abaqus . Now I want a script MATLAB that allows me to control and change young's modulus of my material , and through this i will extract many graphs of force for comparison
Thanks for sharing, I'm not so experienced in Abaqus but wonder if there is away to automate Abqus to generate and excute a multiple model and analyses. I intend to build a multi model to calculate the buckling load for steel beam which varies both in length and stiffness of the support i.e boundry conditions ?
I think this is true. You have to create a Python code that does this and then simply automate it for variables you are interested in. I think you can do this only through a script.
That's very useful video for the beginner like me! Would you have a plan to make another useful videos about subroutine and UMAT in ABAQUS, or how to read python scripts to be embedded in ABAQUS?
Hello @eslingena stugart, thank you for the kind comments. I am happy you found the video useful. With respect to support for UMATs in ABAQUS, that is not something I am doing right now. I intend in future to start working on a series of UMAT-dedicated videos. In the mean time, you may like to consider Dr Ronald Wagner's TH-cam channel where he has a lot of lovely resources on UMATS here: th-cam.com/video/EsMvYd26PRs/w-d-xo.html
Hello sir I want to ask you simple question.. I finished my simulation in abaqus of tensile test now i put a script in python to allow me to change value of young's modulus 10 times si i've now 10 inp and odb files so all what I want is how can I call abaqus to read this odb files automatically to exctract the graph of stress strain or if there is a simple way to do this
It is possible but you will have to develop the python script for doing that especially the post-processing of the ODB files. I do not have any video to this effect on my channel but maybe search around and seeif there is anyone who have such a video to help you. Good luck.
Hello, this is a good question. I will suggest you search out for an answer in ChatGPT. Here is the outcome that I got when I asked it. It looks right, I have not actually tested it out but it does sound right: Integrating Abaqus with MATLAB can be beneficial for performing coupled analyses or leveraging MATLAB's powerful scripting capabilities alongside Abaqus simulations. To set up the Abaqus environment to allow MATLAB to use it, you'll need to follow these general steps: Install Abaqus and MATLAB: Make sure you have both Abaqus and MATLAB installed on your system. It's important that both software packages are correctly installed and working independently before attempting integration. Path Configuration: MATLAB needs to know the path to the Abaqus executable and libraries. This is typically achieved through the MATLAB environment's PATH and LD_LIBRARY_PATH (on Linux) or PATH (on Windows) environment variables. On Windows: Go to "Control Panel" > "System and Security" > "System" > "Advanced system settings" > "Environment Variables". Under "System variables", find "Path" and click "Edit". Add the paths to the Abaqus executable and libraries directories to the list. On Linux: Open a terminal and use the export command to set the LD_LIBRARY_PATH variable to include the Abaqus libraries' path. You can also add this export command to your shell startup files (e.g., .bashrc, .bash_profile, etc.) to make it permanent. Interface Files: Abaqus provides interface files (scripts) that allow MATLAB to communicate with Abaqus and control simulations. These files are located in the Abaqus installation directory. You might find them in a folder named "tools/Scripting". Look for files like abaqus_v6.env, abaqus_v6.bat (Windows), or abaqus_v6.sh (Linux). These files set up the environment for Abaqus scripting. Modify abaqus_v6.env: Edit this file and add lines to specify the Abaqus installation paths and any other required environment variables. Test the Integration: After setting up the environment variables and configuring the interface files, you should test the integration. Launch MATLAB and use its scripting capabilities to interact with Abaqus. For instance, you can use MATLAB to call Abaqus scripts, execute simulations, and retrieve results. MATLAB's system or dos commands can be used to call Abaqus executables and pass simulation commands. You can also use the ! symbol in MATLAB to execute command-line instructions. Here's a basic example of MATLAB code to execute an Abaqus simulation: matlab code abaqusCmd = 'abaqus job=example_input.inp'; system(abaqusCmd); MATLAB Abaqus Toolbox: Another option is to use the MATLAB Abaqus Toolbox, if available. This toolbox provides a graphical interface within MATLAB to set up, run, and post-process Abaqus simulations. It streamlines the process and might eliminate the need for manual scripting. Documentation and Resources: Both Abaqus and MATLAB offer extensive documentation and user guides. Consult these resources for specific information on integrating the two software packages. Additionally, online forums and communities can provide valuable insights and solutions to integration-related issues. Remember that this integration process might vary based on the specific versions of Abaqus and MATLAB you are using, as well as your operating system. Always consult the documentation provided with the software for accurate and up-to-date information.
Hello, *What I do* There is no straight forward command in ABAQUS to do this. What you will have to do is to find a way to monitor to job and then ask it to indicate when a job is completed and then a second one starts. In the past, what I have done is to write a Shell Script which multiple submit options and the next job only executes when a 'JOB COMPLETED' output is detected in the work directory. These sort of external methods are actions people take to monitor ABAQUS JOBs and then run jobs concurrently. *What ABAQUS recommends* ABAQUS has this command called waitForCompletion() which you can use to check the job is completed before loading a next activity. Check more about it from the ABAQUS documentation here: 130.149.89.49:2080/v6.8/books/cmd/default.htm?startat=pt02ch06s08.html Essentially, you hold the job until completion is detected before a next activity is called. In the example in the link, you check for completion before a visualization module is detected and a subsequent plot generated. In your case, you check for completion before sending a new job submit command with your next job name. This is probably a straight forward process for but you have to do it from a Python script. *External methods* I know they are external methods that you can use. Thinking further into your problem, I decided to ask the same question to ChatGPT and below is the ChatGPT-response. I like the *sub-process* option but I have not tested it out. -------------------------------------------------------------------- *Using Python Scripting* If you're running Abaqus jobs via Python scripts, you can employ the subprocess module to execute the second job after the completion of the first job. Python code import subprocess # Run first job subprocess.run('abaqus job=input1.inp', shell=True) # Wait for the completion of the first job # Run the second job subprocess.run('abaqus job=input2.inp', shell=True) This Python script will execute the first job, wait for its completion, and then proceed to execute the second job. *Using Bash Scripting (Linux/macOS)* In a Unix-like environment, you can create a Bash script to wait for the first job to complete before initiating the second job. bash code (shell-scripting language) # Run first job in the background abaqus job=input1.inp & # Wait for the first job to complete wait # Run the second job abaqus job=input2.inp *Using Job Scheduler* If you're working in a cluster or HPC environment, job scheduling software (like Slurm, PBS, or LSF) often provides mechanisms to submit jobs in sequence. You can use job dependencies or job chaining to ensure that the second job starts only after the first job has completed. For example, in Slurm, you can use job dependencies: bash code # Submit the first job and get its job ID job1_id=$(sbatch input1.slurm | awk '{print $4}') # Submit the second job depending on the first job sbatch --dependency=afterok:$job1_id input2.slurm
@MichaelOkereke Now I have finished my simulation in Abaqus . Now I want a script MATLAB that allows me to control and change young's modulus of my material , and through this i will extract many graphs of force for comparison
Hello, it sounds like this is an extra script that you might have to write in MATLAB to do as requested. Good luck with it.
Thanks for sharing, I'm not so experienced in Abaqus but wonder if there is away to automate Abqus to generate and excute a multiple model and analyses. I intend to build a multi model to calculate the buckling load for steel beam which varies both in length and stiffness of the support i.e boundry conditions ?
I think this is true. You have to create a Python code that does this and then simply automate it for variables you are interested in. I think you can do this only through a script.
That's very useful video for the beginner like me! Would you have a plan to make another useful videos about subroutine and UMAT in ABAQUS, or how to read python scripts to be embedded in ABAQUS?
Hello @eslingena stugart, thank you for the kind comments. I am happy you found the video useful. With respect to support for UMATs in ABAQUS, that is not something I am doing right now. I intend in future to start working on a series of UMAT-dedicated videos. In the mean time, you may like to consider Dr Ronald Wagner's TH-cam channel where he has a lot of lovely resources on UMATS here: th-cam.com/video/EsMvYd26PRs/w-d-xo.html
Hello sir I want to ask you simple question.. I finished my simulation in abaqus of tensile test now i put a script in python to allow me to change value of young's modulus 10 times si i've now 10 inp and odb files so all what I want is how can I call abaqus to read this odb files automatically to exctract the graph of stress strain or if there is a simple way to do this
It is possible but you will have to develop the python script for doing that especially the post-processing of the ODB files. I do not have any video to this effect on my channel but maybe search around and seeif there is anyone who have such a video to help you. Good luck.
How do we set up the abaqus environment to allow matlab to use it?
Hello, this is a good question. I will suggest you search out for an answer in ChatGPT. Here is the outcome that I got when I asked it. It looks right, I have not actually tested it out but it does sound right:
Integrating Abaqus with MATLAB can be beneficial for performing coupled analyses or leveraging MATLAB's powerful scripting capabilities alongside Abaqus simulations. To set up the Abaqus environment to allow MATLAB to use it, you'll need to follow these general steps:
Install Abaqus and MATLAB:
Make sure you have both Abaqus and MATLAB installed on your system. It's important that both software packages are correctly installed and working independently before attempting integration.
Path Configuration:
MATLAB needs to know the path to the Abaqus executable and libraries. This is typically achieved through the MATLAB environment's PATH and LD_LIBRARY_PATH (on Linux) or PATH (on Windows) environment variables.
On Windows:
Go to "Control Panel" > "System and Security" > "System" > "Advanced system settings" > "Environment Variables".
Under "System variables", find "Path" and click "Edit".
Add the paths to the Abaqus executable and libraries directories to the list.
On Linux:
Open a terminal and use the export command to set the LD_LIBRARY_PATH variable to include the Abaqus libraries' path.
You can also add this export command to your shell startup files (e.g., .bashrc, .bash_profile, etc.) to make it permanent.
Interface Files:
Abaqus provides interface files (scripts) that allow MATLAB to communicate with Abaqus and control simulations. These files are located in the Abaqus installation directory. You might find them in a folder named "tools/Scripting". Look for files like abaqus_v6.env, abaqus_v6.bat (Windows), or abaqus_v6.sh (Linux). These files set up the environment for Abaqus scripting.
Modify abaqus_v6.env:
Edit this file and add lines to specify the Abaqus installation paths and any other required environment variables.
Test the Integration:
After setting up the environment variables and configuring the interface files, you should test the integration. Launch MATLAB and use its scripting capabilities to interact with Abaqus.
For instance, you can use MATLAB to call Abaqus scripts, execute simulations, and retrieve results. MATLAB's system or dos commands can be used to call Abaqus executables and pass simulation commands. You can also use the ! symbol in MATLAB to execute command-line instructions.
Here's a basic example of MATLAB code to execute an Abaqus simulation:
matlab code
abaqusCmd = 'abaqus job=example_input.inp';
system(abaqusCmd);
MATLAB Abaqus Toolbox:
Another option is to use the MATLAB Abaqus Toolbox, if available. This toolbox provides a graphical interface within MATLAB to set up, run, and post-process Abaqus simulations. It streamlines the process and might eliminate the need for manual scripting.
Documentation and Resources:
Both Abaqus and MATLAB offer extensive documentation and user guides. Consult these resources for specific information on integrating the two software packages. Additionally, online forums and communities can provide valuable insights and solutions to integration-related issues.
Remember that this integration process might vary based on the specific versions of Abaqus and MATLAB you are using, as well as your operating system. Always consult the documentation provided with the software for accurate and up-to-date information.
Hi, a quick question. How to ask abaqus to wait for the first job to complete and then start the second job?
Hello,
*What I do*
There is no straight forward command in ABAQUS to do this. What you will have to do is to find a way to monitor to job and then ask it to indicate when a job is completed and then a second one starts. In the past, what I have done is to write a Shell Script which multiple submit options and the next job only executes when a 'JOB COMPLETED' output is detected in the work directory. These sort of external methods are actions people take to monitor ABAQUS JOBs and then run jobs concurrently.
*What ABAQUS recommends*
ABAQUS has this command called waitForCompletion() which you can use to check the job is completed before loading a next activity. Check more about it from the ABAQUS documentation here: 130.149.89.49:2080/v6.8/books/cmd/default.htm?startat=pt02ch06s08.html
Essentially, you hold the job until completion is detected before a next activity is called. In the example in the link, you check for completion before a visualization module is detected and a subsequent plot generated. In your case, you check for completion before sending a new job submit command with your next job name. This is probably a straight forward process for but you have to do it from a Python script.
*External methods*
I know they are external methods that you can use. Thinking further into your problem, I decided to ask the same question to ChatGPT and below is the ChatGPT-response. I like the *sub-process* option but I have not tested it out.
--------------------------------------------------------------------
*Using Python Scripting*
If you're running Abaqus jobs via Python scripts, you can employ the subprocess module to execute the second job after the completion of the first job.
Python code
import subprocess
# Run first job
subprocess.run('abaqus job=input1.inp', shell=True)
# Wait for the completion of the first job
# Run the second job
subprocess.run('abaqus job=input2.inp', shell=True)
This Python script will execute the first job, wait for its completion, and then proceed to execute the second job.
*Using Bash Scripting (Linux/macOS)*
In a Unix-like environment, you can create a Bash script to wait for the first job to complete before initiating the second job.
bash code (shell-scripting language)
# Run first job in the background
abaqus job=input1.inp &
# Wait for the first job to complete
wait
# Run the second job
abaqus job=input2.inp
*Using Job Scheduler*
If you're working in a cluster or HPC environment, job scheduling software (like Slurm, PBS, or LSF) often provides mechanisms to submit jobs in sequence. You can use job dependencies or job chaining to ensure that the second job starts only after the first job has completed. For example, in Slurm, you can use job dependencies:
bash code
# Submit the first job and get its job ID
job1_id=$(sbatch input1.slurm | awk '{print $4}')
# Submit the second job depending on the first job
sbatch --dependency=afterok:$job1_id input2.slurm