RE: Post processing relative displacmeent from different data base.
RE: Post processing relative displacmeent from different data base.
Hi,
I want to post-process my results for visualisation in the STKO posprocessor.
From one of your seminars, a code was provided to process the calculated displacements to incremental displacements relative to the end of the previous Stage, of the same database.
This is the initial code I got from the webinar:
from PyMpc import *
import numpy as np
doc = App.postDocument ()
db =doc.getDatabase(1)
U1 = db.getNodalResult('Displacement', time=MpcOdbVirtualResult.stageEnd(4))
U = db.getNodalResult('Displacement') - U1
print(U)
U.setDisplayName('Delta Disp (Stage 5-1)')
U.setComponentLabels(['dUx', 'dUy', 'dUz'])
db.addVirtualResult(U)
I want to rewrite the code so that it shows the incremental displacement relative to the end of the stage of the first database instead. So basically, I want the incremental displacement of the 2nd database relative to the end of Stage 1 of the first database.
I tried rewriting the code to suit my needs; however, I keep getting this error:
Cannot add the virtual results due to the following errors:
Nodal result with id (1) belongs to a different parent DB
I'm not very familiar with the code titles used in PyMPC. How do I edit the initial code to find the incremental displacements from one database relative to another? Could you provide me with an example and assist me with this issue? Thank you; your help is appreciated.
I want to post-process my results for visualisation in the STKO posprocessor.
From one of your seminars, a code was provided to process the calculated displacements to incremental displacements relative to the end of the previous Stage, of the same database.
This is the initial code I got from the webinar:
from PyMpc import *
import numpy as np
doc = App.postDocument ()
db =doc.getDatabase(1)
U1 = db.getNodalResult('Displacement', time=MpcOdbVirtualResult.stageEnd(4))
U = db.getNodalResult('Displacement') - U1
print(U)
U.setDisplayName('Delta Disp (Stage 5-1)')
U.setComponentLabels(['dUx', 'dUy', 'dUz'])
db.addVirtualResult(U)
I want to rewrite the code so that it shows the incremental displacement relative to the end of the stage of the first database instead. So basically, I want the incremental displacement of the 2nd database relative to the end of Stage 1 of the first database.
I tried rewriting the code to suit my needs; however, I keep getting this error:
Cannot add the virtual results due to the following errors:
Nodal result with id (1) belongs to a different parent DB
I'm not very familiar with the code titles used in PyMPC. How do I edit the initial code to find the incremental displacements from one database relative to another? Could you provide me with an example and assist me with this issue? Thank you; your help is appreciated.
Re: RE: Post processing relative displacmeent from different data base.
This error says that you cannot perform "virtual result" operations among different databases. If your databases belong to the same analyses, why do you separe them? are you using something like remove-recorder + record several times?Nodal result with id (1) belongs to a different parent DB
Re: RE: Post processing relative displacmeent from different data base.
Hi,
In my analysis, I am using two material models: one for stage 1 of the analysis and another material is added for the subsequent analysis stages (2 materials now in stage 2). When I save the results in a single MPCO recorder that incorporates both model stages, I can only view the stress-strain color map for one of the materials, not the other.
However, I was previously advised in this forum to create separate MPCO recorders for each analysis stage, so that I can view the stress-strain data for both materials in the second stage. As such, I have separated my different stages into separate databases. And yes, I am using emove-recorder + record several times.
Is there a way to perform "virtual result" operations across different databases when two different databases are uploaded?
How do i edit the given code to suit this need?
regards,
ryan
In my analysis, I am using two material models: one for stage 1 of the analysis and another material is added for the subsequent analysis stages (2 materials now in stage 2). When I save the results in a single MPCO recorder that incorporates both model stages, I can only view the stress-strain color map for one of the materials, not the other.
However, I was previously advised in this forum to create separate MPCO recorders for each analysis stage, so that I can view the stress-strain data for both materials in the second stage. As such, I have separated my different stages into separate databases. And yes, I am using emove-recorder + record several times.
Is there a way to perform "virtual result" operations across different databases when two different databases are uploaded?
How do i edit the given code to suit this need?
regards,
ryan
Re: RE: Post processing relative displacmeent from different data base.
Currently it's not possible because this limitation is written in the core c++ part of the code.
If you share your model we can see if there is a way to keep 1 single database for your analsyis
If you share your model we can see if there is a way to keep 1 single database for your analsyis
Re: RE: Post processing relative displacmeent from different data base.
I am currently using STKO for post-processing.
I have another question: I am also utilizing OpenSees' built-in recorder system. One reason I use the "remove recorder" command is that I want to separate my text results between different stages of analysis into separate text files. Is there a way to remove all the recorders by OpenSees while keeping the MPCO recorder at the first stage?
I have another question: I am also utilizing OpenSees' built-in recorder system. One reason I use the "remove recorder" command is that I want to separate my text results between different stages of analysis into separate text files. Is there a way to remove all the recorders by OpenSees while keeping the MPCO recorder at the first stage?
Re: RE: Post processing relative displacmeent from different data base.
Try this small example:Is there a way to remove all the recorders by OpenSees while keeping the MPCO recorder at the first stage?
Code: Select all
model basic -ndm 2 -ndf 2
node 1 0.0 0.0
set R1 [recorder Node -file nodal_1.txt -time -node 1 -dof 1 disp]
set R2 [recorder Node -file nodal_2.txt -time -node 1 -dof 2 disp]
record
remove recorder $R1
record
remove recorder $R2