🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

How to link variables with abaqus slover?

User: "Altair Forum User"
Altair Employee
Updated by Altair Forum User

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:

Find more posts tagged with