Skip to content

Commit

Permalink
Merge pull request #16 from NorbertHofbauer/main
Browse files Browse the repository at this point in the history
Update to Cubit 2024.3
  • Loading branch information
NorbertHofbauer authored Apr 1, 2024
2 parents f7abdd4 + be84a58 commit 0dcd8c9
Show file tree
Hide file tree
Showing 104 changed files with 567 additions and 1,206 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ After the run with CalculiX the results will be automatically converted for Para

Here you can find the source code and a build for linux.

This component was build with Cubit 2023.8!
This component was build with Cubit 2024.3!

Tested with Cubit 2023.8 and 2023.11 on Ubuntu 22.04
Tested with Cubit 2024.3 on Ubuntu 22.04

# Key Features
Definition of:
Expand Down
Binary file modified build/libcalculix_comp.ccl
Binary file not shown.
Binary file modified build/libcalculix_plugin.ccm
Binary file not shown.
2 changes: 2 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
2024-04-01 deprecating ccx2paraview
2024-04-01 Update from Cubit 2023.11 to 2024.3
125 changes: 125 additions & 0 deletions examples/Welding/shrinkage_model.jou
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
#!cubit

# the model is a rebuild of https://github.com/calculix/CalculiX-Examples/tree/master/Thermal/Thermal%20distortion but without contact definitions

reset

#{tf = 10}
#{bf = 100}
#{length = 500}
#{tw = 10}
#{hw = 100}
#{a = 7}
#{dls = 25}

# flange
create brick x {bf} y {tf} z {length/2}
# web
create brick x {tw/2} y {hw} z {length/2}
# seam
create brick x {a/sqrt(2)} y {a/sqrt(2)} z {length/2-dls}
webcut volume 3 with plane xplane offset 0 rotate 45 about z center 0 0 0
delete volume 3
compress

#move to position
move Vertex 7 location 0 0 0 include_merged
move Vertex 15 location 0 {tf} 0 include_merged
move Vertex 18 location {tw/2} {tf} 0 include_merged


#we will first merge all together and mesh and then unmerge the web and the flange
imprint vol all
merge vol all
#vol all size auto factor 5
mesh vol all
#unmerge all
unmerge vol all
#reconnect with seam
merge vol 1 3
merge vol 2 3

#create blocks
block 1 add volume 1
block 1 name "flange"
block 2 add volume 2
block 2 name "web"
block 3 add volume 3
block 3 name "seam"

#block all element type hex8
#hex 20 is way more accurate, you can play with the auto size factor and hex8 to see the difference
block all element type hex20
# hex20 will be c3d20 but can also be modified
#ccx block all element_type C3D20R

# create nodesets for boundary conditions
nodeset 1 add surface 10 4
nodeset 1 name "symm_x"
nodeset 2 add surface 2 8 16
nodeset 2 name "symm_z"
nodeset 3 add vertex 7
nodeset 3 name "fixed_y"
nodeset 4 add volume 3
nodeset 4 name "seam_temp"
nodeset 5 add volume all
nodeset 5 name "initial_temp"

#material
create material "steel" property_group "CalculiX-FEA"
modify material "steel" scalar_properties "CCX_ELASTIC_USE_CARD" 1
modify material "steel" scalar_properties "CCX_ELASTIC_ISO_USE_CARD" 1
modify material "steel" matrix_property "CCX_ELASTIC_ISO_MODULUS_VS_POISSON_VS_TEMPERATURE" 210000 0.3 0
modify material "steel" scalar_properties "CCX_PLASTIC_ISO_USE_CARD" 1
modify material "steel" scalar_properties "CCX_DENSITY_USE_CARD" 1
modify material "steel" matrix_property "CCX_DENSITY_DENSITY" 7.9e-06 0
modify material "steel" scalar_properties "CCX_SPECIFIC_HEAT_USE_CARD" 1
modify material "steel" matrix_property "CCX_SPECIFIC_HEAT_SPECIFIC_HEAT" 5e+08 0
modify material "steel" scalar_properties "CCX_EXPANSION_USE_CARD" 1
modify material "steel" scalar_properties "CCX_EXPANSION_ISO_USE_CARD" 1
modify material "steel" matrix_property "CCX_EXPANSION_ISO_A_TEMPERATURE" 1.2e-05 0
modify material "steel" scalar_properties "CCX_CONDUCTIVITY_USE_CARD" 1
modify material "steel" scalar_properties "CCX_CONDUCTIVITY_ISO_USE_CARD" 1
modify material "steel" matrix_property "CCX_CONDUCTIVITY_ISO_K_TEMPERATURE" 50 0

#sections
ccx create section solid block all material 1

#boundary conditions
create temperature on nodeset 5 value 0 #will be used as initial condition
create temperature on nodeset 4 value -1000 #our seam temperature
ccx modify temperature 2 keyword_type temp
create displacement on nodeset 1 dof 1 dof 6 fix 0 #x symm
create displacement on nodeset 2 dof 3 dof 4 fix 0 #z symm
create displacement on nodeset 3 dof 2 fix 0 dof 5 #fixed point in y

#initial conditions
ccx create initialcondition temperature
ccx modify initialcondition 1 temperature bc_id 1

#outputs
ccx create fieldoutput name "fo_node" node
ccx modify fieldoutput 1 node
ccx modify fieldoutput 1 node key_on U NT
ccx modify fieldoutput 1 node key_off CP DEPF DEPT DTF HCRI KEQ MACH MAXU MF PNT POT PRF PS PSF PT PTF PU RF RFL SEN TS TSF TT TTF TURB V VF
ccx create fieldoutput name "fo_element" element
ccx modify fieldoutput 2 element
ccx modify fieldoutput 2 element key_on E S
ccx modify fieldoutput 2 element key_off CEEQ ECD EMFB EMFE ENER ERR HER HFL HFLF MAXE MAXS ME PEEQ PHS SF SMID SNEG SPOS SVF SDV THE ZZS

# add homogeneous bc
ccx hbc add bc displacement 1
ccx hbc add bc displacement 2
ccx hbc add bc displacement 3

# create step
ccx create step name "static" static
ccx step 1 add bc temperature 2
ccx step 1 add fieldoutput 1
ccx step 1 add fieldoutput 2

#job
ccx create job name "shrinkage_model"
ccx run job 1
ccx wait job 1
ccx result paraview job 1
10 changes: 2 additions & 8 deletions examples/bolted_connection/bolted_connection.jou
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!cubit

reset
create brick x 40 y 20 z 5
volume 1 copy move x 20 z -5.001
Expand Down Expand Up @@ -142,11 +144,3 @@ mesh vol all
#ccx result load job 1
#ccx use logfile core on
#ccx result convert job 1 partial block 1 2 3








4 changes: 3 additions & 1 deletion examples/contact_press_fitting/contact_press_fitting.jou
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!cubit

reset
create cylinder height 1 radius 2
create cylinder height 1 radius 0.996
Expand Down Expand Up @@ -52,4 +54,4 @@ vol all size 0.2
mesh vol all
ccx run job 1 no_conversion
ccx wait job 1
ccx result convert job 1 partial
ccx result convert job 1 partial
3 changes: 2 additions & 1 deletion journal_files/first_run.jou → examples/first_run.jou
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!cubit
reset
#beam geometry
create brick x 100 y 10 z 10
Expand Down Expand Up @@ -73,4 +74,4 @@ ccx create job name "first_run"
ccx run job 1
ccx wait job 1
ccx result cgx job 1
ccx result paraview job 1
ccx result paraview job 1
1 change: 0 additions & 1 deletion examples/model_change/model_change.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!python
#!python
from numpy import cos,sin,arccos
import numpy as np
import cubit
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
#!cubit

reset
create curve arc radius 200 center location 0 0 0 normal 0 0 1 start angle 0 stop angle 360
sweep curve 1 vector 0 0 1 distance 400

surface 1 size 15
surface 1 size 30
mesh surface 1

block 1 add surface 1
Expand Down Expand Up @@ -54,10 +56,10 @@ ccx modify fieldoutput 2 element output_2d
ccx modify fieldoutput 2 element key_on E S
ccx modify fieldoutput 2 element key_off CEEQ ECD EMFB EMFE ENER ERR HER HFL HFLF MAXE MAXS ME PEEQ PHS SF SMID SNEG SPOS SVF SDV THE ZZS

ccx create historyoutput name "ho_1" element
ccx modify historyoutput 1 element block 1
ccx modify historyoutput 1 element key_on S E
ccx modify historyoutput 1 element key_off SVF ME PEEQ CEEQ ENER SDV HFL HFLF COORD ELSE ELKE EVOL EMAS EBHE CENT
#ccx create historyoutput name "ho_1" element
#ccx modify historyoutput 1 element block 1
#ccx modify historyoutput 1 element key_on S E
#ccx modify historyoutput 1 element key_off SVF ME PEEQ CEEQ ENER SDV HFL HFLF COORD ELSE ELKE EVOL EMAS EBHE CENT

ccx create step name "buckle" buckle
ccx modify step 1 buckle bucklingfactors 5 accuracy 1e-8 solver pardiso
Expand All @@ -73,18 +75,17 @@ ccx wait job 1
ccx delete step 1

modify material "Steel" scalar_properties "CCX_PLASTIC_USE_CARD" 1
modify material "Steel" matrix_property "CCX_PLASTIC_ISO_YIELD_STRESS_VS_STRAIN_VS_TEMPERATURE" 4e+2 0 0 4.2e+2 0.02 0 5e+2 0.2 0 6e+2 0.5 0
modify material "Steel" matrix_property "CCX_PLASTIC_ISO_YIELD_STRESS_VS_STRAIN_VS_TEMPERATURE" 4e+2 0 0
modify material "Alu" scalar_properties "CCX_PLASTIC_USE_CARD" 1
modify material "Alu" matrix_property "CCX_PLASTIC_ISO_YIELD_STRESS_VS_STRAIN_VS_TEMPERATURE" 1.6e+2 0 0 3.4e+2 0.02 0
modify displacement 2 dof 3 fix -50

modify material "Alu" matrix_property "CCX_PLASTIC_ISO_YIELD_STRESS_VS_STRAIN_VS_TEMPERATURE" 1.6e+2 0 0
modify displacement 2 dof 3 fix -20

ccx create step name "nonlinear" static
ccx modify step 1 parameter nlgeom_yes
ccx modify step 1 static totaltimeatstart 0 initialtimeincrement 0.01 timeperiodofstep 1 minimumtimeincrement 1e-5 maximumtimeincrement 0.1 solver pardiso
ccx step 1 add bc displacement 1 2
ccx step 1 add fieldoutput 1 2
ccx step 1 add historyoutput 1
#ccx step 1 add historyoutput 1

ccx result project job 1 totalincrement 2 scale 1
#ccx result project job 1 totalincrement 3 scale 0.5
Expand All @@ -93,6 +94,4 @@ ccx result project job 1 totalincrement 2 scale 1
#ccx result project job 1 totalincrement 6 scale 0.0625

ccx create job name "nonlinear"
#ccx run job 2


#ccx run job 2
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!cubit

reset
# creating geometry
#blank
Expand Down Expand Up @@ -83,6 +85,15 @@ merge all

mesh surface all


#create vertices for reference points
create vertex x 25 y 35 z 0
create vertex x 25 y 35 z 0
create vertex x 85 y 35 z 0
create vertex x 85 y 35 z 0

mesh vertex all

#sections
ccx create section solid block 1 material 1
ccx create section solid block 2 material 2
Expand All @@ -92,12 +103,20 @@ ccx create section solid block 4 material 2
#nodesets
nodeset 1 add curve 2
nodeset 1 name "nset_blank_symmetry"
nodeset 2 add surface 12 13 14
nodeset 2 add curve 13 14 18
nodeset 2 name "nset_punch"
nodeset 3 add surface 16 17 18
nodeset 3 add curve 27 28 32
nodeset 3 name "nset_holder"
nodeset 4 add surface 20 21 22
nodeset 4 name "nset_die"
nodeset 5 add vertex 68
nodeset 5 name "rp1_punch"
nodeset 6 add vertex 69
nodeset 6 name "rp2_punch"
nodeset 7 add vertex 70
nodeset 7 name "rp1_holder"
nodeset 8 add vertex 71
nodeset 8 name "rp2_holder"

#sidesets
sideset 1 add curve 1 3
Expand All @@ -109,30 +128,39 @@ sideset 3 name "Part_Holder"
sideset 4 add curve 66 64 45 70 68
sideset 4 name "Part_Die"

# constraints
ccx create constraint rigid body nodeset 2 ref 68 rot 69
ccx create constraint rigid body nodeset 3 ref 70 rot 71

#contact
ccx create surfaceinteraction name "ContactType" linear slopeK 1e6 sigmaINF 3 c0 1e-2
ccx modify surfaceinteraction 1 friction mu 0.1 lambda 1

ccx create contactpair surfaceinteraction 1 surfacetosurface master 2 slave 1
ccx create contactpair surfaceinteraction 1 surfacetosurface master 3 slave 1
ccx create contactpair surfaceinteraction 1 surfacetosurface master 4 slave 1
#ccx modify contactpair 1 surfacetosurface adjust 0.01
#ccx modify contactpair 2 surfacetosurface adjust 0.01
#ccx modify contactpair 3 surfacetosurface adjust 0.01

#bcs
create displacement name "blank_step1" on nodeset 1 dof 1 dof 2 dof 3 fix
create displacement name "blank_step2" on nodeset 1 dof 1 dof 3 fix
ccx modify displacement 2 op new
create displacement name 'punch_fix' on nodeset 2 dof 1 dof 2 dof 3 fix
create displacement name 'punch_move' on nodeset 2 dof 2 fix -40
#blank
create displacement name "blank" on nodeset 1 dof 1 dof 3 fix
#punch
create displacement name 'punch_fix_rp1' on nodeset 5 dof 1 dof 2 dof 3 fix
create displacement name 'punch_fix_rp2' on nodeset 6 dof 1 dof 2 dof 3 fix
create displacement name 'punch_move_rp1' on nodeset 5 dof 2 fix -40
modify displacement 4 dof 1 fix 0
modify displacement 4 dof 3 fix 0
create displacement name 'holder_move' on nodeset 3 dof 2 fix -2.15e-3
#holder
create displacement name 'holder_move_rp1' on nodeset 7 dof 2 fix -2.5e-3
create displacement name 'holder_move_rp2' on nodeset 8 dof 1 dof 2 dof 3 fix
modify displacement 5 dof 1 fix 0
modify displacement 5 dof 3 fix 0
#create displacement name 'holder_force_rp1' on nodeset 7 dof 1 dof 3 fix
#die
create displacement name 'die_fix' on nodeset 4 dof 1 dof 2 dof 3 fix

#loads
#create force on nodeset 7 force value 100 direction 0 -1 0

#outputs
ccx create fieldoutput name "nout" node
ccx modify fieldoutput 1 node frequency 5
Expand Down Expand Up @@ -164,23 +192,17 @@ ccx modify historyoutput 3 contact key_off
ccx create step name "hold" static
ccx modify step 1 parameter nlgeom_yes
ccx modify step 1 static initialtimeincrement 0.1 timeperiodofstep 1 minimumtimeincrement 1e-6 maximumtimeincrement 0.1
ccx step 1 add bc displacement 1 3 5 6
ccx step 1 add bc displacement 1 2 3 5 6 7
#ccx step 1 add load force 1
ccx step 1 add fieldoutput 1 2 3
ccx step 1 add historyoutput 1 2 3

ccx create step name "release_blank" static
ccx modify step 2 parameter nlgeom_yes
ccx modify step 2 static initialtimeincrement 0.1 timeperiodofstep 1 minimumtimeincrement 1e-6 maximumtimeincrement 0.1
ccx step 2 add bc displacement 2 3 5 6
ccx step 2 add fieldoutput 1 2 3
ccx step 2 add historyoutput 1 2 3
#ccx step 1 add historyoutput 1 2 3

ccx create step name "move_punch" static
ccx modify step 3 parameter nlgeom_yes inc 1000
ccx modify step 3 static initialtimeincrement 0.00125 timeperiodofstep 1 minimumtimeincrement 1e-6 maximumtimeincrement 0.0025
ccx step 3 add bc displacement 4
ccx step 3 add fieldoutput 1 2 3
ccx step 3 add historyoutput 1 2 3
ccx modify step 2 parameter nlgeom_yes inc 1000
ccx modify step 2 static initialtimeincrement 0.00125 timeperiodofstep 1 minimumtimeincrement 1e-6 maximumtimeincrement 0.0025
ccx step 2 add bc displacement 5
ccx step 2 add fieldoutput 1 2 3
#ccx step 2 add historyoutput 1 2 3

ccx create job name "forming"
#ccx run job 1
#ccx run job 1
3 changes: 2 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ project(Cubit-CalculiX)
#set(CMAKE_PREFIX_PATH "/opt/Coreform-Cubit-2022.4/bin")
#set(CMAKE_PREFIX_PATH "/opt/Coreform-Cubit-2023.4/cmake")
#set(CMAKE_PREFIX_PATH "/opt/Coreform-Cubit-2023.6/cmake")
set(CMAKE_PREFIX_PATH "/opt/Coreform-Cubit-2023.8/cmake")
#set(CMAKE_PREFIX_PATH "/opt/Coreform-Cubit-2023.8/cmake")
#set(CMAKE_PREFIX_PATH "/opt/Coreform-Cubit-2023.10/cmake")
#set(CMAKE_PREFIX_PATH "/opt/Coreform-Cubit-2023.11/cmake")
set(CMAKE_PREFIX_PATH "/opt/Coreform-Cubit-2024.3/cmake")
#set(CMAKE_PREFIX_PATH "C:/Program Files/Coreform Cubit 2023.8/cmake")
#set(CMAKE_PREFIX_PATH "C:/Program Files/Coreform Cubit 2023.11/cmake")

Expand Down
Loading

0 comments on commit 0dcd8c9

Please sign in to comment.