diff --git a/CMakeLists.txt b/CMakeLists.txt index b65c2837d..86c3397dc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -32,8 +32,23 @@ set(OPS_BUNDLED_DIR "${PROJECT_SOURCE_DIR}/OTHER/") set(OPS_SRC_DIR "${PROJECT_SOURCE_DIR}/SRC/") include(OpenSeesFunctions) +# pseudo target modeling all exteral packages +add_library(OPS_External_packages INTERFACE) + +#add_library(OPS_Element_libraries INTERFACE) + +# include user config include(${PROJECT_SOURCE_DIR}/Conf.cmake) +message("OPS >>> BLAS: ${BLAS_LIBRARIES}") +message("OPS >>> CBLAS: ${CBLAS_LIBRARY}\n") +message("OPS >>> LAPACK: ${LAPACK_LIBRARIES}") +message("OPS >>> ARPACK: ${ARPACK_LIBRARIES}") +message("OPS >>> SUPERLU: ${SUPERLU_LIBRARIES}") +message("OPS >>> TCL: ${TCL_LIBRARY}") +set(TCL_LIBRARIES ${TCL_LIBRARY}) +message("OPS >>> AMD: ${AMD_LIBRARIES}") + # define user-selectable options for end target set_property(CACHE OPS_FINAL_TARGET PROPERTY STRINGS G3 OpenSeesTcl OpenSeesMP OpenSeesSP OpenSeesPy) @@ -46,10 +61,8 @@ add_library(OPS_OS_Specific_libs INTERFACE) if (UNIX) include(OpenSeesDependenciesUnix) - if(APPLE) message(STATUS ">>> MacOS") - else() message(STATUS ">>> LINUX") add_compile_definitions(_LINUX _UNIX _TCL85) @@ -59,23 +72,11 @@ endif() if(WIN32) # NOTE: this will execute for both 32-bit and 64-bit builds. include(OpenSeesDependenciesWin) - - # target_sources(OPS_OS_Specific_libs INTERFACE ${OPS_SRC_DIR}/api/win32Functions.cpp) target_link_libraries(OPS_OS_Specific_libs INTERFACE wsock32 ws2_32) add_compile_definitions(_WIN32) - # message("OPS >>> Including the following precompiled libs: '${ops_precompiled}'") - # target_sources(OPS_OS_Specific_libs INTERFACE ${OPS_SRC_DIR}/api/win32Functions.cpp) message(STATUS ">>> WIN32") endif() -message("OPS >>> BLAS: ${BLAS_LIBRARIES}") -message("OPS >>> CBLAS: ${CBLAS_LIBRARY}\n") -message("OPS >>> LAPACK: ${LAPACK_LIBRARIES}") -message("OPS >>> ARPACK: ${ARPACK_LIBRARIES}") -message("OPS >>> SUPERLU: ${SUPERLU_LIBRARIES}") -message("OPS >>> TCL: ${TCL_LIBRARY}") -set(TCL_LIBRARIES ${TCL_LIBRARY}) -message("OPS >>> AMD: ${AMD_LIBRARIES}") #============================================================================== diff --git a/Conf.cmake b/Conf.cmake index 7d0ba7997..55684a462 100644 --- a/Conf.cmake +++ b/Conf.cmake @@ -58,7 +58,6 @@ set(OPS_Extension_List set(OPS_Element_List #OPS_Material_StressDensity #OPS_Uniaxial_Fedeas - OPS_Element_truss #OPS_Element_beam2d OPS_Element_beam3d @@ -90,6 +89,7 @@ set(OPS_Element_List OPS_Element_masonry #OPS_Element_feap #OPS_Element_PFEMElement + OPS_Element_CEq ) diff --git a/DEVELOPER/core/classTags.h b/DEVELOPER/core/classTags.h index 3127735b5..50ce42de1 100644 --- a/DEVELOPER/core/classTags.h +++ b/DEVELOPER/core/classTags.h @@ -218,11 +218,12 @@ #define MAT_TAG_QzSimple1 207 #define MAT_TAG_PyLiq1 208 #define MAT_TAG_TzLiq1 209 -#define MAT_TAG_PySimple2 210 -#define MAT_TAG_TzSimple2 211 -#define MAT_TAG_QzSimple2 212 -#define MAT_TAG_SteelBRB 213 -#define MAT_TAG_PySimple3 214 +#define MAT_TAG_QzLiq1 210 +#define MAT_TAG_PySimple2 211 +#define MAT_TAG_TzSimple2 212 +#define MAT_TAG_QzSimple2 213 +#define MAT_TAG_SteelBRB 214 +#define MAT_TAG_PySimple3 215 @@ -722,6 +723,8 @@ #define ELE_TAG_EightNodeQuad 208 #define ELE_TAG_SixNodeTri 209 +#define ELE_TAG_ASDEmbeddedNodeElement 217 // Massimo Petracca (ASDEA) + #define FRN_TAG_Coulomb 1 #define FRN_TAG_VelDependent 2 #define FRN_TAG_VelPressureDep 3 diff --git a/ETC/cmake/OpenSeesDependenciesUnix.cmake b/ETC/cmake/OpenSeesDependenciesUnix.cmake index dbf5b745e..76a514533 100644 --- a/ETC/cmake/OpenSeesDependenciesUnix.cmake +++ b/ETC/cmake/OpenSeesDependenciesUnix.cmake @@ -63,4 +63,8 @@ opensees_load(HDF5 FIND) opensees_load(MySQL FIND) +# Integrated exteral libraries +opensees_load(FEDEAS_Uniaxial + LIBRARY FALSE +) diff --git a/ETC/cmake/OpenSeesFunctions.cmake b/ETC/cmake/OpenSeesFunctions.cmake index 4171376c7..7efa4471a 100644 --- a/ETC/cmake/OpenSeesFunctions.cmake +++ b/ETC/cmake/OpenSeesFunctions.cmake @@ -1,4 +1,21 @@ # Claudio Perez + +function (opensees_elements elemlib) + add_library(${elemlib} EXCLUDE_FROM_ALL) + set(private_sources ${ARGN}) + set(public_sources ${ARGN}) + list(FILTER private_sources INCLUDE REGEX ".*\.cpp") + list(FILTER public_sources INCLUDE REGEX ".*\.h") + target_sources(${elemlib} PRIVATE ${private_sources} PUBLIC ${public_sources}) + set_target_properties(${elemlib} PROPERTIES LINKER_LANGUAGE CXX) + message("PRIVATE ${private_sources} PUBLIC ${public_sources}") +endfunction() + +function (opensees_uniaxials unilib) + opensees_elements(${unilib} ${ARGN}) +endfunction() + + function (opensees_add_cxx_flag) cmake_parse_arguments( PARSE_ARGV 0 @@ -27,6 +44,9 @@ endfunction() function (opensees_load lib_name) +# +# +# cmake_parse_arguments( PARSE_ARGV 1 OPS_LOAD_ARG # prefix of output variables @@ -37,12 +57,6 @@ function (opensees_load lib_name) set(OPS_PKG_FOUND_VAR "${lib_name}_FOUND")# PARENT_SCOPE) set(${OPS_PKG_FOUND_VAR} FALSE)# PARENT_SCOPE) - #if(OPS_LOAD_ARG_BUILD) - # message("OPS >>> Using OpenSees bundled library '${lib_name}'") - # set(${OPS_PKG_FOUND_VAR} TRUE PARENT_SCOPE) - # opensees_build(${lib_name}) - # return() - if(OPS_LOAD_ARG_LIBRARY) if(NOT ${${OPS_PKG_FOUND_VAR}}) message("OPS >>> ${lib_name}") @@ -64,7 +78,7 @@ function (opensees_load lib_name) message("OPS >>> find_package(${lib_name})") find_package(${lib_name}) message("OPS >>> status: ${OPS_PKG_FOUND_VAR}=${${OPS_PKG_FOUND_VAR}}") - endif() + endif() endif() if(OPS_LOAD_ARG_BUNDLED) @@ -78,8 +92,10 @@ function (opensees_load lib_name) set("${lib_name}_LIBRARIES" "${lib_name}") endif() endif() + set("${lib_name}_LIBRARIES" ${${lib_name}_LIBRARIES} PARENT_SCOPE) set("${lib_name}_INCLUDE_DIRS" ${${lib_name}_INCLUDE_DIRS} PARENT_SCOPE) + target_compile_definitions(OPS_External_packages INTERFACE "OPSDEF_${lib_name}") message(" status: ${lib_name}_LIBRARIES =${${lib_name}_LIBRARIES}") message(" status: ${lib_name}_INCLUDE_DIRS =${${lib_name}_INCLUDE_DIRS}\n") endfunction() diff --git a/MAKES/Makefile.def.Ubuntu20.04 b/MAKES/Makefile.def.Ubuntu20.04 index 4dee0b607..5e1851d45 100644 --- a/MAKES/Makefile.def.Ubuntu20.04 +++ b/MAKES/Makefile.def.Ubuntu20.04 @@ -15,7 +15,7 @@ # Instructuction for building OpenSees on Ubuntu 20.04 -# NOTE: if you plan to contribue code, fork your own github reo in the browser +# NOTE: if you plan to contribue code, fork your own github repo in the browser # and make change to git clone below to point to your own fork. We will # never give anyone access to repo itself. @@ -23,21 +23,14 @@ # mkdir $HOME/lib # mkdir $HOME/bin # sudo apt-get update -# sudo apt-get install git -# sudo apt-get install emacs -# sudo apt-get install build-essential -# sudo apt-get install gfortran -# wget https://prdownloads.sourceforge.net/tcl/tcl8.6.10-src.tar.gz -# tar zxBf tcl8.6.tar.gz -# cd tcl8.6.10/unix -# configure --prefix=$HOME/tcl8.6 --enable-static --disable-shared --enable-64bit +# sudo apt-get install -y git emacs build-essential gfortran tcl8.6 tcl8.6-dev # make # make install # cd $HOME # git clone https://github.com/OpenSees/OpenSees.git # cd OpenSees # cp ./MAKES/Makefile.def.Ubuntu20.04 ./Makefile.def -# make +# make ## For faster compilation, add -j $(numberOfCores) #INTERPRETER_LANGUAGE = PYTHON @@ -115,8 +108,7 @@ UMFPACK_LIBRARY = $(HOME)/lib/libUmfpack.a METIS_LIBRARY = $(HOME)/lib/libMetis.a CSPARSE_LIBRARY = $(HOME)/lib/libCSparse.a -TCL_LIBRARY = $(HOME)/tcl8.6/lib/libtcl8.6.a - +TCL_LIBRARY = /usr/lib/x86_64-linux-gnu/libtcl8.6.so BLITZ_LIBRARY = $(HOME)/blitz/lib/libblitz.a GRAPHIC_LIBRARY = @@ -267,8 +259,7 @@ MACHINE_INCLUDES = -I/usr/include \ # this file contains all the OpenSees/SRC includes include $(FE)/Makefile.incl -#TCL_INCLUDES = -I/usr/includes/tcl-private/generic -TCL_INCLUDES = -I$(HOME)/tcl8.6/include +TCL_INCLUDES = -I/usr/include/tcl8.6 PYTHON_INCLUDES = -I/usr/include/python3.5 INCLUDES = $(TCL_INCLUDES) $(FE_INCLUDES) $(MACHINE_INCLUDES) $(PYTHON_INCLUDES) diff --git a/SRC/Makefile b/SRC/Makefile index 27dcbd3a4..bec4b9a05 100644 --- a/SRC/Makefile +++ b/SRC/Makefile @@ -344,6 +344,7 @@ PY_SJB_RWB_BJ_LIBS = $(FE)/material/uniaxial/PY/PySimple1.o \ $(FE)/material/uniaxial/PY/ShallowFoundationGen.o \ $(FE)/material/uniaxial/PY/PyLiq1.o \ $(FE)/material/uniaxial/PY/TzLiq1.o \ + $(FE)/material/uniaxial/PY/QzLiq1.o \ $(FE)/material/uniaxial/PY/PySimple1Gen.o \ $(FE)/material/uniaxial/PY/TzSimple1Gen.o @@ -657,7 +658,8 @@ ELE_LIBS = $(FE)/element/Element.o \ $(FE)/element/RockingBC/RockingBC.o \ $(FE)/element/masonry/MasonPan12.o \ $(FE)/element/masonry/MasonPan3D.o \ - $(FE)/element/masonry/BeamGT.o + $(FE)/element/masonry/BeamGT.o \ + $(FE)/element/CEqElement/ASDEmbeddedNodeElement.o # $(FE)/material/nD/Damage2p.o \ # $(FE)/material/nD/Damage2p3D.o \ @@ -860,6 +862,7 @@ MATERIAL_LIBS = $(FE)/material/Material.o \ $(FE)/material/uniaxial/Trilinwpd.o \ $(FE)/material/uniaxial/Trilinwp.o \ $(FE)/material/uniaxial/Trilinwp2.o \ + $(FE)/material/uniaxial/SteelFractureDI.o \ $(FE)/material/nD/NDMaterial.o \ $(FE)/material/nD/PlaneStressLayeredMaterial.o \ $(FE)/material/nD/PlaneStressRebarMaterial.o \ diff --git a/SRC/Makefile.incl b/SRC/Makefile.incl index a5538c0fa..83b7260dd 100644 --- a/SRC/Makefile.incl +++ b/SRC/Makefile.incl @@ -113,6 +113,7 @@ FE_INCLUDES = -I$(FE)/matrix \ -I$(FE)/element/twoNodeLink \ -I$(FE)/element/updatedLagrangianBeamColumn \ -I$(FE)/element/RockingBC \ + -I$(FE)/element/CEqElement \ -I$(FE)/element/UWelements \ -I$(FE)/element/HUelements \ -I$(FE)/analysis \ diff --git a/SRC/actor/objectBroker/FEM_ObjectBrokerAllClasses.cpp b/SRC/actor/objectBroker/FEM_ObjectBrokerAllClasses.cpp index cef431ebc..294016b8e 100644 --- a/SRC/actor/objectBroker/FEM_ObjectBrokerAllClasses.cpp +++ b/SRC/actor/objectBroker/FEM_ObjectBrokerAllClasses.cpp @@ -107,6 +107,7 @@ #include "PY/QzSimple2.h" #include "PY/PyLiq1.h" #include "PY/TzLiq1.h" +#include "PY/QzLiq1.h" #include "fedeas/FedeasBond1Material.h" #include "fedeas/FedeasBond2Material.h" @@ -311,6 +312,8 @@ #include "RockingBC/RockingBC.h" +#include "CEqElement/ASDEmbeddedNodeElement.h" + #include "LinearCrdTransf2d.h" #include "LinearCrdTransf3d.h" #include "PDeltaCrdTransf2d.h" @@ -908,6 +911,9 @@ FEM_ObjectBrokerAllClasses::getNewElement(int classTag) case ELE_TAG_RockingBC: return new RockingBC(); + case ELE_TAG_ASDEmbeddedNodeElement: + return new ASDEmbeddedNodeElement(); + default: opserr << "FEM_ObjectBrokerAllClasses::getNewElement - "; opserr << " - no Element type exists for class tag " ; @@ -1223,7 +1229,7 @@ FEM_ObjectBrokerAllClasses::getNewUniaxialMaterial(int classTag) case MAT_TAG_Fatigue: return new FatigueMaterial(); - case MAT_TAG_TzLiq1: + case MAT_TAG_TzLiq1: return new TzLiq1(); case MAT_TAG_QzSimple1: @@ -1232,6 +1238,9 @@ FEM_ObjectBrokerAllClasses::getNewUniaxialMaterial(int classTag) case MAT_TAG_QzSimple2: return new QzSimple2(); + case MAT_TAG_QzLiq1: + return new QzLiq1(); + case MAT_TAG_Hysteretic: return new HystereticMaterial(); diff --git a/SRC/analysis/algorithm/equiSolnAlgo/ExpressNewton.cpp b/SRC/analysis/algorithm/equiSolnAlgo/ExpressNewton.cpp index 01cd27c6e..d187e4441 100644 --- a/SRC/analysis/algorithm/equiSolnAlgo/ExpressNewton.cpp +++ b/SRC/analysis/algorithm/equiSolnAlgo/ExpressNewton.cpp @@ -54,6 +54,35 @@ #include #include +void *OPS_ExpressNewton() +{ + int nIter = 2, factorOnce = 0, formTangent = CURRENT_TANGENT; + double kMultiplier = 1.0; + + int nArgs = OPS_GetNumRemainingInputArgs(); + int numData = 1; + if (nArgs > 0 && OPS_GetIntInput(&numData,&nIter) < 0) { + opserr << "WARNING ExpressNewton -- error reading nIter\n"; + return 0; + } + if (nArgs > 1 && OPS_GetDoubleInput(&numData,&kMultiplier) < 0) { + opserr << "WARNING ExpressNewton -- error reading kMultiplier\n"; + return 0; + } + while (OPS_GetNumRemainingInputArgs() > 0) { + const char *type = OPS_GetString(); + if ((strcmp(type,"-initialTangent") == 0) || (strcmp(type,"-InitialTangent") == 0)) { + formTangent = INITIAL_TANGENT; + } else if ((strcmp(type,"-currentTangent") == 0) || (strcmp(type,"-CurrentTangent") ==0 )) { + formTangent = CURRENT_TANGENT; + } else if ((strcmp(type,"-factorOnce") == 0) || (strcmp(type,"-FactorOnce") ==0 )) { + factorOnce = 1; + } + } + + return new ExpressNewton(nIter,kMultiplier,formTangent,factorOnce); +} + // Constructor ExpressNewton::ExpressNewton(int ni, double km, int tg, int fo) :EquiSolnAlgo(EquiALGORITHM_TAGS_ExpressNewton), nIter(ni), factorOnce(fo) diff --git a/SRC/analysis/integrator/Newmark.cpp b/SRC/analysis/integrator/Newmark.cpp index 873188b89..d66f64ca5 100644 --- a/SRC/analysis/integrator/Newmark.cpp +++ b/SRC/analysis/integrator/Newmark.cpp @@ -411,6 +411,11 @@ int Newmark::domainChanged() } } + // The remaining get**Sensitivity methods cause seg faults with Lagrange constraint + // handler in dynamic (transient) analysis even when there is no sensitivity algorithm. + // However, I don't think these methods need to be called in domainChanged -- MHS + continue; + const Vector &dispSens = dofPtr->getDispSensitivity(gradNumber); for (i=0; i < idSize; i++) { int loc = id(i); diff --git a/SRC/classTags.h b/SRC/classTags.h index 3dd7a1ab1..58c2f7a05 100644 --- a/SRC/classTags.h +++ b/SRC/classTags.h @@ -223,19 +223,20 @@ #define MAT_TAG_QzSimple1 207 #define MAT_TAG_PyLiq1 208 #define MAT_TAG_TzLiq1 209 -#define MAT_TAG_PySimple2 210 -#define MAT_TAG_TzSimple2 211 -#define MAT_TAG_QzSimple2 212 -#define MAT_TAG_SteelBRB 213 -#define MAT_TAG_PySimple3 214 -#define MAT_TAG_PlateBearingConnectionThermal 215 -#define MAT_TAG_ASD_SMA_3K 216 - -#define MAT_TAG_Masonry 217 -#define MAT_TAG_Masonryt 218 -#define MAT_TAG_Trilinwp 219 -#define MAT_TAG_Trilinwp2 220 -#define MAT_TAG_Trilinwpd 221 +#define MAT_TAG_QzLiq1 210 +#define MAT_TAG_PySimple2 211 +#define MAT_TAG_TzSimple2 212 +#define MAT_TAG_QzSimple2 213 +#define MAT_TAG_SteelBRB 214 +#define MAT_TAG_PySimple3 215 +#define MAT_TAG_PlateBearingConnectionThermal 216 +#define MAT_TAG_ASD_SMA_3K 217 +#define MAT_TAG_SteelFractureDI 218 // galvisf +#define MAT_TAG_Masonry 219 +#define MAT_TAG_Masonryt 220 +#define MAT_TAG_Trilinwp 221 +#define MAT_TAG_Trilinwp2 222 +#define MAT_TAG_Trilinwpd 223 #define MAT_TAG_FedeasMaterial 1000 #define MAT_TAG_FedeasBond1 1001 @@ -788,6 +789,7 @@ #define ELE_TAG_BeamGT 214 #define ELE_TAG_MasonPan12 215 #define ELE_TAG_MasonPan3D 216 +#define ELE_TAG_ASDEmbeddedNodeElement 217 // Massimo Petracca (ASDEA) #define ELE_TAG_ExternalElement 99990 diff --git a/SRC/element/CEqElement/ASDEmbeddedNodeElement.cpp b/SRC/element/CEqElement/ASDEmbeddedNodeElement.cpp new file mode 100644 index 000000000..4d963ccce --- /dev/null +++ b/SRC/element/CEqElement/ASDEmbeddedNodeElement.cpp @@ -0,0 +1,1132 @@ +/* ****************************************************************** ** +** OpenSees - Open System for Earthquake Engineering Simulation ** +** Pacific Earthquake Engineering Research Center ** +** ** +** ** +** (C) Copyright 1999, The Regents of the University of California ** +** All Rights Reserved. ** +** ** +** Commercial use of this program without express permission of the ** +** University of California, Berkeley, is strictly prohibited. See ** +** file 'COPYRIGHT' in main directory for information on usage and ** +** redistribution, and for a DISCLAIMER OF ALL WARRANTIES. ** +** ** +** Developed by: ** +** Frank McKenna (fmckenna@ce.berkeley.edu) ** +** Gregory L. Fenves (fenves@ce.berkeley.edu) ** +** Filip C. Filippou (filippou@ce.berkeley.edu) ** +** ** +** ****************************************************************** */ + +// $Revision: 1.10 $ +// $Date: 2021/04/28 22:51:21 $ + +// Original implementation: Massimo Petracca (ASDEA) +// +// + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +// anonymous namespace for utilities +namespace +{ + + double det2(const Matrix& J) { + return J(0, 0) * J(1, 1) - J(0, 1) * J(1, 0); + } + + double det3(const Matrix& J) { + return J(0, 0) * J(1, 1) * J(2, 2) - J(0, 0) * J(1, 2) * J(2, 1) - J(0, 1) * J(1, 0) * J(2, 2) + + J(0, 1) * J(1, 2) * J(2, 0) + J(0, 2) * J(1, 0) * J(2, 1) - J(0, 2) * J(1, 1) * J(2, 0); + } + + void cross(const Vector& a, const Vector& b, Vector& c) { + c(0) = a(1) * b(2) - a(2) * b(1); + c(1) = a(2) * b(0) - a(0) * b(2); + c(2) = a(0) * b(1) - a(1) * b(0); + } + + namespace tri { + + double shapeFun(double x, double y, int i) { + if (i == 0) + return 1.0 - x - y; + else if (i == 1) + return x; + else if (i == 2) + return y; + return 0.0; + } + + void shapeFunDer(Matrix& dN) { + dN(0, 0) = -1.0; dN(0, 1) = -1.0; + dN(1, 0) = 1.0; dN(1, 1) = 0.0; + dN(2, 0) = 0.0; dN(2, 1) = 1.0; + } + + void globalCoord(const Matrix& X, double lx, double ly, double& gx, double& gy) { + gx = gy = 0.0; + for (int i = 0; i < 3; i++) { + double N = shapeFun(lx, ly, i); + gx += N * X(0, i); + gy += N * X(1, i); + } + } + + void globalCoord(const Matrix& X, double lx, double ly, double& gx, double& gy, double& gz) { + gx = gy = gz = 0.0; + for (int i = 0; i < 3; i++) { + double N = shapeFun(lx, ly, i); + gx += N * X(0, i); + gy += N * X(1, i); + gz += N * X(2, i); + } + } + + void localCoord(const Matrix& X, const Matrix& invJ, double gx, double gy, double& lx, double& ly) { + lx = ly = 0.0; + double px, py; + globalCoord(X, lx, ly, px, py); + Vector D(2); + Vector DL(2); + D(0) = gx - px; + D(1) = gy - py; + DL.addMatrixVector(0.0, invJ, D, 1.0); + lx = DL(0); + ly = DL(1); + } + + void localCoord(const Matrix& X, const Matrix& invJ, double gx, double gy, double gz, double& lx, double& ly) { + lx = ly = 0.0; + double px, py, pz; + globalCoord(X, lx, ly, px, py, pz); + Vector D(3); + Vector DL(3); + D(0) = gx - px; + D(1) = gy - py; + D(2) = gz - pz; + DL.addMatrixVector(0.0, invJ, D, 1.0); + lx = DL(0); + ly = DL(1); + } + + void fillVzInJacobian(Matrix& J) { + double nx = J(1, 0) * J(2, 1) - J(1, 1) * J(2, 0); + double ny = J(0, 1) * J(2, 0) - J(0, 0) * J(2, 1); + double nz = J(0, 0) * J(1, 1) - J(0, 1) * J(1, 0); + double norm = std::sqrt(nx * nx + ny * ny + nz * nz); + if (norm > std::numeric_limits::epsilon()) { + J(0, 2) = nx / norm; + J(1, 2) = ny / norm; + J(2, 2) = nz / norm; + } + } + + } + + namespace tet { + + double shapeFun(double x, double y, double z, int i) { + if (i == 0) + return 1.0 - (x + y + z); + else if (i == 1) + return x; + else if (i == 2) + return y; + else if (i == 3) + return z; + return 0.0; + } + + void shapeFunDer(Matrix& dN) { + dN(0, 0) = -1.0; dN(0, 1) = -1.0; dN(0, 2) = -1.0; + dN(1, 0) = 1.0; dN(1, 1) = 0.0; dN(1, 2) = 0.0; + dN(2, 0) = 0.0; dN(2, 1) = 1.0; dN(2, 2) = 0.0; + dN(3, 0) = 0.0; dN(3, 1) = 0.0; dN(3, 2) = 1.0; + } + + void globalCoord(const Matrix& X, double lx, double ly, double lz, double& gx, double& gy, double& gz) { + gx = gy = gz = 0.0; + for (int i = 0; i < 4; i++) { + double N = shapeFun(lx, ly, lz, i); + gx += N * X(0, i); + gy += N * X(1, i); + gz += N * X(2, i); + } + } + + void localCoord(const Matrix& X, const Matrix& invJ, double gx, double gy, double gz, double& lx, double& ly, double& lz) { + lx = ly = lz = 0.0; + double px, py, pz; + globalCoord(X, lx, ly, lz, px, py, pz); + Vector D(3); + Vector DL(3); + D(0) = gx - px; + D(1) = gy - py; + D(2) = gz - pz; + DL.addMatrixVector(0.0, invJ, D, 1.0); + lx = DL(0); + ly = DL(1); + lz = DL(2); + } + + } + +} + +void * +OPS_ASDEmbeddedNodeElement(void) +{ + static bool first_done = false; + if (!first_done) { + opserr << "Using ASDEmbeddedNodeElement - Developed by: Massimo Petracca, Guido Camata, ASDEA Software Technology\n"; + first_done = true; + } + + const char* descr = "Want: element ASDEmbeddedNodeElement $tag $Cnode $Rnode1 $Rnode2 $Rnode3 <$Rnode4> <-rot> <-K $K>\n"; + + int numArgs = OPS_GetNumRemainingInputArgs(); + if (numArgs < 5) { + opserr << "ASDEmbeddedNodeElement ERROR : Few arguments:\n" << descr; + return 0; + } + + // mandatory parameters + int iData[5]; + int numData = 5; + if (OPS_GetInt(&numData, iData) != 0) { + opserr << "ASDEmbeddedNodeElement ERROR: Invalid integer mandatory values: element ASDEmbeddedNodeElement wants at least 5 integer parameters\n" << descr; + return 0; + } + + // parse optional parameters + bool rot = false; + int N4 = 0; + bool has_N4 = false; + double K = 1.0e18; + for (int i = 5; i < numArgs; i++) { + const char* what = OPS_GetString(); + if (strcmp(what, "-rot") == 0) { + rot = true; + } + else if (strcmp(what, "-K") == 0) { + if (i == numArgs - 1) { + opserr << "ASDEmbeddedNodeElement ERROR: The -K keyword should be followed by a floating point number.\n" << descr; + return 0; + } + ++i; + numData = 1; + if (OPS_GetDouble(&numData, &K) != 0) { + opserr << "ASDEmbeddedNodeElement ERROR invalid floating point number for -K keyword.\n"; + return 0; + } + } + else { + // should be an integer for the only if i == 6 + if (i == 5) { + try { + N4 = std::stoi(std::string(what)); + has_N4 = true; + } + catch (...) { + N4 = -1; + has_N4 = false; + } + } + } + } + + // done + if (has_N4) + return new ASDEmbeddedNodeElement(iData[0], iData[1], iData[2], iData[3], iData[4], N4, rot, K); + else + return new ASDEmbeddedNodeElement(iData[0], iData[1], iData[2], iData[3], iData[4], rot, K); +} + +ASDEmbeddedNodeElement::ASDEmbeddedNodeElement() + : Element(0, ELE_TAG_ASDEmbeddedNodeElement) +{ +} + +ASDEmbeddedNodeElement::ASDEmbeddedNodeElement(int tag, int cNode, int rNode1, int rNode2, int rNode3, bool rot_flag, double K) + : Element(tag, ELE_TAG_ASDEmbeddedNodeElement) + , m_rot_c_flag(rot_flag) + , m_K(K) +{ + m_node_ids.resize(4); + m_node_ids(0) = cNode; + m_node_ids(1) = rNode1; + m_node_ids(2) = rNode2; + m_node_ids(3) = rNode3; + m_nodes.resize(4, nullptr); +} + +ASDEmbeddedNodeElement::ASDEmbeddedNodeElement(int tag, int cNode, int rNode1, int rNode2, int rNode3, int rNode4, bool rot_flag, double K) + : Element(tag, ELE_TAG_ASDEmbeddedNodeElement) + , m_rot_c_flag(rot_flag) + , m_K(K) +{ + m_node_ids.resize(5); + m_node_ids(0) = cNode; + m_node_ids(1) = rNode1; + m_node_ids(2) = rNode2; + m_node_ids(3) = rNode3; + m_node_ids(4) = rNode4; + m_nodes.resize(5, nullptr); +} + +ASDEmbeddedNodeElement::~ASDEmbeddedNodeElement( ) +{ +} + +const char* ASDEmbeddedNodeElement::getClassType(void) const +{ + return "ASDEmbeddedNodeElement"; +} + +void ASDEmbeddedNodeElement::setDomain(Domain* theDomain) +{ + // check nodes + m_num_dofs = 0; + int local_dof_counter = 0; + int local_pos = 0; + std::vector aux_mapping(m_nodes.size()); + for (std::size_t i = 0; i < m_nodes.size(); ++i) { + + // check node + int node_id = m_node_ids(static_cast(i)); + Node* node = theDomain->getNode(node_id); + if (node == nullptr) { + opserr << "ASDEmbeddedNodeElement Error in setDomain: node " << node_id << " does not exit in the domain\n"; + exit(-1); + } + + // store node + m_nodes[i] = node; + + // check NDM + int ndm = node->getCrds().Size(); + if (ndm != 2 && ndm != 3) { + opserr << "ASDEmbeddedNodeElement Error in setDomain: Nodes should have either 2 or 3 dimensions, not " << ndm << "\n"; + exit(-1); + } + if (i == 0) { + // save ndm at first node + m_ndm = ndm; + } + else { + if (m_ndm != ndm) { + opserr << "ASDEmbeddedNodeElement Error in setDomain: Nodes should have the same dimension (2 or 3)\n"; + exit(-1); + } + } + + // check NDF + int ndf = node->getNumberDOF(); + if (m_ndm == 2) { + if (ndf != 2 && ndf != 3) { + opserr << "ASDEmbeddedNodeElement Error in setDomain: In 2D only 2 or 3 DOFs are allowed, not " << ndf << "\n"; + exit(-1); + } + if (i == 0) { + m_rot_c = (m_rot_c_flag && ndf == 3); + } + } + else { + if (ndf != 3 && ndf != 4 && ndf != 6) { + opserr << "ASDEmbeddedNodeElement Error in setDomain: In 3D only 3, 4 or 6 DOFs are allowed, not " << ndf << "\n"; + exit(-1); + } + if (i == 0) { + m_rot_c = (m_rot_c_flag && ndf == 6); + } + } + + // set up mapping + ID& imap = aux_mapping[i]; + imap.resize(m_ndm + ((i == 0 && m_rot_c) ? (m_ndm == 2 ? 1 : 3) : 0)); + imap(0) = local_pos; // Ux + imap(1) = local_pos + 1; // Uy + if (m_ndm == 3) { + imap(2) = local_pos + 2; // Uz + if (i == 0 && m_rot_c) { + imap(3) = local_pos + 3; // Rx + imap(4) = local_pos + 4; // Rx + imap(5) = local_pos + 5; // Rx + } + } + else { + if (i == 0 && m_rot_c) { + imap(2) = local_pos + 2; // Rz + } + } + local_pos += ndf; + + // update total dof counter + m_num_dofs += ndf; + // update local dof counter + local_dof_counter += imap.Size(); + } + + // flatten mapping + m_mapping.resize(local_dof_counter); + local_pos = 0; + for (const ID& imap : aux_mapping) { + for (int i = 0; i < imap.Size(); ++i) { + m_mapping(local_pos++) = imap(i); + } + } + + // compute initial displacement vector + if (!m_U0_computed) { + m_U0.resize(m_num_dofs); + m_U0 = getGlobalDisplacements(); + m_U0_computed = true; + } + + // call base class implementation + DomainComponent::setDomain(theDomain); +} + +void ASDEmbeddedNodeElement::Print(OPS_Stream& s, int flag) +{ + if (flag == -1) { + int eleTag = this->getTag(); + s << "EL_ASDEmbeddedNodeElement\t" << eleTag << " :"; + for (int i = 0; i < m_node_ids.Size(); ++i) + s << "\t" << m_node_ids(i); + s << endln; + } + + if (flag == OPS_PRINT_PRINTMODEL_JSON) { + s << "\t\t\t{"; + s << "\"name\": " << this->getTag() << ", "; + s << "\"type\": \"ASDEmbeddedNodeElement\", "; + s << "\"nodes\": ["; + for (int i = 0; i < m_node_ids.Size(); ++i) { + if (i > 0) + s << ", "; + s << m_node_ids(i); + } + s << "]}"; + } +} + +int ASDEmbeddedNodeElement::getNumExternalNodes() const +{ + return m_node_ids.Size(); +} + +const ID& ASDEmbeddedNodeElement::getExternalNodes() +{ + return m_node_ids; +} + +Node** +ASDEmbeddedNodeElement::getNodePtrs(void) +{ + return m_nodes.data(); +} + +int ASDEmbeddedNodeElement::getNumDOF() +{ + return m_num_dofs; +} + +int ASDEmbeddedNodeElement::update() +{ + return 0; +} + +int ASDEmbeddedNodeElement::revertToLastCommit() +{ + return 0; +} + +const Matrix& ASDEmbeddedNodeElement::getTangentStiff() +{ + // compute stiffness matrix in reduced local dofset + auto compute_local = [this]() -> const Matrix& { + if (m_nodes.size() == 4) { + // support shape is a triangle ... + if (m_ndm == 2) { + // ... in 2D + if (m_rot_c) { + // ... with rotational dofs + return TRI_2D_UR(); + } + else { + // ... without rotational dofs + return TRI_2D_U(); + } + } + else { + // ... in 3D + if (m_rot_c) { + // ... with rotational dofs + return TRI_3D_UR(); + } + else { + // ... without rotational dofs + return TRI_3D_U(); + } + } + } + else { + // support shape is a tetrahedron ... + if (m_rot_c) { + // ... with rotational dofs + return TET_3D_UR(); + } + else { + // ... without rotational dofs + return TET_3D_U(); + } + } + }; + const Matrix& KL = compute_local(); + + // output matrix + static Matrix K; + K.resize(m_num_dofs, m_num_dofs); + K.Zero(); + + // copy in global dofset + for (int i = 0; i < KL.noRows(); ++i) { + int ig = m_mapping(i); + for (int j = 0; j < KL.noCols(); ++j) { + int jg = m_mapping(j); + K(ig, jg) = KL(i, j); + } + } + + // done + return K; +} + +const Matrix& ASDEmbeddedNodeElement::getInitialStiff() +{ + return getTangentStiff(); +} + +const Matrix& ASDEmbeddedNodeElement::getMass() +{ + static Matrix M; + M.resize(m_num_dofs, m_num_dofs); + M.Zero(); + return M; +} + +int +ASDEmbeddedNodeElement::addInertiaLoadToUnbalance(const Vector& accel) +{ + return 0; +} + +const Vector& ASDEmbeddedNodeElement::getResistingForce() +{ + static Vector F; + F.resize(m_num_dofs); + const Matrix& K = getTangentStiff(); + const Vector& U = getGlobalDisplacements(); + F.addMatrixVector(0.0, K, U, 1.0); + return F; +} + +const Vector& ASDEmbeddedNodeElement::getResistingForceIncInertia() +{ + return getResistingForce(); +} + +int ASDEmbeddedNodeElement::sendSelf(int commitTag, Channel& theChannel) +{ + int res = 0; + + // note: we don't check for dataTag == 0 for Element + // objects as that is taken care of in a commit by the Domain + // object - don't want to have to do the check if sending data + int dataTag = this->getDbTag(); + + // INT data + // tag + // number of nodes + // 5 nodal ids (the last one is 0 if number of nodes = 4) + // ndm + // num_dofs + // rot_c_flag + // rot_c + // U0_computed + // number of local dofs (at most 18) + // mapping of local dofs (if less then 18, the last ones will be set to 0) + static ID idData(31); + idData.Zero(); + idData(0) = getTag(); + idData(1) = m_node_ids.Size(); + idData(2) = m_node_ids(0); + idData(3) = m_node_ids(1); + idData(4) = m_node_ids(2); + idData(5) = m_node_ids(3); + if (m_node_ids.Size() == 5) + idData(6) = m_node_ids(4); + idData(7) = m_ndm; + idData(8) = m_num_dofs; + idData(9) = m_rot_c_flag ? 1 : 0; + idData(10) = m_rot_c ? 1 : 0; + idData(11) = m_U0_computed ? 1 : 0; + idData(12) = m_mapping.Size(); + for (int i = 0; i < m_mapping.Size(); ++i) + idData(12 + i) = m_mapping(i); + res += theChannel.sendID(dataTag, commitTag, idData); + if (res < 0) { + opserr << "WARNING ASDEmbeddedNodeElement::sendSelf() - " << this->getTag() << " failed to send ID\n"; + return res; + } + + // DOUBLE data + // K + // initial displacement (at most we can have 30 dofs) + static Vector vectData(31); + vectData.Zero(); + vectData(0) = m_K; + for (int i = 0; i < m_num_dofs; ++i) + vectData(1 + i) = m_U0(i); + res += theChannel.sendVector(dataTag, commitTag, vectData); + if (res < 0) { + opserr << "WARNING ASDEmbeddedNodeElement::sendSelf() - " << this->getTag() << " failed to send Vector\n"; + return res; + } + + // done + return res; +} + +int ASDEmbeddedNodeElement::recvSelf(int commitTag, Channel& theChannel, FEM_ObjectBroker& theBroker) +{ + int res = 0; + + int dataTag = this->getDbTag(); + + // INT data + // tag + // number of nodes + // 5 nodal ids (the last one is 0 if number of nodes = 4) + // ndm + // num_dofs + // rot_c_flag + // rot_c + // number of local dofs (at most 18) + // mapping of local dofs (if less then 18, the last ones will be set to 0) + static ID idData(31); + res += theChannel.recvID(dataTag, commitTag, idData); + if (res < 0) { + opserr << "WARNING ASDEmbeddedNodeElement::recvSelf() - " << this->getTag() << " failed to receive ID\n"; + return res; + } + + setTag(idData(0)); + int num_nodes = idData(1); + m_node_ids.resize(num_nodes); + m_nodes.resize(static_cast(num_nodes), nullptr); + m_node_ids(0) = idData(2); + m_node_ids(1) = idData(3); + m_node_ids(2) = idData(4); + m_node_ids(3) = idData(5); + if (m_node_ids.Size() == 5) + m_node_ids(4) = idData(6); + m_ndm = idData(7); + m_num_dofs = idData(8); + m_rot_c_flag = idData(9) == 1; + m_rot_c = idData(10) == 1; + m_U0_computed = idData(11) == 1; + int num_local_dofs = idData(12); + m_mapping.resize(num_local_dofs); + for (int i = 0; i < m_mapping.Size(); ++i) + m_mapping(i) = idData(12 + i); + + // DOUBLE data + // K + static Vector vectData(31); + res += theChannel.recvVector(dataTag, commitTag, vectData); + if (res < 0) { + opserr << "WARNING ASDEmbeddedNodeElement::sendSelf() - " << this->getTag() << " failed to receive Vector\n"; + return res; + } + m_K = vectData(0); + m_U0.resize(m_num_dofs); + for (int i = 0; i < m_num_dofs; ++i) + m_U0(i) = vectData(1 + i); + + // done + return res; +} + +const Vector& ASDEmbeddedNodeElement::getGlobalDisplacements() const +{ + static Vector U(m_num_dofs); + int counter = 0; + for (Node* node : m_nodes) { + const Vector& iu = node->getTrialDisp(); + for (int i = 0; i < iu.Size(); ++i) { + U(counter++) = iu(i); + } + } + if (m_U0_computed) { + U.addVector(1.0, m_U0, -1.0); + } + return U; +} + +const Matrix& ASDEmbeddedNodeElement::TRI_2D_U() +{ + // output + static Matrix K(8, 8); + + // collect triangle coordinates + static Matrix X(2, 3); + for (int i = 1; i < 4; i++) { + const Node* node = m_nodes[static_cast(i)]; + X(0, i-1) = node->getCrds()(0); + X(1, i-1) = node->getCrds()(1); + } + + // shape functions natural derivatives + static Matrix dN(3, 2); + tri::shapeFunDer(dN); + + // jacobian + static Matrix J(2, 2); + J.addMatrixProduct(0.0, X, dN, 1.0); + double detJ = det2(J); + double V = detJ / 2.0; + static Matrix invJ(2, 2); + J.Invert(invJ); + + // find local coordinates of constrained node + double lx, ly; + tri::localCoord(X, invJ, m_nodes[0]->getCrds()(0), m_nodes[0]->getCrds()(1), lx, ly); + + // compute shape functions at constrained node + static Vector N(3); + for(int i = 0; i < 3; ++i) + N(i) = tri::shapeFun(lx, ly, i); + + // compute B matrix + // UCx = sum(N*URx) -> sum(N*URx) - UCx = 0 + // UCy = sum(N*URy) -> sum(N*URy) - UCy = 0 + static Matrix B(2, 8); + B.Zero(); + for (int i = 0; i < 2; i++) + B(i, i) = -1.0; + for (int i = 0; i < 3; i++) { + int j = 2 + i * 2; + B(0, j) = N(i); + B(1, j + 1) = N(i); + } + + // Penalty stiffness + double iK = m_K * V; + + // compute stiffness + K.addMatrixTransposeProduct(0.0, B, B, iK); + + // done + return K; +} + +const Matrix& ASDEmbeddedNodeElement::TRI_2D_UR() +{ + // output + static Matrix K(9, 9); + + // collect triangle coordinates + static Matrix X(2, 3); + for (int i = 1; i < 4; i++) { + const Node* node = m_nodes[static_cast(i)]; + X(0, i - 1) = node->getCrds()(0); + X(1, i - 1) = node->getCrds()(1); + } + + // shape functions natural derivatives + static Matrix dN(3, 2); + tri::shapeFunDer(dN); + + // jacobian + static Matrix J(2, 2); + J.addMatrixProduct(0.0, X, dN, 1.0); + double detJ = det2(J); + double V = detJ / 2.0; + static Matrix invJ(2, 2); + J.Invert(invJ); + + // shape functions cartesian derivatives + static Matrix dNdX(3, 2); + dNdX.addMatrixProduct(0.0, dN, invJ, 1.0); + + // find local coordinates of constrained node + double lx, ly; + tri::localCoord(X, invJ, m_nodes[0]->getCrds()(0), m_nodes[0]->getCrds()(1), lx, ly); + + // compute shape functions at constrained node + static Vector N(3); + for (int i = 0; i < 3; ++i) + N(i) = tri::shapeFun(lx, ly, i); + + // compute B matrix + // UCx = sum(N*URx) -> sum(N*URx) - UCx = 0 + // UCy = sum(N*URy) -> sum(N*URy) - UCy = 0 + // RCz = sum(d_URy_dX - d_URx_dY)/2.0 -> sum(d_URy_dX - d_URx_dY)/2.0 - RCz = 0 + static Matrix B(3, 9); + B.Zero(); + for (int i = 0; i < 3; i++) + B(i, i) = -1.0; + for (int i = 0; i < 3; i++) { + int j = 3 + i * 2; + B(0, j) = N(i); + B(1, j + 1) = N(i); + B(2, j) = -dNdX(i, 1)/2.0; B(2, j + 1) = dNdX(i, 0)/2.0; + } + + // Penalty stiffness + double iK = m_K* V; + + // compute stiffness + K.addMatrixTransposeProduct(0.0, B, B, iK); + + // done + return K; +} + +const Matrix& ASDEmbeddedNodeElement::TRI_3D_U() +{ + // output + static Matrix K(12, 12); + + // collect triangle coordinates + static Matrix X(3, 3); + for (int i = 1; i < 4; i++) { + const Node* node = m_nodes[static_cast(i)]; + X(0, i - 1) = node->getCrds()(0); + X(1, i - 1) = node->getCrds()(1); + X(2, i - 1) = node->getCrds()(2); + } + + // shape functions natural derivatives + static Matrix dN(3, 3); + dN.Zero(); // note: the tri::shapeFunDer fills the first 2 columns, the 3rd should be zero! + tri::shapeFunDer(dN); + + // jacobian + static Matrix J(3, 3); + J.addMatrixProduct(0.0, X, dN, 1.0); + tri::fillVzInJacobian(J); // note: the 3rd column will be zero, so fill it with the unit normal vector + double detJ = det3(J); + double V = detJ / 2.0; + static Matrix invJ(3, 3); + J.Invert(invJ); + for (int i = 0; i < 3; ++i) invJ(i, 2) = 0.0; // note: the 3rd column in the inverse should be zero + + // find local coordinates of constrained node + double lx, ly; + tri::localCoord(X, invJ, m_nodes[0]->getCrds()(0), m_nodes[0]->getCrds()(1), m_nodes[0]->getCrds()(2), lx, ly); + + // compute shape functions at constrained node + static Vector N(3); + for (int i = 0; i < 3; ++i) + N(i) = tri::shapeFun(lx, ly, i); + + // compute B matrix + // UCx = sum(N*URx) -> sum(N*URx) - UCx = 0 + // UCy = sum(N*URy) -> sum(N*URy) - UCy = 0 + // UCz = sum(N*URz) -> sum(N*URz) - UCz = 0 + static Matrix B(3, 12); + B.Zero(); + for (int i = 0; i < 3; i++) + B(i, i) = -1.0; + for (int i = 0; i < 3; i++) { + int j = 3 + i * 3; + B(0, j) = N(i); + B(1, j + 1) = N(i); + B(2, j + 2) = N(i); + } + + // Penalty stiffness + double iK = m_K * V; + + // compute stiffness + K.addMatrixTransposeProduct(0.0, B, B, iK); + + // done + return K; +} + +const Matrix& ASDEmbeddedNodeElement::TRI_3D_UR() +{ + // output + static Matrix K(15, 15); + + // collect triangle coordinates + // in global coordinates + static Matrix X(3, 3); + for (int i = 1; i < 4; i++) { + const Node* node = m_nodes[static_cast(i)]; + X(0, i - 1) = node->getCrds()(0); + X(1, i - 1) = node->getCrds()(1); + X(2, i - 1) = node->getCrds()(2); + } + + // compute orientation + static Vector dx(3); + static Vector dy(3); + static Vector dz(3); + for (int i = 0; i < 3; ++i) { + dx(i) = X(i, 1) - X(i, 0); + dy(i) = X(i, 2) - X(i, 0); + } + dx.Normalize(); + dy.Normalize(); + cross(dx, dy, dz); + dz.Normalize(); + cross(dz, dx, dy); + + // assemble orientation matrix (transposed of rotation) + static Matrix R(3, 3); + for (int i = 0; i < 3; ++i) { + R(0, i) = dx(i); + R(1, i) = dy(i); + R(2, i) = dz(i); + } + + // triangle coordinates in local coordinates + static Matrix XL(2, 3); + for (int i = 0; i < 3; ++i) { + XL(0, i) = X(0, i) * dx(0) + X(1, i) * dx(1) + X(2, i) * dx(2); + XL(1, i) = X(0, i) * dy(0) + X(1, i) * dy(1) + X(2, i) * dy(2); + } + + // shape functions natural derivatives + static Matrix dN(3, 2); + tri::shapeFunDer(dN); + + // jacobian + static Matrix J(2, 2); + J.addMatrixProduct(0.0, XL, dN, 1.0); + double detJ = det2(J); + double V = detJ / 2.0; + static Matrix invJ(2, 2); + J.Invert(invJ); + + // shape functions cartesian derivatives + static Matrix dNdX(3, 2); + dNdX.addMatrixProduct(0.0, dN, invJ, 1.0); + + // find local coordinates of constrained node + const Vector CPos = m_nodes[0]->getCrds(); + double CPosX = CPos(0) * dx(0) + CPos(1) * dx(1) + CPos(2) * dx(2); + double CPosY = CPos(0) * dy(0) + CPos(1) * dy(1) + CPos(2) * dy(2); + double lx, ly; + tri::localCoord(XL, invJ, CPosX, CPosY, lx, ly); + + // compute shape functions at constrained node + static Vector N(3); + for (int i = 0; i < 3; ++i) + N(i) = tri::shapeFun(lx, ly, i); + + // compute B matrix (in local coordinates) + // UCx = sum(N*URx) -> sum(N*URx) - UCx = 0 + // UCy = sum(N*URy) -> sum(N*URy) - UCy = 0 + // UCz = sum(N*URz) -> sum(N*URz) - UCz = 0 + // RCx = sum( d_URz_dY) -> sum( d_URz_dY) - RCx = 0 (local) + // RCy = sum(-d_URz_dX) -> sum(-d_URz_dX) - RCy = 0 (local) + // RCz = sum(d_URy_dX - d_URx_dY)/2.0 -> sum(d_URy_dX - d_URx_dY)/2.0 - RCz = 0 (local) + static Matrix B(6, 15); + B.Zero(); + // fill the -identity 6x6 block (transformed to global coordinates) + // for constrained node+ + /*for (int i = 0; i < 6; ++i) + B(i, i) = -1.0;*/ + for (int i = 0; i < 2; ++i) { + int j = i * 3; + for (int row = 0; row < 3; ++row) + for (int col = 0; col < 3; ++col) + B(j + row, j + col) = -R(row, col); + } + // fill the 2 rows of 3 3x3 blocks (transformed to global coordinates) + static Matrix BL(3, 3); + static Matrix BG(3, 3); + for (int i = 0; i < 3; ++i) { + int j = 6 + i * 3; + // U block + BL.Zero(); + BL(0, 0) = N(i); + BL(1, 1) = N(i); + BL(2, 2) = N(i); + BG.addMatrixProduct(0.0, BL, R, 1.0); + for (int row = 0; row < 3; ++row) + for (int col = 0; col < 3; ++col) + B(row, j + col) = BG(row, col); + // R block + BL.Zero(); + BL(0, 2) = dNdX(i, 1); + BL(1, 2) = -dNdX(i, 0); + BL(2, 0) = -dNdX(i, 1) / 2.0; + BL(2, 1) = dNdX(i, 0) / 2.0; + BG.addMatrixProduct(0.0, BL, R, 1.0); + for (int row = 0; row < 3; ++row) + for (int col = 0; col < 3; ++col) + B(3 + row, j + col) = BG(row, col); + } + + // Penalty stiffness + double iK = m_K * V; + + // compute stiffness + K.addMatrixTransposeProduct(0.0, B, B, iK); + + // done + return K; +} + +const Matrix& ASDEmbeddedNodeElement::TET_3D_U() +{ + // output + static Matrix K(15, 15); + + // collect tetrahedron coordinates + static Matrix X(3, 4); + for (int i = 1; i < 5; i++) { + const Node* node = m_nodes[static_cast(i)]; + X(0, i - 1) = node->getCrds()(0); + X(1, i - 1) = node->getCrds()(1); + X(2, i - 1) = node->getCrds()(2); + } + + // shape functions natural derivatives + static Matrix dN(4, 3); + tet::shapeFunDer(dN); + + // jacobian + static Matrix J(3, 3); + J.addMatrixProduct(0.0, X, dN, 1.0); + double detJ = det3(J); + double V = detJ / 6.0; + static Matrix invJ(3, 3); + J.Invert(invJ); + + // find local coordinates of constrained node + double lx, ly, lz; + tet::localCoord(X, invJ, m_nodes[0]->getCrds()(0), m_nodes[0]->getCrds()(1), m_nodes[0]->getCrds()(2), lx, ly, lz); + + // compute shape functions at constrained node + static Vector N(4); + for (int i = 0; i < 4; ++i) + N(i) = tet::shapeFun(lx, ly, lz, i); + + // compute B matrix + // UCx = sum(N*URx) -> sum(N*URx) - UCx = 0 + // UCy = sum(N*URy) -> sum(N*URy) - UCy = 0 + // UCz = sum(N*URz) -> sum(N*URz) - UCz = 0 + static Matrix B(3, 15); + B.Zero(); + for (int i = 0; i < 3; i++) + B(i, i) = -1.0; + for (int i = 0; i < 4; i++) { + int j = 3 + i * 3; + B(0, j) = N(i); + B(1, j + 1) = N(i); + B(2, j + 2) = N(i); + } + + // Penalty stiffness + double iK = m_K * V; + + // compute stiffness + K.addMatrixTransposeProduct(0.0, B, B, iK); + + // done + return K; +} + +const Matrix& ASDEmbeddedNodeElement::TET_3D_UR() +{ + // output + static Matrix K(18, 18); + + // collect tetrahedron coordinates + static Matrix X(3, 4); + for (int i = 1; i < 5; i++) { + const Node* node = m_nodes[static_cast(i)]; + X(0, i - 1) = node->getCrds()(0); + X(1, i - 1) = node->getCrds()(1); + X(2, i - 1) = node->getCrds()(2); + } + + // shape functions natural derivatives + static Matrix dN(4, 3); + tet::shapeFunDer(dN); + + // jacobian + static Matrix J(3, 3); + J.addMatrixProduct(0.0, X, dN, 1.0); + double detJ = det3(J); + double V = detJ / 6.0; + static Matrix invJ(3, 3); + J.Invert(invJ); + + // shape functions cartesian derivatives + static Matrix dNdX(4, 3); + dNdX.addMatrixProduct(0.0, dN, invJ, 1.0); + + // find local coordinates of constrained node + double lx, ly, lz; + tet::localCoord(X, invJ, m_nodes[0]->getCrds()(0), m_nodes[0]->getCrds()(1), m_nodes[0]->getCrds()(2), lx, ly, lz); + + // compute shape functions at constrained node + static Vector N(4); + for (int i = 0; i < 4; ++i) + N(i) = tet::shapeFun(lx, ly, lz, i); + + // compute B matrix + // UCx = sum(N*URx) -> sum(N*URx) - UCx = 0 + // UCy = sum(N*URy) -> sum(N*URy) - UCy = 0 + // UCz = sum(N*URz) -> sum(N*URz) - UCz = 0 + // RCx = sum(d_URz_dY - d_URy_dZ)/2.0 -> sum(d_URz_dY - d_URy_dZ)/2.0 - RCx = 0 + // RCy = sum(d_URx_dZ - d_URz_dX)/2.0 -> sum(d_URx_dZ - d_URz_dX)/2.0 - RCy = 0 + // RCz = sum(d_URy_dX - d_URx_dY)/2.0 -> sum(d_URy_dX - d_URx_dY)/2.0 - RCz = 0 + static Matrix B(6, 18); + B.Zero(); + for (int i = 0; i < 6; i++) + B(i, i) = -1.0; + for (int i = 0; i < 4; i++) { + int j = 6 + i * 3; + B(0, j) = N(i); + B(1, j + 1) = N(i); + B(2, j + 2) = N(i); + B(3, j + 1) = -dNdX(i, 2) / 2.0; B(3, j + 2) = dNdX(i, 1) / 2.0; + B(4, j) = dNdX(i, 2) / 2.0; B(4, j + 2) = -dNdX(i, 0) / 2.0; + B(5, j) = -dNdX(i, 1) / 2.0; B(5, j + 1) = dNdX(i, 0) / 2.0; + } + + // Penalty stiffness + double iK = m_K * V; + + // compute stiffness + K.addMatrixTransposeProduct(0.0, B, B, iK); + + // done + return K; +} diff --git a/SRC/element/CEqElement/ASDEmbeddedNodeElement.h b/SRC/element/CEqElement/ASDEmbeddedNodeElement.h new file mode 100644 index 000000000..45ff1f0bc --- /dev/null +++ b/SRC/element/CEqElement/ASDEmbeddedNodeElement.h @@ -0,0 +1,122 @@ +/* ****************************************************************** ** +** OpenSees - Open System for Earthquake Engineering Simulation ** +** Pacific Earthquake Engineering Research Center ** +** ** +** ** +** (C) Copyright 1999, The Regents of the University of California ** +** All Rights Reserved. ** +** ** +** Commercial use of this program without express permission of the ** +** University of California, Berkeley, is strictly prohibited. See ** +** file 'COPYRIGHT' in main directory for information on usage and ** +** redistribution, and for a DISCLAIMER OF ALL WARRANTIES. ** +** ** +** Developed by: ** +** Frank McKenna (fmckenna@ce.berkeley.edu) ** +** Gregory L. Fenves (fenves@ce.berkeley.edu) ** +** Filip C. Filippou (filippou@ce.berkeley.edu) ** +** ** +** ****************************************************************** */ + +// $Revision: 1.10 $ +// $Date: 2021/04/28 22:51:21 $ + +// Original implementation: Massimo Petracca (ASDEA) +// +// +// Notes: +// +// + +#ifndef ASDEmbeddedNodeElement_h +#define ASDEmbeddedNodeElement_h + +#include +#include +#include +#include +#include + +class ASDEmbeddedNodeElement : public Element +{ + +public: + + // life cycle + ASDEmbeddedNodeElement(); + ASDEmbeddedNodeElement(int tag, int cNode, int rNode1, int rNode2, int rNode3, bool rot_flag, double K); + ASDEmbeddedNodeElement(int tag, int cNode, int rNode1, int rNode2, int rNode3, int rNode4, bool rot_flag, double K); + virtual ~ASDEmbeddedNodeElement(); + + // domain + const char* getClassType(void) const; + void setDomain(Domain* theDomain); + + // print + void Print(OPS_Stream& s, int flag); + + // methods dealing with nodes and number of external dof + int getNumExternalNodes() const; + const ID& getExternalNodes(); + Node** getNodePtrs(); + int getNumDOF(); + + // methods dealing with committed state and update + int update(); + int revertToLastCommit(); + + // methods to return the current linearized stiffness, + // damping and mass matrices + const Matrix& getTangentStiff(); + const Matrix& getInitialStiff(); + const Matrix& getMass(); + + // methods for applying loads + int addInertiaLoadToUnbalance(const Vector& accel); + + // methods for obtaining resisting force (force includes elemental loads) + const Vector& getResistingForce(); + const Vector& getResistingForceIncInertia(); + + // public methods for element output + int sendSelf(int commitTag, Channel& theChannel); + int recvSelf(int commitTag, Channel& theChannel, FEM_ObjectBroker& theBroker); + +private: + const Vector& getGlobalDisplacements() const; + const Matrix& TRI_2D_U(); + const Matrix& TRI_2D_UR(); + const Matrix& TRI_3D_U(); + const Matrix& TRI_3D_UR(); + const Matrix& TET_3D_U(); + const Matrix& TET_3D_UR(); + +private: + + // the nodal ids, the first one is the constrained node, + // the other 3 (triangle in 2D or shell triangle in 3D) or 4 (tetrahedron in 3D) + // are the retained nodes + ID m_node_ids; + // the ndoes + std::vector m_nodes; + // store the number of dimensions (2 or 3 are allowed) + int m_ndm = 0; + // total number of dofs + int m_num_dofs = 0; + // user input to constrained, if necessary, the rotation of the constrained node + // if the constrained node has rotational DOFs + bool m_rot_c_flag = false; + // true if the constrained node has rotational DOFs and the user flag is true + bool m_rot_c = false; + // a vector containing the local id mapping for assembling + // into the element matrix and vectors + ID m_mapping; + // stiffness penalty value to impose the constraint + double m_K = 1.0e18; + // initial displacements + Vector m_U0; + bool m_U0_computed = false; + +}; + +#endif // ASDEmbeddedNodeElement_h diff --git a/SRC/element/CEqElement/Makefile b/SRC/element/CEqElement/Makefile new file mode 100644 index 000000000..091191f24 --- /dev/null +++ b/SRC/element/CEqElement/Makefile @@ -0,0 +1,18 @@ +include ../../../Makefile.def + +OBJS = ASDEmbeddedNodeElement.o + +all: $(OBJS) + +# Miscellaneous +tidy: + @$(RM) $(RMFLAGS) Makefile.bak *~ #*# core + +clean: tidy + @$(RM) $(RMFLAGS) $(OBJS) *.o + +spotless: clean + +wipe: spotless + +# DO NOT DELETE THIS LINE -- make depend depends on it. diff --git a/SRC/element/CMakeLists.txt b/SRC/element/CMakeLists.txt index 0373b903c..baf77ad48 100644 --- a/SRC/element/CMakeLists.txt +++ b/SRC/element/CMakeLists.txt @@ -20,6 +20,7 @@ target_sources(OPS_Utilities Information.h ) +target_include_directories(OPS_Element PUBLIC ${CMAKE_CURRENT_LIST_DIR}) add_subdirectory(fourNodeQuad) add_subdirectory(twoNodeLink) @@ -72,6 +73,6 @@ add_subdirectory(HUelements) add_subdirectory(XMUelements) add_subdirectory(masonry) #add_subdirectory(dmglib) +add_subdirectory(CEqElement) -target_include_directories(OPS_Element PUBLIC ${CMAKE_CURRENT_LIST_DIR}) diff --git a/SRC/element/Makefile b/SRC/element/Makefile index 9222a0a87..0948ea50b 100644 --- a/SRC/element/Makefile +++ b/SRC/element/Makefile @@ -52,6 +52,7 @@ all: $(OBJS) @$(CD) $(FE)/element/gradientInelasticBeamColumn; $(MAKE); @$(CD) $(FE)/element/RockingBC; $(MAKE); @$(CD) $(FE)/element/masonry; $(MAKE); + @$(CD) $(FE)/element/CEqElement; $(MAKE); # Miscellaneous tidy: @@ -102,6 +103,7 @@ spotless: clean @$(CD) $(FE)/element/gradientInelasticBeamColumn; $(MAKE) wipe; @$(CD) $(FE)/element/RockingBC; $(MAKE) wipe; @$(CD) $(FE)/element/masonry; $(MAKE) wipe; + @$(CD) $(FE)/element/CEqElement; $(MAKE) wipe; wipe: spotless diff --git a/SRC/element/TclElementCommands.cpp b/SRC/element/TclElementCommands.cpp index f6735273c..8e81979a5 100644 --- a/SRC/element/TclElementCommands.cpp +++ b/SRC/element/TclElementCommands.cpp @@ -161,6 +161,7 @@ extern void* OPS_BeamColumn3DwLHNMYS(void); extern void *OPS_ShellMITC4Thermal(void);//Added by L.Jiang [SIF] extern void *OPS_ShellNLDKGQThermal(void);//Added by L.Jiang [SIF] extern void *OPS_CatenaryCableElement(void); +extern void *OPS_ASDEmbeddedNodeElement(void); // Massimo Petracca (ASDEA) extern void *OPS_ShellANDeS(void); extern void *OPS_FourNodeTetrahedron(void); extern void *OPS_LysmerTriangle(void); @@ -1231,6 +1232,17 @@ TclModelBuilderElementCommand(ClientData clientData, Tcl_Interp *interp, } } + else if (strcmp(argv[1], "ASDEmbeddedNodeElement") == 0) { + void *theEle = OPS_ASDEmbeddedNodeElement(); + if (theEle != 0) { + theElement = (Element*)theEle; + } else { + opserr<<"tclelementcommand -- unable to create element of type : " + <getDomain()->getCommitTag(); + int numdata = 1; + if (OPS_GetNumRemainingInputArgs() > 0) { + if (OPS_GetIntInput(&numdata, &commitTag) < 0) { + opserr << "WARNING: failed to get commitTag\n"; + return -1; + } + cmds->getDomain()->setCommitTag(commitTag); + } + if (OPS_SetIntOutput(&numdata, &commitTag, true) < 0) { + opserr << "WARNING failed to set commitTag\n"; + return 0; + } + + return 0; +} + void* OPS_ParallelRCM() { #ifdef _PARALLEL_INTERPRETERS diff --git a/SRC/interpreter/OpenSeesCommands.h b/SRC/interpreter/OpenSeesCommands.h index 488fa74f3..102ca71f8 100644 --- a/SRC/interpreter/OpenSeesCommands.h +++ b/SRC/interpreter/OpenSeesCommands.h @@ -251,6 +251,7 @@ int OPS_nodeCoord(); int OPS_setNodeCoord(); int OPS_updateElementDomain(); int OPS_eleNodes(); +int OPS_eleType(); int OPS_nodeDOFs(); int OPS_nodeMass(); int OPS_nodePressure(); @@ -374,6 +375,7 @@ int OPS_numFact(); int OPS_numIter(); int* OPS_GetNumEigen(); int OPS_systemSize(); +int OPS_domainCommitTag(); void* OPS_KrylovNewton(); void* OPS_RaphsonNewton(); @@ -381,6 +383,7 @@ void* OPS_MillerNewton(); void* OPS_SecantNewton(); void* OPS_PeriodicNewton(); void* OPS_NewtonLineSearch(); +void* OPS_ExpressNewton(); void* OPS_ParallelNumberer(); void* OPS_ParallelRCM(); diff --git a/SRC/interpreter/OpenSeesElementCommands.cpp b/SRC/interpreter/OpenSeesElementCommands.cpp index 8c7bbe345..8c4fc6e46 100644 --- a/SRC/interpreter/OpenSeesElementCommands.cpp +++ b/SRC/interpreter/OpenSeesElementCommands.cpp @@ -224,6 +224,7 @@ void* OPS_KikuchiBearing(); void* OPS_YamamotoBiaxialHDR(); void* OPS_FourNodeTetrahedron(); void* OPS_CatenaryCableElement(); +void *OPS_ASDEmbeddedNodeElement(void); void* OPS_GradientInelasticBeamColumn2d(); void* OPS_GradientInelasticBeamColumn3d(); void* OPS_RockingBC(); @@ -683,6 +684,7 @@ namespace { functionMap.insert(std::make_pair("zeroLengthND", &OPS_ZeroLengthND)); functionMap.insert(std::make_pair("FourNodeTetrahedron", &OPS_FourNodeTetrahedron)); functionMap.insert(std::make_pair("CatenaryCable", &OPS_CatenaryCableElement)); + functionMap.insert(std::make_pair("ASDEmbeddedNodeElement", &OPS_ASDEmbeddedNodeElement)); functionMap.insert(std::make_pair("gradientInelasticBeamColumn", &OPS_GradientInelasticBeamColumn)); functionMap.insert(std::make_pair("RockingBC", &OPS_RockingBC)); diff --git a/SRC/interpreter/OpenSeesOutputCommands.cpp b/SRC/interpreter/OpenSeesOutputCommands.cpp index c52d25983..39da4a827 100644 --- a/SRC/interpreter/OpenSeesOutputCommands.cpp +++ b/SRC/interpreter/OpenSeesOutputCommands.cpp @@ -1574,6 +1574,41 @@ int OPS_updateElementDomain() return 0; } +int OPS_eleType() +{ + if (OPS_GetNumRemainingInputArgs() < 1) { + opserr << "WARNING want - eleType eleTag?\n"; + return -1; + } + + int tag; + int numdata = 1; + + if (OPS_GetIntInput(&numdata, &tag) < 0) { + opserr << "WARNING eleType eleTag? \n"; + return -1; + } + + Domain* theDomain = OPS_GetDomain(); + if (theDomain == 0) return -1; + + char buffer[80]; + Element *theElement = theDomain->getElement(tag); + if (theElement == 0) { + opserr << "WARNING eleType ele " << tag << " not found" << endln; + return -1; + } + const char* type = theElement->getClassType(); + sprintf(buffer, "%s", type); + + if (OPS_SetString(buffer) < 0) { + opserr << "WARNING failed to set eleType\n"; + return -1; + } + + return 0; +} + int OPS_eleNodes() { if (OPS_GetNumRemainingInputArgs() < 1) { diff --git a/SRC/interpreter/OpenSeesUniaxialMaterialCommands.cpp b/SRC/interpreter/OpenSeesUniaxialMaterialCommands.cpp index c88efa717..d02bf487d 100644 --- a/SRC/interpreter/OpenSeesUniaxialMaterialCommands.cpp +++ b/SRC/interpreter/OpenSeesUniaxialMaterialCommands.cpp @@ -76,6 +76,7 @@ void* OPS_EPPGapMaterial(); void* OPS_ENTMaterial(); void* OPS_Steel01(); void* OPS_Steel02(); +void* OPS_SteelFractureDI(); void* OPS_Steel02Fatigue(); void* OPS_Steel03(); void* OPS_Concrete01(); @@ -131,9 +132,12 @@ void* OPS_BWBN(); void* OPS_PySimple1(); void* OPS_TzSimple1(); void* OPS_QzSimple1(); +void* OPS_PySimple2(); +void* OPS_TzSimple2(); void* OPS_QzSimple2(); void* OPS_PyLiq1(); void* OPS_TzLiq1(); +void* OPS_QzLiq1(); void* OPS_KikuchiAikenHDR(); void* OPS_KikuchiAikenLRB(); void* OPS_AxialSp(); @@ -299,6 +303,7 @@ namespace { uniaxialMaterialsMap.insert(std::make_pair("QzSimple2", &OPS_QzSimple2)); uniaxialMaterialsMap.insert(std::make_pair("PyLiq1", &OPS_PyLiq1)); uniaxialMaterialsMap.insert(std::make_pair("TzLiq1", &OPS_TzLiq1)); + uniaxialMaterialsMap.insert(std::make_pair("QzLiq1", &OPS_QzLiq1)); uniaxialMaterialsMap.insert(std::make_pair("KikuchiAikenHDR", &OPS_KikuchiAikenHDR)); uniaxialMaterialsMap.insert(std::make_pair("KikuchiAikenLRB", &OPS_KikuchiAikenLRB)); uniaxialMaterialsMap.insert(std::make_pair("AxialSp", &OPS_AxialSp)); @@ -343,6 +348,7 @@ namespace { uniaxialMaterialsMap.insert(std::make_pair("UniaxialJ2Plasticity", &OPS_UniaxialJ2Plasticity)); uniaxialMaterialsMap.insert(std::make_pair("OOHysteretic", &OPS_OOHystereticMaterial)); uniaxialMaterialsMap.insert(std::make_pair("UVCuniaxial", &OPS_UVCuniaxial)); + uniaxialMaterialsMap.insert(std::make_pair("SteelFractureDI", &OPS_SteelFractureDI)); uniaxialMaterialsMap.insert(std::make_pair("IMKBilin", &OPS_IMKBilin)); uniaxialMaterialsMap.insert(std::make_pair("IMKPinching", &OPS_IMKPinching)); uniaxialMaterialsMap.insert(std::make_pair("IMKPeakOriented", &OPS_IMKPeakOriented)); diff --git a/SRC/interpreter/PythonWrapper.cpp b/SRC/interpreter/PythonWrapper.cpp index ed99373c4..22c7a5cec 100644 --- a/SRC/interpreter/PythonWrapper.cpp +++ b/SRC/interpreter/PythonWrapper.cpp @@ -1127,6 +1127,18 @@ static PyObject *Py_ops_eleNodes(PyObject *self, PyObject *args) return wrapper->getResults(); } +static PyObject *Py_ops_eleType(PyObject *self, PyObject *args) +{ + wrapper->resetCommandLine(PyTuple_Size(args), 1, args); + + if (OPS_eleType() < 0) { + opserr<<(void*)0; + return NULL; + } + + return wrapper->getResults(); +} + static PyObject *Py_ops_nodeDOFs(PyObject *self, PyObject *args) { wrapper->resetCommandLine(PyTuple_Size(args), 1, args); @@ -2303,6 +2315,17 @@ static PyObject *Py_ops_pc(PyObject *self, PyObject *args) { return wrapper->getResults(); } +static PyObject *Py_ops_domainCommitTag(PyObject *self, PyObject *args) { + wrapper->resetCommandLine(PyTuple_Size(args), 1, args); + + if (OPS_domainCommitTag() < 0) { + opserr << (void *)0; + return NULL; + } + + return wrapper->getResults(); +} + ///////////////////////////////////////////////// ////////////// Add Python commands ////////////// ///////////////////////////////////////////////// @@ -2390,6 +2413,7 @@ PythonWrapper::addOpenSeesCommands() addCommand("setNodeCoord", &Py_ops_setNodeCoord); addCommand("updateElementDomain", &Py_ops_updateElementDomain); addCommand("eleNodes", &Py_ops_eleNodes); + addCommand("eleType", &Py_ops_eleType); addCommand("nodeDOFs", &Py_ops_nodeDOFs); addCommand("nodeMass", &Py_ops_nodeMass); addCommand("nodePressure", &Py_ops_nodePressure); @@ -2492,6 +2516,7 @@ PythonWrapper::addOpenSeesCommands() addCommand("unloadingRule", &Py_ops_unloadingRule); addCommand("partition", &Py_ops_partition); addCommand("pressureConstraint", &Py_ops_pc); + addCommand("domainCommitTag", &Py_ops_domainCommitTag); PyMethodDef method = {NULL,NULL,0,NULL}; methodsOpenSees.push_back(method); diff --git a/SRC/interpreter/TclWrapper.cpp b/SRC/interpreter/TclWrapper.cpp index b75503e03..6f2fd2276 100644 --- a/SRC/interpreter/TclWrapper.cpp +++ b/SRC/interpreter/TclWrapper.cpp @@ -741,6 +741,14 @@ static int Tcl_ops_eleNodes(ClientData clientData, Tcl_Interp *interp, int argc, return TCL_OK; } +static int Tcl_ops_eleType(ClientData clientData, Tcl_Interp *interp, int argc, TCL_Char **argv) { + wrapper->resetCommandLine(argc, 1, argv); + + if (OPS_eleType() < 0) return TCL_ERROR; + + return TCL_OK; +} + static int Tcl_ops_nodeDOFs(ClientData clientData, Tcl_Interp *interp, int argc, TCL_Char **argv) { wrapper->resetCommandLine(argc, 1, argv); diff --git a/SRC/material/nD/UWmaterials/InitialStateAnalysisWrapper.h b/SRC/material/nD/UWmaterials/InitialStateAnalysisWrapper.h index 733314f2c..94852009d 100644 --- a/SRC/material/nD/UWmaterials/InitialStateAnalysisWrapper.h +++ b/SRC/material/nD/UWmaterials/InitialStateAnalysisWrapper.h @@ -84,6 +84,7 @@ class InitialStateAnalysisWrapper : public NDMaterial friend class PyLiq1; friend class TzLiq1; + friend class QzLiq1; // Sumeet int getMainClassTag(); // sends class tag of main material object diff --git a/SRC/material/nD/soil/FluidSolidPorousMaterial.h b/SRC/material/nD/soil/FluidSolidPorousMaterial.h index ab3bda800..d30289ff1 100644 --- a/SRC/material/nD/soil/FluidSolidPorousMaterial.h +++ b/SRC/material/nD/soil/FluidSolidPorousMaterial.h @@ -92,8 +92,9 @@ class FluidSolidPorousMaterial : public NDMaterial int updateParameter(int responseID, Information &eleInformation); // RWB; PyLiq1 & TzLiq1 need to see the excess pore pressure and initial stresses. - friend class PyLiq1; - friend class TzLiq1; + friend class PyLiq1; + friend class TzLiq1; + friend class QzLiq1; // Sumeet protected: diff --git a/SRC/material/nD/soil/MultiYieldSurfaceClay.h b/SRC/material/nD/soil/MultiYieldSurfaceClay.h index 552bdb205..9fb285246 100644 --- a/SRC/material/nD/soil/MultiYieldSurfaceClay.h +++ b/SRC/material/nD/soil/MultiYieldSurfaceClay.h @@ -104,8 +104,9 @@ class MultiYieldSurfaceClay : public NDMaterial //void setCurrentStress(const Vector stress) { currentStress=T2Vector(stress); } // int updateParameter(int responseID, Information &eleInformation,int Yang); - friend class PyLiq1; + friend class PyLiq1; friend class TzLiq1; + friend class QzLiq1; // Sumeet protected: diff --git a/SRC/material/nD/soil/PressureDependMultiYield02.h b/SRC/material/nD/soil/PressureDependMultiYield02.h index e08d1218c..cdf0c0d81 100644 --- a/SRC/material/nD/soil/PressureDependMultiYield02.h +++ b/SRC/material/nD/soil/PressureDependMultiYield02.h @@ -120,6 +120,7 @@ class PressureDependMultiYield02 : public NDMaterial // RWB; PyLiq1 & TzLiq1 need to see the excess pore pressure and initial stresses. friend class PyLiq1; friend class TzLiq1; + friend class QzLiq1; // Sumeet protected: diff --git a/SRC/material/nD/soil/PressureDependMultiYield03.h b/SRC/material/nD/soil/PressureDependMultiYield03.h index 5ae2b5722..0efb1a7f0 100644 --- a/SRC/material/nD/soil/PressureDependMultiYield03.h +++ b/SRC/material/nD/soil/PressureDependMultiYield03.h @@ -118,6 +118,7 @@ class PressureDependMultiYield03 : public NDMaterial // RWB; PyLiq1 & TzLiq1 need to see the excess pore pressure and initial stresses. friend class PyLiq1; friend class TzLiq1; + friend class QzLiq1; // Sumeet protected: diff --git a/SRC/material/nD/soil/PressureIndependMultiYield.h b/SRC/material/nD/soil/PressureIndependMultiYield.h index d4101607b..1a21fa7da 100644 --- a/SRC/material/nD/soil/PressureIndependMultiYield.h +++ b/SRC/material/nD/soil/PressureIndependMultiYield.h @@ -105,6 +105,7 @@ class PressureIndependMultiYield : public NDMaterial // RWB; PyLiq1 & TzLiq1 need to see the excess pore pressure and initial stresses. friend class PyLiq1; friend class TzLiq1; + friend class QzLiq1; // Sumeet protected: diff --git a/SRC/material/nD/soil/TclUpdateMaterialStageCommand.cpp b/SRC/material/nD/soil/TclUpdateMaterialStageCommand.cpp index 15d0050ce..02578139d 100644 --- a/SRC/material/nD/soil/TclUpdateMaterialStageCommand.cpp +++ b/SRC/material/nD/soil/TclUpdateMaterialStageCommand.cpp @@ -14,6 +14,7 @@ #include #include +#include #include diff --git a/SRC/material/uniaxial/BraceMaterial.cpp b/SRC/material/uniaxial/BraceMaterial.cpp index 5cdb8555a..23f1d0cef 100644 --- a/SRC/material/uniaxial/BraceMaterial.cpp +++ b/SRC/material/uniaxial/BraceMaterial.cpp @@ -39,13 +39,8 @@ static int numBilinMaterials = 0; static int numCastMaterials = 0; void * -OPS_Cast(void) +OPS_BraceMaterial(void) { - if (numCastMaterials == 0) { - numCastMaterials++; - opserr << "Cast Fuse uniaxial material - Written by Dimitrios G. Lignos, Ph.D.\n"; - } - // Pointer to a uniaxial material that will be returned UniaxialMaterial *theMaterial = 0; diff --git a/SRC/material/uniaxial/Makefile b/SRC/material/uniaxial/Makefile index cf61568e1..56dbafb01 100644 --- a/SRC/material/uniaxial/Makefile +++ b/SRC/material/uniaxial/Makefile @@ -141,6 +141,7 @@ OBJS = UniaxialMaterial.o \ Trilinwpd.o \ Trilinwp.o \ Trilinwp2.o \ + SteelFractureDI.o \ TclModelBuilderUniaxialMaterialCommand.o all: $(OBJS) diff --git a/SRC/material/uniaxial/PY/CMakeLists.txt b/SRC/material/uniaxial/PY/CMakeLists.txt index 538614dd3..1d26ca981 100644 --- a/SRC/material/uniaxial/PY/CMakeLists.txt +++ b/SRC/material/uniaxial/PY/CMakeLists.txt @@ -1,30 +1,61 @@ target_sources(OPS_Material - PRIVATE + PRIVATE + PyLiq1.cpp PySimple1.cpp - QzSimple1.cpp - TzSimple1.cpp + PySimple1Gen.cpp PySimple2.cpp PySimple3.cpp + QzLiq1.cpp + QzSimple1.cpp QzSimple2.cpp - TzSimple2.cpp ShallowFoundationGen.cpp - PyLiq1.cpp TzLiq1.cpp - PySimple1Gen.cpp + TzSimple1.cpp TzSimple1Gen.cpp - PUBLIC + TzSimple2.cpp + PUBLIC + PyLiq1.h PySimple1.h - QzSimple1.h - TzSimple1.h + PySimple1Gen.h PySimple2.h PySimple3.h + QzLiq1.h + QzSimple1.h QzSimple2.h - TzSimple2.h ShallowFoundationGen.h - PyLiq1.h TzLiq1.h - PySimple1Gen.h + TzSimple1.h TzSimple1Gen.h + TzSimple2.h +#======= +# PyLiq1.cpp +# PySimple1.cpp +# PySimple1Gen.cpp +# PySimple2.cpp +# PySimple3.cpp +# QzLiq1.cpp +# QzSimple1.cpp +# QzSimple2.cpp +# ShallowFoundationGen.cpp +# TzLiq1.cpp +# TzSimple1.cpp +# TzSimple1Gen.cpp +# TzSimple2.cpp +# PUBLIC +# PyLiq1.h +# PySimple1.h +# PySimple1Gen.h +# PySimple2.h +# PySimple3.h +# QzLiq1.h +# QzSimple1.h +# QzSimple2.h +# ShallowFoundationGen.h +# TzLiq1.h +# TzSimple1.h +# TzSimple1Gen.h +# TzSimple2.h +#>>>>>>> 43054b546a2d9dcbd550bec5bb9a915a6e738b1d ) target_include_directories(OPS_Material PUBLIC ${CMAKE_CURRENT_LIST_DIR}) diff --git a/SRC/material/uniaxial/PY/Makefile b/SRC/material/uniaxial/PY/Makefile index 53fc56f71..bd4bedb05 100644 --- a/SRC/material/uniaxial/PY/Makefile +++ b/SRC/material/uniaxial/PY/Makefile @@ -11,6 +11,7 @@ OBJS = PySimple1.o \ ShallowFoundationGen.o \ PyLiq1.o \ TzLiq1.o \ + QzLiq1.o \ PySimple1Gen.o \ TzSimple1Gen.o diff --git a/SRC/material/uniaxial/PY/PyLiq1.cpp b/SRC/material/uniaxial/PY/PyLiq1.cpp index 2005cc4b5..b56219b4c 100644 --- a/SRC/material/uniaxial/PY/PyLiq1.cpp +++ b/SRC/material/uniaxial/PY/PyLiq1.cpp @@ -222,9 +222,11 @@ PyLiq1::setTrialStrain (double newy, double yRate) meanStress = getEffectiveStress(theSeries); else meanStress = getEffectiveStress(); - + if(meanStress>meanConsolStress) + meanStress=meanConsolStress; Tru = 1.0 - meanStress/meanConsolStress; if(Tru > 1.0-pRes/PySimple1::pult) Tru = 1.0-pRes/PySimple1::pult; + if(Tru < 0) Tru = 0; } else { Tru = 0.0; diff --git a/SRC/material/uniaxial/PY/PySimple2.cpp b/SRC/material/uniaxial/PY/PySimple2.cpp index 098a764bb..755ee5204 100644 --- a/SRC/material/uniaxial/PY/PySimple2.cpp +++ b/SRC/material/uniaxial/PY/PySimple2.cpp @@ -56,11 +56,44 @@ #include "PySimple2.h" #include #include +#include // Controls on internal iteration between spring components const int PYmaxIterations = 20; const double PYtolerance = 1.0e-12; +void* OPS_PySimple2() +{ + int numdata = OPS_GetNumRemainingInputArgs(); + if (numdata < 5) { + opserr << "WARNING insufficient arguments\n"; + opserr << "Want: uniaxialMaterial PySimple2 tag? soilType? pult? y50? drag? dashpot?\n"; + return 0; + } + + int idata[2]; + numdata = 2; + if (OPS_GetIntInput(&numdata, idata) < 0) { + opserr << "WARNING invalid int inputs\n"; + return 0; + } + + double ddata[4] = {0,0,0,0}; + numdata = OPS_GetNumRemainingInputArgs(); + if (numdata > 4) numdata = 4; + if (OPS_GetDoubleInput(&numdata, ddata) < 0) { + opserr << "WARNING invalid double inputs\n"; + return 0; + } + + UniaxialMaterial *theMaterial = 0; + theMaterial = new PySimple2(idata[0], MAT_TAG_PySimple1, idata[1], ddata[0], ddata[1], + ddata[2], ddata[3]); + + return theMaterial; +} + + ///////////////////////////////////////////////////////////////////// // Constructor with data diff --git a/SRC/material/uniaxial/PY/QzLiq1.cpp b/SRC/material/uniaxial/PY/QzLiq1.cpp new file mode 100644 index 000000000..1a3f3fe57 --- /dev/null +++ b/SRC/material/uniaxial/PY/QzLiq1.cpp @@ -0,0 +1,762 @@ + +/*** ********************************************************************* +** Module: QzLiq1.cpp +** +** Purpose: Q-z material that incorporates liquefaction effects. It gets +** the pore pressure from a specified element that contains a +** PorousFluidSolid or from provided mean effective stress as a +** timeseries data. +** +** Developed by Sumeet Kumar Sinha +** (C) Copyright 2020, All Rights Reserved. +** +** ****************************************************************** */ + + +// $Revision: 1.0 +// $Date: 2020/6/12 +// $Source: /OpenSees/SRC/material/uniaxial/QzLiq1.cpp +// Written: Sumeet Kumar Sinha +// Created: June 2020 +// Revision: A +// +// Description: This file contains the class implementation for QzLiq1 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// Control on internal iteration between spring components +const int QZmaxIterations = 20; +const double QZtolerance = 1.0e-12; + +int QzLiq1::loadStage = 0; +Vector QzLiq1::stressV3(3); +int QzConstructorType = 0; + +void* OPS_QzLiq1() +{ + UniaxialMaterial* theMat = 0; + + int numdata = OPS_GetNumRemainingInputArgs(); + if (numdata < 8) { + opserr << "WARNING insufficient arguments\n"; + opserr << "Want: uniaxialMaterial QzLiq1 tag? qzType? qult? z50? suction? dashpot? alpha? solidElem1? solidElem2?\n"; + opserr << "or: uniaxialMaterial QzLiq1 tag? qzType? qult? z50? suction? dashpot? alpha? -timeSeries seriesTag?\n"; + return 0; + } + + int idata[2]; + numdata = 2; + if (OPS_GetIntInput(&numdata, idata) < 0) { + opserr << "WARNING invalid int inputs\n"; + return 0; + } + + double ddata[5]; + numdata = 5; + if (OPS_GetDoubleInput(&numdata, ddata) < 0) { + opserr << "WARNING invalid double inputs\n"; + return 0; + } + + const char* arg = OPS_GetString(); + Domain* theDomain = OPS_GetDomain(); + if (theDomain == 0) return 0; + + if (strcmp(arg, "-timeSeries") == 0) { + int tsTag; + numdata = 1; + if (OPS_GetIntInput(&numdata, &tsTag) < 0) { + opserr << "WARNING invalid time series tag\n"; + return 0; + } + TimeSeries* theSeries = OPS_getTimeSeries(tsTag); + theMat = new QzLiq1(idata[0], idata[1], ddata[0], ddata[1], ddata[2], ddata[3], ddata[4], + theDomain,theSeries); + + + } else { + + // back one arg + OPS_ResetCurrentInputArg(-1); + + int eleTags[2]; + numdata = 2; + if (OPS_GetIntInput(&numdata, eleTags) < 0) { + opserr << "WARNING invalid element tags\n"; + return 0; + } + + theMat = new QzLiq1(idata[0], idata[1], ddata[0], ddata[1], ddata[2], ddata[3], ddata[4], + eleTags[0],eleTags[1],theDomain); + } + + return theMat; +} + +///////////////////////////////////////////////////////////////////// +// Constructor with data + +QzLiq1::QzLiq1(int tag, int qz_type, double q_ult, double z_50, double suction, + double dash_pot, double alpha, int solid_elem1, int solid_elem2, Domain *the_Domain) +:QzSimple1(tag, qz_type, q_ult, z_50, suction, dash_pot), alpha(alpha), +solidElem1(solid_elem1), solidElem2(solid_elem2), theDomain(the_Domain) +{ + // Initialize QzSimple variables and history variables + // + this->revertToStart(); + initialTangent = Tangent; + QzConstructorType = 1; +} +QzLiq1::QzLiq1(int tag, int qz_type, double q_ult, double z_50, double suction, + double dash_pot, double alpha, Domain *the_Domain, TimeSeries *the_Series) +:QzSimple1(tag, qz_type, q_ult, z_50, suction, dash_pot),alpha(alpha), +theDomain(the_Domain), theSeries(the_Series) +{ + // Initialize QzSimple variables and history variables + // + this->revertToStart(); + initialTangent = Tangent; + QzConstructorType = 2; +} +///////////////////////////////////////////////////////////////////// +// Default constructor + +QzLiq1::QzLiq1() +:QzSimple1(), solidElem1(0), solidElem2(0), theDomain(0) +{ +} +///////////////////////////////////////////////////////////////////// +// Default destructor +QzLiq1::~QzLiq1() +{ + // Call QzSimple1 destructor even though it does nothing. + // + // QzSimple1::~QzSimple1(); +} + +///////////////////////////////////////////////////////////////////// +int +QzLiq1::setTrialStrain (double newz, double zRate) +{ + // Call the base class QzSimple1 to take care of the basic q-z behavior. + // + QzSimple1::setTrialStrain(newz, zRate); + Tz = newz; + + // Reset mean consolidation stress if loadStage switched from 0 to 1 + // Note: currently assuming y-axis is vertical, and that the + // out-of-plane normal stress equals sigma-xx. + // + if(lastLoadStage ==0 && loadStage ==1){ + + if(QzConstructorType==2) + meanConsolStress = getEffectiveStress(theSeries); + else + meanConsolStress = getEffectiveStress(); + if(meanConsolStress == 0.0){ + opserr << "WARNING meanConsolStress is 0 in solid elements, ru will divide by zero"; + opserr << "QzLiq1: " << endln; + if(QzConstructorType==2) + opserr << "Effective Stress file seriesTag: " << theSeries->getTag() << endln; + else + opserr << "Adjacent solidElems: " << solidElem1 << ", " << solidElem2 << endln; + exit(-1); + } + } + lastLoadStage = loadStage; + + // Obtain the mean effective stress from the adjacent solid elements, + // and calculate ru for scaling of q-z base relation. + // + double meanStress; + if(loadStage == 1) { + if(QzConstructorType==2) + meanStress = getEffectiveStress(theSeries); + else + meanStress = getEffectiveStress(); + if(meanStress>meanConsolStress) + meanStress=meanConsolStress; + Tru = 1.0 - meanStress/meanConsolStress; + if(Tru > 0.999) Tru = 0.999; + if(Tru < 0) Tru = 0; + } + else { + Tru = 0.0; + } + + // Call the base class QzSimple1 to get basic q-z response, + // + double baseT = QzSimple1::getStress(); + double baseTangent = QzSimple1::getTangent(); + + // Check: Only update Hru if not yet converged (avoiding small changes in Tru). + // + if(Tz !=Cz || Tt !=Ct) Hru = Tru; + + // During dilation of the soil (ru dropping), provide a stiff transition + // between the old and new scaled q-z relations. This avoids illogical + // hardening of the q-z relation (i.e., negative stiffnesses). + // + if (Tru < Cru){ + + maxTangent = (QzSimple1::Qult/QzSimple1::z50)*pow(1.0-Cru,alpha); + + // If unloading, follow the old scaled q-z relation until t=0. + // + if(Cz>0.0 && Tz0.0){ + Hru = Cru; + } + if(Cz<0.0 && Tz>Cz && baseT<0.0){ + Hru = Cru; + } + + // If above the stiff transition line (between Tru & Cru scaled surfaces) + + // double zref = Cz + baseT*(Cru-Hru)/maxTangent; + double zref = Cz + baseT*(pow(1-Hru,alpha)-pow(1-Cru,alpha))/maxTangent; + if(Cz>0.0 && Tz>Cz && Tzzref){ + Hru = 1.0 - pow((Ct + (Tz-Cz)*maxTangent)/baseT,1.0/alpha); + } + + if(Hru > Cru) Hru = Cru; + if(Hru < Tru) Hru = Tru; + } + + // Now set the tangent and Tt values accordingly + // + + Tt = baseT*pow(1.0-Hru,alpha); + if(Hru==Cru || Hru==Tru){ + Tangent = pow(1.0-Hru,alpha)*baseTangent; + } + else { + Tangent = maxTangent; + } + + return 0; +} +///////////////////////////////////////////////////////////////////// +double +QzLiq1::getStress(void) +{ + double dashForce = getStrainRate()*this->getDampTangent(); + + // Limit the combined force to qult*(1-ru). + // + double tmax = (1.0-QZtolerance)*QzSimple1::Qult*pow(1.0-Hru,alpha); + if(fabs(Tt + dashForce) >= tmax) + return tmax*(Tt+dashForce)/fabs(Tt+dashForce); + else return Tt + dashForce; + +} +///////////////////////////////////////////////////////////////////// +double +QzLiq1::getTangent(void) +{ + return this->Tangent; + +} +///////////////////////////////////////////////////////////////////// +double +QzLiq1::getInitialTangent(void) +{ + return this->initialTangent; +} +///////////////////////////////////////////////////////////////////// +double +QzLiq1::getDampTangent(void) +{ + // Call the base class QzSimple1 to get basic q-z response, + // and then scale by (1-ru). + // + double dampTangent = QzSimple1::getDampTangent(); + return dampTangent*pow(1.0-Hru,alpha); +} +///////////////////////////////////////////////////////////////////// +double +QzLiq1::getStrain(void) +{ + double strain = QzSimple1::getStrain(); + return strain; +} +///////////////////////////////////////////////////////////////////// +double +QzLiq1::getStrainRate(void) +{ + double strainrate = QzSimple1::getStrainRate(); + return strainrate; +} +///////////////////////////////////////////////////////////////////// +int +QzLiq1::commitState(void) +{ + // Call the QzSimple1 base function to take care of details. + // + QzSimple1::commitState(); + Cz = Tz; + Ct = Tt; + Cru= Hru; + + return 0; +} + +///////////////////////////////////////////////////////////////////// +int +QzLiq1::revertToLastCommit(void) +{ + // reset to committed values + // + QzSimple1::revertToLastCommit(); + Tz = Cz; + Tt = Ct; + Hru= Cru; + + return 0; +} + +///////////////////////////////////////////////////////////////////// +int +QzLiq1::revertToStart(void) +{ + // Call the QzSimple1 base function to take care of most details. + // + QzSimple1::revertToStart(); + Tz = 0.0; + Tt = 0.0; + maxTangent = (QzSimple1::Qult/QzSimple1::z50); + + // Excess pore pressure ratio and pointers + // + Tru = 0.0; + Hru = 0.0; + meanConsolStress = -QzSimple1::Qult; + lastLoadStage = 0; + loadStage = 0; + elemFlag.assign("NONE"); + + // Now get all the committed variables initiated + // + commitState(); + + return 0; +} + +///////////////////////////////////////////////////////////////////// +double +QzLiq1::getEffectiveStress(TimeSeries *theSeries) +{ + return theSeries->getFactor(theDomain->getCurrentTime()); +} + +double +QzLiq1::getEffectiveStress(void) +{ + // Default value for meanStress + double meanStress = meanConsolStress; + + // if theDomain pointer is nonzero, then set pointers to attached soil elements. + // + if(theDomain != 0) + { + Element *theElement1 = theDomain->getElement(solidElem1); + Element *theElement2 = theDomain->getElement(solidElem2); + if (theElement1 == 0 || theElement2 == 0) { + opserr << "WARNING solid element not found in getEffectiveStress" << endln; + opserr << "QzLiq1: " << endln; + opserr << "Adjacent solidElems: " << solidElem1 << ", " << solidElem2 << endln; + exit(-1); + } + + // Check that the class tags for the solid elements are either for a FourNodeQuad object, a FourNodeQuadUP object, + // a 9_4_QuadUP object, a SSPquadUP object, or a SSPquad object + if(theElement1->getClassTag()!=ELE_TAG_FourNodeQuad && theElement1->getClassTag()!=ELE_TAG_FourNodeQuadUP && + theElement1->getClassTag()!=ELE_TAG_Nine_Four_Node_QuadUP && theElement1->getClassTag()!=ELE_TAG_SSPquadUP && theElement1->getClassTag()!=ELE_TAG_SSPquad) + { + opserr << "Element: " << theElement1->getTag() << " cannot be used to read effective stress for a QzLiq1 material." << endln; + exit(-1); + } + if(theElement2->getClassTag()!=ELE_TAG_FourNodeQuad && theElement2->getClassTag()!=ELE_TAG_FourNodeQuadUP && + theElement2->getClassTag()!=ELE_TAG_Nine_Four_Node_QuadUP && theElement2->getClassTag()!=ELE_TAG_SSPquadUP && theElement2->getClassTag()!=ELE_TAG_SSPquad) + { + opserr << "Element: " << theElement2->getTag() << " cannot be used to read effective stress for a QzLiq1 material." << endln; + exit(-1); + } + + double excessPorePressure = 0.0; + meanStress = 0.0; + + // get mean stress from element1 if it is a FourNodeQuad object + if(theElement1->getClassTag()==ELE_TAG_FourNodeQuad) + { + // It's safe to cast *theElement1 onto the FourNodeQuad class because we already + // checked the class tags. + FourNodeQuad *theElement1 = (FourNodeQuad *)(theDomain->getElement(solidElem1)); + + // If the element is a quad, check that the class tag for the material at each gauss point is 100 for FluidSolidPorous object + meanStress = 0.0; + for(int i=0;i<4;i++) + { + NDMaterial *NDM = theElement1->theMaterial[i]; + if(NDM->getClassTag()!=ND_TAG_FluidSolidPorousMaterial){ + opserr << "Material: " << NDM->getTag() << " cannot be used to read effective stress for a QzLiq1 material." << endln; + exit(-1); + } + FluidSolidPorousMaterial *theFSPM = (FluidSolidPorousMaterial *)(NDM); + meanStress += 1.0/8.0*(2.0/3.0*(NDM->getStress())[0] + 1.0/3.0*(NDM->getStress())[1] - theFSPM->trialExcessPressure); + } + } + // get mean stress from element2 if it is a FourNodeQuad object + if(theElement2->getClassTag()==ELE_TAG_FourNodeQuad) + { + // It's safe to cast *theElement1 onto the FourNodeQuad class because we already + // checked the class tags. + FourNodeQuad *theElement2 = (FourNodeQuad *)(theDomain->getElement(solidElem2)); + for(int i=0;i<4;i++) + { + NDMaterial *NDM = theElement2->theMaterial[i]; + if(NDM->getClassTag()!=ND_TAG_FluidSolidPorousMaterial){ + opserr << "Material: " << NDM->getTag() << " cannot be used to read effective stress for a QzLiq1 material." << endln; + exit(-1); + } + FluidSolidPorousMaterial *theFSPM = (FluidSolidPorousMaterial *)(NDM); + meanStress += 1.0/8.0*(2.0/3.0*(NDM->getStress())[0] + 1.0/3.0*(NDM->getStress())[1] - theFSPM->trialExcessPressure); + } + } + + // get mean stress from element1 if it is a FourNodeQuadUP object + if(theElement1->getClassTag()==ELE_TAG_FourNodeQuadUP) { + // It's safe to cast *theElement1 onto the FourNodeQuadUP class because we already checked the class tags. + FourNodeQuadUP *theElement1 = (FourNodeQuadUP *)(theDomain->getElement(solidElem1)); + meanStress=0.0; + + for(int i=0;i<4;i++) { + NDMaterial *NDM = theElement1->theMaterial[i]; + if(NDM->getClassTag()==ND_TAG_InitialStateAnalysisWrapper) { + InitialStateAnalysisWrapper *NDM = (InitialStateAnalysisWrapper *)(theElement1->theMaterial); + if(NDM->getMainClassTag()!=ND_TAG_PressureDependMultiYield && NDM->getMainClassTag()!=ND_TAG_PressureDependMultiYield02) { + opserr << "Material: " << NDM->getTag() << " cannot be used to read effective stress for a QzLiq1 material." << endln; + exit(-1); + } + } else if(NDM->getClassTag()!=ND_TAG_PressureDependMultiYield && NDM->getClassTag() !=ND_TAG_PressureDependMultiYield02){ + opserr << "Material: " << NDM->getTag() << " cannot be used to read effective stress for a QzLiq1 material." << endln; + exit(-1); + } + meanStress += 1.0/8.0*(2.0/3.0*(NDM->getStress())[0] + 1.0/3.0*(NDM->getStress())[1]); + } + } + // get mean stress from element 2 if it is a FourNodeQuadUP object + if(theElement2->getClassTag()==ELE_TAG_FourNodeQuadUP) { + // It's safe to cast *theElement2 onto the FourNodeQuadUP class because we already checked the class tags. + FourNodeQuadUP *theElement2 = (FourNodeQuadUP *)(theDomain->getElement(solidElem2)); + for(int i=0;i<4;i++) { + NDMaterial *NDM = theElement2->theMaterial[i]; + if(NDM->getClassTag()==ND_TAG_InitialStateAnalysisWrapper) { + InitialStateAnalysisWrapper *NDM = (InitialStateAnalysisWrapper *)(theElement2->theMaterial); + if(NDM->getMainClassTag()!=ND_TAG_PressureDependMultiYield && NDM->getMainClassTag()!=ND_TAG_PressureDependMultiYield02) { + opserr << "Material: " << NDM->getTag() << " cannot be used to read effective stress for a QzLiq1 material." << endln; + exit(-1); + } + } else if(NDM->getClassTag()!=ND_TAG_PressureDependMultiYield && NDM->getClassTag() !=ND_TAG_PressureDependMultiYield02){ + opserr << "Material: " << NDM->getTag() << " cannot be used to read effective stress for a QzLiq1 material." << endln; + exit(-1); + } + meanStress += 1.0/8.0*(2.0/3.0*(NDM->getStress())[0] + 1.0/3.0*(NDM->getStress())[1]); + } + } + + // get mean stress from element1 if it is a 9_4_QuadUP object + if(theElement1->getClassTag()==ELE_TAG_Nine_Four_Node_QuadUP) { + // It's safe to cast *theElement1 onto the 9_4_QuadUP class because we already checked the class tags. + NineFourNodeQuadUP *theElement1 = (NineFourNodeQuadUP *)(theDomain->getElement(solidElem1)); + meanStress=0.0; + + for(int i=0;i<9;i++) { + NDMaterial *NDM = theElement1->theMaterial[i]; + if(NDM->getClassTag()==ND_TAG_InitialStateAnalysisWrapper) { + InitialStateAnalysisWrapper *NDM = (InitialStateAnalysisWrapper *)(theElement1->theMaterial); + if(NDM->getMainClassTag()!=ND_TAG_PressureDependMultiYield && NDM->getMainClassTag()!=ND_TAG_PressureDependMultiYield02) { + opserr << "Material: " << NDM->getTag() << " cannot be used to read effective stress for a QzLiq1 material." << endln; + exit(-1); + } + } else if(NDM->getClassTag()!=ND_TAG_PressureDependMultiYield && NDM->getClassTag() !=ND_TAG_PressureDependMultiYield02){ + opserr << "Material: " << NDM->getTag() << " cannot be used to read effective stress for a QzLiq1 material." << endln; + exit(-1); + } + meanStress += 1.0/18.0*(2.0/3.0*(NDM->getStress())[0] + 1.0/3.0*(NDM->getStress())[1]); + } + } + // get mean stress from element2 if it is a 9_4_QuadUP object + if(theElement2->getClassTag()==ELE_TAG_Nine_Four_Node_QuadUP) { + // It's safe to cast *theElement2 onto the 9_4_QuadUP class because we already checked the class tags. + NineFourNodeQuadUP *theElement2 = (NineFourNodeQuadUP *)(theDomain->getElement(solidElem2)); + for(int i=0;i<9;i++) { + NDMaterial *NDM = theElement2->theMaterial[i]; + if(NDM->getClassTag()==ND_TAG_InitialStateAnalysisWrapper) { + InitialStateAnalysisWrapper *NDM = (InitialStateAnalysisWrapper *)(theElement2->theMaterial); + if(NDM->getMainClassTag()!=ND_TAG_PressureDependMultiYield && NDM->getMainClassTag()!=ND_TAG_PressureDependMultiYield02) { + opserr << "Material: " << NDM->getTag() << " cannot be used to read effective stress for a QzLiq1 material." << endln; + exit(-1); + } + } else if(NDM->getClassTag()!=ND_TAG_PressureDependMultiYield && NDM->getClassTag() !=ND_TAG_PressureDependMultiYield02) { + opserr << "Material: " << NDM->getTag() << " cannot be used to read effective stress for a QzLiq1 material." << endln; + exit(-1); + } + meanStress += 1.0/18.0*(2.0/3.0*(NDM->getStress())[0] + 1.0/3.0*(NDM->getStress())[1]); + } + } + + // get mean stress from element1 if it is a SSPquadUP object + if(theElement1->getClassTag()==ELE_TAG_SSPquadUP) { + // It's safe to cast *theElement1 onto the SSPquadUP class because we already checked the class tags. + SSPquadUP *theElement1 = (SSPquadUP *)(theDomain->getElement(solidElem1)); + meanStress = 0.0; + + NDMaterial *NDM = theElement1->theMaterial; + if(NDM->getClassTag()==ND_TAG_InitialStateAnalysisWrapper) { + InitialStateAnalysisWrapper *NDM = (InitialStateAnalysisWrapper *)(theElement1->theMaterial); + if(NDM->getMainClassTag()!=ND_TAG_PressureDependMultiYield && NDM->getMainClassTag()!=ND_TAG_PressureDependMultiYield02) { + opserr << "Material: " << NDM->getTag() << " cannot be used to read effective stress for a QzLiq1 material." << endln; + exit(-1); + } + } else if(NDM->getClassTag()!=ND_TAG_PressureDependMultiYield && NDM->getClassTag()!=ND_TAG_PressureDependMultiYield02) { + opserr << "Material: " << NDM->getTag() << " cannot be used to read effective stress for a QzLiq1 material." << endln; + exit(-1); + } + meanStress += 1.0/2.0*(2.0/3.0*(NDM->getStress())[0] + 1.0/3.0*(NDM->getStress())[1]); + } + // get mean stress from element 2 if it is a SSPquadUP object + if(theElement2->getClassTag()==ELE_TAG_SSPquadUP) { + // It's safe to cast *theElement1 onto the SSPquadUP class because we already checked the class tags. + SSPquadUP *theElement2 = (SSPquadUP *)(theDomain->getElement(solidElem2)); + + NDMaterial *NDM = theElement2->theMaterial; + if(NDM->getClassTag()==ND_TAG_InitialStateAnalysisWrapper) { + InitialStateAnalysisWrapper *NDM = (InitialStateAnalysisWrapper *)(theElement2->theMaterial); + if(NDM->getMainClassTag()!=ND_TAG_PressureDependMultiYield && NDM->getMainClassTag()!=ND_TAG_PressureDependMultiYield02) { + opserr << "Material: " << NDM->getTag() << " cannot be used to read effective stress for a QzLiq1 material." << endln; + exit(-1); + } + } else if(NDM->getClassTag()!=ND_TAG_PressureDependMultiYield && NDM->getClassTag()!=ND_TAG_PressureDependMultiYield02){ + opserr << "Material: " << NDM->getTag() << " cannot be used to read effective stress for a QzLiq1 material." << endln; + exit(-1); + } + meanStress += 1.0/2.0*(2.0/3.0*(NDM->getStress())[0] + 1.0/3.0*(NDM->getStress())[1]); + } + + // get mean stress from element1 if it is a SSPquad object + if(theElement1->getClassTag()==ELE_TAG_SSPquad) { + // It's safe to cast *theElement1 onto the SSPquad class because we already checked the class tags. + SSPquad *theElement1 = (SSPquad *)(theDomain->getElement(solidElem1)); + + // If the element is a SSPquad, check that the class tag for the material at each gauss point is FluidSolidPorous object + meanStress = 0.0; + + NDMaterial *NDM = theElement1->theMaterial; + if(NDM->getClassTag()!=ND_TAG_FluidSolidPorousMaterial){ + opserr << "Material: " << NDM->getTag() << " cannot be used to read effective stress for a QzLiq1 material." << endln; + exit(-1); + } + FluidSolidPorousMaterial *theFSPM = (FluidSolidPorousMaterial *)(NDM); + meanStress += 1.0/2.0*(2.0/3.0*(NDM->getStress())[0] + 1.0/3.0*(NDM->getStress())[1] - theFSPM->trialExcessPressure); + } + // get mean stress from element2 if it is a SSPquad object + if(theElement2->getClassTag()==ELE_TAG_SSPquad) { + // It's safe to cast *theElement2 onto the SSPquad class because we already checked the class tags. + SSPquad *theElement2 = (SSPquad *)(theDomain->getElement(solidElem2)); + + // If the element is a SSPquad, check that the class tag for the material at each gauss point is FluidSolidPorous object + NDMaterial *NDM = theElement2->theMaterial; + if(NDM->getClassTag()!=ND_TAG_FluidSolidPorousMaterial){ + opserr << "Material: " << NDM->getTag() << " cannot be used to read effective stress for a QzLiq1 material." << endln; + exit(-1); + } + FluidSolidPorousMaterial *theFSPM = (FluidSolidPorousMaterial *)(NDM); + meanStress += 1.0/2.0*(2.0/3.0*(NDM->getStress())[0] + 1.0/3.0*(NDM->getStress())[1] - theFSPM->trialExcessPressure); + } + + } + + return meanStress; +} + +int QzLiq1::setParameter(const char **argv, int argc, Parameter ¶m) +{ + if (argc >= 2) + if (strcmp(argv[0],"updateMaterialStage") == 0 && atoi(argv[1]) == this->getTag()) { + return param.addObject(1, this); + } + + return -1; +} + +///////////////////////////////////////////////////////////////////// +int +QzLiq1::updateParameter(int snum,Information &eleInformation) +{ + // TclUpdateMaterialStageCommand will call this routine with the + // command: + // + // updateMaterialStage - material tag -stage snum + // + // If snum = 0; running linear elastic for soil elements, + // so excess pore pressure should be zero. + // If snum = 1; running plastic soil element behavior, + // so this marks the end of the "consol" gravity loading. + + if(snum !=0 && snum !=1){ + opserr << "WARNING updateMaterialStage for QzLiq1 material must be 0 or 1"; + opserr << endln; + exit(-1); + } + loadStage = snum; + + return 0; +} + +///////////////////////////////////////////////////////////////////// +UniaxialMaterial * +QzLiq1::getCopy(void) +{ + // Make a new instance of this class and then assign it "this" to make a copy. + // + QzLiq1 *clone; // pointer to a QzLiq1 class + clone = new QzLiq1(); // pointer gets a new instance of QzLiq1 + *clone = *this; // the clone (dereferenced pointer) = dereferenced this. + + return clone; +} + +///////////////////////////////////////////////////////////////////// +int +QzLiq1::sendSelf(int cTag, Channel &theChannel) +{ + // I'm following an example by Frank here. + // + int res =0; + + static Vector data(17); + + QzSimple1::sendSelf(cTag, theChannel); + + data(0) = this->getTag(); + data(1) = Tz; + data(2) = Cz; + data(3) = Tt; + data(4) = Ct; + data(5) = Tangent; + data(6) = maxTangent; + data(7) = Tru; + data(8) = Cru; + data(9) = Hru; + data(10) = alpha; + if(QzConstructorType==2) + { + data(11) = theSeriesTag; + data(12) = 0.0; + } + if(QzConstructorType==1) + { + data(11) = solidElem1; + data(12) = solidElem2; + } + data(13) = meanConsolStress; + data(14) = loadStage; + data(15) = lastLoadStage; + data(16) = initialTangent; + + res = theChannel.sendVector(this->getDbTag(), cTag, data); + if (res < 0) + opserr << "QzLiq1::sendSelf() - failed to send data\n"; + + return res; +} + +///////////////////////////////////////////////////////////////////// +int +QzLiq1::recvSelf(int cTag, Channel &theChannel, + FEM_ObjectBroker &theBroker) +{ + int res = 0; + + static Vector data(17); + res = theChannel.recvVector(this->getDbTag(), cTag, data); + + if (res < 0) { + opserr << "QzLiq1::recvSelf() - failed to receive data\n"; + this->setTag(0); + } + else { + this->setTag((int)data(0)); + + QzSimple1::recvSelf(cTag, theChannel, theBroker); + + Tz = data(1); + Cz = data(2); + Tt = data(3); + Ct = data(4); + Tangent = data(5); + maxTangent =data(6); + Tru = data(7); + Cru = data(8); + Hru = data(9); + alpha = data(10); + if(QzConstructorType==1) + { + solidElem1 = (int)data(11); + solidElem2 = (int)data(12); + } + if(QzConstructorType==2) + { + theSeriesTag = (int)data(11); + } + meanConsolStress = data(13); + loadStage = (int)data(14); + lastLoadStage = (int)data(15); + initialTangent = data(16); + + // set the trial quantities + this->revertToLastCommit(); + } + + return res; +} + +///////////////////////////////////////////////////////////////////// +void +QzLiq1::Print(OPS_Stream &s, int flag) +{ + s << "QzLiq1, tag: " << this->getTag() << endln; + s << " QzType: " << QzType << endln; + s << " Qult: " << Qult << endln; + s << " z50: " << z50 << endln; + s << " dashpot: " << dashpot << endln; + s << " alpha: " << alpha << endln; + if(QzConstructorType==1) + { + s << " solidElem1: " << solidElem1 << endln; + s << " solidElem2: " << solidElem2 << endln; + } + if(QzConstructorType==2) + { + s << " Time Series Tag: " << theSeries->getTag() << endln; + } + +} + + + + diff --git a/SRC/material/uniaxial/PY/QzLiq1.h b/SRC/material/uniaxial/PY/QzLiq1.h new file mode 100644 index 000000000..936cd1c7d --- /dev/null +++ b/SRC/material/uniaxial/PY/QzLiq1.h @@ -0,0 +1,120 @@ +/* ********************************************************************* +** Module: QzLiq1.h +** +** Purpose: Provide a q-z material that gets pore pressure from a +** specified element that contains a PorousFluidSolid. +** +** +** Developed by Sumeet Kumar Sinha +** (C) Copyright 2002, All Rights Reserved. +** +** ****************************************************************** */ + +// $Revision: 1.0 +// $Date: 2020/6/12 +// $Source: /OpenSees/SRC/material/uniaxial/QzLiq1.h + +#ifndef QZLIQ1_H +#define QZLIQ1_H + +// Written: RWB +// Created: Feb 2002 +// +// Description: This file contains the class definition for QzLiq1. +// + +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +class QzLiq1 : public QzSimple1 +{ + public: + QzLiq1(int tag, int qzType, double tult, double z50, double suction, + double dashpot, double alpha, int solidElem1, int solidElem2, Domain *theDomain); + QzLiq1(int tag, int qzType, double tult, double z50, double suction, + double dashpot, double alpha, Domain *theDomain, TimeSeries *theSeries); + QzLiq1(); + ~QzLiq1(); + + const char *getClassType(void) const {return "QzLiq1";}; + + int setTrialStrain(double y, double yRate); + double getStrain(void); + double getStress(void); + double getTangent(void); + double getStrainRate(void); + double getDampTangent(void); + double getInitialTangent(void); + + int commitState(void); + int revertToLastCommit(void); + int revertToStart(void); + + UniaxialMaterial *getCopy(void); + + int sendSelf(int commitTag, Channel &theChannel); + int recvSelf(int commitTag, Channel &theChannel, + FEM_ObjectBroker &theBroker); + + // Command for initiating vertConsolStress from TclUpdateMaterialStageCommand + int setParameter(const char **argv, int argc, Parameter ¶m); + int updateParameter(int snum, Information &eleInformation); + + void Print(OPS_Stream &s, int flag =0); + + + protected: + + private: + + // Committed and trial values for q, z, and ru + double Tz; // Trial z (displacement) + double Cz; // Commit z (displacement) + double Tt; // Trial load + double Ct; // Commit load + double Tangent; // Tangent + double maxTangent; // maximum tangent + double Tru; // Trial ru + double Cru; // Commit ru + double Hru; // + double alpha; // factor (1-ru)^alpha + + // Solid element from which pore pressures are obtained, domain pointer + // and stage information to get the initial vertical effective stress. + int solidElem1; + int solidElem2; + int theSeriesTag; + + double meanConsolStress; + double ru; + + static int loadStage; + int lastLoadStage; + std::string elemFlag; + Domain *theDomain; + TimeSeries *theSeries; + FourNodeQuad *theQuad1; + FourNodeQuad *theQuad2; + + // Initial tangent + double initialTangent; + + // Function for obtaining effective stresses from adjoining solid soil elements + double getEffectiveStress(void); + double getEffectiveStress(TimeSeries *theSeries); + static Vector stressV3; + +}; + +#endif // QZLIQ1_H + + + diff --git a/SRC/material/uniaxial/PY/QzSimple1.cpp b/SRC/material/uniaxial/PY/QzSimple1.cpp index af0747579..8bd142e15 100644 --- a/SRC/material/uniaxial/PY/QzSimple1.cpp +++ b/SRC/material/uniaxial/PY/QzSimple1.cpp @@ -178,7 +178,7 @@ void QzSimple1::getClosure(double zlast, double dz) // if(TClose_z > 0.0) { - TClose_tang = 0.001*Qult/z50; + TClose_tang = 1e-6*Qult/z50; TClose_Q = TClose_z * TClose_tang; } @@ -374,6 +374,7 @@ void QzSimple1::getNearField(double zlast, double dz, double dz_old) int QzSimple1::setTrialStrain (double newz, double zRate) { + // Set trial values for displacement and load in the material // based on the last Tangent modulus. // diff --git a/SRC/material/uniaxial/PY/QzSimple1.h b/SRC/material/uniaxial/PY/QzSimple1.h index ab1637904..3cc054f9e 100644 --- a/SRC/material/uniaxial/PY/QzSimple1.h +++ b/SRC/material/uniaxial/PY/QzSimple1.h @@ -89,15 +89,6 @@ class QzSimple1 : public UniaxialMaterial protected: - - private: - - // Functions to get Q & z for each component individually - void getGap(double zlast, double dz, double dz_old); - void getClosure(double zlast, double dz); - void getSuction(double zlast, double zy); - void getNearField(double zlast, double dz, double dz_old); - void getFarField(double z); // Material parameters int QzType; // Q-z relation selection @@ -110,6 +101,17 @@ class QzSimple1 : public UniaxialMaterial double maxElast; // max size of elastic range (in terms of dQ/Qult) double nd; // exponent for hardening shape of suction component double dashpot; // dashpot on the far-field (elastic) component + + private: + + // Functions to get Q & z for each component individually + void getGap(double zlast, double dz, double dz_old); + void getClosure(double zlast, double dz); + void getSuction(double zlast, double zy); + void getNearField(double zlast, double dz, double dz_old); + void getFarField(double z); + + // Generated parameters or constants (not user input) double NFkrig; // stiffness of the "rigid" portion of Near Field diff --git a/SRC/material/uniaxial/PY/QzSimple2.cpp b/SRC/material/uniaxial/PY/QzSimple2.cpp index ecc078eef..e3db364ea 100644 --- a/SRC/material/uniaxial/PY/QzSimple2.cpp +++ b/SRC/material/uniaxial/PY/QzSimple2.cpp @@ -178,7 +178,7 @@ void QzSimple2::getClosure(double zlast, double dz) // if(TClose_z > 0.0) { - TClose_tang = 0.001*Qult/z50; + TClose_tang = 1e-6*Qult/z50; TClose_Q = TClose_z * TClose_tang; } diff --git a/SRC/material/uniaxial/PY/TclPyTzQzMaterialCommand.cpp b/SRC/material/uniaxial/PY/TclPyTzQzMaterialCommand.cpp index ffc4aef9d..0cf99efe0 100644 --- a/SRC/material/uniaxial/PY/TclPyTzQzMaterialCommand.cpp +++ b/SRC/material/uniaxial/PY/TclPyTzQzMaterialCommand.cpp @@ -33,6 +33,7 @@ #include #include // RWB #include // RWB +#include // Sumeet #include #include #include @@ -153,7 +154,7 @@ TclModelBuilder_addPyTzQzMaterial(ClientData clientData, Tcl_Interp *interp, int opserr << "WARNING insufficient arguments\n"; printCommand(argc,argv); opserr << "Want: uniaxialMaterial PyLiq1 tag? soilType? pult? y50? drag? dashpot? pRes? solidElem1? solidElem2?" << endln; - opserr << "or: uniaxialMaterial PyLiq1 tag? soilType? pult? y50? drag? dashpot? -timeSeries seriesTag?" << endln; + opserr << "or: uniaxialMaterial PyLiq1 tag? soilType? pult? y50? drag? dashpot? pRes? -timeSeries seriesTag?" << endln; return 0; } @@ -302,7 +303,97 @@ TclModelBuilder_addPyTzQzMaterial(ClientData clientData, Tcl_Interp *interp, int theMaterial = new QzSimple2(tag, QzType, Qult, z50, suction, dashpot); } + // INSERTING THE EXTRA LINES FOR QzLiq1 ////////////////////////// +////////////////////////////////////////////////////////////////////////////////////////////////// + else if (strcmp(argv[1],"QzLiq1") == 0) { + if (argc < 11) { + opserr << "WARNING insufficient arguments\n"; + printCommand(argc,argv); + opserr << "Want: uniaxialMaterial QzLiq1 tag? qzType? qult? z50? suction? dashpot? alpha solidElem1? solidElem2?" << endln; + opserr << "or: uniaxialMaterial QzLiq1 tag? qzType? qult? z50? suction? dashpot? alpha -timeSeries seriesTag?" << endln; + return 0; + } + + int tag, qzType, solidElem1, solidElem2, seriesTag; + double qult, z50, suction, dashpot, alpha; + + if (Tcl_GetInt(interp, argv[2], &tag) != TCL_OK) { + opserr << "WARNING invalid uniaxialMaterial QzLiq1 tag" << endln; + return 0; + } + + if (Tcl_GetInt(interp, argv[3], &qzType) != TCL_OK) { + opserr << "WARNING invalid qzType\n"; + opserr << "uniaxialMaterial QzLiq1: " << tag << endln; + return 0; + } + + if (Tcl_GetDouble(interp, argv[4], &qult) != TCL_OK) { + opserr << "WARNING invalid qult\n"; + opserr << "uniaxialMaterial QzLiq1: " << tag << endln; + return 0; + } + + if (Tcl_GetDouble(interp, argv[5], &z50) != TCL_OK) { + opserr << "WARNING invalid z50\n"; + opserr << "uniaxialMaterial QzLiq1: " << tag << endln; + return 0; + } + + if (Tcl_GetDouble(interp, argv[6], &suction) != TCL_OK) { + opserr << "WARNING invalid suction\n"; + opserr << "uniaxialMaterial QzLiq1: " << tag << endln; + return 0; + } + + if (Tcl_GetDouble(interp, argv[7], &dashpot) != TCL_OK) { + opserr << "WARNING invalid dashpot\n"; + opserr << "uniaxialMaterial QzLiq1: " << tag << endln; + return 0; + } + + if (Tcl_GetDouble(interp, argv[8], &alpha) != TCL_OK) { + opserr << "WARNING invalid alpha\n"; + opserr << "uniaxialMaterial QzLiq1: " << tag << endln; + return 0; + } + + if (strcmp(argv[9],"-timeSeries")!=0) + { + if (Tcl_GetInt(interp, argv[9], &solidElem1) != TCL_OK) { + opserr << "WARNING invalid solidElem\n"; + opserr << "uniaxialMaterial QzLiq1: " << tag << endln; + return 0; + } + + if (Tcl_GetInt(interp, argv[10], &solidElem2) != TCL_OK) { + opserr << "WARNING invalid solidElem\n"; + opserr << "uniaxialMaterial QzLiq1: " << tag << endln; + return 0; + } + + // Parsing was successful, allocate the material + theMaterial = new QzLiq1(tag, qzType, qult, z50, suction, dashpot,alpha, + solidElem1, solidElem2, theDomain); + } + else + { + if (Tcl_GetInt(interp, argv[10], &seriesTag) != TCL_OK) { + opserr << "WARNING time Series\n"; + opserr << "uniaxialMaterial QzLiq1: " << tag << endln; + return 0; + + } + theSeries = OPS_getTimeSeries(seriesTag); + + // Parsing was successful, allocate the material + theMaterial = new QzLiq1(tag, qzType, qult, z50, suction, dashpot,alpha, + theDomain, theSeries); + } + + } + // INSERTING THE EXTRA LINES FOR TzSimple1 ////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/SRC/material/uniaxial/PY/TzLiq1.cpp b/SRC/material/uniaxial/PY/TzLiq1.cpp index 0aaa6ac8b..f51199057 100644 --- a/SRC/material/uniaxial/PY/TzLiq1.cpp +++ b/SRC/material/uniaxial/PY/TzLiq1.cpp @@ -191,8 +191,11 @@ TzLiq1::setTrialStrain (double newz, double zRate) meanStress = getEffectiveStress(theSeries); else meanStress = getEffectiveStress(); + if(meanStress>meanConsolStress) + meanStress=meanConsolStress; Tru = 1.0 - meanStress/meanConsolStress; if(Tru > 0.999) Tru = 0.999; + if(Tru < 0) Tru = 0; } else { Tru = 0.0; @@ -235,8 +238,8 @@ TzLiq1::setTrialStrain (double newz, double zRate) } } - // Now set the tangent and Tt values accordingly - // + // Now set the tangent and Tt values accordingly + Tt = baseT*(1.0-Hru); if(Hru==Cru || Hru==Tru){ diff --git a/SRC/material/uniaxial/PY/TzSimple1.cpp b/SRC/material/uniaxial/PY/TzSimple1.cpp index a336d13af..7d7447743 100644 --- a/SRC/material/uniaxial/PY/TzSimple1.cpp +++ b/SRC/material/uniaxial/PY/TzSimple1.cpp @@ -144,7 +144,7 @@ void TzSimple1::getFarField(double z) ///////////////////////////////////////////////////////////////////// void TzSimple1::getNearField(double zlast, double dz, double dz_old) { - // Limit "dz" step size if it is osillating and not shrinking. + // Limit "dz" step size if it is oscillating and not shrinking. // if(dz*dz_old < 0.0 && fabs(dz/dz_old) > 0.5) dz = -dz_old/2.0; diff --git a/SRC/material/uniaxial/PY/TzSimple2.cpp b/SRC/material/uniaxial/PY/TzSimple2.cpp index 12f7afd05..72cb9547e 100644 --- a/SRC/material/uniaxial/PY/TzSimple2.cpp +++ b/SRC/material/uniaxial/PY/TzSimple2.cpp @@ -56,11 +56,43 @@ #include #include #include +#include // Controls on internal iteration between spring components const int TZmaxIterations = 20; const double TZtolerance = 1.0e-12; +void* OPS_TzSimple2() +{ + int numdata = OPS_GetNumRemainingInputArgs(); + if (numdata < 4) { + opserr << "WARNING insufficient arguments\n"; + opserr << "Want: uniaxialMaterial TzSimple2 tag? tzType? tult? z50? dashpot?\n"; + return 0; + } + + int idata[2]; + numdata = 2; + if (OPS_GetIntInput(&numdata, idata) < 0) { + opserr << "WARNING invalid int inputs\n"; + return 0; + } + + double ddata[3] = {0,0,0}; + numdata = OPS_GetNumRemainingInputArgs(); + if (numdata > 3) numdata = 3; + if (OPS_GetDoubleInput(&numdata, ddata) < 0) { + opserr << "WARNING invalid double inputs\n"; + return 0; + } + + UniaxialMaterial *theMaterial = 0; + theMaterial = new TzSimple2(idata[0], MAT_TAG_PySimple1, idata[1], ddata[0], ddata[1], + ddata[2]); + + return theMaterial; +} + ///////////////////////////////////////////////////////////////////// // Constructor with data diff --git a/SRC/material/uniaxial/SteelFractureDI.cpp b/SRC/material/uniaxial/SteelFractureDI.cpp new file mode 100644 index 000000000..8ae752a22 --- /dev/null +++ b/SRC/material/uniaxial/SteelFractureDI.cpp @@ -0,0 +1,805 @@ +/* ****************************************************************** ** +** OpenSees - Open System for Earthquake Engineering Simulation ** +** Pacific Earthquake Engineering Research Center ** +** ** +** ** +** (C) Copyright 1999, The Regents of the University of California ** +** All Rights Reserved. ** +** ** +** Commercial use of this program without express permission of the ** +** University of California, Berkeley, is strictly prohibited. See ** +** file 'COPYRIGHT' in main directory for information on usage and ** +** redistribution, and for a DISCLAIMER OF ALL WARRANTIES. ** +** ** +** Developed by: ** +** Frank McKenna (fmckenna@ce.berkeley.edu) ** +** Gregory L. Fenves (fenves@ce.berkeley.edu) ** +** Filip C. Filippou (filippou@ce.berkeley.edu) ** +** ** +** ****************************************************************** */ + +// $Revision: 1.0 $ +// $Date: 2021-05-18 00:17:20 $ +// $Source: /usr/local/cvs/OpenSees/SRC/material/uniaxial/SteelFractureDI.cpp,v $ + +// Written: Francisco A. Galvis and Wen-Yi Yen +// Created: 05/2021 +// +// Description: This file contains the class implementation of SteelFractureDI. +// SteelFractureDI is based on the source code for Steel02 +// + +#include + +#include +#include "SteelFractureDI.h" +#include +#include // for recorder +#include +#include + + +#include +#include + + +void * +OPS_SteelFractureDI() +{ + // Pointer to a uniaxial material that will be returned + UniaxialMaterial *theMaterial = 0; + + int iData[1]; + double dData[14]; + int numData = 1; + + if (OPS_GetIntInput(&numData, iData) != 0) { + opserr << "WARNING invalid uniaxialMaterial SteelFractureDI tag" << endln; + return 0; + } + + numData = OPS_GetNumRemainingInputArgs(); + + if (numData != 14) { + opserr << "Invalid #args, want: uniaxialMaterial SteelFractureDI " << iData[0] << + " fy? E? b? R0? cR1? cR2? a1? a2? a3? a4? sigcr? m? sigmin? FI_lim?" << endln; + return 0; + } + else { + if (OPS_GetDoubleInput(&numData, dData) != 0) { + opserr << "Invalid arggs: uniaxialMaterial SteelFractureDI " << iData[0] << + " fy? E? b? R0? cR1? cR2? a1? a2? a3? a4? sigcr? m? sigmin? FI_lim?" << endln; + return 0; + } + theMaterial = new SteelFractureDI(iData[0], dData[0], dData[1], dData[2], + dData[3], dData[4], dData[5], dData[6], + dData[7], dData[8], dData[9], dData[10], dData[11], dData[12], dData[13]); + } + + + + if (theMaterial == 0) { + opserr << "WARNING could not create uniaxialMaterial of type SteelFractureDI Material\n"; + return 0; + } + + return theMaterial; +} + + + +SteelFractureDI::SteelFractureDI(int tag, + double _Fy, double _E0, double _b, + double _R0, double _cR1, double _cR2, + double _a1, double _a2, double _a3, double _a4, double _sigcr, double _m, double _sigmin, double _FI_lim): + UniaxialMaterial(tag, MAT_TAG_SteelFractureDI), + //UniaxialMaterial(tag, 0), + Fy(_Fy), E0(_E0), b(_b), R0(_R0), cR1(_cR1), cR2(_cR2), a1(_a1), a2(_a2), a3(_a3), a4(_a4), + sigcr(_sigcr), m(_m), sigmin(_sigmin), FI_lim(_FI_lim) +{ + konP = 0; + kon = 0; + eP = E0; + epsP = 0.0; + sigP = 0.0; + sig = 0.0; + eps = 0.0; + e = E0; + + epsmaxP = Fy / E0; + epsminP = -epsmaxP; + epsplP = 0.0; + epss0P = 0.0; + sigs0P = 0.0; + epssrP = 0.0; + sigsrP = 0.0; + + // ************** added for fracture *************** + epsCont = 0.0; + konf = 0; + konC = 0; + + epsContP = 0.0; + eps_0 = 0.0; + eps_1 = 0.0; + eps_r = 0; + konfP = 0; + konCP = 0; + // ************** added for fracture *************** + // ************** added for DI ******************** + DIP = 0.0; + isStartP = 1; + sigPDIP = 0.0; + slopePP = 0.0; + sumTenPP = 0.0; + sumCompPP = 0.0; + + DI = 0.0; + isStart = 1; + sigPDI = 0.0; + slopeP = 0.0; + sumTenP = 0.0; + sumCompP = 0.0; + + // ************** added for DI ******************** + +} + + +SteelFractureDI::SteelFractureDI(void) : + UniaxialMaterial(0, MAT_TAG_SteelFractureDI) + // UniaxialMaterial(0, 0) +{ + konP = 0; +} + +SteelFractureDI::~SteelFractureDI(void) +{ + // Does nothing +} + +UniaxialMaterial* +SteelFractureDI::getCopy(void) +{ + //Steel02 *theCopy = new Steel02(this->getTag(), Fy, E0, b, R0, cR1, cR2, a1, a2, a3, a4, sigini); + SteelFractureDI *theCopy = new SteelFractureDI(this->getTag(), Fy, E0, b, R0, cR1, cR2, a1, a2, a3, a4, sigcr, m, sigmin, FI_lim); + + return theCopy; +} + +double +SteelFractureDI::getInitialTangent(void) +{ + return E0; +} + +int +SteelFractureDI::setTrialStrain(double trialStrain, double strainRate) +{ + double Esh = b * E0; + double epsy = Fy / E0; + + eps = trialStrain; + double deps = eps - epsP; + + epsmax = epsmaxP; + epsmin = epsminP; + epspl = epsplP; + epss0 = epss0P; + sigs0 = sigs0P; + epsr = epssrP; + sigr = sigsrP; + kon = konP; + // ************** added for fracture *************** + epsCont = epsContP; + eps_0 = eps_0P; + eps_1 = eps_1P; + eps_r = eps_rP; + konf = konfP; + konC = konCP; + // ************** added for fracture *************** + // ************** added for DI ******************** + DI = DIP; + isStart = isStartP; + sigPDI = sigPDIP; + slopeP = slopePP; + sumTenP = sumTenPP; + sumCompP = sumCompPP; + + // ************** added for DI ******************** + + if (kon == 0 || kon == 3) { // modified C-P. Lamarche 2006 + + + if (fabs(deps) < 10.0*DBL_EPSILON) { + + e = E0; + //sig = sigini; // modified C-P. Lamarche 2006 + sig = 0; + kon = 3; // modified C-P. Lamarche 2006 flag to impose initial stess/strain + return 0; + + } + else { + + epsmax = epsy; + epsmin = -epsy; + if (deps < 0.0) { + kon = 2; + epss0 = epsmin; + sigs0 = -Fy; + epspl = epsmin; + } + else { + kon = 1; + epss0 = epsmax; + sigs0 = Fy; + epspl = epsmax; + } + } + } + + // in case of load reversal from negative to positive strain increment, + // update the minimum previous strain, store the last load reversal + // point and calculate the stress and strain (sigs0 and epss0) at the + // new intersection between elastic and strain hardening asymptote + // To include isotropic strain hardening shift the strain hardening + // asymptote by sigsft before calculating the intersection point + // Constants a3 and a4 control this stress shift on the tension side + + if (kon == 2 && deps > 0.0) { + + + kon = 1; + epsr = epsP; + sigr = sigP; + //epsmin = min(epsP, epsmin); + if (epsP < epsmin) + epsmin = epsP; + double d1 = (epsmax - epsmin) / (2.0*(a4 * epsy)); + double shft = 1.0 + a3 * pow(d1, 0.8); + epss0 = (Fy * shft - Esh * epsy * shft - sigr + E0 * epsr) / (E0 - Esh); + sigs0 = Fy * shft + Esh * (epss0 - epsy * shft); + epspl = epsmax; + + } + else if (kon == 1 && deps < 0.0) { + + // update the maximum previous strain, store the last load reversal + // point and calculate the stress and strain (sigs0 and epss0) at the + // new intersection between elastic and strain hardening asymptote + // To include isotropic strain hardening shift the strain hardening + // asymptote by sigsft before calculating the intersection point + // Constants a1 and a2 control this stress shift on compression side + + kon = 2; + epsr = epsP; + sigr = sigP; + // epsmax = max(epsP, epsmax); + if (epsP > epsmax) + epsmax = epsP; + + double d1 = (epsmax - epsmin) / (2.0*(a2 * epsy)); + double shft = 1.0 + a1 * pow(d1, 0.8); + epss0 = (-Fy * shft + Esh * epsy * shft - sigr + E0 * epsr) / (E0 - Esh); + sigs0 = -Fy * shft + Esh * (epss0 + epsy * shft); + epspl = epsmin; + } + + + // calculate current stress sig and tangent modulus E + if (kon != 4) { // non-fracture case + double xi = fabs((epspl - epss0) / epsy); + double R = R0 * (1.0 - (cR1*xi) / (cR2 + xi)); + double epsrat = (eps - epsr) / (epss0 - epsr); + double dum1 = 1.0 + pow(fabs(epsrat), R); + double dum2 = pow(dum1, (1 / R)); + + sig = b * epsrat + (1.0 - b)*epsrat / dum2; + sig = sig * (sigs0 - sigr) + sigr; + + e = b + (1.0 - b) / (dum1*dum2); + e = e * (sigs0 - sigr) / (epss0 - epsr); + + // calculate DI + calcDI(sigcr, m, sigmin, FI_lim, isStart, sig, sigPDI, DI, slopeP, sumTenP, sumCompP); + + // check if fractured + if (DI >= FI_lim) { + kon = 4; + konf = 1; + + // Point at compression yield envelope + eps_1 = (-Fy + Esh * epsy - sigP + E0 * epsP) / (E0 - Esh); + sig_1 = -Fy + Esh * (eps_1 + epsy); + + // Points at horizontal axis + eps_0 = epsP - sigP / E0; + epsCont = 2 * eps_0 - eps_1; + eps_r = epsCont; + epsr = eps_r; + sigr = 0; + + konC = 1; + + // After fracture goes to zero stress + sig = 0.0; + e = 0.0; + } + //else { + // DI = DI_cache; + //} + + } + else if (kon == 4) { // fractured case + if (eps >= epsCont) { // not contacted + sig = 0.0; + e = 0.0; + if (deps > 0) { + konf = 2; + } + else { + konf = 1; + } + konC = 0; + } + else if (eps < epsCont) { // contacted + if (!konC) { // at first contact + konC = 1; + konf = 2; + } + if (konf == 2 && deps > 0) { // compression --> tension so update variables + konf = 1; // konf = 1 means tensile now + + // Only update if it is out of the linear branch + if (sig < 0.7*sig_1) { + // New properties for unloading and reloading + eps_0 = epsP - sigP / E0; // new interception is at reversal point minus elastic unloading + sigs0 = 0; // new interception always at horizontal axis since flange fractured + + eps_1 = (-Fy + Esh * epsy + E0 * eps_0) / (E0 - Esh); // Point at compression yield envelope + sig_1 = -Fy + Esh * (eps_1 + epsy); + + eps_r = 2 * eps_0 - eps_1; // Point at zero stress and e + } + } + else if (konf == 1 && deps < 0) { // tension --> compression so update variables + konf = 2; // konf == 2 means compression now + } + + // compute sig and e + if (konf == 1) { // compute if is decompressing + // Functional form of first half of the compression load curve all the way until complete unload + double R = 14; + double epsrat = (eps - eps_1) / (eps_1 - eps_0); + double dum1 = 1.0 + pow(fabs(epsrat), R); + double dum2 = pow(dum1, (1 / R)); + + // Functional form for b = 0 since tend to zero stress + sig = sig_1 * (epsrat / dum2 + 1); + e = sig_1 / (eps_1 - eps_0) * (1 / (dum1*dum2)); + + if (eps > eps_r) { + sig = 0; + e = 0; + } + + } + else { // compute if is compressing + double R = 14; + if (eps >= (eps_0 + eps_1) / 2) { + // Update strain for zero stress and e + // Functional form of first half of the compression load curve (b = 0 since tends to horizontal axis) + double epsrat = (eps - eps_1) / (eps_1 - eps_0); + double dum1 = 1.0 + pow(fabs(epsrat), R); + double dum2 = pow(dum1, (1 / R)); + + sig = sig_1 * (epsrat / dum2 + 1); + e = sig_1 / (eps_1 - eps_0) * (1 / (dum1*dum2)); + + if (eps > eps_r) { + sig = 0; + e = 0; + } + } + else { + double epsrat = (eps - eps_0) / (eps_1 - eps_0); + double dum1 = 1.0 + pow(fabs(epsrat), R); + double dum2 = pow(dum1, (1 / R)); + + sig = b * epsrat + (1.0 - b)*epsrat / dum2; + sig = sig * sig_1; + + e = b + (1.0 - b) / (dum1*dum2); + e = e * sig_1 / (eps_1 - eps_0); + } + } + } + } + + return 0; +} + +void +SteelFractureDI::calcDI(double sigcr, double m, double sigmin, double FI_lim, int& isStart, double sig, double& sigPDI, double& DI, double& slopeP, double& sumTenP, double& sumCompP) +{ + // initialize variables **** + double slope; + double currSign; + double sumComp; + double sumTen; + + // Already fractured + if (DI > FI_lim) { + return; + } + + // if is starting point + if (isStart) { + isStart = 0; + sigPDI = sig; + return; + } + + // determine slope sign + slope = sig - sigPDI; + if (slope == 0) { + currSign = returnSign(slopeP); + } + else { + currSign = returnSign(slope); + } + + // Accumulate compressive and tensile stresses + if (fabs(sig) > sigmin) { + // Accumulate only if stress exceeds a threshold + + if (currSign == 1 && sig > sigmin) { + // Tensile excursion (only accumulates in actual tension) + sumComp = sumCompP; + sumTen = sumTenP + fabs(slope); + } + else { + // Compressive excursion + sumTen = sumTenP; + if (sumCompP + fabs(slope) < sumTen) { + // Only considers compression when there is damage to heal + sumComp = sumCompP + fabs(slope); + } + else { + sumComp = sumCompP; + } + } + } + else { + // If below threshold keep same cumulative stresses + sumComp = sumCompP; + sumTen = sumTenP; + } + + DI = (sumTen - sumComp * m) / sigcr; + + if (DI < 0) { + DI = 0; + } + + // update variables + sigPDI = sig; + slopeP = slope; + sumCompP = sumComp; + sumTenP = sumTen; +} + + +int +SteelFractureDI::returnSign(double v) { + if (v < 0) return -1; + if (v > 0) return 1; + return 0; +} + +double +SteelFractureDI::getStrain(void) +{ + return eps; +} + +double +SteelFractureDI::getStress(void) +{ + return sig; +} + +double +SteelFractureDI::getTangent(void) +{ + return e; +} + +double +SteelFractureDI::getDI(void) +{ + return DI; +} + +int +SteelFractureDI::commitState(void) +{ + epsminP = epsmin; + epsmaxP = epsmax; + epsplP = epspl; + epss0P = epss0; + sigs0P = sigs0; + epssrP = epsr; + sigsrP = sigr; + konP = kon; + + eP = e; + sigP = sig; + epsP = eps; + + // ************** added for fracture *************** + epsContP = epsCont; + eps_0P = eps_0; + eps_1P = eps_1; + eps_rP = eps_r; + konfP = konf; + konCP = konC; + // ************** added for fracture *************** + // ************** added for DI ******************** + DIP = DI; + isStartP = isStart; + sigPDIP = sigPDI; + slopePP = slopeP; + sumTenPP = sumTenP; + sumCompPP = sumCompP; + // ************** added for DI ******************** + return 0; +} + +int +SteelFractureDI::revertToLastCommit(void) +{ + epsmin = epsminP; + epsmax = epsmaxP; + epspl = epsplP; + epss0 = epss0P; + sigs0 = sigs0P; + epsr = epssrP; + sigr = sigsrP; + kon = konP; + + e = eP; + sig = sigP; + eps = epsP; + + // ************** added for fracture *************** + epsCont = epsContP; + eps_0 = eps_0P; + eps_1 = eps_0P; + eps_r = eps_rP; + konf = konfP; + konC = konCP; + // ************** added for fracture *************** + // ************** added for DI ******************** + DI = DIP; + isStart = isStartP; + sigPDI = sigPDIP; + slopeP = slopePP; + sumTenP = sumTenPP; + sumCompP = sumCompPP; + // ************** added for DI ******************** + + return 0; +} + +int +SteelFractureDI::revertToStart(void) +{ + konP = 0; + kon = 0; + eP = E0; + epsP = 0.0; + sigP = 0.0; + sig = 0.0; + eps = 0.0; + e = E0; + + epsmaxP = Fy / E0; + epsminP = -epsmaxP; + epsplP = 0.0; + epss0P = 0.0; + sigs0P = 0.0; + epssrP = 0.0; + sigsrP = 0.0; + + // ************** added for fracture *************** + epsCont = 0.0; + eps_0 = 0.0; + eps_1 = 0.0; + eps_r = 0.0; + konf = 0.0; + konC = 0.0; + + epsContP = 0.0; + eps_0P = 0.0; + eps_1P = 0.0; + eps_rP = 0.0; + konfP = 0.0; + konCP = 0.0; + // ************** added for fracture *************** + // ************** added for DI ******************** + DIP = 0.0; + isStartP = 1; + sigPDIP = 0.0; + slopePP = 0.0; + sumTenPP = 0.0; + sumCompPP = 0.0; + + DI = 0.0; + isStart = 1; + sigPDI = 0.0; + slopeP = 0.0; + sumTenP = 0.0; + sumCompP = 0.0; + // ************** added for DI ******************** + + return 0; +} + +int +SteelFractureDI::sendSelf(int commitTag, Channel &theChannel) +{ + return -1; +} + +int +SteelFractureDI::recvSelf(int commitTag, Channel &theChannel, + FEM_ObjectBroker &theBroker) +{ + + return -1; +} + +void +SteelFractureDI::Print(OPS_Stream &s, int flag) +{ + if (flag == OPS_PRINT_PRINTMODEL_MATERIAL) { + // s << "Steel02:(strain, stress, tangent) " << eps << " " << sig << " " << e << endln; + s << "SteelFracture tag: " << this->getTag() << endln; + s << " fy: " << Fy << ", "; + s << " E0: " << E0 << ", "; + s << " b: " << b << ", "; + s << " R0: " << R0 << ", "; + s << " cR1: " << cR1 << ", "; + s << " cR2: " << cR2 << ", "; + s << " a1: " << a1 << ", "; + s << " a2: " << a2 << ", "; + s << " a3: " << a3 << ", "; + s << " a4: " << a4 << ", "; + s << " sigcr: " << sigcr << ", "; + s << " m: " << m << ", "; + s << " sigmin: " << sigmin << ", "; + s << " FI_lim: " << FI_lim << ", "; + } + + if (flag == OPS_PRINT_PRINTMODEL_JSON) { + s << "\t\t\t{"; + s << "\"name\": \"" << this->getTag() << "\", "; + s << "\"type\": \"SteelFracture\", "; + s << "\"E\": " << E0 << ", "; + s << "\"fy\": " << Fy << ", "; + s << "\"b\": " << b << ", "; + s << "\"R0\": " << R0 << ", "; + s << "\"cR1\": " << cR1 << ", "; + s << "\"cR2\": " << cR2 << ", "; + s << "\"a1\": " << a1 << ", "; + s << "\"a2\": " << a2 << ", "; + s << "\"a3\": " << a3 << ", "; + s << "\"a4\": " << a4 << ", "; + s << " sigcr: " << sigcr << ", "; + s << " m: " << m << ", "; + s << " sigmin: " << sigmin << ", "; + s << " FI_lim: " << FI_lim << ", "; + } +} + +Response* +SteelFractureDI::setResponse(const char **argv, int argc, OPS_Stream &theOutput) +{ + if (argc == 0) + return 0; + + Response *theResponse = 0; + + theOutput.tag("UniaxialMaterialOutput"); + theOutput.attr("matType", this->getClassType()); + theOutput.attr("matTag", this->getTag()); + + + // stress + if (strcmp(argv[0], "stress") == 0) { + theOutput.tag("ResponseType", "sigma11"); + theResponse = new MaterialResponse(this, 1, this->getStress()); + } + // tangent + else if (strcmp(argv[0], "tangent") == 0) { + theOutput.tag("ResponseType", "C11"); + theResponse = new MaterialResponse(this, 2, this->getTangent()); + } + + // strain + else if (strcmp(argv[0], "strain") == 0) { + theOutput.tag("ResponseType", "eps11"); + theResponse = new MaterialResponse(this, 3, this->getStrain()); + } + + // strain + else if ((strcmp(argv[0], "stressStrain") == 0) || + (strcmp(argv[0], "stressANDstrain") == 0)) { + theOutput.tag("ResponseType", "sig11"); + theOutput.tag("ResponseType", "eps11"); + theResponse = new MaterialResponse(this, 4, Vector(2)); + } + + // damage + else if (strcmp(argv[0], "damage") == 0) { + theResponse = new MaterialResponse(this, 5, this->getDI()); + theOutput.tag("ResponseType", "DI"); + // added 6/9/2006 + } + + else if (strcmp(argv[0], "failure") == 0) { + int res = 0; + theResponse = new MaterialResponse(this, 6, res); + theOutput.tag("ResponseType", "Failure"); + } + // end add + + + theOutput.endTag(); + return theResponse; +} + +int +SteelFractureDI::getResponse(int responseID, Information &matInfo) +{ + static Vector stressStrain(2); + static Vector cyclesAndRange(6); + + // each subclass must implement its own stuff + switch (responseID) { + case 1: + matInfo.setDouble(this->getStress()); + return 0; + + case 2: + matInfo.setDouble(this->getTangent()); + return 0; + + case 3: + matInfo.setDouble(this->getStrain()); + return 0; + + case 4: + stressStrain(0) = this->getStress(); + stressStrain(1) = this->getStrain(); + matInfo.setVector(stressStrain); + return 0; + + case 5: + matInfo.setDouble(this->getDI()); + return 0; + + case 6: + if (DI > FI_lim) + matInfo.setInt(1); + else + matInfo.setInt(0); + return 0; + + default: + return -1; + + } +} diff --git a/SRC/material/uniaxial/SteelFractureDI.h b/SRC/material/uniaxial/SteelFractureDI.h new file mode 100644 index 000000000..78faecc4c --- /dev/null +++ b/SRC/material/uniaxial/SteelFractureDI.h @@ -0,0 +1,177 @@ +/* ****************************************************************** ** +** OpenSees - Open System for Earthquake Engineering Simulation ** +** Pacific Earthquake Engineering Research Center ** +** ** +** ** +** (C) Copyright 1999, The Regents of the University of California ** +** All Rights Reserved. ** +** ** +** Commercial use of this program without express permission of the ** +** University of California, Berkeley, is strictly prohibited. See ** +** file 'COPYRIGHT' in main directory for information on usage and ** +** redistribution, and for a DISCLAIMER OF ALL WARRANTIES. ** +** ** +** Developed by: ** +** Frank McKenna (fmckenna@ce.berkeley.edu) ** +** Gregory L. Fenves (fenves@ce.berkeley.edu) ** +** Filip C. Filippou (filippou@ce.berkeley.edu) ** +** ** +** ****************************************************************** */ + +// $Revision: 1.0 $ +// $Date: 2021-05-18 00:17:20 $ +// $Source: /usr/local/cvs/OpenSees/SRC/material/uniaxial/SteelFractureDI.cpp,v $ + +// Written: Francisco A. Galvis and Wen-Yi Yen +// Created: 05/2021 +// +// Description: This file contains the class implementation of SteelFractureDI. +// SteelFractureDI is based on the source code for Steel02 +// + + +#ifndef SteelFractureDI_h +#define SteelFractureDI_h + +#include +#include + +class SteelFractureDI : public UniaxialMaterial +{ +public: + SteelFractureDI(int tag, + double fy, double E0, double b, + double R0, double cR1, double cR2, + double a1, double a2, double a3, double a4, double sigcr, double m, double sigmin, double FI_lim); + /*SteelFracture(int tag, + double fy, double E0, double b);*/ + + // Constructor for no isotropic hardening + //SteelFracture(int tag, + // double fy, double E0, double b, + // double R0, double cR1, double cR2); + + //// Constructor for no isotropic hardening + //// Also provides default values for R0, cR1, and cR2 + //SteelFracture(int tag, double fy, double E0, double b); + + SteelFractureDI(void); + virtual ~SteelFractureDI(); + + + const char *getClassType(void) const { return "SteelFracture"; }; + + double getInitialTangent(void); + UniaxialMaterial *getCopy(void); + + int setTrialStrain(double strain, double strainRate = 0.0); + double getStrain(void); + double getStress(void); + double getTangent(void); + double getDI(void); + + int commitState(void); + int revertToLastCommit(void); + int revertToStart(void); + + int sendSelf(int commitTag, Channel &theChannel); + int recvSelf(int commitTag, Channel &theChannel, + FEM_ObjectBroker &theBroker); + + void Print(OPS_Stream &s, int flag = 0); + + // counting function + void calcDI(double sigcr, double m, double sigmin, double FI_lim, int &isStart, double sig, double &sigPDI, double &DI, double &slopeP, double& sumTenP, double& sumCompP); + int returnSign(double v); + + // override get-response function + Response *setResponse(const char **argv, int argc, OPS_Stream &s); + int getResponse(int responseID, Information &matInformation); + +protected: + +private: + // matpar : STEEL FIXED PROPERTIES + double Fy; // = matpar(1) : yield stress + double E0; // = matpar(2) : initial stiffness + double b; // = matpar(3) : hardening ratio (Esh/E0) + double R0; // = matpar(4) : exp transition elastic-plastic + double cR1; // = matpar(5) : coefficient for changing R0 to R + double cR2; // = matpar(6) : coefficient for changing R0 to R + double a1; // = matpar(7) : coefficient for isotropic hardening in compression + double a2; // = matpar(8) : coefficient for isotropic hardening in compression + double a3; // = matpar(9) : coefficient for isotropic hardening in tension + double a4; // = matpar(10) : coefficient for isotropic hardening in tension + //double sigini; // initial + // hstvP : STEEL HISTORY VARIABLES + double epsminP; // = hstvP(1) : max eps in compression + double epsmaxP; // = hstvP(2) : max eps in tension + double epsplP; // = hstvP(3) : plastic excursion + double epss0P; // = hstvP(4) : eps at asymptotes intersection + double sigs0P; // = hstvP(5) : sig at asymptotes intersection + double sig_1P; // = hstvP(5) : sig at asymptotes intersection + double epssrP; // = hstvP(6) : eps at last inversion point + double sigsrP; // = hstvP(7) : sig at last inversion point + int konP; // = hstvP(8) : index for loading/unloading + // hstv : STEEL HISTORY VARIABLES + double epsP; // = strain at previous converged step + double sigP; // = stress at previous converged step + double eP; // stiffness modulus at last converged step; + + + + double epsmin; + double epsmax; + double epspl; + double epss0; + double sigs0; + double sig_1; + double epsr; + double sigr; + int kon; + double sig; + double e; + double eps; // = strain at current step + + // ************** added for fracture *************** + double epsContP; + double eps_0P; + double eps_1P; + double eps_rP; + int konfP; + int konCP; + + double epsCont; + double eps_0; + double eps_1; + double eps_r; + int konf; + int konC; + + // ************** added for fracture *************** + // ************** added for DI ******************** + double sigcr; + double m; + double FI_lim; + double sigmin; + + double DIP; + int isStartP; + double sigPDIP; + double slopePP; + double sumTenPP; + double sumCompPP; + + double DI; + int isStart; + double sigPDI; + double slopeP; + double sumTenP; + double sumCompP; + + // ************** added for DI ******************** +}; + + +#endif + diff --git a/SRC/material/uniaxial/TclModelBuilderUniaxialMaterialCommand.cpp b/SRC/material/uniaxial/TclModelBuilderUniaxialMaterialCommand.cpp index ffe5749c6..72cdded58 100644 --- a/SRC/material/uniaxial/TclModelBuilderUniaxialMaterialCommand.cpp +++ b/SRC/material/uniaxial/TclModelBuilderUniaxialMaterialCommand.cpp @@ -100,6 +100,7 @@ extern void *OPS_Bilin02(void); extern void *OPS_Steel01(void); extern void *OPS_FRPConfinedConcrete02(void); extern void *OPS_Steel02(void); +extern void *OPS_SteelFractureDI(void); // galvisf extern void *OPS_Steel02Fatigue(void); extern void *OPS_RambergOsgoodSteel(void); extern void *OPS_ReinforcingSteel(void); @@ -334,6 +335,15 @@ TclModelBuilderUniaxialMaterialCommand (ClientData clientData, Tcl_Interp *inter theMaterial = (UniaxialMaterial *)theMat; else return TCL_ERROR; + + } + else if (strcmp(argv[1], "SteelFractureDI") == 0) { + void* theMat = OPS_SteelFractureDI(); + if (theMat != 0) + theMaterial = (UniaxialMaterial*)theMat; + else + return TCL_ERROR; + } else if (strcmp(argv[1],"Steel02Fatigue") == 0) { void *theMat = OPS_Steel02Fatigue(); if (theMat != 0) diff --git a/SRC/recorder/EnvelopeElementRecorder.cpp b/SRC/recorder/EnvelopeElementRecorder.cpp index cb7d49bbc..544528cdd 100644 --- a/SRC/recorder/EnvelopeElementRecorder.cpp +++ b/SRC/recorder/EnvelopeElementRecorder.cpp @@ -244,8 +244,13 @@ OPS_EnvelopeElementRecorder() nargrem = 1 + OPS_GetNumRemainingInputArgs(); data = new const char *[nargrem]; data[0] = option; - for (int i = 1; i < nargrem; i++) - data[i] = OPS_GetString(); + for (int i = 1; i < nargrem; i++) { + data[i] = new char[128]; + + // Turn everything in to a string for setResponse + //data[i] = OPS_GetStringFromAll(buffer, 128); + OPS_GetStringFromAll((char*)data[i], 128); + } } } diff --git a/SRC/recorder/MPCORecorder.cpp b/SRC/recorder/MPCORecorder.cpp index 2b381a432..5ad34c018 100755 --- a/SRC/recorder/MPCORecorder.cpp +++ b/SRC/recorder/MPCORecorder.cpp @@ -3535,13 +3535,14 @@ namespace mpco { get class tag, geometry and integration rule type */ int elem_type = current_element->getClassTag(); - - if (elem_type == ELE_TAG_Subdomain) + /* + skip element classes tht we don't want to record + */ + if (elem_type == ELE_TAG_Subdomain || + elem_type == ELE_TAG_ASDEmbeddedNodeElement) { - //Skip subdomains continue; } - ElementGeometryType::Enum geom_type; ElementIntegrationRuleType::Enum int_rule_type; getGeometryAndIntRuleByClassTag(elem_type, geom_type, int_rule_type); diff --git a/SRC/tcl/commands.cpp b/SRC/tcl/commands.cpp index 9ad4402af..8cce591a3 100644 --- a/SRC/tcl/commands.cpp +++ b/SRC/tcl/commands.cpp @@ -75,6 +75,7 @@ using std::ofstream; #include bool OPS_suppressOpenSeesOutput = false; +bool OPS_showHeader = true; StandardStream sserr; OPS_Stream *opserrPtr = &sserr; @@ -201,6 +202,7 @@ extern "C" int OPS_ResetInputNoBuilder(ClientData clientData, Tcl_Interp #include //SAJalali extern void *OPS_NewtonRaphsonAlgorithm(void); +extern void *OPS_ExpressNewton(void); extern void *OPS_ModifiedNewton(void); extern void *OPS_NewtonHallM(void); @@ -2285,19 +2287,24 @@ printA(ClientData clientData, Tcl_Interp *interp, int argc, TCL_Char **argv) FileStream outputFile; OPS_Stream *output = &opserr; + bool ret = false; int currentArg = 1; + while (currentArg < argc) { + if ((strcmp(argv[currentArg], "file") == 0) || + (strcmp(argv[currentArg], "-file") == 0)) { + currentArg++; - if (argc > 2) { - if ((strcmp(argv[currentArg],"file") == 0) || - (strcmp(argv[currentArg],"-file") == 0)) { - currentArg++; - - if (outputFile.setFile(argv[currentArg]) != 0) { - opserr << "print .. - failed to open file: " << argv[currentArg] << endln; - return TCL_ERROR; + if (outputFile.setFile(argv[currentArg]) != 0) { + opserr << "print .. - failed to open file: " << argv[currentArg] << endln; + return TCL_ERROR; + } + output = &outputFile; } - output = &outputFile; - } + else if ((strcmp(argv[currentArg], "ret") == 0) || + (strcmp(argv[currentArg], "-ret") == 0)) { + ret = true; + } + currentArg++; } if (theSOE != 0) { if (theStaticIntegrator != 0) @@ -2307,13 +2314,27 @@ printA(ClientData clientData, Tcl_Interp *interp, int argc, TCL_Char **argv) const Matrix *A = theSOE->getA(); if (A != 0) { - *output << *A; + if (ret) { + int n = A->noRows(); + int m = A->noCols(); + if (n * m > 0) { + for (int i = 0; i < n; i++) { + for (int j = 0; j < m; j++) { + char buffer[40]; + sprintf(buffer, "%.10e ", (*A)(i, j)); + Tcl_AppendResult(interp, buffer, NULL); + } + } + } + } + else { + *output << *A; + // close the output file + outputFile.close(); + } } } - // close the output file - outputFile.close(); - return res; } @@ -2326,19 +2347,24 @@ printB(ClientData clientData, Tcl_Interp *interp, int argc, TCL_Char **argv) OPS_Stream *output = &opserr; // bool done = false; + bool ret = false; int currentArg = 1; + while (currentArg < argc) { + if ((strcmp(argv[currentArg], "file") == 0) || + (strcmp(argv[currentArg], "-file") == 0)) { + currentArg++; - if (argc > 2) { - if ((strcmp(argv[currentArg],"file") == 0) || - (strcmp(argv[currentArg],"-file") == 0)) { - currentArg++; - - if (outputFile.setFile(argv[currentArg]) != 0) { - opserr << "print .. - failed to open file: " << argv[currentArg] << endln; - return TCL_ERROR; + if (outputFile.setFile(argv[currentArg]) != 0) { + opserr << "print .. - failed to open file: " << argv[currentArg] << endln; + return TCL_ERROR; + } + output = &outputFile; } - output = &outputFile; - } + else if ((strcmp(argv[currentArg], "ret") == 0) || + (strcmp(argv[currentArg], "-ret") == 0)) { + ret = true; + } + currentArg++; } if (theSOE != 0) { if (theStaticIntegrator != 0) @@ -2347,12 +2373,23 @@ printB(ClientData clientData, Tcl_Interp *interp, int argc, TCL_Char **argv) theTransientIntegrator->formUnbalance(); const Vector &b = theSOE->getB(); - *output << b; + if (ret) { + int n = b.Size(); + if (n > 0) { + for (int i = 0; i < n; i++) { + char buffer[40]; + sprintf(buffer, "%.10e ", b(i)); + Tcl_AppendResult(interp, buffer, NULL); + } + } + } + else { + *output << b; + // close the output file + outputFile.close(); + } } - // close the output file - outputFile.close(); - return res; } @@ -3576,9 +3613,10 @@ specifySOE(ClientData clientData, Tcl_Interp *interp, int argc, TCL_Char **argv) #endif return TCL_OK; + } else { + opserr << "WARNING system " << argv[1] << " is unknown or not installed\n"; + return TCL_ERROR; } - - return TCL_ERROR; } @@ -4100,24 +4138,13 @@ specifyAlgorithm(ClientData clientData, Tcl_Interp *interp, int argc, } else if (strcmp(argv[1],"ExpressNewton") == 0) { - int nIter = 2, factorOnce = 0, formTangent = CURRENT_TANGENT; - double kMultiplier = 1.0; - if (argc >= 3 && Tcl_GetInt(interp, argv[2], &nIter) != TCL_OK) - return TCL_ERROR; - if (argc >= 4 && Tcl_GetDouble(interp, argv[3], &kMultiplier) != TCL_OK) + void *theNewtonAlgo = OPS_ExpressNewton(); + if (theNewtonAlgo == 0) return TCL_ERROR; - int count = 4; - while (argc > count) { - if ((strcmp(argv[count],"-initialTangent") == 0) || (strcmp(argv[count],"-InitialTangent") == 0)) { - formTangent = INITIAL_TANGENT; - } else if ((strcmp(argv[count],"-currentTangent") == 0) || (strcmp(argv[count],"-CurrentTangent") ==0 )) { - formTangent = CURRENT_TANGENT; - } else if ((strcmp(argv[count],"-factorOnce") == 0) || (strcmp(argv[count],"-FactorOnce") ==0 )) { - factorOnce = 1; - } - count++; - } - theNewAlgo = new ExpressNewton(nIter,kMultiplier,formTangent,factorOnce); + + theNewAlgo = (EquiSolnAlgo *)theNewtonAlgo; + if (theTest != 0) + theNewAlgo->setConvergenceTest(theTest); } else { @@ -7135,7 +7162,7 @@ eleType(ClientData clientData, Tcl_Interp* interp, int argc, TCL_Char** argv) return TCL_ERROR; } - char buffer[20]; + char buffer[80]; Element* theElement = theDomain.getElement(tag); if (theElement == 0) { opserr << "WARNING eleType ele " << tag << " not found" << endln; diff --git a/SRC/tcl/tclMain.cpp b/SRC/tcl/tclMain.cpp index d9bcc4639..dd7ff9378 100644 --- a/SRC/tcl/tclMain.cpp +++ b/SRC/tcl/tclMain.cpp @@ -205,6 +205,7 @@ char *TclGetStartupScriptFileName() */ extern bool OPS_suppressOpenSeesOutput; +extern bool OPS_showHeader; void g3TclMain(int argc, char **argv, Tcl_AppInitProc * appInitProc, int rank, int np) @@ -224,9 +225,13 @@ g3TclMain(int argc, char **argv, Tcl_AppInitProc * appInitProc, int rank, int np DummyStream dummy; for (int i=0; i Disabled - ..\..\..\src\element\RockingBC;..\..\..\src\element\mixedBeamColumn;..\..\..\src\element\tetrahedron;..\..\..\src\domain\pattern;..\..\..\src\element\catenaryCable;..\..\..\src\recorder;..\..\..\src\analysis\integrator;..\..\..\src\analysis\algorithm;..\..\..\src\domain\region;..\..\..\src\element\triangle;..\..\..\src\element\PFEMElement;..\..\..\other\tetgen1.4.3;..\..\..\src\analysis\analysis;..\..\..\other\triangle;..\..\..\src\element\HUelements;..\..\..\src\material\nD\UWmaterials;..\..\..\src\element\UWelements;..\..\..\src\tagged\storage;..\..\..\src\element\frictionBearing\frictionModel;..\..\..\src\element\frictionBearing;..\..\..\src\element\adapter;..\..\..\src\element\elastomericBearing;..\..\..\src\element\twoNodeLink;..\..\..\src\api;..\..\..\src\actor\message;..\..\..\src\element\generic;..\..\..\src\material\section\fiber;..\..\..\src\element\dispBeamColumnInt;..\..\..\src\element\UP_ucdavis;..\..\..\src\element\UP-ucsd;..\..\..\src\package;..\..\..\src\damage;..\..\..\src\element\TotalLagrangianFD20NodeBrick;..\..\..\src\element\27nbrick;..\..\..\src\element\upU;..\..\..\src\element\dispBeamColumn;..\..\..\src\element\brick;..\..\..\src\element\shell;..\..\..\src\element\8nbrick;..\..\..\src\recorder\response;..\..\..\src\element\nonlinearBeamColumn\quadRule;..\..\..\src\material\nD;..\..\..\src\element\fourNodeQuad;..\..\..\src\element\damper;..\..\..\src\coordTransformation;..\..\..\src\element\beamWithHinges;..\..\..\src\element\nonlinearBeamColumn\matrixutil;..\..\..\src\element\zeroLength;..\..\..\src\modelbuilder;..\..\..\src\modelbuilder\tcl;..\..\..\src\element\feap;..\..\..\src\handler;..\..\..\src\element;..\..\..\src\element\truss;..\..\..\src\material\section;..\..\..\src\element\beam3d;..\..\..\src\element\beam2d;..\..\..\src\material;..\..\..\src\material\uniaxial;..\..\..\src\actor\objectBroker;..\..\..\src\matrix;..\..\..\src\domain\load;..\..\..\src\renderer;..\..\..\src\actor\channel;..\..\..\src\domain\node;..\..\..\src\actor\actor;..\..\..\src\tagged;..\..\..\src\domain\component;..\..\..\src;..\..\..\src\domain\domain;..\..\..\src\material\nd\template3dep;..\..\..\src\nDarray;..\..\..\src\element\20nbrick;..\..\..\src\element\elasticBeamColumn;..\..\..\src\element\joint;..\..\..\src\domain\constraints;..\..\..\src\element\updatedLagrangianBeamColumn;..\..\..\src\material\yieldSurface\yieldSurfaceBC;..\..\..\src\material\yieldSurface\evolution;..\..\..\src\element\forceBeamColumn;..\..\..\src\element\nonlinearBeamColumn\element;..\..\..\src\element\nonlinearBeamColumn\matrixUtil;c:\Program Files (x86)\tcl;c:\Program Files (x86)\tcl\include;%(AdditionalIncludeDirectories) + ..\..\..\src\element\RockingBC;..\..\..\src\element\CEqElement;..\..\..\src\element\mixedBeamColumn;..\..\..\src\element\tetrahedron;..\..\..\src\domain\pattern;..\..\..\src\element\catenaryCable;..\..\..\src\recorder;..\..\..\src\analysis\integrator;..\..\..\src\analysis\algorithm;..\..\..\src\domain\region;..\..\..\src\element\triangle;..\..\..\src\element\PFEMElement;..\..\..\other\tetgen1.4.3;..\..\..\src\analysis\analysis;..\..\..\other\triangle;..\..\..\src\element\HUelements;..\..\..\src\material\nD\UWmaterials;..\..\..\src\element\UWelements;..\..\..\src\tagged\storage;..\..\..\src\element\frictionBearing\frictionModel;..\..\..\src\element\frictionBearing;..\..\..\src\element\adapter;..\..\..\src\element\elastomericBearing;..\..\..\src\element\twoNodeLink;..\..\..\src\api;..\..\..\src\actor\message;..\..\..\src\element\generic;..\..\..\src\material\section\fiber;..\..\..\src\element\dispBeamColumnInt;..\..\..\src\element\UP_ucdavis;..\..\..\src\element\UP-ucsd;..\..\..\src\package;..\..\..\src\damage;..\..\..\src\element\TotalLagrangianFD20NodeBrick;..\..\..\src\element\27nbrick;..\..\..\src\element\upU;..\..\..\src\element\dispBeamColumn;..\..\..\src\element\brick;..\..\..\src\element\shell;..\..\..\src\element\8nbrick;..\..\..\src\recorder\response;..\..\..\src\element\nonlinearBeamColumn\quadRule;..\..\..\src\material\nD;..\..\..\src\element\fourNodeQuad;..\..\..\src\element\damper;..\..\..\src\coordTransformation;..\..\..\src\element\beamWithHinges;..\..\..\src\element\nonlinearBeamColumn\matrixutil;..\..\..\src\element\zeroLength;..\..\..\src\modelbuilder;..\..\..\src\modelbuilder\tcl;..\..\..\src\element\feap;..\..\..\src\handler;..\..\..\src\element;..\..\..\src\element\truss;..\..\..\src\material\section;..\..\..\src\element\beam3d;..\..\..\src\element\beam2d;..\..\..\src\material;..\..\..\src\material\uniaxial;..\..\..\src\actor\objectBroker;..\..\..\src\matrix;..\..\..\src\domain\load;..\..\..\src\renderer;..\..\..\src\actor\channel;..\..\..\src\domain\node;..\..\..\src\actor\actor;..\..\..\src\tagged;..\..\..\src\domain\component;..\..\..\src;..\..\..\src\domain\domain;..\..\..\src\material\nd\template3dep;..\..\..\src\nDarray;..\..\..\src\element\20nbrick;..\..\..\src\element\elasticBeamColumn;..\..\..\src\element\joint;..\..\..\src\domain\constraints;..\..\..\src\element\updatedLagrangianBeamColumn;..\..\..\src\material\yieldSurface\yieldSurfaceBC;..\..\..\src\material\yieldSurface\evolution;..\..\..\src\element\forceBeamColumn;..\..\..\src\element\nonlinearBeamColumn\element;..\..\..\src\element\nonlinearBeamColumn\matrixUtil;c:\Program Files (x86)\tcl;c:\Program Files (x86)\tcl\include;%(AdditionalIncludeDirectories) _DEBUG;WIN32;_LIB;_WGL;_TCL85;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebug @@ -76,7 +76,7 @@ OnlyExplicitInline - ..\..\..\src\element\RockingBC;..\..\..\src\element\mixedBeamColumn;..\..\..\src\element\tetrahedron;..\..\..\src\domain\pattern;..\..\..\src\element\catenaryCable;..\..\..\src\recorder;..\..\..\src\analysis\integrator;..\..\..\src\analysis\algorithm;..\..\..\src\domain\region;..\..\..\src\element\triangle;..\..\..\src\element\PFEMElement;..\..\..\other\tetgen1.4.3;..\..\..\src\analysis\analysis;..\..\..\other\triangle;..\..\..\src\element\HUelements;..\..\..\src\material\nD\UWmaterials;..\..\..\src\element\UWelements;..\..\..\src\tagged\storage;..\..\..\src\element\frictionBearing\frictionModel;..\..\..\src\element\frictionBearing;..\..\..\src\element\adapter;..\..\..\src\element\elastomericBearing;..\..\..\src\element\twoNodeLink;..\..\..\src\api;..\..\..\src\actor\message;..\..\..\src\element\generic;..\..\..\src\material\section\fiber;..\..\..\src\element\dispBeamColumnInt;..\..\..\src\element\UP_ucdavis;..\..\..\src\element\UP-ucsd;..\..\..\src\package;..\..\..\src\damage;..\..\..\src\element\TotalLagrangianFD20NodeBrick;..\..\..\src\element\27nbrick;..\..\..\src\element\upU;..\..\..\src\element\dispBeamColumn;..\..\..\src\element\brick;..\..\..\src\element\shell;..\..\..\src\element\8nbrick;..\..\..\src\recorder\response;..\..\..\src\element\nonlinearBeamColumn\quadRule;..\..\..\src\material\nD;..\..\..\src\element\fourNodeQuad;..\..\..\src\element\damper;..\..\..\src\coordTransformation;..\..\..\src\element\beamWithHinges;..\..\..\src\element\nonlinearBeamColumn\matrixutil;..\..\..\src\element\zeroLength;..\..\..\src\modelbuilder;..\..\..\src\modelbuilder\tcl;..\..\..\src\element\feap;..\..\..\src\handler;..\..\..\src\element;..\..\..\src\element\truss;..\..\..\src\material\section;..\..\..\src\element\beam3d;..\..\..\src\element\beam2d;..\..\..\src\material;..\..\..\src\material\uniaxial;..\..\..\src\actor\objectBroker;..\..\..\src\matrix;..\..\..\src\domain\load;..\..\..\src\renderer;..\..\..\src\actor\channel;..\..\..\src\domain\node;..\..\..\src\actor\actor;..\..\..\src\tagged;..\..\..\src\domain\component;..\..\..\src;..\..\..\src\domain\domain;..\..\..\src\material\nd\template3dep;..\..\..\src\nDarray;..\..\..\src\element\20nbrick;..\..\..\src\element\elasticBeamColumn;..\..\..\src\element\joint;..\..\..\src\domain\constraints;..\..\..\src\element\updatedLagrangianBeamColumn;..\..\..\src\material\yieldSurface\yieldSurfaceBC;..\..\..\src\material\yieldSurface\evolution;..\..\..\src\element\forceBeamColumn;..\..\..\src\element\nonlinearBeamColumn\element;..\..\..\src\element\nonlinearBeamColumn\matrixUtil;c:\Program Files (x86)\tcl;c:\Program Files (x86)\tcl\include;%(AdditionalIncludeDirectories) + ..\..\..\src\element\RockingBC;..\..\..\src\element\CEqElement;..\..\..\src\element\mixedBeamColumn;..\..\..\src\element\tetrahedron;..\..\..\src\domain\pattern;..\..\..\src\element\catenaryCable;..\..\..\src\recorder;..\..\..\src\analysis\integrator;..\..\..\src\analysis\algorithm;..\..\..\src\domain\region;..\..\..\src\element\triangle;..\..\..\src\element\PFEMElement;..\..\..\other\tetgen1.4.3;..\..\..\src\analysis\analysis;..\..\..\other\triangle;..\..\..\src\element\HUelements;..\..\..\src\material\nD\UWmaterials;..\..\..\src\element\UWelements;..\..\..\src\tagged\storage;..\..\..\src\element\frictionBearing\frictionModel;..\..\..\src\element\frictionBearing;..\..\..\src\element\adapter;..\..\..\src\element\elastomericBearing;..\..\..\src\element\twoNodeLink;..\..\..\src\api;..\..\..\src\actor\message;..\..\..\src\element\generic;..\..\..\src\material\section\fiber;..\..\..\src\element\dispBeamColumnInt;..\..\..\src\element\UP_ucdavis;..\..\..\src\element\UP-ucsd;..\..\..\src\package;..\..\..\src\damage;..\..\..\src\element\TotalLagrangianFD20NodeBrick;..\..\..\src\element\27nbrick;..\..\..\src\element\upU;..\..\..\src\element\dispBeamColumn;..\..\..\src\element\brick;..\..\..\src\element\shell;..\..\..\src\element\8nbrick;..\..\..\src\recorder\response;..\..\..\src\element\nonlinearBeamColumn\quadRule;..\..\..\src\material\nD;..\..\..\src\element\fourNodeQuad;..\..\..\src\element\damper;..\..\..\src\coordTransformation;..\..\..\src\element\beamWithHinges;..\..\..\src\element\nonlinearBeamColumn\matrixutil;..\..\..\src\element\zeroLength;..\..\..\src\modelbuilder;..\..\..\src\modelbuilder\tcl;..\..\..\src\element\feap;..\..\..\src\handler;..\..\..\src\element;..\..\..\src\element\truss;..\..\..\src\material\section;..\..\..\src\element\beam3d;..\..\..\src\element\beam2d;..\..\..\src\material;..\..\..\src\material\uniaxial;..\..\..\src\actor\objectBroker;..\..\..\src\matrix;..\..\..\src\domain\load;..\..\..\src\renderer;..\..\..\src\actor\channel;..\..\..\src\domain\node;..\..\..\src\actor\actor;..\..\..\src\tagged;..\..\..\src\domain\component;..\..\..\src;..\..\..\src\domain\domain;..\..\..\src\material\nd\template3dep;..\..\..\src\nDarray;..\..\..\src\element\20nbrick;..\..\..\src\element\elasticBeamColumn;..\..\..\src\element\joint;..\..\..\src\domain\constraints;..\..\..\src\element\updatedLagrangianBeamColumn;..\..\..\src\material\yieldSurface\yieldSurfaceBC;..\..\..\src\material\yieldSurface\evolution;..\..\..\src\element\forceBeamColumn;..\..\..\src\element\nonlinearBeamColumn\element;..\..\..\src\element\nonlinearBeamColumn\matrixUtil;c:\Program Files (x86)\tcl;c:\Program Files (x86)\tcl\include;%(AdditionalIncludeDirectories) NDEBUG;WIN32;_LIB;_WGL;_TCL85;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) true MultiThreaded @@ -108,6 +108,7 @@ + @@ -379,6 +380,7 @@ + diff --git a/Win32/proj/element/element.vcxproj.filters b/Win32/proj/element/element.vcxproj.filters index a085fee5e..6aedc5235 100644 --- a/Win32/proj/element/element.vcxproj.filters +++ b/Win32/proj/element/element.vcxproj.filters @@ -129,6 +129,9 @@ {91ebcb15-2aac-4ce7-ad6a-0b8c7b83b286} + + {0e9b8d94-5562-43c8-a721-4ab2cc9c0edf} + {b9971b16-c2ff-443f-ab28-9022482c25ed} @@ -920,6 +923,9 @@ RockingBC + + CEqElement + elasticBeamColumn @@ -1651,6 +1657,9 @@ RockingBC + + CEqElement + elasticBeamColumn diff --git a/Win64/proj/element/element.vcxproj b/Win64/proj/element/element.vcxproj index c3087c05a..0d464e9f3 100644 --- a/Win64/proj/element/element.vcxproj +++ b/Win64/proj/element/element.vcxproj @@ -75,7 +75,7 @@ Disabled - ..\..\..\src\element\mixedBeamColumn;..\..\..\src\element\RockingBC;..\..\..\src\element\mixedBeamColumn;..\..\..\src\element\tetrahedron;..\..\..\src\domain\pattern;..\..\..\src\element\catenaryCable;..\..\..\src\recorder;..\..\..\src\analysis\integrator;..\..\..\src\analysis\algorithm;..\..\..\src\domain\region;..\..\..\src\element\triangle;..\..\..\src\element\PFEMElement;..\..\..\other\tetgen1.4.3;..\..\..\src\analysis\analysis;..\..\..\other\triangle;..\..\..\src\element\HUelements;..\..\..\src\material\nD\UWmaterials;..\..\..\src\element\UWelements;..\..\..\src\tagged\storage;..\..\..\src\element\frictionBearing\frictionModel;..\..\..\src\element\frictionBearing;..\..\..\src\element\adapter;..\..\..\src\element\elastomericBearing;..\..\..\src\element\twoNodeLink;..\..\..\src\api;..\..\..\src\actor\message;..\..\..\src\element\generic;..\..\..\src\material\section\fiber;..\..\..\src\element\dispBeamColumnInt;..\..\..\src\element\UP_ucdavis;..\..\..\src\element\UP-ucsd;..\..\..\src\package;..\..\..\src\damage;..\..\..\src\element\TotalLagrangianFD20NodeBrick;..\..\..\src\element\27nbrick;..\..\..\src\element\upU;..\..\..\src\element\dispBeamColumn;..\..\..\src\element\brick;..\..\..\src\element\shell;..\..\..\src\element\8nbrick;..\..\..\src\recorder\response;..\..\..\src\element\nonlinearBeamColumn\quadRule;..\..\..\src\material\nD;..\..\..\src\element\fourNodeQuad;..\..\..\src\element\damper;..\..\..\src\coordTransformation;..\..\..\src\element\beamWithHinges;..\..\..\src\element\nonlinearBeamColumn\matrixutil;..\..\..\src\element\zeroLength;..\..\..\src\modelbuilder;..\..\..\src\modelbuilder\tcl;..\..\..\src\element\feap;..\..\..\src\handler;..\..\..\src\element;..\..\..\src\element\truss;..\..\..\src\material\section;..\..\..\src\element\beam3d;..\..\..\src\element\beam2d;..\..\..\src\material;..\..\..\src\material\uniaxial;..\..\..\src\actor\objectBroker;..\..\..\src\matrix;..\..\..\src\domain\load;..\..\..\src\renderer;..\..\..\src\actor\channel;..\..\..\src\domain\node;..\..\..\src\actor\actor;..\..\..\src\tagged;..\..\..\src\domain\component;..\..\..\src;..\..\..\src\domain\domain;..\..\..\src\material\nd\template3dep;..\..\..\src\nDarray;..\..\..\src\element\20nbrick;..\..\..\src\element\elasticBeamColumn;..\..\..\src\element\joint;..\..\..\src\domain\constraints;..\..\..\src\element\updatedLagrangianBeamColumn;..\..\..\src\material\yieldSurface\yieldSurfaceBC;..\..\..\src\material\yieldSurface\evolution;..\..\..\src\element\forceBeamColumn;..\..\..\src\element\nonlinearBeamColumn\element;..\..\..\src\element\nonlinearBeamColumn\matrixUtil;c:\Program Files\tcl;c:\Program Files\tcl\include;%(AdditionalIncludeDirectories) + ..\..\..\src\element\mixedBeamColumn;..\..\..\src\element\RockingBC;..\..\..\src\element\CEqElement;..\..\..\src\element\mixedBeamColumn;..\..\..\src\element\tetrahedron;..\..\..\src\domain\pattern;..\..\..\src\element\catenaryCable;..\..\..\src\recorder;..\..\..\src\analysis\integrator;..\..\..\src\analysis\algorithm;..\..\..\src\domain\region;..\..\..\src\element\triangle;..\..\..\src\element\PFEMElement;..\..\..\other\tetgen1.4.3;..\..\..\src\analysis\analysis;..\..\..\other\triangle;..\..\..\src\element\HUelements;..\..\..\src\material\nD\UWmaterials;..\..\..\src\element\UWelements;..\..\..\src\tagged\storage;..\..\..\src\element\frictionBearing\frictionModel;..\..\..\src\element\frictionBearing;..\..\..\src\element\adapter;..\..\..\src\element\elastomericBearing;..\..\..\src\element\twoNodeLink;..\..\..\src\api;..\..\..\src\actor\message;..\..\..\src\element\generic;..\..\..\src\material\section\fiber;..\..\..\src\element\dispBeamColumnInt;..\..\..\src\element\UP_ucdavis;..\..\..\src\element\UP-ucsd;..\..\..\src\package;..\..\..\src\damage;..\..\..\src\element\TotalLagrangianFD20NodeBrick;..\..\..\src\element\27nbrick;..\..\..\src\element\upU;..\..\..\src\element\dispBeamColumn;..\..\..\src\element\brick;..\..\..\src\element\shell;..\..\..\src\element\8nbrick;..\..\..\src\recorder\response;..\..\..\src\element\nonlinearBeamColumn\quadRule;..\..\..\src\material\nD;..\..\..\src\element\fourNodeQuad;..\..\..\src\element\damper;..\..\..\src\coordTransformation;..\..\..\src\element\beamWithHinges;..\..\..\src\element\nonlinearBeamColumn\matrixutil;..\..\..\src\element\zeroLength;..\..\..\src\modelbuilder;..\..\..\src\modelbuilder\tcl;..\..\..\src\element\feap;..\..\..\src\handler;..\..\..\src\element;..\..\..\src\element\truss;..\..\..\src\material\section;..\..\..\src\element\beam3d;..\..\..\src\element\beam2d;..\..\..\src\material;..\..\..\src\material\uniaxial;..\..\..\src\actor\objectBroker;..\..\..\src\matrix;..\..\..\src\domain\load;..\..\..\src\renderer;..\..\..\src\actor\channel;..\..\..\src\domain\node;..\..\..\src\actor\actor;..\..\..\src\tagged;..\..\..\src\domain\component;..\..\..\src;..\..\..\src\domain\domain;..\..\..\src\material\nd\template3dep;..\..\..\src\nDarray;..\..\..\src\element\20nbrick;..\..\..\src\element\elasticBeamColumn;..\..\..\src\element\joint;..\..\..\src\domain\constraints;..\..\..\src\element\updatedLagrangianBeamColumn;..\..\..\src\material\yieldSurface\yieldSurfaceBC;..\..\..\src\material\yieldSurface\evolution;..\..\..\src\element\forceBeamColumn;..\..\..\src\element\nonlinearBeamColumn\element;..\..\..\src\element\nonlinearBeamColumn\matrixUtil;c:\Program Files\tcl;c:\Program Files\tcl\include;%(AdditionalIncludeDirectories) _DEBUG;WIN32;_LIB;_WGL;_TCL85;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions);_HAVE_PML_;_HAVE_PML EnableFastChecks MultiThreadedDebug @@ -104,7 +104,7 @@ Disabled - ..\..\..\src\element\mixedBeamColumn;..\..\..\src\element\RockingBC;..\..\..\src\element\tetrahedron;..\..\..\src\domain\pattern;..\..\..\src\element\catenaryCable;..\..\..\src\recorder;..\..\..\src\analysis\integrator;..\..\..\src\analysis\algorithm;..\..\..\src\domain\region;..\..\..\src\element\triangle;..\..\..\src\element\PFEMElement;..\..\..\other\tetgen1.4.3;..\..\..\src\analysis\analysis;..\..\..\other\triangle;..\..\..\src\element\HUelements;..\..\..\src\material\nD\UWmaterials;..\..\..\src\element\UWelements;..\..\..\src\tagged\storage;..\..\..\src\element\frictionBearing\frictionModel;..\..\..\src\element\frictionBearing;..\..\..\src\element\adapter;..\..\..\src\element\elastomericBearing;..\..\..\src\element\twoNodeLink;..\..\..\src\api;..\..\..\src\actor\message;..\..\..\src\element\generic;..\..\..\src\material\section\fiber;..\..\..\src\element\dispBeamColumnInt;..\..\..\src\element\UP_ucdavis;..\..\..\src\element\UP-ucsd;..\..\..\src\package;..\..\..\src\damage;..\..\..\src\element\TotalLagrangianFD20NodeBrick;..\..\..\src\element\27nbrick;..\..\..\src\element\upU;..\..\..\src\element\dispBeamColumn;..\..\..\src\element\brick;..\..\..\src\element\shell;..\..\..\src\element\8nbrick;..\..\..\src\recorder\response;..\..\..\src\element\nonlinearBeamColumn\quadRule;..\..\..\src\material\nD;..\..\..\src\element\fourNodeQuad;..\..\..\src\element\damper;..\..\..\src\coordTransformation;..\..\..\src\element\beamWithHinges;..\..\..\src\element\nonlinearBeamColumn\matrixutil;..\..\..\src\element\zeroLength;..\..\..\src\modelbuilder;..\..\..\src\modelbuilder\tcl;..\..\..\src\element\feap;..\..\..\src\handler;..\..\..\src\element;..\..\..\src\element\truss;..\..\..\src\material\section;..\..\..\src\element\beam3d;..\..\..\src\element\beam2d;..\..\..\src\material;..\..\..\src\material\uniaxial;..\..\..\src\actor\objectBroker;..\..\..\src\matrix;..\..\..\src\domain\load;..\..\..\src\renderer;..\..\..\src\actor\channel;..\..\..\src\domain\node;..\..\..\src\actor\actor;..\..\..\src\tagged;..\..\..\src\domain\component;..\..\..\src;..\..\..\src\domain\domain;..\..\..\src\material\nd\template3dep;..\..\..\src\nDarray;..\..\..\src\element\20nbrick;..\..\..\src\element\elasticBeamColumn;..\..\..\src\element\joint;..\..\..\src\domain\constraints;..\..\..\src\element\updatedLagrangianBeamColumn;..\..\..\src\material\yieldSurface\yieldSurfaceBC;..\..\..\src\material\yieldSurface\evolution;..\..\..\src\element\forceBeamColumn;..\..\..\src\element\nonlinearBeamColumn\element;..\..\..\src\element\nonlinearBeamColumn\matrixUtil;c:\Program Files\tcl;c:\Program Files\tcl\include;%(AdditionalIncludeDirectories) + ..\..\..\src\element\mixedBeamColumn;..\..\..\src\element\RockingBC;..\..\..\src\element\CEqElement;..\..\..\src\element\tetrahedron;..\..\..\src\domain\pattern;..\..\..\src\element\catenaryCable;..\..\..\src\recorder;..\..\..\src\analysis\integrator;..\..\..\src\analysis\algorithm;..\..\..\src\domain\region;..\..\..\src\element\triangle;..\..\..\src\element\PFEMElement;..\..\..\other\tetgen1.4.3;..\..\..\src\analysis\analysis;..\..\..\other\triangle;..\..\..\src\element\HUelements;..\..\..\src\material\nD\UWmaterials;..\..\..\src\element\UWelements;..\..\..\src\tagged\storage;..\..\..\src\element\frictionBearing\frictionModel;..\..\..\src\element\frictionBearing;..\..\..\src\element\adapter;..\..\..\src\element\elastomericBearing;..\..\..\src\element\twoNodeLink;..\..\..\src\api;..\..\..\src\actor\message;..\..\..\src\element\generic;..\..\..\src\material\section\fiber;..\..\..\src\element\dispBeamColumnInt;..\..\..\src\element\UP_ucdavis;..\..\..\src\element\UP-ucsd;..\..\..\src\package;..\..\..\src\damage;..\..\..\src\element\TotalLagrangianFD20NodeBrick;..\..\..\src\element\27nbrick;..\..\..\src\element\upU;..\..\..\src\element\dispBeamColumn;..\..\..\src\element\brick;..\..\..\src\element\shell;..\..\..\src\element\8nbrick;..\..\..\src\recorder\response;..\..\..\src\element\nonlinearBeamColumn\quadRule;..\..\..\src\material\nD;..\..\..\src\element\fourNodeQuad;..\..\..\src\element\damper;..\..\..\src\coordTransformation;..\..\..\src\element\beamWithHinges;..\..\..\src\element\nonlinearBeamColumn\matrixutil;..\..\..\src\element\zeroLength;..\..\..\src\modelbuilder;..\..\..\src\modelbuilder\tcl;..\..\..\src\element\feap;..\..\..\src\handler;..\..\..\src\element;..\..\..\src\element\truss;..\..\..\src\material\section;..\..\..\src\element\beam3d;..\..\..\src\element\beam2d;..\..\..\src\material;..\..\..\src\material\uniaxial;..\..\..\src\actor\objectBroker;..\..\..\src\matrix;..\..\..\src\domain\load;..\..\..\src\renderer;..\..\..\src\actor\channel;..\..\..\src\domain\node;..\..\..\src\actor\actor;..\..\..\src\tagged;..\..\..\src\domain\component;..\..\..\src;..\..\..\src\domain\domain;..\..\..\src\material\nd\template3dep;..\..\..\src\nDarray;..\..\..\src\element\20nbrick;..\..\..\src\element\elasticBeamColumn;..\..\..\src\element\joint;..\..\..\src\domain\constraints;..\..\..\src\element\updatedLagrangianBeamColumn;..\..\..\src\material\yieldSurface\yieldSurfaceBC;..\..\..\src\material\yieldSurface\evolution;..\..\..\src\element\forceBeamColumn;..\..\..\src\element\nonlinearBeamColumn\element;..\..\..\src\element\nonlinearBeamColumn\matrixUtil;c:\Program Files\tcl;c:\Program Files\tcl\include;%(AdditionalIncludeDirectories) _DEBUG;WIN32;_LIB;_WGL;_TCL85;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions);_HAVE_PML_;_HAVE_PML EnableFastChecks MultiThreadedDebugDLL @@ -133,7 +133,7 @@ OnlyExplicitInline - ..\..\..\src\element\mixedBeamColumn;..\..\..\src\element\RockingBC;..\..\..\src\element\mixedBeamColumn;..\..\..\src\element\tetrahedron;..\..\..\src\domain\pattern;..\..\..\src\element\catenaryCable;..\..\..\src\recorder;..\..\..\src\analysis\integrator;..\..\..\src\analysis\algorithm;..\..\..\src\domain\region;..\..\..\src\element\triangle;..\..\..\src\element\PFEMElement;..\..\..\other\tetgen1.4.3;..\..\..\src\analysis\analysis;..\..\..\other\triangle;..\..\..\src\element\HUelements;..\..\..\src\material\nD\UWmaterials;..\..\..\src\element\UWelements;..\..\..\src\tagged\storage;..\..\..\src\element\frictionBearing\frictionModel;..\..\..\src\element\frictionBearing;..\..\..\src\element\adapter;..\..\..\src\element\elastomericBearing;..\..\..\src\element\twoNodeLink;..\..\..\src\api;..\..\..\src\actor\message;..\..\..\src\element\generic;..\..\..\src\material\section\fiber;..\..\..\src\element\dispBeamColumnInt;..\..\..\src\element\UP_ucdavis;..\..\..\src\element\UP-ucsd;..\..\..\src\package;..\..\..\src\damage;..\..\..\src\element\TotalLagrangianFD20NodeBrick;..\..\..\src\element\27nbrick;..\..\..\src\element\upU;..\..\..\src\element\dispBeamColumn;..\..\..\src\element\brick;..\..\..\src\element\shell;..\..\..\src\element\8nbrick;..\..\..\src\recorder\response;..\..\..\src\element\nonlinearBeamColumn\quadRule;..\..\..\src\material\nD;..\..\..\src\element\fourNodeQuad;..\..\..\src\element\damper;..\..\..\src\coordTransformation;..\..\..\src\element\beamWithHinges;..\..\..\src\element\nonlinearBeamColumn\matrixutil;..\..\..\src\element\zeroLength;..\..\..\src\modelbuilder;..\..\..\src\modelbuilder\tcl;..\..\..\src\element\feap;..\..\..\src\handler;..\..\..\src\element;..\..\..\src\element\truss;..\..\..\src\material\section;..\..\..\src\element\beam3d;..\..\..\src\element\beam2d;..\..\..\src\material;..\..\..\src\material\uniaxial;..\..\..\src\actor\objectBroker;..\..\..\src\matrix;..\..\..\src\domain\load;..\..\..\src\renderer;..\..\..\src\actor\channel;..\..\..\src\domain\node;..\..\..\src\actor\actor;..\..\..\src\tagged;..\..\..\src\domain\component;..\..\..\src;..\..\..\src\domain\domain;..\..\..\src\material\nd\template3dep;..\..\..\src\nDarray;..\..\..\src\element\20nbrick;..\..\..\src\element\elasticBeamColumn;..\..\..\src\element\joint;..\..\..\src\domain\constraints;..\..\..\src\element\updatedLagrangianBeamColumn;..\..\..\src\material\yieldSurface\yieldSurfaceBC;..\..\..\src\material\yieldSurface\evolution;..\..\..\src\element\forceBeamColumn;..\..\..\src\element\nonlinearBeamColumn\element;..\..\..\src\element\nonlinearBeamColumn\matrixUtil;c:\Program Files\tcl;c:\Program Files\tcl\include;%(AdditionalIncludeDirectories) + ..\..\..\src\element\mixedBeamColumn;..\..\..\src\element\RockingBC;..\..\..\src\element\CEqElement;..\..\..\src\element\mixedBeamColumn;..\..\..\src\element\tetrahedron;..\..\..\src\domain\pattern;..\..\..\src\element\catenaryCable;..\..\..\src\recorder;..\..\..\src\analysis\integrator;..\..\..\src\analysis\algorithm;..\..\..\src\domain\region;..\..\..\src\element\triangle;..\..\..\src\element\PFEMElement;..\..\..\other\tetgen1.4.3;..\..\..\src\analysis\analysis;..\..\..\other\triangle;..\..\..\src\element\HUelements;..\..\..\src\material\nD\UWmaterials;..\..\..\src\element\UWelements;..\..\..\src\tagged\storage;..\..\..\src\element\frictionBearing\frictionModel;..\..\..\src\element\frictionBearing;..\..\..\src\element\adapter;..\..\..\src\element\elastomericBearing;..\..\..\src\element\twoNodeLink;..\..\..\src\api;..\..\..\src\actor\message;..\..\..\src\element\generic;..\..\..\src\material\section\fiber;..\..\..\src\element\dispBeamColumnInt;..\..\..\src\element\UP_ucdavis;..\..\..\src\element\UP-ucsd;..\..\..\src\package;..\..\..\src\damage;..\..\..\src\element\TotalLagrangianFD20NodeBrick;..\..\..\src\element\27nbrick;..\..\..\src\element\upU;..\..\..\src\element\dispBeamColumn;..\..\..\src\element\brick;..\..\..\src\element\shell;..\..\..\src\element\8nbrick;..\..\..\src\recorder\response;..\..\..\src\element\nonlinearBeamColumn\quadRule;..\..\..\src\material\nD;..\..\..\src\element\fourNodeQuad;..\..\..\src\element\damper;..\..\..\src\coordTransformation;..\..\..\src\element\beamWithHinges;..\..\..\src\element\nonlinearBeamColumn\matrixutil;..\..\..\src\element\zeroLength;..\..\..\src\modelbuilder;..\..\..\src\modelbuilder\tcl;..\..\..\src\element\feap;..\..\..\src\handler;..\..\..\src\element;..\..\..\src\element\truss;..\..\..\src\material\section;..\..\..\src\element\beam3d;..\..\..\src\element\beam2d;..\..\..\src\material;..\..\..\src\material\uniaxial;..\..\..\src\actor\objectBroker;..\..\..\src\matrix;..\..\..\src\domain\load;..\..\..\src\renderer;..\..\..\src\actor\channel;..\..\..\src\domain\node;..\..\..\src\actor\actor;..\..\..\src\tagged;..\..\..\src\domain\component;..\..\..\src;..\..\..\src\domain\domain;..\..\..\src\material\nd\template3dep;..\..\..\src\nDarray;..\..\..\src\element\20nbrick;..\..\..\src\element\elasticBeamColumn;..\..\..\src\element\joint;..\..\..\src\domain\constraints;..\..\..\src\element\updatedLagrangianBeamColumn;..\..\..\src\material\yieldSurface\yieldSurfaceBC;..\..\..\src\material\yieldSurface\evolution;..\..\..\src\element\forceBeamColumn;..\..\..\src\element\nonlinearBeamColumn\element;..\..\..\src\element\nonlinearBeamColumn\matrixUtil;c:\Program Files\tcl;c:\Program Files\tcl\include;%(AdditionalIncludeDirectories) NDEBUG;WIN32;_LIB;_WGL;_TCL85;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions);_HAVE_PML_;_HAVE_PML true MultiThreaded @@ -161,7 +161,7 @@ OnlyExplicitInline - ..\..\..\src\element\mixedBeamColumn;..\..\..\src\element\RockingBC;..\..\..\src\element\tetrahedron;..\..\..\src\domain\pattern;..\..\..\src\element\catenaryCable;..\..\..\src\recorder;..\..\..\src\analysis\integrator;..\..\..\src\analysis\algorithm;..\..\..\src\domain\region;..\..\..\src\element\triangle;..\..\..\src\element\PFEMElement;..\..\..\other\tetgen1.4.3;..\..\..\src\analysis\analysis;..\..\..\other\triangle;..\..\..\src\element\HUelements;..\..\..\src\material\nD\UWmaterials;..\..\..\src\element\UWelements;..\..\..\src\tagged\storage;..\..\..\src\element\frictionBearing\frictionModel;..\..\..\src\element\frictionBearing;..\..\..\src\element\adapter;..\..\..\src\element\elastomericBearing;..\..\..\src\element\twoNodeLink;..\..\..\src\api;..\..\..\src\actor\message;..\..\..\src\element\generic;..\..\..\src\material\section\fiber;..\..\..\src\element\dispBeamColumnInt;..\..\..\src\element\UP_ucdavis;..\..\..\src\element\UP-ucsd;..\..\..\src\package;..\..\..\src\damage;..\..\..\src\element\TotalLagrangianFD20NodeBrick;..\..\..\src\element\27nbrick;..\..\..\src\element\upU;..\..\..\src\element\dispBeamColumn;..\..\..\src\element\brick;..\..\..\src\element\shell;..\..\..\src\element\8nbrick;..\..\..\src\recorder\response;..\..\..\src\element\nonlinearBeamColumn\quadRule;..\..\..\src\material\nD;..\..\..\src\element\fourNodeQuad;..\..\..\src\element\damper;..\..\..\src\coordTransformation;..\..\..\src\element\beamWithHinges;..\..\..\src\element\nonlinearBeamColumn\matrixutil;..\..\..\src\element\zeroLength;..\..\..\src\modelbuilder;..\..\..\src\modelbuilder\tcl;..\..\..\src\element\feap;..\..\..\src\handler;..\..\..\src\element;..\..\..\src\element\truss;..\..\..\src\material\section;..\..\..\src\element\beam3d;..\..\..\src\element\beam2d;..\..\..\src\material;..\..\..\src\material\uniaxial;..\..\..\src\actor\objectBroker;..\..\..\src\matrix;..\..\..\src\domain\load;..\..\..\src\renderer;..\..\..\src\actor\channel;..\..\..\src\domain\node;..\..\..\src\actor\actor;..\..\..\src\tagged;..\..\..\src\domain\component;..\..\..\src;..\..\..\src\domain\domain;..\..\..\src\material\nd\template3dep;..\..\..\src\nDarray;..\..\..\src\element\20nbrick;..\..\..\src\element\elasticBeamColumn;..\..\..\src\element\joint;..\..\..\src\domain\constraints;..\..\..\src\element\updatedLagrangianBeamColumn;..\..\..\src\material\yieldSurface\yieldSurfaceBC;..\..\..\src\material\yieldSurface\evolution;..\..\..\src\element\forceBeamColumn;..\..\..\src\element\nonlinearBeamColumn\element;..\..\..\src\element\nonlinearBeamColumn\matrixUtil;c:\Program Files\tcl;c:\Program Files\tcl\include;%(AdditionalIncludeDirectories) + ..\..\..\src\element\mixedBeamColumn;..\..\..\src\element\RockingBC;..\..\..\src\element\CEqElement;..\..\..\src\element\tetrahedron;..\..\..\src\domain\pattern;..\..\..\src\element\catenaryCable;..\..\..\src\recorder;..\..\..\src\analysis\integrator;..\..\..\src\analysis\algorithm;..\..\..\src\domain\region;..\..\..\src\element\triangle;..\..\..\src\element\PFEMElement;..\..\..\other\tetgen1.4.3;..\..\..\src\analysis\analysis;..\..\..\other\triangle;..\..\..\src\element\HUelements;..\..\..\src\material\nD\UWmaterials;..\..\..\src\element\UWelements;..\..\..\src\tagged\storage;..\..\..\src\element\frictionBearing\frictionModel;..\..\..\src\element\frictionBearing;..\..\..\src\element\adapter;..\..\..\src\element\elastomericBearing;..\..\..\src\element\twoNodeLink;..\..\..\src\api;..\..\..\src\actor\message;..\..\..\src\element\generic;..\..\..\src\material\section\fiber;..\..\..\src\element\dispBeamColumnInt;..\..\..\src\element\UP_ucdavis;..\..\..\src\element\UP-ucsd;..\..\..\src\package;..\..\..\src\damage;..\..\..\src\element\TotalLagrangianFD20NodeBrick;..\..\..\src\element\27nbrick;..\..\..\src\element\upU;..\..\..\src\element\dispBeamColumn;..\..\..\src\element\brick;..\..\..\src\element\shell;..\..\..\src\element\8nbrick;..\..\..\src\recorder\response;..\..\..\src\element\nonlinearBeamColumn\quadRule;..\..\..\src\material\nD;..\..\..\src\element\fourNodeQuad;..\..\..\src\element\damper;..\..\..\src\coordTransformation;..\..\..\src\element\beamWithHinges;..\..\..\src\element\nonlinearBeamColumn\matrixutil;..\..\..\src\element\zeroLength;..\..\..\src\modelbuilder;..\..\..\src\modelbuilder\tcl;..\..\..\src\element\feap;..\..\..\src\handler;..\..\..\src\element;..\..\..\src\element\truss;..\..\..\src\material\section;..\..\..\src\element\beam3d;..\..\..\src\element\beam2d;..\..\..\src\material;..\..\..\src\material\uniaxial;..\..\..\src\actor\objectBroker;..\..\..\src\matrix;..\..\..\src\domain\load;..\..\..\src\renderer;..\..\..\src\actor\channel;..\..\..\src\domain\node;..\..\..\src\actor\actor;..\..\..\src\tagged;..\..\..\src\domain\component;..\..\..\src;..\..\..\src\domain\domain;..\..\..\src\material\nd\template3dep;..\..\..\src\nDarray;..\..\..\src\element\20nbrick;..\..\..\src\element\elasticBeamColumn;..\..\..\src\element\joint;..\..\..\src\domain\constraints;..\..\..\src\element\updatedLagrangianBeamColumn;..\..\..\src\material\yieldSurface\yieldSurfaceBC;..\..\..\src\material\yieldSurface\evolution;..\..\..\src\element\forceBeamColumn;..\..\..\src\element\nonlinearBeamColumn\element;..\..\..\src\element\nonlinearBeamColumn\matrixUtil;c:\Program Files\tcl;c:\Program Files\tcl\include;%(AdditionalIncludeDirectories) NDEBUG;WIN32;_LIB;_WGL;_TCL85;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions);_HAVE_PML_;_HAVE_PML true MultiThreadedDLL @@ -194,6 +194,7 @@ + @@ -477,6 +478,7 @@ + diff --git a/Win64/proj/element/element.vcxproj.filters b/Win64/proj/element/element.vcxproj.filters index 5f1542849..ce1eb5a32 100644 --- a/Win64/proj/element/element.vcxproj.filters +++ b/Win64/proj/element/element.vcxproj.filters @@ -135,6 +135,9 @@ {61bce605-5c0a-4311-b059-28f47dbe6364} + + {44a1f5d6-7e75-44f5-a5a5-b79b65801b24} + @@ -932,6 +935,9 @@ RockingBC + + CEqElement + crdTransf @@ -1693,6 +1699,9 @@ RockingBC + + CEqElement + crdTransf diff --git a/Win64/proj/material/material.vcxproj b/Win64/proj/material/material.vcxproj index d60bcec0f..dcaf0a307 100644 --- a/Win64/proj/material/material.vcxproj +++ b/Win64/proj/material/material.vcxproj @@ -221,9 +221,6 @@ - - - @@ -344,6 +341,7 @@ + @@ -369,6 +367,7 @@ + @@ -647,9 +646,6 @@ - - - @@ -788,6 +784,7 @@ + diff --git a/Win64/proj/material/material.vcxproj.filters b/Win64/proj/material/material.vcxproj.filters index b7a9529b3..17327347c 100644 --- a/Win64/proj/material/material.vcxproj.filters +++ b/Win64/proj/material/material.vcxproj.filters @@ -1256,15 +1256,6 @@ nD - - nD\stressDensityModel - - - nD\stressDensityModel - - - nD\stressDensityModel - nD\UWmaterials @@ -1370,6 +1361,9 @@ section + + uniaxial + uniaxial @@ -1385,6 +1379,9 @@ uniaxial + + uniaxial\py_tz_qz + @@ -2465,15 +2462,6 @@ nD - - nD\stressDensityModel - - - nD\stressDensityModel - - - nD\stressDensityModel - nD\UWmaterials @@ -2576,5 +2564,8 @@ section + + uniaxial + \ No newline at end of file