Skip to content

Commit

Permalink
updated, new files for the RPV thermo-mechanical, nonlinear example p…
Browse files Browse the repository at this point in the history
…roblem
  • Loading branch information
rhdodds committed Aug 8, 2020
1 parent 90511c9 commit 842049c
Show file tree
Hide file tree
Showing 23 changed files with 118,512 additions and 0 deletions.
9 changes: 9 additions & 0 deletions manual_examples_chpt1/example_3_nonlinear/cleanup.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash
#
# cleanup directory after running analysis
#
/bin/rm -f model.text wef* wn* wem* wes* wnd* wne* wns* states_head* >& /dev/null
/bin/rm -f energy *~ *-e *neutral* *exo z* *bak *pyc* *.pdf >& /dev/null
#
echo "> done..."
exit
144 changes: 144 additions & 0 deletions manual_examples_chpt1/example_3_nonlinear/commands.inp
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@

compute displacements for loading press_temp_trans step 5
*input "domain_define_compute.inp"

compute displacements for loading press_temp_trans step 6
*input "domain_define_compute.inp"

compute displacements for loading press_temp_trans step 7
*input "domain_define_compute.inp"

compute displacements for loading press_temp_trans step 8
*input "domain_define_compute.inp"

compute displacements for loading press_temp_trans step 9
*input "domain_define_compute.inp"

compute displacements for loading press_temp_trans step 10
*input "domain_define_compute.inp"

compute displacements for loading press_temp_trans step 11
*input "domain_define_compute.inp"

compute displacements for loading press_temp_trans step 12
*input "domain_define_compute.inp"

compute displacements for loading press_temp_trans step 13
*input "domain_define_compute.inp"

compute displacements for loading press_temp_trans step 14
*input "domain_define_compute.inp"

compute displacements for loading press_temp_trans step 15
*input "domain_define_compute.inp"

compute displacements for loading press_temp_trans step 16
*input "domain_define_compute.inp"

compute displacements for loading press_temp_trans step 17
*input "domain_define_compute.inp"

compute displacements for loading press_temp_trans step 18
*input "domain_define_compute.inp"

compute displacements for loading press_temp_trans step 19
*input "domain_define_compute.inp"

compute displacements for loading press_temp_trans step 20
*input "domain_define_compute.inp"

compute displacements for loading press_temp_trans step 21
*input "domain_define_compute.inp"

compute displacements for loading press_temp_trans step 22
*input "domain_define_compute.inp"

compute displacements for loading press_temp_trans step 23
*input "domain_define_compute.inp"

compute displacements for loading press_temp_trans step 24
*input "domain_define_compute.inp"

compute displacements for loading press_temp_trans step 25
*input "domain_define_compute.inp"

compute displacements for loading press_temp_trans step 26
*input "domain_define_compute.inp"

compute displacements for loading press_temp_trans step 27
*input "domain_define_compute.inp"

compute displacements for loading press_temp_trans step 28
*input "domain_define_compute.inp"

compute displacements for loading press_temp_trans step 29
*input "domain_define_compute.inp"

compute displacements for loading press_temp_trans step 30
*input "domain_define_compute.inp"

compute displacements for loading press_temp_trans step 31
*input "domain_define_compute.inp"

compute displacements for loading press_temp_trans step 32
*input "domain_define_compute.inp"

compute displacements for loading press_temp_trans step 33
*input "domain_define_compute.inp"

compute displacements for loading press_temp_trans step 34
*input "domain_define_compute.inp"

compute displacements for loading press_temp_trans step 35
*input "domain_define_compute.inp"

compute displacements for loading press_temp_trans step 36
*input "domain_define_compute.inp"

compute displacements for loading press_temp_trans step 37
*input "domain_define_compute.inp"

compute displacements for loading press_temp_trans step 38
*input "domain_define_compute.inp"

compute displacements for loading press_temp_trans step 39
*input "domain_define_compute.inp"

compute displacements for loading press_temp_trans step 40
*input "domain_define_compute.inp"

compute displacements for loading press_temp_trans step 41
*input "domain_define_compute.inp"

compute displacements for loading press_temp_trans step 42
*input "domain_define_compute.inp"

compute displacements for loading press_temp_trans step 43
*input "domain_define_compute.inp"

compute displacements for loading press_temp_trans step 44
*input "domain_define_compute.inp"

compute displacements for loading press_temp_trans step 45
*input "domain_define_compute.inp"

compute displacements for loading press_temp_trans step 46
*input "domain_define_compute.inp"

compute displacements for loading press_temp_trans step 47
*input "domain_define_compute.inp"

compute displacements for loading press_temp_trans step 48
*input "domain_define_compute.inp"

compute displacements for loading press_temp_trans step 49
*input "domain_define_compute.inp"

compute displacements for loading press_temp_trans step 50
*input "domain_define_compute.inp"

compute displacements for loading press_temp_trans step 51
*input "domain_define_compute.inp"

compute displacements for loading press_temp_trans step 52
*input "domain_define_compute.inp"
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
!
! define domains for J computation
! at each corner node along front. Use node sets
! at each front location with the initially blunted front
!
! J values at each front location should be
! the same given axisymmetric geometry, loading, material
! properties.
!
! tangent vectors are theta = 0, 3-degrees are needed since
! straight crack front segments do not intersect planes at right
! angles.
!
!
list 'ring 1 front nodes' 2946,
3268 3370 3480 3162 3586 3605,
3055 3606-3616 display
!
list 'ring 2 front nodes' 9954,
9944 9945 9947 9948 9951-9953 9961-9971 display
!
list 'ring 3 front nodes' 15490,
15480 15481 15483 15484 15487 15488 15489 15497-15507 display
!
list 'ring 4 front nodes' 21026,
21016 21017 21019 21020,
21023 21024 21025 21033-21043 display
!
domain theta_0
normal plane nx 0 ny 1.0 nz 0.0
symmetric
node set 1 'ring 1 front nodes'
node set 2 'ring 2 front nodes'
node set 3 'ring 3 front nodes'
node set 4 'ring 4 front nodes'
front node sets 1 2 l3disop
tangent vector tx 0 ty 0 tz 1.0
q-values automatic rings 15-20
function type a
J to K $ just for convenience
!
compute domain integral
!
# domain theta_1_degree
# normal plane nx 0 ny 1.0 nz 0.0
# symmetric
# node set 1 'ring 1 front nodes'
# node set 2 'ring 2 front nodes'
# node set 3 'ring 3 front nodes'
# node set 4 'ring 4 front nodes'
# front node sets 1 2 3 l3disop
# q-values automatic rings 15-20
# function type b
# J to K
# !
# ! compute domain integral
# !
# domain theta_2_degrees
# normal plane nx 0 ny 1.0 nz 0.0
# symmetric
# node set 1 'ring 1 front nodes'
# node set 2 'ring 2 front nodes'
# node set 3 'ring 3 front nodes'
# node set 4 'ring 4 front nodes'
# front node sets 2 3 4 l3disop
# q-values automatic rings 15-20
# function type b
# J to K
# !
# ! compute domain integral
# !
# domain theta_3_degrees
# normal plane nx 0 ny 1.0 nz 0.0
# symmetric
# node set 1 'ring 1 front nodes'
# node set 2 'ring 2 front nodes'
# node set 3 'ring 3 front nodes'
# node set 4 'ring 4 front nodes'
# front node sets 3 4 l3disop
# q-values automatic rings 15-20
# tangent vector tx -0.05233595624294383 ty 0,
# tz 0.9986295347545738
# function type c
# J to K
# !
# compute domain integral
!
119 changes: 119 additions & 0 deletions manual_examples_chpt1/example_3_nonlinear/find_lines_make_plot.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
#
#
from numpy import *
import matplotlib
import matplotlib.pyplot as plt
import os
#from scipy.interpolate import spline Python 2
from scipy import interpolate
#
#
# ----------------------------------------------------------------------------
# ----------------------------------------------------------------------------
#
# functions to make engineering plots with Dodds specific style
# available for anyone to use
#
# ----------------------------------------------------------------------------

from plot_support import *



def read_KJ_values( fname, column ):
#
global KJ_values
f = open(fname, "r")
count = 0
ldebug = 0

while True:

while True:
line = f.readline()
if not line:
break
if line.find( "domain KI plane stress ") > 0:
line = f.readline()
line = f.readline()
words = line.split()
count += 1
KJ_values[count-1,column] = float( words[2] )
KJ_values[count-1,column] = KJ_values[count-1,column]/sqrt(1000.0)
if ldebug: print(KJ_values[count-1,column])


if not line:
break

f.close()
print("Normal EOF on:", filename)
return count


# ----------------------------------------------------------------------------
#
# begin main
#
# ----------------------------------------------------------------------------
#
#set_printoptions(threshold='nan')

ldebug = 0

KJ_values = zeros([1000,10], float64 )
temps = zeros(1000,float64)


filename = "./output_temp_dependent"
num_values = read_KJ_values( filename, 0 )
print("number of values: ", num_values)
filename = "./output_20C_temp"
num_values = read_KJ_values( filename, 1 )
print("number of values: ", num_values)
filename = "./output_250C_temp"
num_values = read_KJ_values( filename, 2 )
print("number of values: ", num_values)
filename = "./output_CTE_clad_zero"
num_values = read_KJ_values( filename, 3 )
print("number of values: ", num_values)

now_temp = 288.0
delta_temp = -4.0
temps = zeros(1000,float64)

for j in range(num_values):
temps[j] = now_temp
now_temp += delta_temp
if ldebug: print(temps[j])

orientation = 0 # landscape
orientation = 1 # portrait
orientation = 0
plot_start( orientation )
#

#
plt.ylim( [0.0, 120.0] )
plt.xlim( [288.0, 90.0] )
plt.xlabel(r'$\mathrm{Inner\ Surface\ Temperature\ (C)}$')
plt.ylabel(r'$K_J\ \ \mathrm{(MPa\sqrt{m})}$')
plt.title( " " )

plt.plot( temps[0:num_values], KJ_values[0:num_values,0], color=colors(0), label="Temperature Dependent" )
plt.plot( temps[0:num_values], KJ_values[0:num_values,1], color=colors(1), label="20C" )
plt.plot( temps[0:num_values], KJ_values[0:num_values,2], color=colors(2), label="250C" )
plt.plot( temps[0:num_values], KJ_values[0:num_values,3], color=colors(3), label="Clad CTE=0",
linestyle=lines(1))
#plt.plot( times_matlab, matlab, 's',markersize=3, color=plot_colors[4],label="MatLab" )

plt.legend(loc='upper left')
#
plot_file_name = 'plot_KJ_vs_temp.pdf'
plot_finish( plot_file_name )
#
print("\n\n... normal end of program")
#
exit(0)


Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
4
#
# stress vs. plastic strain curves for 20C, 250C 400C
# for base (cols 1-3) and clad (cols 4-6)
#
0.0 473.0 433.0 412.0 312. 264. 233.
3.0 630.0 620. 560. 610. 437. 386.
Loading

0 comments on commit 842049c

Please sign in to comment.