Abaqus中有7个模型,名称分别是"w+数字+s+数字",如下图所示。我现在要根据这7个模型,在每个模型里面改grout_circle材料的渗透系数,生成新的INP文件。
变量有两个,一个是w后面的数字,代表注浆圈厚度,一个是n,代表围岩与注浆圈渗透系数的比值。
# -*- coding: mbcs -*-
# Do not delete the following import lines
from abaqus import *
from abaqusConstants import *
import __main__
"""
"""
def change_par_submit_job(thickness, n):
"""
thickness: groutcircle_thickness
n:permeability coefficient ration(surrouding rock/grout circle)
"""
import section
import regionToolset
import displayGroupMdbToolset as dgm
import part
import material
import assembly
import step
import interaction
import load
import mesh
import optimization
import job
import sketch
import visualization
import xyPlot
import displayGroupOdbToolset as dgo
import connectorBehavior
model_name = "w{}s6".format(thickness)
per_value = 1e-6/n
job_name = model_name + "n{}".format(n)
session.viewports['Viewport: 1'].partDisplay.setValues(sectionAssignments=ON,
engineeringFeatures=ON)
session.viewports['Viewport: 1'].partDisplay.geometryOptions.setValues(
referenceRepresentation=OFF)
mdb.models[model_name].materials['grout-circle'].permeability.setValues(
specificWeight=10000.0, inertialDragCoefficient=0.142887, table=((
per_value, 0.02), ))
a = mdb.models[model_name].rootAssembly
a.regenerate()
a = mdb.models[model_name].rootAssembly
session.viewports['Viewport: 1'].setValues(displayedObject=a)
session.viewports['Viewport: 1'].assemblyDisplay.setValues(loads=OFF, bcs=OFF,
predefinedFields=OFF, connectors=OFF)
mdb.Job(name=job_name, model=model_name, description='', type=ANALYSIS,
atTime=None, waitMinutes=0, waitHours=0, queue=None, memory=90,
memoryUnits=PERCENTAGE, getMemoryFromAnalysis=True,
explicitPrecision=SINGLE, nodalOutputPrecision=SINGLE, echoPrint=OFF,
modelPrint=OFF, contactPrint=OFF, historyPrint=OFF, userSubroutine='',
scratch='', resultsFormat=ODB, multiprocessingMode=DEFAULT, numCpus=1,
numGPUs=0)
mdb.jobs[job_name].writeInput(consistencyChecking=OFF)
thicknesses = [2,4,6,8,10,12,14]
ns = [2,10,50,100,200,500]
for thickness in thicknesses:
for n in ns:
change_par_submit_job(thickness, n)
免责声明:本文系网络转载或改编,未找到原创作者,版权归原作者所有。如涉及版权,请联系删