rclab-auth / gidopensees

GiD+OpenSees Interface
http://gidopensees.rclab.civil.auth.gr
GNU General Public License v3.0
94 stars 42 forks source link

How to add a new material and element in OpenSees + GiD ? #150

Open dyiskok opened 3 years ago

dyiskok commented 3 years ago

hi guys ,gid+opensee is a great tool and it is very helpful to me. but I've been having some problems lately--how to add new materials and elements to gid+opensees, which is already contained in opensess and not contained in gid+opensees? it is very important to me ,holp to get your help,thanks!

charles-see commented 3 years ago

I thank we need to do as what the team have done in the develop of GiD+Opensees,but in the github ,I can't get enougth information to solve it.May be we can add the material in the .tcl file to solve this problem instead in the GID

theokart commented 3 years ago

Take some existing elements/materials as template.

  1. define your new material or element inside OpenSees.mat. Each element/material is defined between commands MATERIAL and END MATERIAL . There is also a command BOOK which is used to categorize the elements/materials defined above of each BOOK command. So put your own element in the correct category ( and corresponding window ).
  2. create a relevant .bas file inside bas folder (e.g. bas/Elements/Truss/TrussElement.bas ) in order to print the correct command for each used defined element/material.
  3. create a relevant .tcl file inside tcl or bas/tcl folder if needed. You can see some commands inside .mat file "TKWIDGET: functionName" this functionName is a tcl procedure defined inside a .tcl file.
  4. The above mentioned .tcl file should be imported ( sourced ) from OpenSees.tcl through procedure InitGIDProject .
  5. include your .bas file (step 2) in the correct spot of OpenSees.bas file. For example, check command "*include bas\Elements\Truss\TrussElement.bas" inside OpenSees.bas.
vpapanik commented 3 years ago

And then share with the community.

zgz115 commented 2 years ago

Hi,guys,When I tried to add a new material(SelfCentering Material,https://opensees.berkeley.edu/wiki/index.php/SelfCentering_Material) to gid+opensees, there were some following errors,Idon't konw why?It is very important to me ,I am really hope to get your help,thanks!@theokart,@vpapanik Syntax error in dependencies at field 2. Assuming no dependencies Expected FORWARD ACTIVATION FORCE_SIGACT must be some of "HIDE" "SET" "RESTORE" "-" "CONDITION" "TITLESTATE" near position 179 of (Stress-Strain,RESTORE,Initial Stiffness_K1,#CURRENT#,RESTORE,Post-Activation Stiffness_K2,#CURRENT#,RESTORE,Forward Activation Stress_sigAct,HIDE,Forward Activation Force_sigAct,#CURRENT#,RESTORE,Ratio of Forward to Reverse Activation Stress_beta,HIDE,Ratio of Forward to Reverse Activation Force_beta,#CURRENT#,RESTORE,slip Strain_epsSlip,HIDE,slip Deformation_epsSlip,#CURRENT#,RESTORE,Bearing Strain_epsBear,HIDE,Bearing Deformation_epsBear,#CURRENT#,RESTORE,Ratio of Bearing Stiffness to Initial Stiffness $k1_rBear,#CURRENT#) Syntax error in dependencies at field 2. Assuming no dependencies Expected FORWARD ACTIVATION FORCE_SIGACT must be some of "HIDE" "SET" "RESTORE" "-" "CONDITION" "TITLESTATE" near position 183 of (Force-Deformation,RESTORE,Initial Stiffness_K1,#CURRENT#,RESTORE,Post-Activation Stiffness_K2,#CURRENT#,HIDE,Forward Activation Stress_sigAct,RESTORE,Forward Activation Force_sigAct,#CURRENT#,HIDE,Ratio of Forward to Reverse Activation Stress_beta,RESTORE,Ratio of Forward to Reverse Activation Force_beta,#CURRENT#,HIDE,slip Strain_epsSlip,RESTORE,slip Deformation_epsSlip,#CURRENT#,HIDE,Bearing Strain_epsBear,RESTORE,Bearing Deformation_epsBear,#CURRENT#,RESTORE,Ratio of Bearing Stiffness to Initial Stiffness $k1_rBear,#CURRENT#) Error in tcl script sending event INIT to Standard Uniaxial Materials::GenerateValues: invalid command name "Standard" Error in tcl script sending event INIT to TK_MaterialWikiInfo: can't read "cmd": no such variable

Error in tcl script sending event CLOSE to Standard Uniaxial Materials::GenerateValues: invalid command name "Standard" Error in tcl script sending event CLOSE to Standard Uniaxial Materials::GenerateValues: invalid command name "Standard" while executing "error $result" invoked from within "if [catch "DWCheckClose $GDN" result] { if [string equal $result CANCEL] { return } if {$after_close ne ""} { ..." (procedure "DWCloseWindow" line 4) invoked from within "DWCloseWindow GD_MAT_1" invoked from within ".gid.materials1.but2.close invoke " invoked from within ".gid.materials1.but2.close instate !disabled { .gid.materials1.but2.close invoke } " invoked from within ".gid.materials1.but2.close instate pressed { .gid.materials1.but2.close state !pressed; .gid.materials1.but2.close instate !disabled { .gid.materials1..." (command bound to event)

MekPAME commented 7 months ago

Hi! GIDOpenSees Developers of Aristotle University of Thessaloniki, Greece.

First of all, thanks for your great job to create this new platform. I am doing a Master Thesis at TU Delft on the sand soil behaviour of on shore wind turbine shallow foundations.

I want to introduce a new costitutive law so a new material called SANISAND MS. I've found this open topic. @theokart @vpapanik Are there any new developments about? If there are not, how to generate the new material through the code? @theokart commented on Mar 25, 2021 in this issue with a procedure, shoud I use it?

I think your answer can be really important for the future of all the Engineering community of GIDOpenSees.

Dear all, my best regards!

Marcello De Vivo (master student of Geotechnical Engineering at the Polytechnic of Turin at the moment at TU Delft.

vpapanik commented 7 months ago

Follow these instructions and make a pull request when you finish.

Take some existing elements/materials as template.

1. define your new material or element inside **OpenSees.mat**. Each element/material is defined between commands **MATERIAL** and **END MATERIAL** . There is also a command **BOOK** which is used to categorize the elements/materials defined above of each BOOK command. So put your own element in the correct category ( and corresponding window ).

2. create a relevant .bas file inside bas folder (e.g. bas/Elements/Truss/TrussElement.bas ) in order to print the correct command for each used defined element/material.

3. create a relevant .tcl file inside tcl or bas/tcl folder **if needed**.  You can see some commands inside .mat file "TKWIDGET: functionName" this functionName is a tcl procedure defined inside a .tcl file.

4. The above mentioned .tcl file should be imported ( sourced ) from **OpenSees.tcl** through procedure **InitGIDProject** .

5. include your .bas file (step 2) in the correct spot of **OpenSees.bas** file.  For example, check command "*include bas\Elements\Truss\TrussElement.bas" inside OpenSees.bas.
MekPAME commented 7 months ago

@vpapanik Good morning! Thanks a lot for your answer with the procedure. I need a new material in the GID+OpenSees software where I am creating my geotechnical model. Is this procedure working also for GID+OpenSees? My desire let's say is to have a new material defined by me that I can give to the standard brick elements (so a multi dimensional material) in the GID+OpenSees interface. Otherwise my last option, I think it can work, is to export the tcl file up to the meshing phase and then continue writing the code with OpenSees. But if there is a way to just add a material on GID+OpenSees I'd be really glad!

My best regards!

MekPAME commented 7 months ago

Good morning Professor! @vpapanik I think I've got a limit immediately when I started the procedure. Why? The point is that I do not have this material defined as a matlab code. It's just a .tcl bar code you write when using OpenSees. Do you have an idea on how to import this material anyway? Is there a way to create a matlab code to generate a new material starting from Opensees?

Thank you a lot! Best regards! Marcello