Skip to content

Commit

Permalink
modified: README.md
Browse files Browse the repository at this point in the history
	modified:   changelog.txt
	modified:   examples/mesh_refinement/mesh_refinement_1.jou
	modified:   examples/metal_forming/metal_forming.jou
	modified:   examples/nonlinear_buckling_cylindrical_shell/nonlinear buckling cylindrical shell.jou
	modified:   examples/snap_fit/snap_fit.jou
	renamed:    examples/snap_fit/force_over_displacement.jou -> journal_files/force_over_displacement.jou
	renamed:    examples/snap_fit/force_over_time.jou -> journal_files/force_over_time.jou
	modified:   src/Core/CoreResultsFrd.cpp
  • Loading branch information
NorbertHofbauer committed Oct 20, 2024
1 parent b76dfb7 commit 1ab3bef
Show file tree
Hide file tree
Showing 9 changed files with 43 additions and 28 deletions.
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[![GitHub](https://badgen.net/badge/icon/github?icon=github&label)](https://github.com/calculix/Cubit-CalculiX)
[![Github All Releases](https://img.shields.io/github/downloads/calculix/Cubit-CalculiX/total.svg)](https://github.com/calculix/Cubit-CalculiX/releases)
<br/>
# Cubit-CalculiX 2024.9
# Cubit-CalculiX 2024.10
Hey ho that´s the CalculiX Component for coreform cubit!

Full Model definitions for CalculiX can be done with Cubit as Preprocessor.
Expand All @@ -13,8 +13,8 @@ The builds can be downloaded at our [website](https://www.maschinenbauer.at/open

Or just use the links.

[Windows Build](https://github.com/calculix/Cubit-CalculiX/releases/download/2024.9/build_windows_2024.9.zip)
[Linux Build](https://github.com/calculix/Cubit-CalculiX/releases/download/2024.9/build_linux_2024.9.zip)
[Windows Build](https://github.com/calculix/Cubit-CalculiX/releases/download/2024.10/build_windows_2024.10.zip)
[Linux Build](https://github.com/calculix/Cubit-CalculiX/releases/download/2024.10/build_linux_2024.10.zip)

This component was build with Cubit 2024.8!
Tested with Cubit 2024.8 on Windows 10 and Ubuntu 22.04
Expand Down Expand Up @@ -136,7 +136,7 @@ Restart Cubit.

![Add Component](/readme_docs/Setup_00.png?raw=true "Add Component")

The Cubit Window should now show "Coreform Cubit 202x.x -- with CalculiX" in the Title.
The Cubit Window should now show "Coreform Cubit 202x.x -- with Cubit-CalculiX 202x.x" in the Title.

Now just enable the Model Tree

Expand Down Expand Up @@ -191,7 +191,6 @@ When choosing the totalincrement the related displacements will be used.

# known issues
- See https://github.com/calculix/Cubit-CalculiX/issues for open issues. Not every issue is closed in the available binaries. Please look at the issue and release date.
- Can not open results for Paraview 5.12.0 out of Cubit. Please use Paraview 5.11.* or a new Version with a fix. See https://gitlab.kitware.com/paraview/paraview/-/issues/22614

- History Bug on Windows: Currently commands that will be send using the gui won't be recorded into the history tab. This has been fixed for Linux. In the current cubit windows release (2024.8) are some symbols missing. So we have to wait onto the next release to fix this for windows too.

Expand Down
1 change: 1 addition & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,4 @@
2024-10-12 working on reading/saving ccx core data into .cub
2024-10-19 adding progressbar for saving and reading cub5
2024-10-20 updating to paraview 5.13.1, due to github large file limit, we need to exclude paraview binaries from the repo, the need to be in a local directory for the build, look at cmake file
2024-10-21 fixing bug in frd reader. in parallel some blocks without nodal results where skipped while reading the headers which resulted in a crash
4 changes: 2 additions & 2 deletions examples/mesh_refinement/mesh_refinement_1.jou
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ for i in range(ref_max):
cubit.cmd(f"ccx create job name 'mesh_refinement_{i+1}'")
cubit.cmd(f"ccx run job {i+1}")
cubit.cmd(f"ccx wait job {i+1}")
node_ids = ccx.frd_get_node_ids_between_limits(i+1,1,"ERROR","STR(%)",50,1000)
node_ids = ccx.frd_get_node_ids_between_values(i+1,1,"ERROR","STR(%)",50,1000)
node_ids_list = ' '.join([str(id) for id in node_ids])
cubit.cmd(f"refine node {node_ids_list} numsplit 1 bias 1.0 depth 1 smooth")
cubit.cmd(f"volume 1 smooth scheme condition number beta 2 cpu 0.5")
Expand All @@ -105,4 +105,4 @@ cubit.cmd(f"ccx create job name 'mesh_refinement_{ref_max+1}'")
cubit.cmd(f"ccx run job {ref_max+1}")
cubit.cmd(f"ccx wait job {ref_max+1}")

print("finished!")
print("finished!")
15 changes: 8 additions & 7 deletions examples/metal_forming/metal_forming.jou
Original file line number Diff line number Diff line change
Expand Up @@ -143,20 +143,20 @@ ccx create contactpair surfaceinteraction 1 surfacetosurface master 4 slave 1

#bcs
#blank
create displacement name "blank" on nodeset 1 dof 1 dof 3 fix
create displacement name "blank" on curve 2 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 -35
create displacement name 'punch_fix_rp1' on vertex 68 dof 1 dof 2 dof 3 fix
create displacement name 'punch_fix_rp2' on vertex 69 dof 1 dof 2 dof 3 fix
create displacement name 'punch_move_rp1' on vertex 68 dof 2 fix -35
modify displacement 4 dof 1 fix 0
modify displacement 4 dof 3 fix 0
#holder
create displacement name 'holder_move_rp1' on nodeset 7 dof 2 fix -2.3e-3
create displacement name 'holder_move_rp2' on nodeset 8 dof 1 dof 2 dof 3 fix
create displacement name 'holder_move_rp1' on vertex 70 dof 2 fix -2.3e-3
create displacement name 'holder_move_rp2' on vertex 71 dof 1 dof 2 dof 3 fix
modify displacement 5 dof 1 fix 0
modify displacement 5 dof 3 fix 0
#die
create displacement name 'die_fix' on nodeset 4 dof 1 dof 2 dof 3 fix
create displacement name 'die_fix' on surface 20 21 22 dof 1 dof 2 dof 3 fix

#outputs
ccx create fieldoutput name "nout" node
Expand Down Expand Up @@ -201,3 +201,4 @@ ccx step 2 add fieldoutput 1 2 3

ccx create job name "forming"
#ccx run job 1

Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ modify material "Alu" scalar_properties "CCX_CONDUCTIVITY_ISO_USE_CARD" 1
#ccx create section shell block 1 material 1 thickness 2 offset 0
ccx create section shell block 1 material 2 thickness 2 offset 0

create force on nodeset 2 force value 6e-3 direction 0 0 -1
create force on curve 2 force value 6e-3 direction 0 0 -1

create displacement on nodeset 1 dof 1 dof 2 dof 3 dof 4 dof 5 dof 6 fix 0
create displacement on nodeset 2 dof 1 dof 2 dof 4 dof 5 dof 6 fix 0
create displacement on curve 1 dof 1 dof 2 dof 3 dof 4 dof 5 dof 6 fix 0
create displacement on curve 2 dof 1 dof 2 dof 4 dof 5 dof 6 fix 0
#modify displacement 2 dof 3 fix -5

ccx create fieldoutput name "fo_1" node
Expand Down
8 changes: 4 additions & 4 deletions examples/snap_fit/snap_fit.jou
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,11 @@ ccx create surfaceinteraction name "SurfaceInteraction1" linear slopek 80000 sig
ccx create contactpair surfaceinteraction 1 surfacetosurface master 1 slave 2
ccx modify surfaceinteraction 1 friction mu 0.1 lambda 40000

create displacement on nodeset 2 dof 1 dof 2 dof 3 fix 0
create displacement on nodeset 3 dof 1 dof 2 dof 3 fix 0
create displacement on volume 2 dof 1 dof 2 dof 3 fix 0
create displacement on vertex all in nodeset 3 dof 1 dof 2 dof 3 fix 0
modify displacement 2 dof 1 fix 9.27
create displacement on nodeset 4 dof 1 dof 2 dof 3 fix 0
create displacement on nodeset 3 dof 1 dof 2 dof 3 fix 0
create displacement on vertex all in nodeset 4 dof 1 dof 2 dof 3 fix 0
create displacement on vertex all in nodeset 3 dof 1 dof 2 dof 3 fix 0
modify displacement 4 dof 1 fix 10.3

ccx create fieldoutput name "fo_node" node
Expand Down
File renamed without changes.
File renamed without changes.
28 changes: 21 additions & 7 deletions src/Core/CoreResultsFrd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,8 @@ bool CoreResultsFrd::read_parallel()
log = "";
int currentline = -1;
int last_element_line = thread_ranges[max_threads-1][1];
bool new_result_block = true;
bool new_result_block = false;
bool first_nodal_data = true;
while (frd)
{
std::getline(frd,frdline);
Expand All @@ -627,25 +628,29 @@ bool CoreResultsFrd::read_parallel()
this->check_mode_by_key(this->keys[currentline]);

if (current_read_mode == 3)
{
{
frd_array = this->split_line(frdline);
this->read_parameter_header(frd_array);
new_result_block = true;
first_nodal_data = true;
} else if (current_read_mode == 4)
{
frd_array = this->split_line(frdline);
if (frd_array[0] == "-5")
{
this->read_nodal_result_block(frd_array);
}else{
if (new_result_block)
{
new_result_block = false;
this->read_nodal_result_block_add_components(frd_array);

std::vector<std::vector<std::string>> tmp_frd_array;
frd_arrays.push_back(tmp_frd_array);
}
}else{
if (first_nodal_data)
{
first_nodal_data = false;
this->read_nodal_result_block_add_components(frd_array);
}
frd_arrays[frd_arrays.size()-1].push_back(frd_array);
}
} else if ((current_read_mode == 9999)||(frd.eof()))
Expand All @@ -654,7 +659,15 @@ bool CoreResultsFrd::read_parallel()
}
}
}


if (result_block_components.size()!=frd_arrays.size())
{
std::string log = "Something went wrong while reading the headers! Reach out to devs!\n";
log.append("result_block_components.size() " + std::to_string(result_block_components.size()) + " != frd_arrays.size() " + std::to_string(frd_arrays.size()) + "\n");
PRINT_INFO("%s", log.c_str());
return false;
}

int loop_c = 0;
int number_of_result_blocks = int(frd_arrays.size());
int max_number_of_result_blocks = int(frd_arrays.size());
Expand Down Expand Up @@ -1383,7 +1396,7 @@ bool CoreResultsFrd::read_nodal_result_block_thread(int result_block_data_id, in

n_comp = int(result_block_components[result_block_data_id].size());
std::vector<double> result_comp(n_comp);

for (size_t i = 0; i < n_comp; i++)
{
if ((result_block_type[result_blocks[result_block_data_id][5]] == "STRESS") && (i > 5))
Expand Down Expand Up @@ -1428,6 +1441,7 @@ bool CoreResultsFrd::read_nodal_result_block_thread(int result_block_data_id, in
result_block_node_data[result_block_data_id].push_back({node_id,result_block_node_data_id});

}

this->progress[thread_id] = this->progress[thread_id] + 1;
}

Expand Down

0 comments on commit 1ab3bef

Please sign in to comment.