Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - rezvan

Pages: [1] 2
1
AI use in Regional Simulation (BRAILS) / Live Expert Tips Session Movie
« on: February 02, 2023, 04:57:27 PM »
Hello Barbaros,

Thank you and all the team members for this great module.
This is a great contribution to the field.
I was wondering if you could upload the live expert tips session that was held by SimCenter on Jan. 27.

Best,
Pooya

2
Hi Adam,

First and foremost, I am so grateful for such a valuable and detailed response. Also, I appreciate the new version with the added EDPs.
Moreover, I apologize for replying too late. I had a hectic month and wanted to try all the mentioned points before reaching out.

I thoroughly checked all the options and input data and examined different cases for a 6-story eccentrically braced frame. To make a fair comparison between PACT and PELICUN, I tried to use the same input data as follows:
a- The components' quantities are deterministic in both software (no dispersion was considered for the components).
b- In PELICUN, the number of blocks for each component is calculated by the total quantity divided by the unit quantity of the component defined in PACT. For example, if the total quantity of “B.20.22.001" is 1500 square feet (SF), the unit of this component in PACT is "30 SF". Therefore, the number of blocks in PELICUN was calculated to be 1500/30=50.
c- Similar fragilities for collapse and excessive RID were introduced (median and dispersion).
d- "Mont-Carlo" simulation with 1000 realization was used in both software.
e- Non-directional conversion factor equal to 1.2 was assigned in PACT (the default value in PELICUN).
f- IN PACT, the demands of the prototype subjected to a set of 22 ground motions were provided, while in PELICUN the median and logarithmic standard deviation of these demands were introduced. The log-stdev of each set of demands was calculated by first getting the natural logarithm of the set of 22 EDPs and then calculating the standard deviation of this set (please confirm if it is correct).
g- In PACT, the maximum residual drifts of the building (among all the stories) subjected to the set of 22 ground motions were provided. In PELICUN the ensemble median of the peak residual story drift of each story subjected to the set of 22 ground motions was introduced (similar to the other EDPs). Therefore, there is a difference in terms of providing the input data of the residual drift between PACT and PELICUN.

I examined different cases, and here are some of the findings:

Case-1: On the first try, I tried to make a simpler model for comparison, therefore I only included 2-3 components in the CMP_marginals, and excluded excessive RID and collapse cases by assigning a large number to the median of the corresponding fragilities. If the "Economies of scale" is set to "True", "True" (similar to PACT), the analysis fails (probably because no realization leads to neither collapse nor excessive drift), but if this option is set to "True", "False", the analysis converges. As can be seen in the figure, there is a small difference between CDFs of the repair cost in terms of uncertainty.

Case-2: Similar to case-1, but the collapse, and excessive RID are included. The "Economies of scale" was set to "True", "True" (similar to PACT). As shown in the figure, there is a break in the CDF of the repair cost. This break is due to the large difference between the total repair cost of the repairable cases and the replacement cost (irreparable and collapse cases). The difference between the height of the two horizontal lines infers the probability of either collapse or irreparable damage. It can be seen that PELICUN predicts a higher probability for those scenarios (which is mainly due to excessive RID and not collapse and maybe because of the different ways of providing the residual drift in the two software as mentioned in part "g" above).

Case-3: The remaining components were added, and probabilistic quantities were used for components. Excessive RID and collapse were included in the analysis and the "Economies of scale" was set to "True", "True".


Consequently, two differences can be observed between the results:
1- the probability of irreparable damage in PACT and PELICUN seems to be different (In the first post, such a difference was not observed because the prototype was a self-centering system with almost zero residual drift).
2- The uncertainty seems to be slightly different as shown in Case-1.

Please let me know if I am missing something.

Again, I appreciate your precious work, and I will be glad if I can do any help.

Pooya,






3
Damage & Loss (PELICUN) / Re: EDP keys
« on: May 30, 2022, 11:56:47 PM »
Hi Adam,

I appreciate your detailed and helpful response.

It is now completely clear how to add a new EDP to the mentioned list. I also wanted to suggest adding "Link rotation angle" to the list of EDPs in the next version.
In FEMA P-58, the damage of eccentrically braced frames is based on the link rotation angle as you previously defined in "fragility_DB_FEMA_P58_2nd.xls" file; however the EDP is not defined in base.py.

Thank you so much,

Pooya,

4
Hello,

I just wanted to share this post to show the comparison between the damage and loss assessment results, which were performed with Pelicun and PACT software for a 6-story building.
The results seem to be close; however, the uncertainty in the results based on PACT analysis is more considerable than Pelicun.

Thank you,
Pooya

5
Hi Adam,

Both suggestions look so interesting and innovative to me.

I just tried the second method and it worked perfectly!
I totally agree to define the 'roof' keyword to be parsed as "number of stories + 1"; I think it makes more sense.

I appreciate your innovative solution.

Pooya,



6
Thank you so much, Adam.

Now, I completely understand the definition of the location parameter.

However, I still have a doubt about some acceleration-sensitive components that should be assigned to the floors and not the stories.
Consider two different cases in a 4-story building where we want to put a chiller (D.30.31.023) or cooling tower (D.30.31.023) either on the roof or on the ground (as far as I know both cases are very common).

How can we define the location in these two cases? Because here we have 5 floors and we want to use the EDP of the first and the last floor which are gound and roof levels.
If the offset of 1 is defined for the cooling tower, then how to use the EDP of the ground floor?
If that offset is not defined, then how to use the EDP of the roof?

So many thanks,

Pooya

7
Damage & Loss (PELICUN) / Perlicun Ver3- Location of the Components
« on: May 03, 2022, 10:32:35 PM »
Hello Adam,

I faced a problem related to the location of the components.

I checked in different prototypes, when I define the location of the components in the CMP_marginals_LET file, I do not face any problem if I put "all" or any floor number (e.g. "1", "2",...) in the "Location" column except for the ground floor. If I assign any component to the ground level (e.g. "0" or "0--5") I face two different errors depending on whether the component is drift-sensitive or acceleration-sensitive. I copied the error messages at the end of this message. I personally think this is an important issue, because usually the components of the roof level are different, and using "all" is not possible for many components.
As another example, in the Jupyter notebook example file, if you change the location of the Traction Elevator to "0" (According to FEMA documentation, for traction elevator the acceleration of the first floor which is "0" floor in PELICUN should be used), you will see the same error.

I also have a few questions related to the location of the components, I will try to explain as clearly as I can, however, if it is not that clear please let me know.

1- According to the FEMA documentation, for some components like C30.32.001a (suspended ceiling),  the EDP of the above floor should be considered for calculating the damage in the component; therefore, it is meaningless to assign such components to the roof level since there is no level above that. Does Pelicun follow the same rule? If it does, what would happen if such components are assigned to the roof level (e.g. using "all" in the "Location" column)? Will Pelicun ignore the roof level automatically?

2- The drift-sensitive components should be assigned to the "story" numbers while the acceleration-sensitive components should be assigned to the "floor" number (floor number = story number +1).  What does it mean if you assign "0-6'' to a drift-sensitive component in a 6-story building. Will Pelicun ignore "0" or "6"?  or for example, in the Jupyter notebook example, you assigned "all" to many drift-sensitive components like Wall partitions. Does Pelicun ignore the "roof" or "0" level in such cases?

3- In a four-story building (like Jupyter notebook example), if we put "2-4" in the "Location" column for a drift-sensitive component, does Pelicun consider the drifts of the 2nd, 3rd, and 4th stories? if yes, then what does "0--4" mean (the same question)?

Again, thank you so much and I really appreciate your nice and quick support.

Pooya,



Drift-sensitive components

    PAL.damage.calculate(sample_size, dmg_process=dmg_process)

  File "C:\Users\pooya\anaconda3\lib\site-packages\pelicun\model.py", line 1991, in calculate
    demand = self._assemble_required_demand_data(EDP_req)

  File "C:\Users\pooya\anaconda3\lib\site-packages\pelicun\model.py", line 1591, in _assemble_required_demand_data
    demand = demand_source[(EDP_req[0], EDP_req[1], EDP_req[2])].values

  File "C:\Users\pooya\anaconda3\lib\site-packages\pandas\core\frame.py", line 3504, in __getitem__
    return self._getitem_multilevel(key)

  File "C:\Users\pooya\anaconda3\lib\site-packages\pandas\core\frame.py", line 3555, in _getitem_multilevel
    loc = self.columns.get_loc(key)

  File "C:\Users\pooya\anaconda3\lib\site-packages\pandas\core\indexes\multi.py", line 2882, in get_loc
    return self._engine.get_loc(key)

  File "pandas\_libs\index.pyx", line 779, in pandas._libs.index.BaseMultiIndexCodesEngine.get_loc

  File "pandas\_libs\index.pyx", line 136, in pandas._libs.index.IndexEngine.get_loc

  File "pandas\_libs\index.pyx", line 163, in pandas._libs.index.IndexEngine.get_loc

  File "pandas\_libs\hashtable_class_helper.pxi", line 1832, in pandas._libs.hashtable.UInt64HashTable.get_item

  File "pandas\_libs\hashtable_class_helper.pxi", line 1841, in pandas._libs.hashtable.UInt64HashTable.get_item


acceleration-sensitive components:

    PAL.damage.calculate(sample_size, dmg_process=dmg_process)

  File "C:\Users\pooya\anaconda3\lib\site-packages\pelicun\model.py", line 1994, in calculate
    ds_sample = self._evaluate_damage_state(demand, capacity_sample, lsds_sample)

  File "C:\Users\pooya\anaconda3\lib\site-packages\pelicun\model.py", line 1625, in _evaluate_damage_state
    dmg_eval = (capacity_sample.sub(demand, axis=0) < 0)

  File "C:\Users\pooya\anaconda3\lib\site-packages\pandas\core\ops\__init__.py", line 447, in f
    new_data = self._dispatch_frame_op(other, op)

  File "C:\Users\pooya\anaconda3\lib\site-packages\pandas\core\frame.py", line 6967, in _dispatch_frame_op
    bm = self._mgr.apply(array_op, right=right)

  File "C:\Users\pooya\anaconda3\lib\site-packages\pandas\core\internals\managers.py", line 302, in apply
    applied = b.apply(f, **kwargs)

  File "C:\Users\pooya\anaconda3\lib\site-packages\pandas\core\internals\blocks.py", line 402, in apply
    result = func(self.values, **kwargs)

  File "C:\Users\pooya\anaconda3\lib\site-packages\pandas\core\ops\array_ops.py", line 222, in arithmetic_op
    res_values = _na_arithmetic_op(left, right, op)

  File "C:\Users\pooya\anaconda3\lib\site-packages\pandas\core\ops\array_ops.py", line 163, in _na_arithmetic_op
    result = func(left, right)

  File "C:\Users\pooya\anaconda3\lib\site-packages\pandas\core\computation\expressions.py", line 239, in evaluate
    return _evaluate(op, op_str, a, b)  # type: ignore[misc]

  File "C:\Users\pooya\anaconda3\lib\site-packages\pandas\core\computation\expressions.py", line 128, in _evaluate_numexpr
    result = _evaluate_standard(op, op_str, a, b)

  File "C:\Users\pooya\anaconda3\lib\site-packages\pandas\core\computation\expressions.py", line 69, in _evaluate_standard
    return op(a, b)

TypeError: unsupported operand type(s) for -: 'float' and 'NoneType'





KeyError: 101

8
Damage & Loss (PELICUN) / Re: Probability of repairable damage
« on: May 03, 2022, 01:50:55 PM »
Thank you, Adam

I am asking about the following line of codes which are located in the last part of the example you provided in the Jupyyter notebook:

# get only the results that describe repairable damage
agg_DF_ = agg_DF.loc[agg_DF['repair_cost'] < 2.0e7]

print('\nProbability of experiencing repairable damage:', agg_DF_.shape[0] / agg_DF.shape[0])


 I guess :

1-The probability of "repairable damage" is defined as the number of realizations whose repair cost is less than (2.0E+7) over the total number of realizations. Is that right?

2- In the realization that the building experiences collapse or excessive drift, the repair cost is taken equal to the replacement cost which is more than 2.0E+07, therefore, they will not be considered repairable cases. Is that right?

3- How did you define 2.0E+07? Is it almost half of the replacement cost? Meaning that if the repair cost is more than 50% of the replacement cost, it is not reasonable to repair the building?

Again, I really appreciate your endless support.

Pooya,

9
Damage & Loss (PELICUN) / Component Quantity and Units
« on: May 02, 2022, 04:58:49 PM »
Dear Adam,

I hope my so many questions do not bother you.

Regarding the quantity and unit of the components, for one like "C10.11.001a" which is the wall partition, in the CMP_marignals_LET file, you defined ft2 (square feet) as the unit; however, in the bldg_repair_DB_FEMA_P58_2nd.csv file the repair cost is based on 100 LF which is similar to "Normative Quantity Estimation Tool".

I just wanted to make sure whether the users should follow the units provided in the bldg_repair_DB_FEMA_P58_2nd.csv file or any related unit is acceptable.

Another example is "D5012.021a" which is low-voltage switchgear. Based on the FEMA documentation the quantity should be based on 250 AMP, but you defined "EACH" in the bldg_repair_DB_FEMA_P58_2nd.csv file. Does "EACH" mean each of 250 AMP? since the same repair cost is defined for 250 AMP in FEMA documentation.


Thank you so much,
 Pooya

10
Damage & Loss (PELICUN) / Probability of repairable damage
« on: May 02, 2022, 01:16:20 PM »
Hi Adam,

I have another question regarding the probability of repairable damage.
I was wondering whether the collapsed cases are also considered to get this probability or only the excessive RID damage state is considered to calculate it.

Thank you so much,

11
Hi Adam,

I am thankful for your timely and detailed response.

Actually, after I set the "log_std" column to a very small value (e.g. 10^-6), I checked the generated realizations (attached), and there wasn't any problem in generating deterministic values of each EDP (attached photo) and fortunately, Pelicun was successful in generating the same EDP value in each realization.

However, I was not paying attention to the residual drift since in the example you provided in Jupyter Notebook, the empirical relationships were being used to predict the residual drift and therefore they were taking different values for each realization. I should use deterministic values for the residual drifts as well and see the difference.

Again, I appreciate your enlightening response.

Pooya,

12
Damage & Loss (PELICUN) / Re: Generation of Simulated Demands
« on: May 02, 2022, 12:08:53 PM »
Hello JiaJun,

Definitely, Adam would help you way better, but I (as a user) personally think if you watch the tutorial videos on YouTube, you will learn much more.
I recommend you to watch the tutorials of PBE first and then move to Ver3 of Pelicun.

Here are the links:

https://simcenter.designsafe-ci.org/research-tools/pbe-application/
https://www.youtube.com/watch?v=0Cak4sxyvCI

I hope this would help.

Pooya,

13
Hi Adam,

I didn't face this problem anymore in Version 3.b4.
I appreciate it.

Pooya

14
Hello Adam,

Thank you for the updated Version 3.b4 of Pelicun.

I have a question and I will be so grateful if you could help me.

Is it possible to get a more deterministic damage and loss assessment of a building when is subjected to a specific ground motion by setting the "log_std" of the demands equal to zero?

(I know the repair time and costs are also accompanied by uncertainty as well, so the final results will not be purely deterministic).

In the example you provided in the Jupiter notebook, I set the "log_std" of the demands equal to zero, but I observed meaningful differences in the results (compared to the non-zero "log_std" case).

I attached the summary tables of the consequences here and as you can see, the standard deviation of the consequences is even larger when the "log_std" is set to zero.

Thank you so much,

Pooya


15
Damage & Loss (PELICUN) / Pelicun 3.1.b2 - Residual inter-story drift
« on: March 24, 2022, 02:18:06 AM »
Hi Adam,

I faced a problem regarding the residual inter-story drifts and I was wondering if you could help me with.
I am using the Pelicun module for damage and loss assessment of a special self-centering system, with almost near zero residual drift at design basis earthquake (1/475 years).
Therefore, I modified the part of the code for estimation of the residual drift, and instead, I used the results from numerical simulation.
In some cases when the residual drifts (in the demand_data.csv) are very small value (in the order of 10^-5) the following error appears, but if I increase them manually (e.g 10^-4)  the error disappears. I guess it should be due to a mathematical issue when trying to fit a distribution over a median value that is almost zero. Do you think there is any way to overcome this error?

So many thanks,
Pooya

22:13:14 Calculating damages...
         Applying task from prescribed damage process...
         Damage process task successfully applied.
         Applying task from prescribed damage process...
Traceback (most recent call last):

  File "C:\Users\pooya\anaconda3\lib\site-packages\pandas\core\indexes\base.py", line 3621, in get_loc
    return self._engine.get_loc(casted_key)

  File "pandas\_libs\index.pyx", line 136, in pandas._libs.index.IndexEngine.get_loc

  File "pandas\_libs\index.pyx", line 163, in pandas._libs.index.IndexEngine.get_loc

  File "pandas\_libs\hashtable_class_helper.pxi", line 5198, in pandas._libs.hashtable.PyObjectHashTable.get_item

  File "pandas\_libs\hashtable_class_helper.pxi", line 5206, in pandas._libs.hashtable.PyObjectHashTable.get_item

KeyError: '1'


The above exception was the direct cause of the following exception:

Traceback (most recent call last):

  File "C:\Users\pooya\Desktop\Temp\b\MainAnalysis.py", line 288, in <module>
    Analysis(buildingIndex)

  File "C:\Users\pooya\Desktop\Temp\b\MainAnalysis.py", line 283, in Analysis
    dl.getDLAssessment(buildingID, N_story, Tn, SaD, sample_size, delta_y, stripe, DL_DataDir, buildingInfoDir, replacementCost, replacementTime)

  File "C:\Users\pooya\Desktop\Temp\b\DL_AssessmentFunctions.py", line 217, in getDLAssessment
    PAL.damage.calculate(sample_size, dmg_process=dmg_process)

  File "C:\Users\pooya\anaconda3\lib\site-packages\pelicun\model.py", line 1991, in calculate
    qnt_sample = self._perform_dmg_task(task, qnt_sample)

  File "C:\Users\pooya\anaconda3\lib\site-packages\pelicun\model.py", line 1775, in _perform_dmg_task
    source_ds_vals = source_cmp_df.groupby(

  File "C:\Users\pooya\anaconda3\lib\site-packages\pandas\core\frame.py", line 3505, in __getitem__
    indexer = self.columns.get_loc(key)

  File "C:\Users\pooya\anaconda3\lib\site-packages\pandas\core\indexes\base.py", line 3623, in get_loc
    raise KeyError(key) from err

KeyError: '1'



Pages: [1] 2