User Subroutine Extensions¶
FrontISTR मुख्य source code में परिवर्तन किए बिना functionality बढ़ाने के लिए user subroutines का एक समूह प्रदान करता है। इनमें constitutive laws के user implementations और user-defined external loads का integration शामिल है। यह अध्याय उपलब्ध extension points और analysis control file में प्रत्येक को invoke करने के लिए प्रयुक्त keywords की सूची देता है। Subroutine arguments और rebuild procedures के विस्तृत विवरण के लिए User Subroutines (Coding Guide) देखें।
फ़ंक्शनों का अवलोकन¶
User-subroutine extension points को दो categories में बाँटा गया है: material constitutive laws और external loads। Constitutive-law पक्ष में चार invocation paths हैं—linear elasticity, hyperelasticity, elastoplasticity और general-purpose constitutive law—जिनमें से प्रत्येक स्वतंत्र keyword द्वारा सक्रिय होता है। External-load पक्ष में ऐसा path उपलब्ध है जो user द्वारा तैयार external file से load information पढ़ता है और उसे global load vector तथा residual vector में जोड़ता है। प्रत्येक extension FrontISTR distribution में शामिल template file को edit करने और main program को rebuild करने के बाद उपलब्ध होता है।
| Extension category | Analysis control keyword | मुख्य user subroutines | edit किया जाने वाला template |
|---|---|---|---|
| User linear elasticity | !ELASTIC, TYPE=USER |
uElasticMatrix, uElasticUpdate |
fistr1/src/lib/user/uelastic.f90 |
| User hyperelasticity | !HYPERELASTIC, TYPE=USER |
uElasticMatrix, uElasticUpdate |
fistr1/src/lib/user/uelastic.f90 |
| User elastoplasticity (yield function और return mapping) | !PLASTIC, YIELD=USER |
uElastoPlasticMatrix, uBackwardEuler, uElastoPlasticNumStatus |
fistr1/src/lib/user/uyield.f90 |
| General-purpose user constitutive law | !USER_MATERIAL |
uMatlMatrix, uUpdate |
fistr1/src/lib/user/umat.f90 |
| User-defined external load | !ULOAD, FILE=<fname> |
ureadload, uloading, uResidual |
fistr1/src/lib/user/uload.f90 |
User-defined hardening laws (ऐसा path जिसमें built-in yield function बना रहे और केवल hardening curve को user implementation से बदला जाए) समर्थित नहीं हैं। यदि user-defined hardening curve आवश्यक हो, तो !PLASTIC, YIELD=USER चुनें और पूरे elastoplastic constitutive law को user implementation से बदलें। User boundary conditions और restart के दौरान user processing के extension points समर्थित नहीं हैं।
!CREEP में TYPE=USER समर्थित नहीं है। Time-dependent constitutive law को user extension के रूप में लागू करने के लिए !USER_MATERIAL उपयोग करें।
User Constitutive Laws¶
User constitutive laws ऐसे stress-strain relationships लागू करने के लिए entry point प्रदान करते हैं जिन्हें built-in material models से व्यक्त नहीं किया जा सकता। संबंधित built-in constitutive-law framework के अनुसार चार paths उपलब्ध हैं: user linear elasticity, user hyperelasticity, user elastoplasticity और general-purpose user constitutive law। प्रत्येक path में analysis control data के !MATERIAL block के भीतर संबंधित keyword पर TYPE=USER या YIELD=USER निर्दिष्ट करें। अधिकतम 100 user constants दिए जा सकते हैं और वे subroutine को पास किए जाते हैं।
User Linear Elasticity¶
User linear elasticity वह path है जिसमें user infinitesimal-deformation framework के भीतर elastic matrix की गणना करता है। Analysis control data में !ELASTIC, TYPE=USER निर्दिष्ट होने पर FrontISTR इसे infinitesimal-deformation constitutive law मानता है और element stiffness calculation के दौरान uElasticMatrix (जो elastic matrix \(D\) लौटाता है) तथा stress update के दौरान uElasticUpdate (जो stress लौटाता है) को call करता है। इसे किसी मौजूदा hyperelastic या elastoplastic model के साथ उपयोग न करें।
User Hyperelasticity¶
User hyperelasticity large-deformation (Total Lagrange) framework में strain-energy function के derivatives से stress और tangent stiffness गणना करने का path है। Analysis control data में !HYPERELASTIC, TYPE=USER निर्दिष्ट करें। Call होने वाले subroutines user linear elasticity वाले ही uElasticMatrix और uElasticUpdate हैं, और वही fistr1/src/lib/user/uelastic.f90 template साझा किया जाता है। Keyword specification यह switch करता है कि FrontISTR implementation को infinitesimal deformation माने या Total Lagrange, इसलिए समान template को infinitesimal- और large-deformation implementations दोनों के लिए एक साथ उपयोग नहीं किया जा सकता। इसे इन दो constitutive laws में से एक के रूप में implement करें।
User Elastoplasticity¶
User elastoplasticity वह path है जिसमें user yield function और return-mapping procedure implement करता है। Analysis control data में !PLASTIC, YIELD=USER निर्दिष्ट करें। इससे built-in Mises, Mohr-Coulomb और Drucker-Prager yield functions से स्वतंत्र branch चुनी जाती है। Element stiffness calculation के दौरान uElastoPlasticMatrix (जो elastoplastic tangent stiffness \(D\) लौटाता है), stress update के दौरान uBackwardEuler (जो trial stress को true stress में map करके state variables update करता है), और Gauss-point initialization के दौरान uElastoPlasticNumStatus (जो retain किए जाने वाले real-valued state variables की संख्या लौटाता है) call होते हैं। केवल hardening curve को user implementation से बदलने वाला path समर्थित नहीं है। केवल user-defined hardening curve की आवश्यकता होने पर भी पूरे elastoplastic constitutive law को user implementation से बदलने के लिए यही path उपयोग करें।
General-Purpose User Constitutive Law¶
General-purpose user constitutive law उन constitutive laws को implement करने का path है जो elastic, hyperelastic या elastoplastic frameworks में फिट नहीं होते। Analysis control data में !USER_MATERIAL निर्दिष्ट करें। Default रूप से इसे Updated Lagrange framework में संभाला जाता है; KIRCHHOFF निर्दिष्ट होने पर इसे Total Lagrange के रूप में संभाला जाता है। State variables की संख्या NSTATUS द्वारा निर्दिष्ट होती है। Element stiffness calculation के दौरान uMatlMatrix (जो tangent stiffness \(D\) लौटाता है) और stress update के दौरान uUpdate (जो stress और state variables update करता है) call होते हैं।
User Constants और State Variables पास करना¶
!ELASTIC, TYPE=USER, !HYPERELASTIC, TYPE=USER और !USER_MATERIAL paths में analysis control data की data lines पर लिखे user constants (अधिकतम 100) matl argument द्वारा सीधे subroutine को पास होते हैं। !PLASTIC, YIELD=USER के लिए !ELASTIC द्वारा निर्दिष्ट elastic constants और !PLASTIC data lines से दिए user constants पास किए जाते हैं।
General-purpose user constitutive law और !PLASTIC, YIELD=USER में previous step की history information (जैसे plastic strain, back stress और damage) state variable fstat द्वारा user implementation को दी जा सकती है और step के अंत में वापस लिखी जा सकती है। State variables की संख्या general-purpose user constitutive law के लिए !USER_MATERIAL और उसके NSTATUS द्वारा, तथा !PLASTIC, YIELD=USER के लिए uElastoPlasticNumStatus के return value द्वारा निर्धारित होती है।
User-Defined External Loads¶
User-defined external loads ऐसे external forces परिभाषित करने का path देते हैं जिन्हें built-in concentrated loads, distributed loads या body forces से व्यक्त नहीं किया जा सकता। Analysis control data में !ULOAD, FILE=<fname> लिखे जाने पर FrontISTR specified file name को ureadload को देता है और user implementation द्वारा पढ़ी गई जानकारी module data के रूप में रखी जाती है।
!ULOAD invoke होने पर निम्न तीन subroutines संबंधित हैं।
ureadload: Analysis की शुरुआत में control file में निर्दिष्ट external file से user-defined loads पढ़ता है। User implementation फ़ाइल खोलता है और आवश्यक data को module variables में संग्रहीत करता है।uloading: प्रत्येक step के लिए external load vector assemble करते समय call होता है और user load को global load vector में जोड़ता है। Current step number और load factor arguments के रूप में पास होते हैं।uResidual: प्रत्येक iteration में residual vector assemble करते समय call होता है और user load का contribution global residual vector में जोड़ता है। इसे nonlinear iterations और equilibrium calculations दोनों से call किया जाता है।
User boundary conditions (prescribed displacement या contact conditions के user extensions) के लिए कोई extension point उपलब्ध नहीं है। External force के अलावा किसी अन्य user extension की आवश्यकता हो तो संबंधित built-in keyword या user constitutive-law path उपयोग करें।
User Subroutines लागू करने की प्रक्रिया¶
User subroutine उपयोग करने के लिए FrontISTR source distribution में शामिल template file को edit करें और फिर FrontISTR को rebuild करें। Distributed binaries में user subroutines बदले नहीं जा सकते, इसलिए user extension उपयोग करने के लिए ऐसा environment आवश्यक है जिसमें FrontISTR को source से build किया जा सके।
User-subroutine templates fistr1/src/lib/user/ के अंतर्गत स्थित हैं और प्रत्येक extension category के लिए edit करने वाली विशिष्ट file है (file names के लिए फ़ंक्शनों का अवलोकन की table देखें)। प्रारंभिक अवस्था में files में या तो खाली subroutine bodies होते हैं या sample linear-elastic implementation; users वहाँ अपना constitutive law या load definition जोड़ते हैं। Template edit करने के बाद FrontISTR को सामान्य रूप से CMake से rebuild करें और बने हुए fistr1 executable से analysis चलाएँ।
Subroutine arguments के अर्थ, state-variable arrays को संभालने की विधि और rebuild के समय सावधानियों जैसे विवरण coding guide के संबंधित pages पर दिए गए हैं।
- User Subroutines (Overview)
- General-Purpose User Constitutive Law
umat.f - User Elastoplasticity
uyield.f - User-Defined External Load
uload.f - User Linear Elasticity and User Hyperelasticity
uelastic.f
यह भी देखें¶
- Material Data — constitutive-law options और built-in models की सूची
- Boundary Conditions and Loads — built-in boundary conditions और loads
- User Subroutines (Coding Guide) — subroutine argument specifications और implementation conventions
- !USER_MATERIAL — general-purpose user constitutive law के लिए keyword syntax
- !ELASTIC —
TYPE=USERसहित linear-elastic keyword - !HYPERELASTIC —
TYPE=USERसहित hyperelastic keyword - !PLASTIC —
YIELD=USERसहित elastoplastic keyword