Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: jku
  • Order by date
  1. jku

    Python script: each time write output w/o overwrite

    Your work directory is probably different than the directory you want to save the files to. Try with if os.path.isfile('C:/DOE/'+fname):
  2. jku

    Python script: each time write output w/o overwrite

    Just check first which filenames already exist using os.path.isfile(filename): import os n=1 while True: fname=str(n)+'.csv' if os.path.isfile(fname): #file exists, append counter n=n+1 else: #file not found, exit loop break print(fname) #here...
  3. jku

    Get stress/temperature at nodes in assembly set

    The problem is that the TEMP field output contains values at element integration points and you are trying to extract a nodal subset from it. Use either fieldOutputs['NT11'] or extrapolate the integration point values to nodes using getSubset(region=resultsSet, position=ELEMENT_NODAL).

Part and Inventory Search