Skip to content

Commit

Permalink
Merge pull request #441 from recuero/smallElasticFFT
Browse files Browse the repository at this point in the history
Linear elastic FFT solver
  • Loading branch information
dschwen authored Oct 6, 2020
2 parents c19bd79 + 5e602e8 commit 1c702b2
Show file tree
Hide file tree
Showing 12 changed files with 1,070 additions and 2 deletions.
173 changes: 173 additions & 0 deletions examples/spectralLinearElastic2Materials.i
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@
[Mesh]
type = MyTRIMMesh
dim = 3
xmin = -5
xmax = 5
ymin = -5
ymax = 5
zmin = -5
zmax = 5
nx = 32
ny = 32
nz = 32
[]

[Problem]
type = FFTProblem
[]

[AuxVariables]
[./epsilon_aux_var]
order = CONSTANT
family = MONOMIAL
[../]

[./stress_aux_var]
order = CONSTANT
family = MONOMIAL
[../]

[./elastic_aux_var]
order = CONSTANT
family = MONOMIAL

[../]

[./index_buffer_aux_var]
order = CONSTANT
family = MONOMIAL
[../]

[./stiffness_ratio_aux]
order = CONSTANT
family = MONOMIAL
[./InitialCondition]
type = SmoothSuperellipsoidIC
x1 = 0
y1 = 0
z1 = 0
a = 2
b = 2
c = 2
n = 2
int_width = 0
invalue = 1
outvalue = 4
[../]
[../]
[]

[UserObjects]
# Buffers
[./epsilon]
type = RankTwoTensorFFTWBuffer
[../]
[./stress]
type = RankTwoTensorFFTWBuffer
[../]
# Reciprocal space: Elastic tensor
[./gamma]
type = RankFourTensorFFTWBuffer
[../]
[./elastic]
type = RankFourTensorFFTWBuffer
[../]
[./stiffness_ratio]
type = RealFFTWBuffer
moose_variable = stiffness_ratio_aux
[]
[./index_buffer]
type = RealFFTWBuffer
[]
[]

[AuxKernels]
[./epsilon_aux]
type = FFTBufferAux
variable = epsilon_aux_var
fft_buffer = epsilon
execute_on = final
component = '0 1'
[../]

[./stress_aux]
type = FFTBufferAux
variable = stress_aux_var
fft_buffer = stress
execute_on = final
component = '0 1'
[../]

[./elastic_aux]
type = FFTBufferAux
variable = elastic_aux_var
fft_buffer = elastic
execute_on = final
component = '0 1 0 1'
[../]

[./stiffness_aux]
type = FFTBufferAux
variable = stiffness_ratio_aux
fft_buffer = stiffness_ratio
execute_on = final
[../]

[./index_aux]
type = FFTBufferAux
variable = index_buffer_aux_var
fft_buffer = index_buffer
execute_on = final
[../]
[]

[Executioner]
type = SpectralExecutionerLinearElastic

time_step = 1.0
number_iterations = 300
solver_error = 1.0e-6
global_strain_tensor = '0.0 0.0 0.0 0.0 0.0 0.01'
young_modulus = 1e4
poisson_ratio = 0.3
average_material_factor = 2
[]

[VectorPostprocessors]
[./linevaluex]
type = LineValueSampler
variable = 'epsilon_aux_var stress_aux_var'
start_point = '-4.9999999999 0 0'
end_point = '4.9999999999 0 0'
num_points = 101
sort_by = x
execute_on = final
[../]
[./linevaluey]
type = LineValueSampler
variable = 'epsilon_aux_var stress_aux_var'
start_point = '0 -4.9999999999 0'
end_point = '0 4.9999999999 0'
num_points = 101
sort_by = y
execute_on = final
[../]
[./linevaluez]
type = LineValueSampler
variable = 'epsilon_aux_var stress_aux_var'
start_point = '0 0 -4.9999999999'
end_point = '0 0 4.9999999999'
num_points = 101
sort_by = z
execute_on = final
[../]
[]

[Outputs]
exodus = true
execute_on = 'INITIAL FINAL'
perf_graph = true
[./comp]
type = CSV
[../]
[]
Loading

0 comments on commit 1c702b2

Please sign in to comment.