How to link variables with abaqus slover?


Hi, I'm using abaqus as a slover. There are two models which should be optimize synchronously, so some variables were linked.
--------------------------------
Acitive Label Varname Expression
1 com1_1 m_1_varname_1
1 com2_1 m_2_varname_1 m_1_varname_1
--------------------------------
But when the 'evaluate' was conducted, there are errors occured:
--------------------------------
13 Error : Scalar value expected for ( com2_1 (m_2_varname_1) )
14 Warning: Could not set the value of variable ( com2_1 (m_2_varname_1) ) in model ( Model 2 (m_2) )
--------------------------------
I'm wondering whether the slover script didn't support the two models link variables?
--------------------------------
#!/usr/bin/env python
''' Example script to run abaqus
'''
# import statements
import os
import platform
import subprocess
import sys
# user edits-------------------------------------------------------------------
# set abaqus path use forward slashes (/)
abaqus_exe = 'C:/SIMULIA/Abaqus/Commands/abq6121.bat'
# set abaqus arguments
abaqus_arguments = 'job=' + sys.argv[1] + ' ' + 'memory=20000Mb cpus=36 interactive'
# set log file name
logFile = 'logFile.txt'
# -----------------------------------------------------------------------------
# open log file
f = open('logFile.txt', 'w')
# get environment information
plat = platform.system()
hst_altair_home = ''
strEnvVal = os.getenv('HST_ALTAIR_HOME')
if strEnvVal:
hst_altair_home = strEnvVal
else:
f.write('%EXA_xx-e-env, Environment variable not defined ( HST_ALTAIR_HOME )')
abaqus_exe = os.path.normpath(abaqus_exe)
lstCommands = [abaqus_exe, abaqus_arguments]
# echo log information
f.write('platform: ' + plat + '\n')
f.write('hst_altair_home: ' + hst_altair_home + '\n')
f.write('abaqus command: ' + abaqus_exe + '\n')
#execute the command
f.write('Running the command:\n' + ' '.join(lstCommands) + '\n')
p1 = subprocess.Popen(' '.join(lstCommands), stdout=subprocess.PIPE , stderr=subprocess.PIPE)
# log the standard out and error
f.write('\nStandard out' + '\n' + p1.communicate()[0] + '\n')
f.write('\nStandard error' + '\n' + p1.communicate()[1] + '\n')
# close log file
f.close()
# End of file:
Answers
-
Are you able to execute nominal run for any other single model(without linking)?Please share which version of HyperStudy & Abaqus you are using at your end?
0 -
Meanwhile you can also look in to relative videos on Solvers script from DOE Ebook.
https://altairuniversity.com/free-ebook-design-of-experiments-with-hyperstudy-a-study-guide/ (Link to Download Ebook)
0 -
Altair Forum User said:
Are you able to execute nominal run for any other single model(without linking)?Please share which version of HyperStudy & Abaqus you are using at your end?
Thanks for your replying. The nominal run worked well and two models can get their results, but the second model's variable can change in accordance with the first model.
The hyperworks is 14.0 with the abaqus is 6.12. Is that matter?
0 -
Could you share .hstx or .xml file for better understanding?
0 -
Altair Forum User said:
Could you share .hstx or .xml file for better understanding?
Thanks. I'will upload later~~~
0 -
Altair Forum User said:
Could you share .hstx or .xml file for better understanding?
I'm so grateful! Here is the .xml and with models~~~
0 -
Thanks for sharing all required information.I will check internally and let you know the outcome.
0 -
HyperStudy doesn’t support linking two string variables today. We have enhancement request for this feature.
As a workaround, We would recommend using output stream redirection as shown the attached example. The example shows how a single tpl file can be used to write multiple other files using only a single. This allows the user to get the same string variable value written into more than one file without using a link in HyperStudy. From the point of view of the HST framework there is only one variable.
This process will result in both files written into the same directory. In 14.0 the user may need to use some custom solver scripts to run both of these files. In 2017.2, you could use a combination of model resources and an operator model to avoid a custom script.
0