Skip to content

Commit

Permalink
Example modified, path plot added
Browse files Browse the repository at this point in the history
  • Loading branch information
mkraska committed Jun 13, 2016
1 parent 7249d84 commit 5a14160
Show file tree
Hide file tree
Showing 20 changed files with 197 additions and 47 deletions.
39 changes: 19 additions & 20 deletions Thermal/Thermal shock/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
Tested with CGX/CCX 2.10

+ Transient coupled thermo-mechanical analysis
+ Stress due to non-homogeneous temperature
+ Time history plot
+ Bending of a plate due to one-sided heating
+ Time history excitation and deflection plot
+ Cross thickness temperature and stress plot

File | Contents
:------------- | :-------------
Expand All @@ -12,34 +13,35 @@ File | Contents
[post.fbl](post.fbl) | CGX script, post-processing, images and plots
[anim.fbl](anim.fbl) | CGX script, movie
[history.gnu](history.gnu)| Gnuplot script for the time history plot
[profile.gnu](profile.gnu)| Gnuplot script for the profile plot

The model represents a cantilever plate. The upper face is exposed to a heat
impulse (excitation), defined by a time-dependent heat flux density.
The model represents a rectangular plate, which is supported in the center and exposed to a transient heat flux (excitation) at the upper side.

A cross-thickness temperature gradient develops and remains for the duration of
the excitation time.
A cross-thickness temperature and stress gradient develops and remains for the duration of
the excitation time, leading to transient bending of the plate.

Corresponding to the temperature gradient, a strain gradient develops. which leads to
a curvature (bending) of the plate.
<img src="Refs/profile.png" width="400" title="Temperature and stress profile at the center of the plate">
<img src="Refs/hist.png" width="400" title="Time history plot of the excitation and the tip deflection">

<img src="Refs/start.png" width="260" title="Deflection and temperature profile, initial state">
<img src="Refs/end_of_excitation.png" width="260" title="Deflection and temperature profile at the end of the excitation">
<img src="Refs/end.png" width="260" title="Deflection and temperature profile at the end of the simulation">

<img src="Refs/hist.png" title="Time history plot of the excitation and the tip deflection">


## Pre-Processing
```
> cgx -b pre.fbl
```
The geometry consists of a single brick with a structured hex mesh (C3D8I elements).
The simulation domain is restricted to one quarter of the plate due to symmetry. It is meshed with 6 layers of C3D20R elements with cross thickness bias to capture the high gradients at the excitation side.
The element size is biased (smaller at the support) because of the higher
longitudinal temperature gradients.

A set with a single node at the tip is defined for history plot generation.
A set with a single node at the vertex of the plate is defined for history plot generation.

A node set marking a cross section path for plotting temperature and stress profiles is also defined.

<img src="Refs/mesh.png" width="400" title="Excitation surface (yellow), support and heat sink (red), history plot node (blue)">
<img src="Refs/mesh.png" width="400" title="Excitation surface (yellow), symmetry (red), history plot node (blue), profile path (magenta)">
<img src="Refs/meshzoom.gif" width="400" title="Mesh with cross thickness bias">

## Solving

Expand All @@ -63,12 +65,9 @@ Create a time history animation of the deformed shape colored by the temperature
<img src="movie.gif" width="400" title="Animation of the temperature history">

```
> cgx -b plots.fbl
> cgx -b post.fbl
```
creates
1. a time history plot of the deflection of the plate tip
2. a time history plot of the excitation function
3. a custom plot with both curves
creates the images used in the introduction above:
1. a time history plot of the excitation intensity and the deflection of the plate tip
2. a cross section temperature and stress profile plot
4. Images of initial and final state and of the state at the end of the excitation.

Images from 3. and 4. are found at the top of this page.
Binary file modified Thermal/Thermal shock/Refs/end.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Thermal/Thermal shock/Refs/end_of_excitation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Thermal/Thermal shock/Refs/hist.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Thermal/Thermal shock/Refs/mesh.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Thermal/Thermal shock/Refs/meshzoom.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Thermal/Thermal shock/Refs/profile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Thermal/Thermal shock/Refs/start.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions Thermal/Thermal shock/amplitude.gnu
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
set term postscript landscape monochrom
#set term x11
set out "amplitude.ps"
set grid
set title "Amplitude"
set ylabel " y "
set xlabel " x "
plot "excite.out" using 2:3 title 'excite' with linespoints
16 changes: 11 additions & 5 deletions Thermal/Thermal shock/anim.fbl
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
read solve.frd new
rot x
rot z
frame
rot c 40
rot d 60
rot c 90
rot r 5
rot u 3
view elem
zoom 1.3
zoom 3
tra u 10
tra l 10
# animation of the deformed geometry coloured by the temperature
seta base se all
copy all new mir y
copy all new mir z
view disp
scal d 1000
scal d 500
anim real
movi frames auto
ds 2 ah 1
9 changes: 9 additions & 0 deletions Thermal/Thermal shock/graph_0.gnu
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
set term postscript landscape monochrom
#set term x11
set out "graph_0.ps"
set title "Values at Nodes (post.fbl)"
set grid
set ylabel " D1 "
set xlabel " Time "
plot "graph_0.out" using 3:5 title 'Node=498' with linespoints

8 changes: 8 additions & 0 deletions Thermal/Thermal shock/graph_1.gnu
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
set term postscript landscape monochrom
#set term x11
set out "graph_1.ps"
set grid
set title "Values at Nodes (post.fbl)"
set ylabel " T "
set xlabel " Length "
plot "graph_1.out" using 2:3 title 'Setname NNpath' with linespoints
8 changes: 8 additions & 0 deletions Thermal/Thermal shock/graph_2.gnu
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
set term postscript landscape monochrom
#set term x11
set out "graph_2.ps"
set grid
set title "Values at Nodes (post.fbl)"
set ylabel " SZZ "
set xlabel " Length "
plot "graph_2.out" using 2:3 title 'Setname NNpath' with linespoints
Binary file modified Thermal/Thermal shock/movie.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
55 changes: 55 additions & 0 deletions Thermal/Thermal shock/plots.fbl
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
read values.fbl
read Naht.frd new

# compute the probe locations
valu two 2
valu neg -1
valu NBh / NB two
valu xN - L o1
valu xN - xN NBh
valu lgh / lg two
valu l1h / l1 two
valu yN + y1 l1h
valu yF + y1 l1
valu yF + yF lgh
valu zbot * T1 neg
valu ztop + Gap T2

# select the nodes
seta nodes n all
enq nodes topseam rec xN yN ztop 1 i
enq nodes topfault rec xN yF ztop 1 i
enq nodes botseam rec xN yN zbot 1 i
enq nodes botfault rec xN yF zbot 1 i

# create the time history plots
seta probes se topseam topfault botseam botfault
graph probes time NDTEMP T
sys convert -rotate 90 graph_0.ps Refs/history.png

# document the probe positions
rot x
rot c 90
font d 6
zoom 2
text Positions of the probes
plot na probes
hcpy png
sys mv hcpy_1.png Refs/probes.png

# path plot along the seam on the upper side
enq nodes top rec xN _ ztop 0.1 a
ds -0 e 1
graph top length +
sys convert -rotate 90 graph_1.ps Refs/pathplot.png

# plot the path
rot y
frame
rot r 20
rot u 20
zoom 3
text Path for temperature profile
plot n top
hcpy png
sys mv hcpy_2.png Refs/path.png
37 changes: 28 additions & 9 deletions Thermal/Thermal shock/post.fbl
Original file line number Diff line number Diff line change
@@ -1,31 +1,50 @@
read solve.frd new
read solve.inp nom
#max 2.5 f
rot x
rot -y
rot c -90
rot l 70
rot u 10
frame
rot c 40
rot d 60
view elem
zoom 1.3
zoom 2
min 0 f l
max 2 f l

# time history plots
graph * amp
graph Nhist time DISP D1
sys gnuplot history.gnu

# path plots
ds 71 e 1
graph Npath length
ds 72 e 3
graph Npath length

# create screen shots
seta base se all
copy all new mir y
copy all new mir z
view disp
scal d 1000
scal d 500

ds 2 e 1
plot fv base
plus e new n
hcpy png
sys mv hcpy_1.png Refs/start.png

ds 71 e 1
plot fv base
plus e new n
hcpy png
sys mv hcpy_2.png Refs/end_of_excitation.png

ds 149 e 1
plot fv base
plus e new n
hcpy png
sys mv hcpy_3.png Refs/end.png

# time history plots
graph * amp
graph Nhist time DISP D1
min 0 f u
max 1 f u
45 changes: 34 additions & 11 deletions Thermal/Thermal shock/pre.fbl
Original file line number Diff line number Diff line change
Expand Up @@ -3,39 +3,62 @@
valu th 2
valu wi 20
valu le 100
valu two
valu le_half / le two

# Part th x wi x le et
pnt p1 0 0 0
swep all new tra 0 0 le 40
bia L001 4
swep all new tra th 0 0 4
swep all new tra th 0 0 12
bia all 4
swep all new tra 0 wi 0 8
swep all new tra 0 0 le 20

# meshing
elty all he8i
elty all he20r
mesh all
send all abq

# distributed flux (excitation)
seta nodes n all
enq nodes excite rec 0 _ _ 0.1
enq nodes excite rec 0 _ _ 0.001
comp excite do
send excite abq dflux 50
# temperature constraint
enq nodes fix rec _ _ 0 0.1
send fix abq spc 123t
# temperature constraint and uz=0
enq nodes zsym rec _ _ 0 0.001
send zsym abq spc 3
# symmetry at y=0
enq nodes ysym rec _ 0 _ 0.001
send ysym abq spc 2
# node for x constraint
enq nodes x0 rec 0 0 0 0.001
send x0 abq spc 1
# node for displacement history plot
enq nodes hist rec 0 wi le 0.01
enq nodes hist rec 0 wi le 0.001
send hist abq nam

# nodes for cross thickness path
enq nodes path rec _ 0 0 0.001
send path abq nam
rot x
frame
rot c 40
rot d 60
view elem
zoom 1.3
plot f excite
plus n fix
plus n zsym
plus n ysym
plus n x0 k
plus na hist b
plus n path m
hcpy png
sys mv hcpy_1.png Refs/mesh.png

plot f all n
rot z
rot c 90
zoom 5
rot r 6
rot u 5

hcpy gif
sys mv hcpy_1.gif Refs/meshzoom.gif
13 changes: 13 additions & 0 deletions Thermal/Thermal shock/profile.gnu
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
set term pngcairo enhanced
set out "Refs/profile.png"
set key top right
set title "Cross thickness profile at end of excitation"
set grid
set xlabel "Distance in mm"
set ylabel "{/Symbol D}T in K"
set yrange [-1:2]
set y2label "Stress in MPa"
set y2range [-1:2]
set y2tics
plot "graph_1.out" using 2:3 axes x1y1 title "{/Symbol D}T" w l,\
"graph_2.out" using 2:3 axes x1y2 title "{/Symbol s}_{zz}" w l lt 3
6 changes: 4 additions & 2 deletions Thermal/Thermal shock/solve.inp
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
*include, input=all.msh
*include, input=hist.nam
** heat sink with T=0
*include, input=path.nam
*boundary
*include, input=fix_123t.bou
*include, input=ysym_2.bou
*include, input=zsym_3.bou
*include, input=x0_1.bou
** material definition
*material, name=steel
*elastic
Expand Down
Binary file modified Thermal/Thermal shock/solve.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 5a14160

Please sign in to comment.