Skip to content

Commit

Permalink
update IGA example (refs idaholab#18768)
Browse files Browse the repository at this point in the history
  • Loading branch information
aeslaughter committed Apr 13, 2022
1 parent 53c8854 commit 5709fce
Show file tree
Hide file tree
Showing 8 changed files with 4,368 additions and 75 deletions.
1 change: 1 addition & 0 deletions framework/doc/acronyms.yml
Expand Up @@ -22,6 +22,7 @@ GUI: graphical user interface
HIT: Hierarchical Input Text
HPC: High Performance Computing
I/O: Input/Output
IGA: Isogeometric Analysis
INL: Idaho National Laboratory
IT: Information Technology
JFNK: Jacobian-Free Newton-Krylov
Expand Down
Expand Up @@ -98,7 +98,9 @@ The [!ac](MOOSE) development team at [!ac](INL) occasionally hosts live training

MOOSE training events will typically be announced on the [home page](index.md exact=true), but be sure to join the [mailing list](help/contact_us.md) for further updates!

## Isogeometric Analysis

[tensor_mechanics/examples/cframe_iga.md]

## C++ Programming References id=programming

Expand Down
@@ -0,0 +1,42 @@
# Isogeometric Analysis in MOOSE

This example illustrates using [!ac](IGA) within MOOSE framework to perform a simulation. This example simulates
loads applied to a "c-frame" to determine the maximum principal stress.

## Creating IGA Mesh

To create the mesh file included int this example a Coreform Cubit license is needed.
Coreform Cubit is a product released and maintained by Coreform, LLC.
A free to use [Cubit Learn license](https://coreform.com/products/coreform-cubit/free-meshing-software/) can be acquired.

!alert! note title=Mesh Generation with Cubit
The following is not required to run the example, but is required to
generate the input mesh that is included in the example. To execute
the Cubit journal file in batch from the command line use the
following command:

```
coreform_cubit -batch cframe_build.jou
```
!alert-end!

Within the journal file, see [!ref](cframe_jou), there are unique commands that will generate a uspline on the discretized mesh.

- Line 35 sets the degree and continuity of the uspline
- As of this writing, the max degree supported by libmesh is 2.
- All continuity must equal p-1 where p is the degree.
- Line 36 constructs the uspline using the geometry as a basis.
- Line 37 fits the uspline that was built to the geometry.

!listing examples/cframe_iga/cframe_build.jou id=cframe_jou caption=Complete Coreform Cubit file for generating [!ac](IGA) input mesh

## MOOSE-IGA Simulation

Performing the simulation utilizing the mesh created above does not require much with respect to the MOOSE input, simply
load the mesh from a file and select utilize the RATIONAL_BERNSTEIN element family as shown in [!ref](moose-iga-input).
Exporting using the VTK format (`vtk = true`) input will output in a format that will capture the higher-order nature
of the [!ac](IGA) based elements using Paraview visualization.

!listing examples/cframe_iga/cframe_iga.i id=moose-iga-input caption=Complete input file for running example problem with [!ac](IGA) in MOOSE.

!media tensor_mechanics/cframe_iga.png id=moose-iga-vtk caption=Maximum principal stress for "c-frame" example utilizing [!ac](IGA) in MOOSE.
24 changes: 0 additions & 24 deletions modules/tensor_mechanics/examples/cframe_iga/README.md

This file was deleted.

54 changes: 7 additions & 47 deletions modules/tensor_mechanics/examples/cframe_iga/cframe_iga.i
@@ -1,7 +1,4 @@
#
[GlobalParams]
order = SECOND
family = RATIONAL_BERNSTEIN
displacements = 'disp_x disp_y disp_z'
[]

Expand All @@ -15,10 +12,16 @@

[Variables]
[disp_x]
order = SECOND
family = RATIONAL_BERNSTEIN
[]
[disp_y]
order = SECOND
family = RATIONAL_BERNSTEIN
[]
[disp_z]
order = SECOND
family = RATIONAL_BERNSTEIN
[]
[]

Expand Down Expand Up @@ -123,7 +126,6 @@
[]

[Materials]
active = 'density_AL stress strain elasticity_tensor_AL'
[elasticity_tensor_AL]
#Creates the elasticity tensor using concrete parameters
youngs_modulus = 24e6 #psi
Expand All @@ -139,12 +141,6 @@
#Computes the stress, using linear elasticity
type = ComputeLinearElasticStress
[]
[hoop_stress_clad]
type = RankTwoCylindricalComponent
rank_two_tensor = stress
cylindrical_component = HoopStress
property_name = Hoop_Stress
[]
[density_AL]
#Defines the density of steel
type = GenericConstantMaterial
Expand All @@ -161,7 +157,6 @@
[]
[]


[Postprocessors]
[max_principal_stress]
type = PointValue
Expand All @@ -175,20 +170,8 @@
[]
[]

#[VectorPostprocessors]
# [axial_stress_base_0_0]
# type = LineValueSampler
# num_points = 20
# outputs = vpp
# sort_by = id
# start_point = '0 0.5 0'
# end_point = '0 -0.5 0'
# variable = stress_yy
# []
#[]

[Executioner]
#We solve a steady state problem using Newton's iteration
# We solve a steady state problem using Newton's iteration
type = Steady
solve_type = NEWTON
nl_rel_tol = 1e-9
Expand All @@ -199,29 +182,6 @@
petsc_options_value = 'hypre boomeramg 31'
[]

[Reporters]
[constrainedDOF]
type=MeshInfo
items="num_dofs_constrained num_dofs_nonlinear"
[]
[]

[Outputs]
vtk = true
exodus = true
perf_graph = true
# [vpp]
# type = CSV
# file_base = 'csv/out'
# execute_on = timestep_end
# []
[probe]
type = CSV
execute_on = 'final'
file_base = 'probe_data'
[]
[]

#[Debug]
#show_material_props = true
#[]
@@ -0,0 +1,25 @@
<?xml version="1.0"?>
<VTKFile type="PUnstructuredGrid" version="0.1" byte_order="LittleEndian" header_type="UInt32" compressor="vtkZLibDataCompressor">
<PUnstructuredGrid GhostLevel="1">
<PPointData RationalWeights="RationalWeights">
<PDataArray type="Float64" Name="RationalWeights"/>
<PDataArray type="Float64" Name="von_mises"/>
<PDataArray type="Float64" Name="Max_Princ"/>
<PDataArray type="Float64" Name="stress_xx"/>
<PDataArray type="Float64" Name="stress_yy"/>
<PDataArray type="Float64" Name="stress_zz"/>
<PDataArray type="Float64" Name="disp_x"/>
<PDataArray type="Float64" Name="disp_y"/>
<PDataArray type="Float64" Name="disp_z"/>
</PPointData>
<PCellData>
<PDataArray type="Int32" Name="libmesh_elem_id"/>
<PDataArray type="Int32" Name="subdomain_id"/>
<PDataArray type="Int32" Name="processor_id"/>
</PCellData>
<PPoints>
<PDataArray type="Float64" Name="Points" NumberOfComponents="3"/>
</PPoints>
<Piece Source="cframe_iga_out_001_0.vtu"/>
</PUnstructuredGrid>
</VTKFile>

0 comments on commit 5709fce

Please sign in to comment.