No result when outputting Craig-Bampton reduced matrices with DMIGPCH
Hello,
I get no reduced matrices output to an ASCII file when trying with a Craig-Bampton reduction in Optistruct. Below is my procedure:
I have built a simple model to learn how to output the Craig-Bampton reduced matrices into an ASCII file, perhaps a PCH file. My model is a simple beam meshed with second order tets as below:
The blue rigids are RBE2s and the yellow BCs are ASET1s as I am also preparing this model for Adams MNF output.
For CMSMETH, I have created a load collector with card image CMSMETH, method set to 'CB' and NMODES set to 5 to extract the first five fixed interface modes.
I have a DTI_UNITS card open as below:
Then I have a GLOBAL_CASE_CONTROL card open as below:
Also, I have a PARAM card open with EXTOUT set to DMIGPCH as below:
Finally, I have an OUTPUT card open for MNF creation as below:
I can afford do a separate run for ADAMSMNF output if I need to. What I really need first is to be able to extract the Craig-Bampton reduced matrices to an ASCII file. Any help would be much appreciated. Thank you.
Best regards
Answers
-
Hello again,
I wanna post an update as it could be a possible bug. When I solve the exact same fem file with optistruct 2017.2, it generated the reduced mass and stiffness matrices as expected. The matrix dimensions are correct as I've checked in the out file. However, when I try to solve the same fem file in version 2019.1, I don't get a PCH file as I explained in my first post. Can I get some help on this? Is this a bug?
UPDATE: Optistruct generates the PCH file with the reduced mass and stiffness matrices if one selects 'CBN' instead of 'CB' in the CMSMETH card in 2019.1.
Thanks.
Best regards
0 -
Altair Forum User said:
it generated the reduced mass and stiffness matrices as expected
Hi
Do you have any idea how to read the KAAX.pch file ? I saw the documentation and I didn't understand how to read it ...
Thanks in advance,
0 -
Altair Forum User said:
Hi
Do you have any idea how to read the KAAX.pch file ? I saw the documentation and I didn't understand how to read it ...
Thanks in advance,
Hello,
Yes. Please take a look at this document by Middle East Technical University, taken from Tom Irvine's Vibrationdata blog: https://drive.google.com/file/d/0Bw1VlHh5X_tTdUZRYkh4WGxJMWM/view
0 -
Altair Forum User said:
Hello,
Yes. Please take a look at this document by Middle East Technical University, taken from Tom Irvine's Vibrationdata blog: https://drive.google.com/file/d/0Bw1VlHh5X_tTdUZRYkh4WGxJMWM/view
Thank you so much ! I appreciate it /emoticons/default_wink.png' srcset='/emoticons/wink@2x.png 2x' title=';)' width='20' />
I will let you know if I find something about *k.op2 / *m.op2 files.
0 -
Altair Forum User said:
Thank you so much ! I appreciate it /emoticons/default_wink.png' srcset='/emoticons/wink@2x.png 2x' title=';)' width='20' />
I will let you know if I find something about *k.op2 / *m.op2 files.
Thank you. I have written a small C++ program to read the PCH file and extract the system matrices in complete form into the memory where they can be used for further analysis or just printing. Actually, Tom Irvine also has shared such a program on his blog but I think it only does printing. In my project I need to also have the matrices in memory so I can work with them. I will drop a GitHub link here with necessary instructions in a few days.
0 -
Altair Forum User said:
Thank you. I have written a small C++ program to read the PCH file and extract the system matrices in complete form into the memory where they can be used for further analysis or just printing. Actually, Tom Irvine also has shared such a program on his blog but I think it only does printing. In my project I need to also have the matrices in memory so I can work with them. I will drop a GitHub link here with necessary instructions in a few days.
Yeah, I'm doing the same thing ... I need all matrices (M, C and K). If you can drop it, I will use it for sure. Thanks in advance.
0 -
Altair Forum User said:
Yeah, I'm doing the same thing ... I need all matrices (M, C and K). If you can drop it, I will use it for sure. Thanks in advance.
Hello,
I've shared a small C++ code on GitHub to extract the K and M matrices. There's a small example included as well. I can quickly add support for the C matrix but I don't know the identifier for it (like it is KAAX for K and MAAX for M). If you can tell me the identifier for C then I'll add it into the program.
0 -
Altair Forum User said:
Hello,
I've shared a small C++ code on GitHub to extract the K and M matrices. There's a small example included as well. I can quickly add support for the C matrix but I don't know the identifier for it (like it is KAAX for K and MAAX for M). If you can tell me the identifier for C then I'll add it into the program.
Thank you some much.
I have some suggestions, if you don't mind :
- In the README.md, I would like to add eigen lib sources (git clone https://gitlab.com/libeigen/eigen.git ) to install Eigens headers or simply to move Eigen folder in pchmatexport.h folder (if you're not root).
- Replace #include <Eigen/Dense> with #include 'Eigen/Dense'
Thank you again /emoticons/default_wink.png' srcset='/emoticons/wink@2x.png 2x' title=';)' width='20' />
0 -
Altair Forum User said:
Thank you some much.
I have some suggestions, if you don't mind :
- In the README.md, I would like to add eigen lib sources (git clone https://gitlab.com/libeigen/eigen.git ) to install Eigens headers or simply to move Eigen folder in pchmatexport.h folder (if you're not root).
- Replace #include <Eigen/Dense> with #include 'Eigen/Dense'
Thank you again /emoticons/default_wink.png' srcset='/emoticons/wink@2x.png 2x' title=';)' width='20' />
Your welcome, and thank you for your suggestions. I will look into them. I have added a small but important explanation to the readme. If you have been unable to run the code, I suggest you take a look at the explanation. Good luck.
0 -
Altair Forum User said:
Your welcome, and thank you for your suggestions. I will look into them. I have added a small but important explanation to the readme. If you have been unable to run the code, I suggest you take a look at the explanation. Good luck.
It works very well after adding Eigen folder to the master folder /emoticons/default_wink.png' srcset='/emoticons/wink@2x.png 2x' title=';)' width='20' />
Thank you so muck again. I added a small contribution to write and export the matrices to an ASCII file (Please see the main file bellow) :
#include <iostream>
#include <fstream>
#include <string>
#include 'pchmatexport.h'int main() {
std::string pchAddress('/Users/faroukmaaboudallah/Desktop/test.pch');
auto stifmat = PCH::read_matrix(pchAddress, PCH::MATRIX::STIF);
//auto massmat = PCH::read_matrix(pchAddress, PCH::MATRIX::MASS);std::cout << stifmat << std::endl;
std::ofstream file('test.txt');if (file.is_open())
{
file << 'Stiffness matrix K :\n' << stifmat << '\n';
file << 'K' << '\n' << stifmat << '\n';
}
return 0;
}0 -
Altair Forum User said:
It works very well after adding Eigen folder to the master folder /emoticons/default_wink.png' srcset='/emoticons/wink@2x.png 2x' title=';)' width='20' />
Thank you so muck again. I added a small contribution to write and export the matrices to an ASCII file (Please see the main file bellow) :
#include <iostream>
#include <fstream>
#include <string>
#include 'pchmatexport.h'int main() {
std::string pchAddress('/Users/faroukmaaboudallah/Desktop/test.pch');
auto stifmat = PCH::read_matrix(pchAddress, PCH::MATRIX::STIF);
//auto massmat = PCH::read_matrix(pchAddress, PCH::MATRIX::MASS);std::cout << stifmat << std::endl;
std::ofstream file('test.txt');if (file.is_open())
{
file << 'Stiffness matrix K :\n' << stifmat << '\n';
file << 'K' << '\n' << stifmat << '\n';
}
return 0;
}Thanks a lot! Also, looks like there was a bug in the first version of the script. I've just fixed it. Please download it again.
We are diverging from the topic now so please feel free to contact me at denizb@alumni.ubc.ca for further discussion regarding this subject.
0