UQLink : Abaqus outputs two result files, How can I read the results from both files separately?

Dear Professor,
How do I modify the readabaqusOutput.m file when my abaqus software outputs two result files and I need to read the results from both files separately?
best wishes!
Tony Smith

Dear @Mr121Tony

Since UQLab does not include a readabaqusOutput.m file, I assume it is your own?
Then you probably already use it to parse the output by setting the modelopts.Output.Parser field.
So you can just update readabaqusOutput.m to read both output files and return the values from both files together. Or did I misunderstand your question? If so, can you be more specific about what you are trying to accomplish and where you are stuck?

Best regards
Styfen

Yes, professor. readabaqusOutput.m is a function that reads some data in the output file.

I did a simple example where the finite element model generated two output files “abaqus1.rpt” and" abaqus2.rpt ", and now I need to read one of the data in each file. How should I set up my UQLink program in UQLab? Samplings.m is the main procedure.

Here I’ve uploaded my files.
Test.zip (686.2 KB)

Actually, I’m stuck on how to update the readabaqusOutput.m file.

The results are as follows:
“The first entry must be a file name or file identifier.
Error readabaqusOutput (line 7)
f = fopen(outputfile) ;”

Dear @Mr121Tony

The input argument outputfile corresponds to the ModelOpts.Output.FileName field, which is a cell array of two file names in your case. Therefore, you pass this cell array to fopen instead of a valid file name (this is also what the error message tells you). Just extract the two file names and open these files separately.

Best regards
Styfen

This is so cool. I have solved this problem by use
“m = outputfile{1};
n = outputfile{2};”
@styfen.schaer Thank you very much!

1 Like