Coupled RC Core Wall with MVLEM-3D
Re: Coupled RC Core Wall with MVLEM-3D
We just released it. Try it now
Re: Coupled RC Core Wall with MVLEM-3D
It works now. Thank you!
I am trying to use your latest extract_data_from_selection file to modify it to extract data from selection sets.
Can you please give me a bit more details what should I do with the code below? Should I replace something with this code or add it somewhere?
Thank you very much
I am trying to use your latest extract_data_from_selection file to modify it to extract data from selection sets.
Can you please give me a bit more details what should I do with the code below? Should I replace something with this code or add it somewhere?
I would really appreciate if you can point me in the right direction.App.clearTerminal()
doc = App.postDocument()
db = doc.getDatabase(1)
ssets = db.selectionSets
for sset_id, sset in ssets.items():
print('\nSelection Set {}'.format(sset_id))
print(sset.id)
print(sset.name)
print(sset.nodes)
print(sset.elements)
Thank you very much
Re: Coupled RC Core Wall with MVLEM-3D
Try this:
Re: Coupled RC Core Wall with MVLEM-3D
Thank you for sending the file. It does extract selection set results. However, I would like to make modifications to the file so I can create a loop and extract many selection sets with a single click. It seems that the only way to run the file is using STKO. Running them from Python gives me an error. How can I make changes to the file and debug it? Currently I dont see an option for testing and debugging the API files.
Please let me know. Thank you.
Please let me know. Thank you.
Re: Coupled RC Core Wall with MVLEM-3D
If you want you can edit the file with whatever editor you want outside of STKO.
But you need to run it in STKO, because it adds extensions to the standard python
But you need to run it in STKO, because it adds extensions to the standard python
Re: Coupled RC Core Wall with MVLEM-3D
Yes, I understand that. But how do you debug it? For example, if I want to print out some variables on the screen, it seems that I cannot see this when I run STKO because there is no command window where things can be printed out...
Please advise. Thank you.
Please advise. Thank you.
Re: Coupled RC Core Wall with MVLEM-3D
You can print to the STKO's terminal. Inside the STKO's environment, the Python's print is redirected to the std::cout, and thus to the terminal
Code: Select all
from PyMpc import *
# This clears the STKO's terminal
App.clearTerminal()
# this prints to the STKO's terminal using the
# 'standard' formatting (black color)
print("Hello from python print")
# same as above, but you need to explicitly put a newline
IO.write_cout("Hello from python PyMpc.IO.write_cout\n")
# ... or using the 'log' format (blue color)
IO.write_clog("Hello from python PyMpc.IO.write_clog\n")
# ... or using the 'err' format (red color)
IO.write_cerr("Hello from python PyMpc.IO.write_cerr\n")
Re: Coupled RC Core Wall with MVLEM-3D
Hello,
I am using API to process element responses. I modified your API to create a loop and everything works fine for nodal results. However, when I process element results I have an issue. Per your recommendation, I created a separate region and MPCO recorder for coupling beams only. I also have a selection set that includes coupling beams, and I used BeamWithShearHinge element for coupling beams. When I select "strain" response and run API, I get the following error "data not available for element XXX". It seems to me that API is trying to access strain for the BeamWithShearHinge, but because this is really a compound element of elastic beams and a shear hinge, it is trying to get strain from the elastic beam, which doesnt exist. This is what I think is happening, but I am not sure. Can you please advise how to go about this issue? I only need strains and stresses from the shear hinge.
Please let me know. Thank you,
I am using API to process element responses. I modified your API to create a loop and everything works fine for nodal results. However, when I process element results I have an issue. Per your recommendation, I created a separate region and MPCO recorder for coupling beams only. I also have a selection set that includes coupling beams, and I used BeamWithShearHinge element for coupling beams. When I select "strain" response and run API, I get the following error "data not available for element XXX". It seems to me that API is trying to access strain for the BeamWithShearHinge, but because this is really a compound element of elastic beams and a shear hinge, it is trying to get strain from the elastic beam, which doesnt exist. This is what I think is happening, but I am not sure. Can you please advise how to go about this issue? I only need strains and stresses from the shear hinge.
Please let me know. Thank you,
Re: Coupled RC Core Wall with MVLEM-3D
You're right. The SelectionSet in the post-processor corresponds to the selection set in the STKO pre-processor (i.e. before the compound elements are created, during the WriteTcl command).It seems to me that API is trying to access strain for the BeamWithShearHinge, but because this is really a compound element of elastic beams and a shear hinge, it is trying to get strain from the elastic beam, which doesn't exist. This is what I think is happening, but I am not sure. Can you please advise how to go about this issue? I only need strains and stresses from the shear hinge.
I made a simple change in the previous script:
- I put the field[row] command in a try/except block, so that it will not generate an Exception if a result is not available in a certain element
- I modified the way I get the elements from the selection set.
First, I look for elements, not included in the selection set, but sharing all nodes with a selection set. If those elements are found, we ask you to choose among these options:- Consider only elements in the original selection set
- Consider only elements embedded into the original set (this is what you want)
- Consider both
- Attachments
-
- extract_data_from_selection_sets.zip
- (3.81 KiB) Downloaded 3 times
Re: Coupled RC Core Wall with MVLEM-3D
Thank you for your quick response. I tried running your script, but the results come out blank.
You can download the results and the extracted data from the link below so you can test it your self. Names of selection sets with coupling beams start with "CB".
https://www.dropbox.com/s/2g2jxgv424xn6 ... T.zip?dl=0
Please let me know if you find anything.
Thank you
You can download the results and the extracted data from the link below so you can test it your self. Names of selection sets with coupling beams start with "CB".
https://www.dropbox.com/s/2g2jxgv424xn6 ... T.zip?dl=0
Please let me know if you find anything.
Thank you