This repository contains the code that was the basis of a prevous study on reducing the interface mesh of a jointed structure. Please cite the relevant paper:
@article{hyper_paper,
title = {Reduced order modeling for the dynamics of jointed structures through hyper-reduced interface representation},
volume = {149},
issn = {0888-3270},
doi = {10.1016/j.ymssp.2020.107249},
journal = {Mechanical Systems and Signal Processing},
author = {Balaji, N.~N. and Dreher, T. and Krack, M. and Brake, M.~R.~W.},
month = feb,
year = {2021},
pages = {107249},
}
This code is a fork of that project code for continued use by the Tribomechadynamics Lab. Some additional documentation will be provided here on how to utilize the hyper-reduction code. Some folders referenced here may not be publicly available.
Further development is needed to separate methods for doing hyper reduction from specific examples made with edits here.
- You will first need to generate a set of matrices describing the system without model reduction. A tutorial on how to do that has been published here. This description assumes that coordinates are exported for both sides of the interface. The tutorial may be updated to where that is no longer needed. As of writing this, the tutorial produces input decks that list the wrong order outputs for the preserved top and bottom nodes. Check your output files and verify that the top node numbers are output first. If not, switch the order of the preserved node sets in the model reduction and rerun the Abaqus simulation. If this is correct, it should eliminate the need to update the relative coordinates in step 8 below.
- Clone this repository.
- Copy your .mat file from Abaqus into the folder './MATRIX_EXTRACTION/RUNS/[SUBFOLDER_NAME]' where '[SUBFOLDER_NAME]' is a subfolder that you create. Copy this subfolder name into the variable list 'SETDIRS' on line 8 of 'FULLJOINT_ROM_PREPARE/prepare_roms_consint.m' Rename your mat file to be called 'BRB_WOPRES_MAT.mat' (WOPRES = Without Prestress). You will also need to copy Elements.dat and Nodes.dat from the Abaqus procedure to this same folder.
- Set the variable 'setid' in FULLJOINT_ROM_PREPARE/prepare_roms_consint.m to select the index of SETDIRS corresponding to your folder.
- Set the ROM type by setting sel_method to one of {'P', 'U', 'PD'}. These different methods are all described in the journal paper. Then select the number of elements that you want in the reduced mesh. The options for each reduction type are listed in a comment. E.g., 232 is valid for U, but not for P or PD. The variable Nels that the for loop is for needs to be set to this value.
- Download the mesh details for the model you are using to a new directory named 'MATS' under 'FULLJOINT_ROM_PREPARE'. For members of the Tribomechadynamics lab, meshes can be found here. These files should just contain a few items, but it appears that some also contain full M and K matrices that will be ignored for the rest of this process.
- Make a folder under FULLJOINT_ROM_PREPARE named 'ROMS'. Your output model will be put here with the name like 'ROM_U_232ELS.mat' (232 elements with uniform reduction).
- The relative coordinate transformation currently needs to be manually defined. Open your abaqus output (Modelmats.mtx) and check if the bottom or top surface outputs nodes first. Look at comments in the relative coordinate transformation to determine which Trel to use (Xt = top, Xb=bot). Abaqus coordinates = Xrel * [Xt - Xb; Xb; Xinternal]. Failing to do so may flip the sign of the contact model and cause other unknown issues if not fully corrected everywhere.
- The variables
HCB_null_space_tolandNcomp_finalcan be changed inFULLJOINT_ROM_PREPARE/prepare_roms_consint.m. The former sets a tolerance for eliminating some null space vectors in HCB, which may sometimes be needed to eliminate rigid body modes. To set this value, you stop on debug in the HCBREDUCE.m file and check the ratio of singular values and what tolerance is needed to eliminate the expected 6 rigid body modes.Ncomp_finalsimply sets how many fixed interface modes the final output model should use. This should be checked to achieve convergence. - Run FULLJOINT_ROM_PREPARE/prepare_roms_consint.m
Run FULLJOINT_ROM_PREPARE/preparemets.m. Before running you may need to do the following:
- Set file path and get Abaqus output formatted as described above for the model reduction runs.
- Set
eliminateXbto true if you want to eliminate the relative coordinates. Otherwise, set to false. - Set
Ncomp_finalto the desired number of fixed interface modes, if you are eliminating relative coordinates. - You may need to pass an extra argument to the HCB reduction if you have trouble will the illconditioned matrix solve in HCB.
See discussion above. This argument is named
HCB_null_space_tolin the script now.
These are some changes that I have made to the code to get things to run correctly in 2024. These changes are committed along with some file name options for the models that were being produced at the time.
- Change line 46 to not include a transpose of R. It should be 'R = sparse(R);' You also need to remove the transpose for Fv on the line before.
- The loaded Nodes.dat file contains 3 columns with z coordinates in the last column. However, this code expects only two columns, so that was modified.
- If you want to preserve a different number of fixed interface modes than the original Abaqus run, you should be able to change Nrest on line 95 (in the HCBREDUCE function call) to be the number of modes that you with to preserve.
- I think preparemats.m is just used to reduce to relative coordinates if you do not want to reduce the mesh. It appears that the relative coordinate transform is already applied in prepare_roms_consint.m. The procedure from running this script is probably the same, but note that you need to set the flag 'eliminateXb' to True to get rid of the bottom coordinates and put in relative coordinates.
- To run the matrices resuling from this process in TMDSimPy, an additional post processing step to save for python is needed. See here for a script.
- Under 'FULLJOINT_ROM_PREPARE' create a directory named 'MATS' and download the descriptions of the meshes from the folder here. These files should just contain a few items, but it appears that some also contain full M and K matrices that will be ignored for the rest of this process.
- TODO: I need to check a different folder on box about having the correct inputs for this step.
- Open the MATLAB script 'FULLJOINT_ROM_PREPARE/prepare_roms_consint.m'
- Copy your .mat file produced from Abaqus into the folder './MATRIX_EXTRACTION/RUNS/[SUBFOLDER_NAME]' where '[SUBFOLDER_NAME]' is a subfolder that you create. Copy this subfolder name intothe variable list 'SETDIRS' on line 8 of 'FULLJOINT_ROM_PREPARE/prepare_roms_consint.m'
- Set the variable 'setid' in this script to select the index of SETDIRS corresponding to your folder.
- Rename your .mat file to be called 'BRB_WOPRES_MAT.mat' in your folder.
- First have to prepare your matrices with a different script, then you can run this one...
- Need a directory called DATS somewhere and ROMS
- It looks like 'FULLJOINT_ROM_PREPARE/preparemats.m' was also modified last time I ran this, so that may needed before running the other script.
- You have to set the method and number of elements in prepare_rom_consint.m.
- Set filenames similar to before in preparemats.m
- New commit here on preparemats.m to change to relative coordinates (may not be needed when doing relative coordinates direct from abaqus).