keyword
stringclasses
7 values
repo_name
stringlengths
8
98
file_path
stringlengths
4
244
file_extension
stringclasses
29 values
file_size
int64
0
84.1M
line_count
int64
0
1.6M
content
stringlengths
1
84.1M
language
stringclasses
14 values
3D
febiosoftware/FEBio
FEBioMech/FEViscoElasticDamage.cpp
.cpp
9,547
263
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #include "FEViscoElasticDamage.h" #include <FECore/log.h> #include <FECore/FEModel.h> //----------------------------------------------------------------------------- BEGIN_FECORE_CLASS(FEViscoElasticDamage, FEElasticMaterial) // material parameters ADD_PARAMETER(m_t[0], "t1")->setUnits(UNIT_TIME); ADD_PARAMETER(m_t[1], "t2")->setUnits(UNIT_TIME); ADD_PARAMETER(m_t[2], "t3")->setUnits(UNIT_TIME); ADD_PARAMETER(m_t[3], "t4")->setUnits(UNIT_TIME); ADD_PARAMETER(m_t[4], "t5")->setUnits(UNIT_TIME); ADD_PARAMETER(m_t[5], "t6")->setUnits(UNIT_TIME); ADD_PARAMETER(m_g0 , "g0"); ADD_PARAMETER(m_g[0], "g1"); ADD_PARAMETER(m_g[1], "g2"); ADD_PARAMETER(m_g[2], "g3"); ADD_PARAMETER(m_g[3], "g4"); ADD_PARAMETER(m_g[4], "g5"); ADD_PARAMETER(m_g[5], "g6"); // define the material properties ADD_PROPERTY(m_pDmg, "elastic"); END_FECORE_CLASS(); //----------------------------------------------------------------------------- //! constructor FEViscoElasticDamage::FEViscoElasticDamage(FEModel* pfem) : FEElasticMaterial(pfem) { m_g0 = 1; for (int i=0; i<MAX_TERMS; ++i) { m_t[i] = 1; m_g[i] = 0; } m_pDmg = nullptr; } //----------------------------------------------------------------------------- //! data initialization bool FEViscoElasticDamage::Init() { if (dynamic_cast<FEDamageMaterial*>(m_pDmg) == 0) { feLogError("elastic component of viscoelastic damage material must be of type elastic damage!"); return false; } return m_pDmg->Init(); } //----------------------------------------------------------------------------- //! Create material point data for this material FEMaterialPointData* FEViscoElasticDamage::CreateMaterialPointData() { return new FEViscoElasticMaterialPoint(m_pDmg->CreateMaterialPointData()); } //----------------------------------------------------------------------------- //! Stress function mat3ds FEViscoElasticDamage::Stress(FEMaterialPoint& mp) { double dt = GetFEModel()->GetTime().timeIncrement; if (dt == 0) return mat3ds(0, 0, 0, 0, 0, 0); // get the elastic part FEElasticMaterialPoint& ep = *mp.ExtractData<FEElasticMaterialPoint>(); // get the viscoelastic point data FEViscoElasticMaterialPoint& pt = *mp.ExtractData<FEViscoElasticMaterialPoint>(); // Calculate the new elastic Cauchy stress mat3ds se = m_pDmg->GetElasticMaterial()->Stress(mp); // pull-back to get PK2 stress mat3ds Se = pt.m_Se = ep.pull_back(se); // get elastic PK2 stress of previous timestep mat3ds Sep = pt.m_Sep; // calculate new history variables // terms are accumulated in S, the total PK2-stress mat3ds S = Se*m_g0; double g, h; for (int i=0; i<MAX_TERMS; ++i) { g = exp(-dt/m_t[i]); h = (1 - g)/(dt/m_t[i]); pt.m_H[i] = pt.m_Hp[i]*g + (Se - Sep)*h; S += pt.m_H[i]*m_g[i]; } // return the total Cauchy stress, // which is the push-forward of S double D = m_pDmg->Damage(mp); return ep.push_forward(S)*(1-D); } //----------------------------------------------------------------------------- //! Material tangent tens4ds FEViscoElasticDamage::Tangent(FEMaterialPoint& pt) { double dt = GetFEModel()->GetTime().timeIncrement; // calculate the spatial elastic tangent tens4ds C = m_pDmg->GetElasticMaterial()->Tangent(pt); if (dt == 0.0) return C; // calculate the visco scale factor double f = m_g0, g, h; for (int i=0; i<MAX_TERMS; ++i) { g = exp(-dt/m_t[i]); h = ( 1 - exp(-dt/m_t[i]) )/( dt/m_t[i] ); f += m_g[i]*h; } double D = m_pDmg->Damage(pt); // multiply tangent with visco-factor return C*(f*(1-D)); } //----------------------------------------------------------------------------- //! Strain energy density function double FEViscoElasticDamage::StrainEnergyDensity(FEMaterialPoint& mp) { // get the viscoelastic point data FEViscoElasticMaterialPoint& pt = *mp.ExtractData<FEViscoElasticMaterialPoint>(); FEElasticMaterialPoint& et = *mp.ExtractData<FEElasticMaterialPoint>(); mat3d Fsafe = et.m_F; double Jsafe = et.m_J; // Calculate the new elastic strain energy density pt.m_sed = m_pDmg->GetElasticMaterial()->StrainEnergyDensity(mp); double sed = pt.m_sed; double sedt = sed*m_g0; if (SeriesStretchExponent(mp)) { // get the elastic point data and evaluate the right-stretch tensor for (int i=0; i<MAX_TERMS; ++i) { if (m_g[i] > 0) { mat3ds C = et.RightCauchyGreen(); double l2[3], l[3]; vec3d v[3]; C.eigen2(l2, v); l[0] = sqrt(l2[0]); l[1] = sqrt(l2[1]); l[2] = sqrt(l2[2]); mat3ds Ua = dyad(v[0])*pow(l[0],pt.m_alpha[i]) + dyad(v[1])*pow(l[1],pt.m_alpha[i]) + dyad(v[2])*pow(l[2],pt.m_alpha[i]); et.m_F = Ua; et.m_J = Ua.det(); sedt += m_g[i]*m_pDmg->GetElasticMaterial()->StrainEnergyDensity(mp); } } } else throw std::runtime_error("FEViscoElasticDamage::strain energy density calculation did not converge!"); et.m_F = Fsafe; et.m_J = Jsafe; double D = m_pDmg->Damage(mp); // return the total strain energy density return sedt*(1-D); } //----------------------------------------------------------------------------- //! calculate exponent of right-stretch tensor in series spring bool FEViscoElasticDamage::SeriesStretchExponent(FEMaterialPoint& mp) { const double errrel = 1e-6; const double almin = 0.001; const int maxiter = 50; // get the elastic point data and evaluate the right-stretch tensor FEElasticMaterialPoint& et = *mp.ExtractData<FEElasticMaterialPoint>(); // get the right stretch tensor mat3ds C = et.RightCauchyGreen(); double l2[3], l[3]; vec3d v[3]; C.eigen2(l2, v); l[0] = sqrt(l2[0]); l[1] = sqrt(l2[1]); l[2] = sqrt(l2[2]); mat3ds U = dyad(v[0])*l[0] + dyad(v[1])*l[1] + dyad(v[2])*l[2]; double gamma = 0; for (int i=0; i<MAX_TERMS; ++i) gamma += m_g[i]; // get the viscoelastic point data FEViscoElasticMaterialPoint& pt = *mp.ExtractData<FEViscoElasticMaterialPoint>(); // use previous time solution as initial guess for the exponent mat3ds Se = pt.m_Se; mat3ds S = et.pull_back(et.m_s); double fmag = Se.dotdot(U); mat3d Fsafe = et.m_F; double Jsafe = et.m_J; for (int i=0; i<MAX_TERMS; ++i) { if (m_g[i] > 0) { double alpha = pt.m_alphap[i]; bool done = false; int iter = 0; do { mat3ds Ua = dyad(v[0])*pow(l[0],alpha) + dyad(v[1])*pow(l[1],alpha) + dyad(v[2])*pow(l[2],alpha); et.m_F = Ua; et.m_J = Ua.det(); mat3ds Sea = et.pull_back(m_pDmg->GetElasticMaterial()->Stress(mp)); double f = (Sea*m_g[i] - S + Se).dotdot(U); tens4ds Cea = et.pull_back(m_pDmg->GetElasticMaterial()->Tangent(mp)); mat3ds U2ap = dyad(v[0])*(pow(l[0],2*alpha)*log(l[0])) + dyad(v[1])*(pow(l[1],2*alpha)*log(l[1])) + dyad(v[2])*(pow(l[2],2*alpha)*log(l[2])); double fprime = (Cea.dot(U2ap)).dotdot(U)*m_g[i]; if (fprime != 0) { double dalpha = -f/fprime; alpha += dalpha; if (fabs(f) < errrel*fmag) done = true; else if (fabs(dalpha) < errrel*fabs(alpha)) done = true; else if (alpha > 1) { alpha = 1; done = true; } else if (alpha < almin) { alpha = 0; done = true; } else if (++iter > maxiter) done = true; } else done = true; } while (!done); if (iter > maxiter) { et.m_F = Fsafe; et.m_J = Jsafe; return false; } pt.m_alpha[i] = alpha; } } et.m_F = Fsafe; et.m_J = Jsafe; return true; }
C++
3D
febiosoftware/FEBio
FEBioMech/FEIdealGasPressure.cpp
.cpp
4,158
140
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #include "stdafx.h" #include "FEIdealGasPressure.h" #include "FEBioMech.h" #include <FECore/log.h> BEGIN_FECORE_CLASS(FEIdealGasPressure, FESurfaceLoad) ADD_PARAMETER(m_initialPressure, "P0")->setUnits(UNIT_PRESSURE); ADD_PARAMETER(m_bsymm, "symmetric_stiffness"); ADD_PARAMETER(m_bshellb, "shell_bottom"); END_FECORE_CLASS() FEIdealGasPressure::FEIdealGasPressure(FEModel* pfem) : FESurfaceLoad(pfem) { m_initialPressure = 0.0; m_bsymm = true; m_bshellb = false; m_currentPressure = 0; m_currentVolume = 0; } bool FEIdealGasPressure::Init() { FESurface& surf = GetSurface(); surf.SetShellBottom(m_bshellb); // get the degrees of freedom m_dof.Clear(); if (m_bshellb == false) { m_dof.AddVariable(FEBioMech::GetVariableName(FEBioMech::DISPLACEMENT)); } else { m_dof.AddVariable(FEBioMech::GetVariableName(FEBioMech::SHELL_DISPLACEMENT)); } if (m_dof.IsEmpty()) return false; return FESurfaceLoad::Init(); } void FEIdealGasPressure::Activate() { m_initialVolume = CalculateSurfaceVolume(GetSurface()); m_currentVolume = m_initialVolume; m_currentPressure = m_initialPressure; feLogDebug("initial volume: %lg\n", m_initialVolume); FESurfaceLoad::Activate(); } void FEIdealGasPressure::Update() { m_currentVolume = CalculateSurfaceVolume(GetSurface()); m_currentPressure = m_initialPressure * (m_initialVolume / m_currentVolume); feLogDebug("volume: %lg, pressure: %lg\n", m_currentVolume, m_currentPressure); FESurfaceLoad::Update(); } void FEIdealGasPressure::LoadVector(FEGlobalVector& R) { // evaluate the integral FESurface& surf = GetSurface(); surf.LoadVector(R, m_dof, false, [&](FESurfaceMaterialPoint& pt, const FESurfaceDofShape& dof_a, std::vector<double>& val) { // evaluate pressure at this material point double P = m_currentPressure; if (m_bshellb) P = -P; double J = (pt.dxr ^ pt.dxs).norm(); // force vector vec3d N = (pt.dxr ^ pt.dxs); N.unit(); vec3d t = N * P; double H_u = dof_a.shape; val[0] = H_u * t.x * J; val[1] = H_u * t.y * J; val[2] = H_u * t.z * J; }); } void FEIdealGasPressure::StiffnessMatrix(FELinearSystem& LS) { // evaluate the integral FESurface& surf = GetSurface(); surf.LoadStiffness(LS, m_dof, m_dof, [&](FESurfaceMaterialPoint& mp, const FESurfaceDofShape& dof_a, const FESurfaceDofShape& dof_b, matrix& kab) { // evaluate pressure at this material point double P = m_currentPressure; if (m_bshellb) P = -P; double H_i = dof_a.shape; double Gr_i = dof_a.shape_deriv_r; double Gs_i = dof_a.shape_deriv_s; double H_j = dof_b.shape; double Gr_j = dof_b.shape_deriv_r; double Gs_j = dof_b.shape_deriv_s; vec3d vab(0, 0, 0); if (m_bsymm) vab = (mp.dxr * (H_j * Gs_i - H_i * Gs_j) - mp.dxs * (H_j * Gr_i - H_i * Gr_j)) * 0.5 * P; else vab = (mp.dxs * Gr_j - mp.dxr * Gs_j) * (P * H_i); mat3da K(vab); kab.set(0, 0, K); }); }
C++
3D
febiosoftware/FEBio
FEBioMech/FETendonMaterial.h
.h
2,266
64
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #pragma once #include "FEUncoupledMaterial.h" //----------------------------------------------------------------------------- //! Tendon Material //! This material uses the constitutive model developed by Blemker et.al. to model tendons class FETendonMaterial : public FEUncoupledMaterial { public: FETendonMaterial(FEModel* pfem); public: // transverse constants FEParamDouble m_G1; //!< along-fiber shear modulus FEParamDouble m_G2; //!< cross-fiber shear modulus // along fiber constants FEParamDouble m_L1; //!< tendon fiber constant L1 FEParamDouble m_L2; //!< tendon fiber constant L2 FEParamDouble m_lam1; //!< max exponential fiber stretch FEVec3dValuator* m_fiber; public: //! calculate deviatoric stress at material point virtual mat3ds DevStress(FEMaterialPoint& pt) override; //! calculate deviatoric tangent stiffness at material point virtual tens4ds DevTangent(FEMaterialPoint& pt) override; // declare the parameter list DECLARE_FECORE_CLASS(); };
Unknown
3D
febiosoftware/FEBio
FEBioMech/FEMaxDamageCriterion.cpp
.cpp
1,853
50
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #include "stdafx.h" #include "FEMaxDamageCriterion.h" #include "FEElasticMaterial.h" BEGIN_FECORE_CLASS(FEDamageAdaptorCriterion, FEMeshAdaptorCriterion) END_FECORE_CLASS(); FEDamageAdaptorCriterion::FEDamageAdaptorCriterion(FEModel* fem) : FEMeshAdaptorCriterion(fem) { } bool FEDamageAdaptorCriterion::GetMaterialPointValue(FEMaterialPoint& mp, double& value) { // TODO: What about mixtures? FEDamageMaterialPoint* dp = mp.ExtractData<FEDamageMaterialPoint>(); if (dp == nullptr) return false; // evaluate the damage at this point value = dp->m_D; return true; }
C++
3D
febiosoftware/FEBio
FEBioMech/FEKinematicGrowth.h
.h
3,464
94
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2019 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #pragma once #include "FEGrowthTensor.h" #include "FEElasticMaterial.h" #include <FECore/FEMaterialPoint.h> #include <FECore/FEModelComponent.h> //----------------------------------------------------------------------------- //! Define a material point that stores the multiplicative decomposition //! of the deformation gradient and the solid referential density // class FEKinematicMaterialPoint : public FEMaterialPointData { public: FEKinematicMaterialPoint(FEMaterialPointData *pt) : FEMaterialPointData(pt) {} FEMaterialPointData* Copy() override; void Init() override; void Update(const FETimeInfo& timeInfo) override; void Serialize(DumpStream& ar) override; public: mat3d m_Fe; //!< elastic deformation double m_Je; //!< elastic relative volume mat3d m_Fg; //!< growth deformation double m_rhor; //!< solid referential density }; //----------------------------------------------------------------------------- //! Material class that implements Kinematic growth model. // class FEKinematicGrowth : public FEElasticMaterial { public: FEKinematicGrowth(FEModel* pfem); //! Initialization routine bool Init() override; //! get the elastic base material FEElasticMaterial* GetBaseMaterial() { return m_pBase; } //! get the elastic base material FEGrowthTensor* GetGrowthMaterial() { return m_pGrowth; } //! Returns the Cauchy stress mat3ds Stress(FEMaterialPoint& mp) override; //! Returns the spatial tangent tens4ds Tangent(FEMaterialPoint& mp) override; //! Returns the strain energy density double StrainEnergyDensity(FEMaterialPoint& mp) override; // returns a pointer to a new material point object FEMaterialPointData* CreateMaterialPointData() override; // update material point at each iteration void UpdateSpecializedMaterialPoints(FEMaterialPoint& mp, const FETimeInfo& tp) override; private: FEElasticMaterial* m_pBase; //!< pointer to elastic solid material FEGrowthTensor* m_pGrowth; //!< pointer to growth tensor DECLARE_FECORE_CLASS(); };
Unknown
3D
febiosoftware/FEBio
FEBioMech/FEVolumeConstraint.h
.h
3,367
111
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #pragma once #include <FECore/FESurfaceConstraint.h> #include <FECore/FESurface.h> //----------------------------------------------------------------------------- class FEVolumeSurface : public FESurface { public: //! constructor FEVolumeSurface(FEModel* fem); //! Initialization bool Init(); //! copy data void CopyFrom(FEVolumeSurface& s); //! serialization void Serialize(DumpStream& ar); public: double m_Lp; //!< Lagrange multipler pressure double m_p; //!< applied pressure (= Lp + eps*DV) double m_V0; //!< Initial volume double m_Vt; //!< current volume }; //----------------------------------------------------------------------------- // This class implements a constraint that tries to maintain the volume of the // enclosed space using an isochoric pressure. class FEVolumeConstraint : public FESurfaceConstraint { public: //! constructor FEVolumeConstraint(FEModel* pfem); ~FEVolumeConstraint(); void Activate() override; void LoadVector(FEGlobalVector& R, const FETimeInfo& tp) override; void StiffnessMatrix(FELinearSystem& LS, const FETimeInfo& tp) override; bool Augment(int naug, const FETimeInfo& tp) override; void Serialize(DumpStream& ar) override; void CopyFrom(FENLConstraint* plc) override; // update state void Reset() override; void Update() override; //! Unpack surface element data void UnpackLM(FEElement& el, vector<int>& lm); //! build connectivity for matrix profile void BuildMatrixProfile(FEGlobalMatrix& M) override; // get the surface FESurface* GetSurface() override; public: double EnclosedVolume() const; double Pressure() const; public: double m_eps; //!< penalty parameter double m_atol; //!< augmented Lagrangian tolerance bool m_blaugon; //!< augmentation flag private: bool m_binit; //!< flag indicating whether the constraint is initialized // degrees of freedom // (TODO: find a better way of defining this. // I don't want to have to do this in each class) int m_dofX; int m_dofY; int m_dofZ; FEVolumeSurface* m_s; //!< the bounding surface DECLARE_FECORE_CLASS(); };
Unknown
3D
febiosoftware/FEBio
FEBioMech/FEBioMechPlot.cpp
.cpp
162,146
5,213
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #include "stdafx.h" #include "FEBioMechPlot.h" #include "FEDamageNeoHookean.h" #include "FEDamageTransIsoMooneyRivlin.h" #include "FEKinematicGrowth.h" #include "FEReactiveMaterialPoint.h" #include "FEReactiveFatigue.h" #include "FEReactivePlasticity.h" #include "FEReactivePlasticDamage.h" #include "FERemodelingElasticMaterial.h" #include "FERigidSolidDomain.h" #include "FERigidShellDomain.h" #include "FEElasticShellDomainOld.h" #include "FEElasticEASShellDomain.h" #include "FEElasticANSShellDomain.h" #include "FEElasticMixture.h" #include "FEElasticMultigeneration.h" #include "FEUT4Domain.h" #include "FEContactSurface.h" #include "FERigidBody.h" #include <FECore/FESPRProjection.h> #include "FEUncoupledElasticMixture.h" #include "FERigidMaterial.h" #include "FEVolumeConstraint.h" #include "FEFacet2FacetSliding.h" #include "FEMortarSlidingContact.h" #include "FEMechModel.h" #include "FEPreStrainElastic.h" #include <FECore/writeplot.h> #include <FECore/FEDomainParameter.h> #include <FECore/FEModel.h> #include "FEDiscreteElasticMaterial.h" #include "FEDiscreteElasticDomain.h" #include "FEContinuousElasticDamage.h" #include <FECore/FEMeshAdaptor.h> // for projectToNodes #include "FESlidingInterface.h" #include "FESlidingElasticInterface.h" #include "FETiedContactSurface.h" #include "FEStickyInterface.h" #include "FEReactiveVEMaterialPoint.h" #include "FELinearTrussDomain.h" #include <FECore/FESurface.h> #include <FECore/FESurfaceLoad.h> #include <FECore/FETrussDomain.h> #include <FECore/FEElement.h> #include <FEBioMech/FEElasticBeamDomain.h> #include <FEBioMech/FEElasticBeamMaterial.h> #include <FEBioMech/FEEdgeToSurfaceSlidingContact.h> #include "FEIdealGasPressure.h" #include "FEBodyForce.h" //============================================================================= // N O D E D A T A //============================================================================= //----------------------------------------------------------------------------- bool FEPlotNodeDisplacement::Save(FEMesh& m, FEDataStream& a) { FEModel* fem = GetFEModel(); const int dof_X = fem->GetDOFIndex("x"); const int dof_Y = fem->GetDOFIndex("y"); const int dof_Z = fem->GetDOFIndex("z"); writeNodalValues<vec3d>(m, a, [=](const FENode& node) { return node.get_vec3d(dof_X, dof_Y, dof_Z); }); return true; } bool FEPlotNodeRotation::Save(FEMesh& m, FEDataStream& a) { FEModel* fem = GetFEModel(); const int dof_U = fem->GetDOFIndex("u"); const int dof_V = fem->GetDOFIndex("v"); const int dof_W = fem->GetDOFIndex("w"); writeNodalValues<vec3d>(m, a, [=](const FENode& node) { return node.get_vec3d(dof_U, dof_V, dof_W); }); return true; } bool FEPlotNodeShellDisplacement::Save(FEMesh& m, FEDataStream& a) { FEModel* fem = GetFEModel(); const int dof_SX = fem->GetDOFIndex("sx"); const int dof_SY = fem->GetDOFIndex("sy"); const int dof_SZ = fem->GetDOFIndex("sz"); writeNodalValues<vec3d>(m, a, [=](const FENode& node) { return node.get_vec3d(dof_SX, dof_SY, dof_SZ); }); return true; } bool FEPlotNodalShellDirector::Save(FEMesh& m, FEDataStream& a) { writeNodalValues<vec3d>(m, a, [=](const FENode& node) { return (node.HasFlags(FENode::SHELL)) ? node.m_dt : vec3d(0,0,0); }); return true; } //! Store the nodal incremental displacements bool FEPlotNodeIncrementalDisplacement::Save(FEMesh& m, FEDataStream& a) { int N = m.Nodes(); if (m_rp.size() != N) { m_rp.resize(N); for (int i = 0; i < N; ++i) m_rp[i] = m.Node(i).m_rt; } // loop over all nodes for (int i = 0; i < N; ++i) { vec3d& rt = m.Node(i).m_rt; a << rt - m_rp[i]; m_rp[i] = rt; } return true; } //----------------------------------------------------------------------------- bool FEPlotNodeVelocity::Save(FEMesh& m, FEDataStream& a) { FEModel* fem = GetFEModel(); const int dof_VX = fem->GetDOFIndex("vx"); const int dof_VY = fem->GetDOFIndex("vy"); const int dof_VZ = fem->GetDOFIndex("vz"); writeNodalValues<vec3d>(m, a, [=](const FENode& node) { return node.get_vec3d(dof_VX, dof_VY, dof_VZ); }); return true; } //----------------------------------------------------------------------------- bool FEPlotNodeAcceleration::Save(FEMesh& m, FEDataStream& a) { writeNodalValues<vec3d>(m, a, [](const FENode& node) { return node.m_at; }); return true; } //----------------------------------------------------------------------------- //! Store nodal reaction forces bool FEPlotNodeReactionForces::Save(FEMesh& m, FEDataStream& a) { // NOTE: Currently, for nodes attached to rigid bodies the reaction forces // will actually be the rigid reaction forces. FEModel& fem = *GetFEModel(); int dofX = fem.GetDOFIndex("x"); int dofY = fem.GetDOFIndex("y"); int dofZ = fem.GetDOFIndex("z"); if ((dofX >= 0) && (dofY >= 0) && (dofZ >= 0)) { writeNodalValues<vec3d>(m, a, [=](const FENode& node) { return node.get_load3(dofX, dofY, dofZ); }); return true; } else return false; } //============================================================================= // S U R F A C E D A T A //============================================================================= bool FEPlotContactGap::SetFilter(const char* szfilter) { if (szfilter) m_interfaceName = szfilter; return (szfilter != nullptr); } // Plot contact gap bool FEPlotContactGap::Save(FESurface& surf, FEDataStream& a) { FEContactSurface* pcs = dynamic_cast<FEContactSurface*>(&surf); if (pcs == 0) return false; // make sure the corresponding contact interface is active // (in case the parent was not set, we'll proceed regardless) FEContactInterface* pci = pcs->GetContactInterface(); bool write = false; if (pci == nullptr) write = true; else if (pci->IsActive()) { if (m_interfaceName.empty() || (m_interfaceName == pci->GetName())) write = true; } if (write) { // NOTE: the sliding surface does not use material points, so we need this little hack. FESlidingSurface* slidingSurface = dynamic_cast<FESlidingSurface*>(pcs); if (slidingSurface) { for (int i = 0; i < slidingSurface->Elements(); ++i) { FEElement& el = slidingSurface->Element(i); double g = 0.0; for (int j = 0; j < el.Nodes(); ++j) { double gj = slidingSurface->m_data[el.m_lnode[j]].m_gap; g += gj; } g /= el.Nodes(); a << g; } return true; } FETiedContactSurface* tiedSurface = dynamic_cast<FETiedContactSurface*>(pcs); if (tiedSurface) { for (int i = 0; i < tiedSurface->Elements(); ++i) { FEElement& el = tiedSurface->Element(i); double g = 0.0; for (int j = 0; j < el.Nodes(); ++j) { double gj = tiedSurface->m_data[el.m_lnode[j]].m_gap; g += gj; } g /= el.Nodes(); a << g; } return true; } FEStickySurface* stickySurface = dynamic_cast<FEStickySurface*>(pcs); if (stickySurface) { for (int i = 0; i < stickySurface->Elements(); ++i) { FEElement& el = stickySurface->Element(i); double g = 0.0; for (int j = 0; j < el.Nodes(); ++j) { double gj = stickySurface->m_data[el.m_lnode[j]].scalar_gap; g += gj; } g /= el.Nodes(); a << g; } return true; } writeAverageElementValue<double>(surf, a, [=](const FEMaterialPoint& mp) { const FEContactMaterialPoint* pt = dynamic_cast<const FEContactMaterialPoint*>(&mp); return (pt ? pt->m_gap : 0.0); }); return true; } else return false; } //----------------------------------------------------------------------------- // Plot vector gap bool FEPlotVectorGap::Save(FESurface& surf, FEDataStream& a) { FEContactSurface* pcs = dynamic_cast<FEContactSurface*>(&surf); if (pcs == 0) return false; // make sure the corresponding contact interface is active // (in case the parent was not set, we'll proceed regardless) FEContactInterface* pci = pcs->GetContactInterface(); assert(pci); if ((pci == 0) || pci->IsActive()) { writeElementValue<vec3d>(surf, a, [=](int nface) { vec3d gn; pcs->GetVectorGap(nface, gn); return gn; }); return true; } return false; } bool FEPlotContactPressure::SetFilter(const char* szfilter) { if (szfilter) m_interfaceName = szfilter; return (szfilter != nullptr); } // Plot contact pressure bool FEPlotContactPressure::Save(FESurface &surf, FEDataStream& a) { FEContactSurface* pcs = dynamic_cast<FEContactSurface*>(&surf); if (pcs == 0) return false; // make sure the corresponding contact interface is active // (in case the parent was not set, we'll proceed regardless) FEContactInterface* pci = pcs->GetContactInterface(); bool write = false; if (pci == nullptr) write = true; else if (pci->IsActive()) { if (m_interfaceName.empty() || (m_interfaceName == pci->GetName())) write = true; } if (write) { // NOTE: the sliding surface does not use material points, so we need this little hack. FESlidingSurface* slidingSurface = dynamic_cast<FESlidingSurface*>(pcs); if (slidingSurface) { for (int i = 0; i < slidingSurface->Elements(); ++i) { FEElement& el = slidingSurface->Element(i); double Lm = 0.0; for (int j = 0; j < el.Nodes(); ++j) { double Lmj = slidingSurface->m_data[el.m_lnode[j]].m_Ln; Lm += Lmj; } Lm /= el.Nodes(); a << Lm; } return true; } writeAverageElementValue<double>(surf, a, [](const FEMaterialPoint& mp) { const FEContactMaterialPoint* pt = dynamic_cast<const FEContactMaterialPoint*>(&mp); return (pt ? pt->m_Ln : 0.0); }); return true; } return false; } bool FEPlotContactTraction::SetFilter(const char* szfilter) { if (szfilter) m_interfaceName = szfilter; return (szfilter != nullptr); } // Plot contact traction bool FEPlotContactTraction::Save(FESurface &surf, FEDataStream& a) { FEContactSurface* pcs = dynamic_cast<FEContactSurface*>(&surf); if (pcs == 0) return false; // make sure the corresponding contact interface is active // (in case the parent was not set, we'll proceed regardless) FEContactInterface* pci = pcs->GetContactInterface(); bool write = false; if (pci == nullptr) write = true; else if (pci->IsActive()) { if (m_interfaceName.empty() || (m_interfaceName == pci->GetName())) write = true; } if (write) { writeElementValue<vec3d>(surf, a, [=](int nface) { vec3d tn; pcs->GetContactTraction(nface, tn); return tn; }); return true; } return false; } //----------------------------------------------------------------------------- // Plot nodal contact gap bool FEPlotNodalContactGap::Save(FESurface& surf, FEDataStream& a) { FEContactSurface* pcs = dynamic_cast<FEContactSurface*>(&surf); if (pcs == 0) return false; // make sure the corresponding contact interface is active // (in case the parent was not set, we'll proceed regardless) FEContactInterface* pci = pcs->GetContactInterface(); assert(pci); if ((pci == 0) || pci->IsActive()) { // NOTE: the sliding surface does not use material points, so we need this little hack. FESlidingSurface* ss = dynamic_cast<FESlidingSurface*>(pcs); if (ss) { for (int i = 0; i < ss->Elements(); ++i) { FEElement& el = ss->Element(i); for (int j = 0; j < el.Nodes(); ++j) { double gap = ss->m_data[el.m_lnode[j]].m_gap; a << gap; } } return true; } writeNodalProjectedElementValues<double>(surf, a, [](const FEMaterialPoint& mp) { const FEContactMaterialPoint* pt = dynamic_cast<const FEContactMaterialPoint*>(&mp); return (pt ? pt->m_gap : 0.0); }); return true; } return false; } //----------------------------------------------------------------------------- // Plot nodal vector gap bool FEPlotNodalVectorGap::Save(FESurface &surf, FEDataStream& a) { FEContactSurface* pcs = dynamic_cast<FEContactSurface*>(&surf); if (pcs == 0) return false; // make sure the corresponding contact interface is active // (in case the parent was not set, we'll proceed regardless) FEContactInterface* pci = pcs->GetContactInterface(); assert(pci); if ((pci == 0) || pci->IsActive()) { int NF = pcs->Elements(); vec3d gn[FEElement::MAX_NODES]; for (int j = 0; j < NF; ++j) { FESurfaceElement& el = pcs->Element(j); pcs->GetNodalVectorGap(j, gn); // store in archive int ne = el.Nodes(); for (int k = 0; k < ne; ++k) a << gn[k]; } return true; } return false; } //----------------------------------------------------------------------------- // Plot nodal contact pressure bool FEPlotNodalContactPressure::Save(FESurface &surf, FEDataStream& a) { FEContactSurface* pcs = dynamic_cast<FEContactSurface*>(&surf); if (pcs == 0) return false; // make sure the corresponding contact interface is active // (in case the parent was not set, we'll proceed regardless) FEContactInterface* pci = pcs->GetContactInterface(); assert(pci); if ((pci == 0) || pci->IsActive()) { writeNodalProjectedElementValues<double>(surf, a, [](const FEMaterialPoint& mp) { const FEContactMaterialPoint* pt = dynamic_cast<const FEContactMaterialPoint*>(&mp); return (pt ? pt->m_Ln : 0.0); }); return true; } return false; } //----------------------------------------------------------------------------- // Plot nodal contact traction bool FEPlotNodalContactTraction::Save(FESurface &surf, FEDataStream& a) { FEContactSurface* pcs = dynamic_cast<FEContactSurface*>(&surf); if (pcs == 0) return false; // make sure the corresponding contact interface is active // (in case the parent was not set, we'll proceed regardless) FEContactInterface* pci = pcs->GetContactInterface(); assert(pci); if ((pci == 0) || pci->IsActive()) { int NF = pcs->Elements(); vec3d tn[FEElement::MAX_NODES]; for (int j = 0; j < NF; ++j) { FESurfaceElement& el = pcs->Element(j); pcs->GetNodalContactTraction(j, tn); // store in archive int ne = el.Nodes(); for (int k = 0; k < ne; ++k) a << tn[k]; } return true; } return false; } //----------------------------------------------------------------------------- // Plot surface traction bool FEPlotSurfaceTraction::Save(FESurface &surf, FEDataStream& a) { FEContactSurface* pcs = dynamic_cast<FEContactSurface*>(&surf); if (pcs == 0) return false; // make sure the corresponding contact interface is active // (in case the parent was not set, we'll proceed regardless) FEContactInterface* pci = pcs->GetContactInterface(); assert(pci); if ((pci == 0) || pci->IsActive()) { writeElementValue<vec3d>(surf, a, [=](int nface) { vec3d tn; pcs->GetSurfaceTraction(nface, tn); return tn; }); return true; } return false; } //----------------------------------------------------------------------------- // Plot nodal contact traction bool FEPlotNodalSurfaceTraction::Save(FESurface &surf, FEDataStream& a) { FEContactSurface* pcs = dynamic_cast<FEContactSurface*>(&surf); if (pcs == 0) return false; // make sure the corresponding contact interface is active // (in case the parent was not set, we'll proceed regardless) FEContactInterface* pci = pcs->GetContactInterface(); assert(pci); if ((pci == 0) || pci->IsActive()) { int NF = pcs->Elements(); vec3d tn[FEElement::MAX_NODES]; for (int j = 0; j < NF; ++j) { FESurfaceElement& el = pcs->Element(j); pcs->GetNodalSurfaceTraction(j, tn); // store in archive int ne = el.Nodes(); for (int k = 0; k < ne; ++k) a << tn[k]; } return true; } return false; } //----------------------------------------------------------------------------- // Plot stick status bool FEPlotStickStatus::Save(FESurface& surf, FEDataStream& a) { FEContactSurface* pcs = dynamic_cast<FEContactSurface*>(&surf); if (pcs == 0) return false; // make sure the corresponding contact interface is active // (in case the parent was not set, we'll proceed regardless) FEContactInterface* pci = pcs->GetContactInterface(); assert(pci); if ((pci == 0) || pci->IsActive()) { writeElementValue<double>(surf, a, [=](int nface) { double gn; pcs->GetStickStatus(nface, gn); return gn; }); return true; } return false; } //----------------------------------------------------------------------------- bool FEPlotContactForce::Save(FESurface &surf, FEDataStream &a) { FEContactSurface* pcs = dynamic_cast<FEContactSurface*>(&surf); if (pcs == 0) return false; // make sure the corresponding contact interface is active // (in case the parent was not set, we'll proceed regardless) FEContactInterface* pci = pcs->GetContactInterface(); assert(pci); if ((pci == 0) || pci->IsActive()) { vec3d fn = pcs->GetContactForce(); a << fn; return true; } return false; } //----------------------------------------------------------------------------- // Plot contact area bool FEPlotContactArea::Save(FESurface &surf, FEDataStream& a) { FEContactSurface* pcs = dynamic_cast<FEContactSurface*>(&surf); if (pcs == 0) return false; // make sure the corresponding contact interface is active // (in case the parent was not set, we'll proceed regardless) FEContactInterface* pci = pcs->GetContactInterface(); assert(pci); if ((pci == 0) || pci->IsActive()) { double area = pcs->GetContactArea(); a << area; return true; } return false; } //----------------------------------------------------------------------------- // Plot contact penalty parameter bool FEPlotContactPenalty::Save(FESurface& surf, FEDataStream& a) { FEContactSurface* pcs = dynamic_cast<FEContactSurface*>(&surf); if (pcs == 0) return false; // make sure the corresponding contact interface is active // (in case the parent was not set, we'll proceed regardless) FEContactInterface* pci = pcs->GetContactInterface(); assert(pci); if ((pci == 0) || pci->IsActive()) { FEFacetSlidingSurface* ps = dynamic_cast<FEFacetSlidingSurface*>(&surf); if (ps) { writeAverageElementValue<double>(surf, a, [](const FEMaterialPoint& mp) { const FEFacetSlidingSurface::Data* pt = dynamic_cast<const FEFacetSlidingSurface::Data*>(&mp); return (pt ? pt->m_eps : 0); }); return true; } FESlidingElasticSurface* pse = dynamic_cast<FESlidingElasticSurface*>(&surf); if (pse) { writeAverageElementValue<double>(surf, a, [](const FEMaterialPoint& mp) { const FESlidingElasticSurface::Data* pt = dynamic_cast<const FESlidingElasticSurface::Data*>(&mp); return (pt ? pt->m_epsn : 0); }); return true; } } return false; } //----------------------------------------------------------------------------- bool FEPlotContactStatus::Save(FESurface& surf, FEDataStream& a) { FEFacetSlidingSurface* ps = dynamic_cast<FEFacetSlidingSurface*>(&surf); if (ps == nullptr) return false; // make sure the corresponding contact interface is active // (in case the parent was not set, we'll proceed regardless) FEContactInterface* pci = ps->GetContactInterface(); assert(pci); if ((pci == 0) || pci->IsActive()) { int NF = ps->Elements(); for (int i = 0; i < NF; ++i) { FESurfaceElement& el = ps->Element(i); double nc = 0.0; int nint = el.GaussPoints(); for (int j = 0; j < nint; ++j) { FEContactMaterialPoint* mp = dynamic_cast<FEContactMaterialPoint*>(el.GetMaterialPoint(j)); if (mp && mp->m_pme) nc++; } a << nc; } return true; } return false; } //----------------------------------------------------------------------------- bool FEPlotMortarContactGap::Save(FESurface& S, FEDataStream& a) { FEMortarSlidingSurface* ps = dynamic_cast<FEMortarSlidingSurface*>(&S); if (ps) { writeNodalValues<double>(S, a, [=](int i) { vec3d vA = ps->m_nu[i]; vec3d gA = ps->m_gap[i]; return gA*vA; }); return true; } else return false; } //----------------------------------------------------------------------------- bool FEPlotEnclosedVolume::Save(FESurface &surf, FEDataStream &a) { FESurface* pcs = &surf; if (pcs == 0) return false; writeIntegratedElementValue<double>(surf, a, [=](const FEMaterialPoint& mp) { FESurfaceElement& el = static_cast<FESurfaceElement&>(*mp.m_elem); int n = mp.m_index; vec3d xi = pcs->Local2Global(el, n); vec3d g[2]; pcs->CoBaseVectors(el, n, g); return xi*(g[0] ^ g[1]) / 3; }); return true; } //----------------------------------------------------------------------------- bool FEPlotEnclosedVolumeChange::Save(FESurface &surf, FEDataStream &a) { FESurface* pcs = &surf; if (pcs == 0) return false; writeIntegratedElementValue<double>(surf, a, [=](const FEMaterialPoint& mp) { FESurfaceElement& el = static_cast<FESurfaceElement&>(*mp.m_elem); int n = mp.m_index; vec3d xi = pcs->Local2Global(el, n); vec3d g[2]; pcs->CoBaseVectors(el, n, g); vec3d Xi = pcs->Local2Global0(el, n); vec3d G[2]; pcs->CoBaseVectors0(el, n, G); return (xi*(g[0] ^ g[1]) - Xi*(G[0] ^ G[1])) / 3; }); return true; } //----------------------------------------------------------------------------- bool FEPlotSurfaceArea::Save(FESurface &surf, FEDataStream &a) { FESurface* pcs = &surf; if (pcs == 0) return false; writeIntegratedElementValue<double>(surf, a, [=](const FEMaterialPoint& mp) { FESurfaceElement& el = static_cast<FESurfaceElement&>(*mp.m_elem); int n = mp.m_index; vec3d g[2]; pcs->CoBaseVectors(el, n, g); return (g[0] ^ g[1]).norm(); }); return true; } //----------------------------------------------------------------------------- bool FEPlotFacetArea::Save(FESurface& surf, FEDataStream& a) { FESurface* pcs = &surf; if (pcs == 0) return false; writeElementValue<double>(surf, a, [=](int nface) { double A = pcs->CurrentFaceArea(pcs->Element(nface)); return A; }); return true; } //----------------------------------------------------------------------------- // Plot scalar surface load bool FEPlotScalarSurfaceLoad::Save(FESurface &surf, FEDataStream& a) { FEModel* fem = GetFEModel(); int nsl = fem->ModelLoads(); FESurfaceLoad* psl = nullptr; for (int i = 0; i<nsl; ++i) { psl = dynamic_cast<FESurfaceLoad*>(fem->ModelLoad(i)); if (psl && (&psl->GetSurface() == &surf)) break; } if (psl == nullptr) return false; if (psl->IsActive()) { writeAverageElementValue<double>(surf, a, [=](const FEMaterialPoint& mp) { const FESurfaceMaterialPoint* pt = dynamic_cast<const FESurfaceMaterialPoint*>(&mp); return (pt ? psl->ScalarLoad(*const_cast<FESurfaceMaterialPoint*>(pt)) : 0.0); }); return true; } return false; } //----------------------------------------------------------------------------- bool FEPlotNetSurfaceReactionForce::Save(FESurface& surf, FEDataStream& a) { // NOTE: Currently, for nodes attached to rigid bodies the reaction forces // will actually be the rigid reaction forces. FEModel& fem = *GetFEModel(); int dofX = fem.GetDOFIndex("x"); int dofY = fem.GetDOFIndex("y"); int dofZ = fem.GetDOFIndex("z"); if ((dofX < 0) || (dofY < 0) || (dofZ < 0)) return false; vec3d F(0, 0, 0); for (int i = 0; i < surf.Nodes(); ++i) { FENode& n = surf.Node(i); vec3d Fi = n.get_load3(dofX, dofY, dofZ); F += Fi; } a << F; return true; } //----------------------------------------------------------------------------- bool FEPlotNetSurfaceReactionMoment::Save(FESurface& surf, FEDataStream& a) { // NOTE: Currently, for nodes attached to rigid bodies the reaction forces // will actually be the rigid reaction forces. FEModel& fem = *GetFEModel(); int dofX = fem.GetDOFIndex("x"); int dofY = fem.GetDOFIndex("y"); int dofZ = fem.GetDOFIndex("z"); if ((dofX < 0) || (dofY < 0) || (dofZ < 0)) return false; vec3d M(0, 0, 0); for (int i = 0; i < surf.Nodes(); ++i) { FENode& n = surf.Node(i); vec3d Fi = n.get_load3(dofX, dofY, dofZ); vec3d r = n.m_rt; vec3d Mi = r ^ Fi; M += Mi; } a << M; return true; } //============================================================================= // D O M A I N D A T A //============================================================================= //----------------------------------------------------------------------------- bool FEPlotElementVelocity::Save(FEDomain &dom, FEDataStream& a) { FESolidMaterial* pme = dom.GetMaterial()->ExtractProperty<FESolidMaterial>(); if ((pme == 0) || pme->IsRigid()) return false; writeAverageElementValue<vec3d>(dom, a, [](const FEMaterialPoint& mp) { const FEElasticMaterialPoint& pt = *mp.ExtractData<FEElasticMaterialPoint>(); return pt.m_v; }); return true; } //----------------------------------------------------------------------------- bool FEPlotElementAcceleration::Save(FEDomain &dom, FEDataStream& a) { FESolidMaterial* pme = dom.GetMaterial()->ExtractProperty<FESolidMaterial>(); if ((pme == 0) || pme->IsRigid()) return false; writeAverageElementValue<vec3d>(dom, a, [](const FEMaterialPoint& mp) { const FEElasticMaterialPoint& pt = *mp.ExtractData<FEElasticMaterialPoint>(); return pt.m_a; }); return true; } //============================================================================= class FEStress { public: mat3ds operator()(const FEMaterialPoint& mp) { const FEElasticMaterialPoint* pt = mp.ExtractData<FEElasticMaterialPoint>(); return (pt ? pt->m_s : mat3ds(0)); } }; class FEStrain { public: mat3ds operator()(const FEMaterialPoint& mp) { FEElement* el = mp.m_elem; FEShellElementNew* se = dynamic_cast<FEShellElementNew*>(el); const FEElasticMaterialPoint* pt = mp.ExtractData<FEElasticMaterialPoint>(); if (se) return (se->m_E[mp.m_index].norm() > 0) ? se->m_E[mp.m_index] : pt->Strain(); else return (pt ? pt->Strain() : mat3ds(0)); } }; //----------------------------------------------------------------------------- //! Store the average stresses for each element. bool FEPlotElementStress::Save(FEDomain& dom, FEDataStream& a) { FEDomainParameter* var = nullptr; FESolidMaterial* pme = dom.GetMaterial()->ExtractProperty<FESolidMaterial>(); if (pme) { if (!pme->IsRigid()) var = pme->FindDomainParameter("stress"); } else var = dom.GetMaterial()->FindDomainParameter("stress"); if (var == nullptr) return false; writeAverageElementValue<mat3ds>(dom, a, var); return true; } //----------------------------------------------------------------------------- //! Store the average stresses for each element. bool FEPlotElementPK2Stress::Save(FEDomain& dom, FEDataStream& a) { FESolidMaterial* pme = dom.GetMaterial()->ExtractProperty<FESolidMaterial>(); if ((pme == 0) || pme->IsRigid()) return false; writeAverageElementValue<mat3ds>(dom, a, [](const FEMaterialPoint& mp) { const FEElasticMaterialPoint& ep = *mp.ExtractData< FEElasticMaterialPoint>(); mat3ds s = ep.m_s; mat3ds S = ep.pull_back(s); return S; }); return true; } //----------------------------------------------------------------------------- //! Store the average PK1 stress for each element. bool FEPlotElementPK1Stress::Save(FEDomain& dom, FEDataStream& a) { FESolidMaterial* pme = dom.GetMaterial()->ExtractProperty<FESolidMaterial>(); if ((pme == 0) || pme->IsRigid()) return false; writeAverageElementValue<mat3d>(dom, a, [](const FEMaterialPoint& mp) { const FEElasticMaterialPoint& ep = *mp.ExtractData< FEElasticMaterialPoint>(); mat3d F = ep.m_F; double J = F.det(); mat3ds s = ep.m_s; // Cauchy stress mat3d P = (s * F.transinv()) * J; return P; }); return true; } //----------------------------------------------------------------------------- //! Store the average element plastic yield stress bool FEPlotElementPlasticYieldStress::Save(FEDomain& dom, FEDataStream& a) { FESolidMaterial* pme = dom.GetMaterial()->ExtractProperty<FESolidMaterial>(); if ((pme == 0) || pme->IsRigid()) return false; FEReactivePlasticity* pmp = pme->ExtractProperty<FEReactivePlasticity>(); if (pmp == nullptr) return false; writeAverageElementValue<double>(dom, a, [](const FEMaterialPoint& mp) { const FEReactivePlasticityMaterialPoint& pp = *mp.ExtractData<FEReactivePlasticityMaterialPoint>(); if (pp.m_Kv.size() > 0) return pp.m_Kv[0]; return 0.0; }); return true; } //----------------------------------------------------------------------------- //! Store the average element yield stress based on Drucker shear stress criterion bool FEPlotElementDruckerShear::Save(FEDomain& dom, FEDataStream& a) { FESolidMaterial* pme = dom.GetMaterial()->ExtractProperty<FESolidMaterial>(); if ((pme == 0) || pme->IsRigid()) return false; FEDamageCriterionDrucker* pmd = pme->ExtractProperty<FEDamageCriterionDrucker>(); if (pmd == nullptr) return false; writeAverageElementValue<double>(dom, a, [&pmd](const FEMaterialPoint& mp) { double c = pmd->m_c(mp); const FEElasticMaterialPoint& ep = *mp.ExtractData< FEElasticMaterialPoint>(); mat3ds s = ep.m_s; // Cauchy stress mat3ds sdev = s.dev(); double J2 = 0.5*(sdev*sdev).trace(); double J3 = sdev.det(); double k = pow(pow(J2,3) - c*pow(J3,2),1./6.); return k; }); return true; } //----------------------------------------------------------------------------- //! Store the average element yield stress based on Prager-Drucker criterion bool FEPlotElementPragerDruckerStress::Save(FEDomain& dom, FEDataStream& a) { FESolidMaterial* pme = dom.GetMaterial()->ExtractProperty<FESolidMaterial>(); if ((pme == 0) || pme->IsRigid()) return false; FEDamageCriterionDruckerPrager* pmd = pme->ExtractProperty<FEDamageCriterionDruckerPrager>(); if (pmd == nullptr) return false; writeAverageElementValue<double>(dom, a, [&pmd](const FEMaterialPoint& mp) { double b = pmd->m_b(mp); const FEElasticMaterialPoint& ep = *mp.ExtractData< FEElasticMaterialPoint>(); mat3ds s = ep.m_s; // Cauchy stress double se = sqrt((pow(s.xx()-s.yy(),2) + pow(s.yy()-s.zz(),2) + pow(s.zz()-s.xx(),2) + 6*(pow(s.xy(),2) + pow(s.yz(),2) + pow(s.xz(),2)))/2); double sm = s.tr()/3; double Phi = se - b*sm; return Phi; }); return true; } //----------------------------------------------------------------------------- //! Store the average element yield stress based on Deshpande-Fleck criterion bool FEPlotElementDeshpandeFleckStress::Save(FEDomain& dom, FEDataStream& a) { FESolidMaterial* pme = dom.GetMaterial()->ExtractProperty<FESolidMaterial>(); if ((pme == 0) || pme->IsRigid()) return false; FEDamageCriterionDeshpandeFleck* pmd = pme->ExtractProperty<FEDamageCriterionDeshpandeFleck>(); if (pmd == nullptr) return false; writeAverageElementValue<double>(dom, a, [&pmd](const FEMaterialPoint& mp) { double beta = pmd->m_beta(mp); const FEElasticMaterialPoint& ep = *mp.ExtractData< FEElasticMaterialPoint>(); mat3ds s = ep.m_s; // Cauchy stress double se = sqrt((pow(s.xx()-s.yy(),2) + pow(s.yy()-s.zz(),2) + pow(s.zz()-s.xx(),2) + 6*(pow(s.xy(),2) + pow(s.yz(),2) + pow(s.xz(),2)))/2); double sm = s.tr()/3; double Phi = sqrt((se*se+pow(3*beta*sm,2))/(1+beta*beta)); return Phi; }); return true; } //----------------------------------------------------------------------------- bool FEPlotSPRStresses::Save(FEDomain& dom, FEDataStream& a) { // For now, this is only available for solid domains if (dom.Class() != FE_DOMAIN_SOLID) return false; // get the domain FESolidDomain& sd = static_cast<FESolidDomain&>(dom); writeSPRElementValueMat3ds(sd, a, FEStress()); return true; } //----------------------------------------------------------------------------- bool FEPlotSPRLinearStresses::Save(FEDomain& dom, FEDataStream& a) { // For now, this is only available for solid domains if (dom.Class() != FE_DOMAIN_SOLID) return false; // get the domain FESolidDomain& sd = static_cast<FESolidDomain&>(dom); writeSPRElementValueMat3ds(sd, a, FEStress(), 1); return true; } //----------------------------------------------------------------------------- bool FEPlotNodalStresses::Save(FEDomain& dom, FEDataStream& a) { if (dynamic_cast<FESSIShellDomain*>(&dom)) return false; // new shell elements should be excluded writeNodalProjectedElementValues<mat3ds>(dom, a, FEStress()); return true; } //----------------------------------------------------------------------------- bool FEPlotShellTopStress::Save(FEDomain& dom, FEDataStream& a) { if (!dynamic_cast<FESSIShellDomain*>(&dom)) return false; // only use with new shell elements writeShellElementValues<mat3ds>(dom, a, FEStress(), false); return true; } //----------------------------------------------------------------------------- bool FEPlotShellBottomStress::Save(FEDomain& dom, FEDataStream& a) { if (!dynamic_cast<FESSIShellDomain*>(&dom)) return false; // only use with new shell elements writeShellElementValues<mat3ds>(dom, a, FEStress(), true); return true; } //----------------------------------------------------------------------------- bool FEPlotShellTopNodalStresses::Save(FEDomain& dom, FEDataStream& a) { if (!dynamic_cast<FESSIShellDomain*>(&dom)) return false; // only use with new shell elements writeShellNodalProjectedElementValues<mat3ds>(dom, a, FEStress(), false); return true; } //----------------------------------------------------------------------------- bool FEPlotShellBottomNodalStresses::Save(FEDomain& dom, FEDataStream& a) { if (!dynamic_cast<FESSIShellDomain*>(&dom)) return false; // only use with new shell elements writeShellNodalProjectedElementValues<mat3ds>(dom, a, FEStress(), true); return true; } //----------------------------------------------------------------------------- bool FEPlotNodalStrains::Save(FEDomain& dom, FEDataStream& a) { if (dynamic_cast<FESSIShellDomain*>(&dom)) return false; // new shell elements should be excluded writeNodalProjectedElementValues<mat3ds>(dom, a, FEStrain()); return true; } //----------------------------------------------------------------------------- bool FEPlotShellTopStrain::Save(FEDomain& dom, FEDataStream& a) { if (!dynamic_cast<FESSIShellDomain*>(&dom)) return false; // only use with new shell elements writeShellElementValues<mat3ds>(dom, a, FEStrain(), false); return true; } //----------------------------------------------------------------------------- bool FEPlotShellBottomStrain::Save(FEDomain& dom, FEDataStream& a) { if (!dynamic_cast<FESSIShellDomain*>(&dom)) return false; // only use with new shell elements writeShellElementValues<mat3ds>(dom, a, FEStrain(), true); return true; } //----------------------------------------------------------------------------- bool FEPlotShellTopNodalStrains::Save(FEDomain& dom, FEDataStream& a) { if (!dynamic_cast<FESSIShellDomain*>(&dom)) return false; // only use with new shell elements writeShellNodalProjectedElementValues<mat3ds>(dom, a, FEStrain(), false); return true; } //----------------------------------------------------------------------------- bool FEPlotShellBottomNodalStrains::Save(FEDomain& dom, FEDataStream& a) { if (!dynamic_cast<FESSIShellDomain*>(&dom)) return false; // only use with new shell elements writeShellNodalProjectedElementValues<mat3ds>(dom, a, FEStrain(), true); return true; } //============================================================================= FEPlotElementMixtureStress::FEPlotElementMixtureStress(FEModel* pfem) : FEPlotDomainData(pfem, PLT_MAT3FS, FMT_ITEM) { m_mat = -1; m_comp = -1; SetUnits(UNIT_PRESSURE); } bool FEPlotElementMixtureStress::SetFilter(const char* szfilter) { if (strncmp(szfilter, "material", 8) == 0) { if (sscanf(szfilter, "material[%d].solid[%d]", &m_mat, &m_comp) != 2) return false; } else { if (sscanf(szfilter, "solid[%d]", &m_comp) != 1) return false; } return true; } bool FEPlotElementMixtureStress::Save(FEDomain& dom, FEDataStream& a) { FEMaterial* pm = dom.GetMaterial(); if (m_mat != -1) { if (pm != GetFEModel()->GetMaterial(m_mat)) return false; } // make sure we start from the elastic component FEElasticMaterial* pmat = pm->ExtractProperty<FEElasticMaterial>(); if (pmat == nullptr) return false; // make sure this is a mixture FEElasticMixture* pmm = dynamic_cast<FEElasticMixture*>(pmat); FEUncoupledElasticMixture* pum = dynamic_cast<FEUncoupledElasticMixture*>(pmat); if ((pmm == nullptr) && (pum == nullptr)) return false; // get the mixture component if (m_comp < 0) return false; for (int i = 0; i < dom.Elements(); ++i) { FEElement& el = dom.ElementRef(i); mat3ds savg; savg.zero(); for (int n = 0; n < el.GaussPoints(); ++n) { FEMaterialPoint& mp = *el.GetMaterialPoint(n); FEElasticMixtureMaterialPoint* mmp = mp.ExtractData< FEElasticMixtureMaterialPoint>(); if (mmp && (m_comp < mmp->Components())) { FEElasticMaterialPoint& ep = *mmp->GetPointData(m_comp)->ExtractData<FEElasticMaterialPoint>(); savg += ep.m_s; } } savg /= (double)el.GaussPoints(); a << savg; } return true; } //============================================================================= //! Store the uncoupled pressure for each element. bool FEPlotElementUncoupledPressure::Save(FEDomain& dom, FEDataStream& a) { FEUncoupledMaterial* pmu = dom.GetMaterial()->ExtractProperty<FEUncoupledMaterial>(); if (pmu == 0) return false; // write element data writeAverageElementValue<double>(dom, a, [=](const FEMaterialPoint& mp) { const FEElasticMaterialPoint* pt = mp.ExtractData<FEElasticMaterialPoint>(); if (pt == 0) return 0.0; return -pt->m_p; // use negative sign to get positive pressure in compression }); return true; } //----------------------------------------------------------------------------- //! Store the norm of the average Cauchy stress for each element. bool FEPlotElementsnorm::Save(FEDomain& dom, FEDataStream& a) { FESolidMaterial* pme = dom.GetMaterial()->ExtractProperty<FESolidMaterial>(); if ((pme == 0) || pme->IsRigid()) return false; writeAverageElementValue<mat3ds, double>(dom, a, FEStress(), [](const mat3ds& s) { return sqrt(s.dotdot(s)); }); return true; } //----------------------------------------------------------------------------- //! Store the average elasticity for each element. class FEElementElasticity { public: FEElementElasticity(FESolidMaterial* pm) : m_mat(pm) {} tens4ds operator()(const FEMaterialPoint& mp) { return m_mat->Tangent(const_cast<FEMaterialPoint&>(mp)); } private: FESolidMaterial* m_mat; }; bool FEPlotElementElasticity::Save(FEDomain& dom, FEDataStream& a) { FESolidMaterial* pme = dom.GetMaterial()->ExtractProperty<FESolidMaterial>(); if ((pme == 0) || pme->IsRigid()) return false; writeAverageElementValue<tens4ds>(dom, a, FEElementElasticity(pme)); return true; } //----------------------------------------------------------------------------- //! Store the average deviatoric elasticity for each element. class FEElementDevElasticity { public: FEElementDevElasticity(FEUncoupledMaterial* pm) : m_mat(pm) {} tens4ds operator()(const FEMaterialPoint& mp) { return m_mat->DevTangent(const_cast<FEMaterialPoint&>(mp)); } private: FEUncoupledMaterial* m_mat; }; bool FEPlotElementDevElasticity::Save(FEDomain& dom, FEDataStream& a) { FEUncoupledMaterial* pme = dom.GetMaterial()->ExtractProperty<FEUncoupledMaterial>(); if ((pme == 0) || pme->IsRigid()) return false; writeAverageElementValue<tens4ds>(dom, a, FEElementDevElasticity(pme)); return true; } //----------------------------------------------------------------------------- class FEStrainEnergy { public: FEStrainEnergy(FEElasticMaterial* pm) : m_mat(pm) {} double operator()(const FEMaterialPoint& mp) { return m_mat->StrainEnergyDensity(const_cast<FEMaterialPoint&>(mp)); } private: FEElasticMaterial* m_mat; }; bool FEPlotStrainEnergyDensity::Save(FEDomain &dom, FEDataStream& a) { FEElasticMaterial* pme = dom.GetMaterial()->ExtractProperty<FEElasticMaterial>(); if (pme == 0) return false; if (dom.Class() == FE_DOMAIN_SOLID) { FEStrainEnergy W(pme); writeAverageElementValue<double>(dom, a, W); return true; } return false; } //----------------------------------------------------------------------------- class FEDevStrainEnergy { public: FEDevStrainEnergy(FEUncoupledMaterial* pm) : m_mat(pm) {} double operator()(const FEMaterialPoint& mp) { return m_mat->DevStrainEnergyDensity(const_cast<FEMaterialPoint&>(mp)); } private: FEUncoupledMaterial* m_mat; }; bool FEPlotDevStrainEnergyDensity::Save(FEDomain &dom, FEDataStream& a) { FEUncoupledMaterial* pmu = dom.GetMaterial()->ExtractProperty<FEUncoupledMaterial>(); if (pmu == 0) return false; if (dom.Class() == FE_DOMAIN_SOLID) { FEDevStrainEnergy devW(pmu); writeAverageElementValue<double>(dom, a, devW); return true; } return false; } //----------------------------------------------------------------------------- class FESpecificStrainEnergy { public: FESpecificStrainEnergy(FEElasticMaterial* pm, int comp) : m_mat(pm), m_comp(comp) {} double operator()(const FEMaterialPoint& mp) { if (dynamic_cast<FERemodelingInterface*>(m_mat) == 0) return 0; FEMaterialPoint& lmp = const_cast<FEMaterialPoint&>(mp); FERemodelingMaterialPoint* rpt = lmp.ExtractData<FERemodelingMaterialPoint>(); if (rpt == nullptr) { FEMaterialPoint* pt = lmp.ExtractData<FEElasticMixtureMaterialPoint>()->GetPointData(m_comp); rpt = pt->ExtractData<FERemodelingMaterialPoint>(); } return (((rpt != nullptr) && (rpt->m_rhor > 0)) ? rpt->m_sed / rpt->m_rhor : 0.0); } private: FEElasticMaterial* m_mat; int m_comp; }; bool FEPlotSpecificStrainEnergy::Save(FEDomain &dom, FEDataStream& a) { FEElasticMaterial* pme = dom.GetMaterial()->ExtractProperty<FEElasticMaterial>(); if (pme == 0) return false; if (dom.Class() == FE_DOMAIN_SOLID) { FESpecificStrainEnergy w(pme, -1); writeAverageElementValue<double>(dom, a, w); return true; } return false; } //============================================================================= FEPlotMixtureStrainEnergyDensity::FEPlotMixtureStrainEnergyDensity(FEModel* pfem) : FEPlotDomainData(pfem, PLT_FLOAT, FMT_ITEM) { m_mat = -1; m_comp = -1; SetUnits(UNIT_PRESSURE); } bool FEPlotMixtureStrainEnergyDensity::SetFilter(const char* szfilter) { if (strncmp(szfilter, "material", 8) == 0) { if (sscanf(szfilter, "material[%d].solid[%d]", &m_mat, &m_comp) != 2) return false; } else { if (sscanf(szfilter, "solid[%d]", &m_comp) != 1) return false; } return true; } bool FEPlotMixtureStrainEnergyDensity::Save(FEDomain& dom, FEDataStream& a) { FEMaterial* pm = dom.GetMaterial(); if (m_mat != -1) { if (pm != GetFEModel()->GetMaterial(m_mat)) return false; } // make sure we start from the elastic component FEElasticMaterial* pmat = pm->ExtractProperty<FEElasticMaterial>(); if (pmat == nullptr) return false; // make sure this is a mixture FEElasticMixture* pmm = dynamic_cast<FEElasticMixture*>(pmat); FEUncoupledElasticMixture* pum = dynamic_cast<FEUncoupledElasticMixture*>(pmat); if ((pmm == nullptr) && (pum == nullptr)) return false; // get the mixture component if (m_comp < 0) return false; FEElasticMaterial* pme = nullptr; if (pmm) pme = pmm->GetMaterial(m_comp); else if (pum) pme = pum->GetMaterial(m_comp); if (dom.Class() == FE_DOMAIN_SOLID) { FEStrainEnergy W(pme); writeAverageElementValue<double>(dom, a, W); return true; } return false; } //============================================================================= FEPlotMixtureDevStrainEnergyDensity::FEPlotMixtureDevStrainEnergyDensity(FEModel* pfem) : FEPlotDomainData(pfem, PLT_FLOAT, FMT_ITEM) { m_mat = -1; m_comp = -1; SetUnits(UNIT_PRESSURE); } bool FEPlotMixtureDevStrainEnergyDensity::SetFilter(const char* szfilter) { if (strncmp(szfilter, "material", 8) == 0) { if (sscanf(szfilter, "material[%d].solid[%d]", &m_mat, &m_comp) != 2) return false; } else { if (sscanf(szfilter, "solid[%d]", &m_comp) != 1) return false; } return true; } bool FEPlotMixtureDevStrainEnergyDensity::Save(FEDomain& dom, FEDataStream& a) { FEMaterial* pm = dom.GetMaterial(); if (m_mat != -1) { if (pm != GetFEModel()->GetMaterial(m_mat)) return false; } // make sure we start from the elastic component FEElasticMaterial* pmat = pm->ExtractProperty<FEElasticMaterial>(); if (pmat == nullptr) return false; // make sure this is a mixture FEUncoupledElasticMixture* pum = dynamic_cast<FEUncoupledElasticMixture*>(pmat); if (pum == nullptr) return false; // get the mixture component if (m_comp < 0) return false; FEElasticMaterial* pme = pum->GetMaterial(m_comp); FEUncoupledMaterial* pmu = pme->ExtractProperty<FEUncoupledMaterial>(); if (dom.Class() == FE_DOMAIN_SOLID) { FEDevStrainEnergy devW(pmu); writeAverageElementValue<double>(dom, a, devW); return true; } return false; } //============================================================================= FEPlotMixtureSpecificStrainEnergy::FEPlotMixtureSpecificStrainEnergy(FEModel* pfem) : FEPlotDomainData(pfem, PLT_FLOAT, FMT_ITEM) { m_mat = -1; m_comp = -1; SetUnits(UNIT_SPECIFIC_ENERGY); } bool FEPlotMixtureSpecificStrainEnergy::SetFilter(const char* szfilter) { if (strncmp(szfilter, "material", 8) == 0) { if (sscanf(szfilter, "material[%d].solid[%d]", &m_mat, &m_comp) != 2) return false; } else { if (sscanf(szfilter, "solid[%d]", &m_comp) != 1) return false; } return true; } bool FEPlotMixtureSpecificStrainEnergy::Save(FEDomain& dom, FEDataStream& a) { FEMaterial* pm = dom.GetMaterial(); if (m_mat != -1) { if (pm != GetFEModel()->GetMaterial(m_mat)) return false; } // make sure we start from the elastic component FEElasticMaterial* pmat = pm->ExtractProperty<FEElasticMaterial>(); if (pmat == nullptr) return false; // make sure this is a mixture FEElasticMixture* pmm = dynamic_cast<FEElasticMixture*>(pmat); FEUncoupledElasticMixture* pum = dynamic_cast<FEUncoupledElasticMixture*>(pmat); if ((pmm == nullptr) && (pum == nullptr)) return false; // get the mixture component if (m_comp < 0) return false; FEElasticMaterial* pme = nullptr; if (pmm) pme = pmm->GetMaterial(m_comp); else if (pum) pme = pum->GetMaterial(m_comp); if (dom.Class() == FE_DOMAIN_SOLID) { FESpecificStrainEnergy w(pme, m_comp); writeAverageElementValue<double>(dom, a, w); return true; } return false; } //----------------------------------------------------------------------------- bool FEPlotKineticEnergyDensity::Save(FEDomain &dom, FEDataStream& a) { const int dof_VX = GetFEModel()->GetDOFIndex("vx"); const int dof_VY = GetFEModel()->GetDOFIndex("vy"); const int dof_VZ = GetFEModel()->GetDOFIndex("vz"); const int dof_VU = GetFEModel()->GetDOFIndex("vu"); const int dof_VV = GetFEModel()->GetDOFIndex("vv"); const int dof_VW = GetFEModel()->GetDOFIndex("vw"); FEMesh& mesh = *dom.GetMesh(); FEElasticMaterial* pme = dom.GetMaterial()->ExtractProperty<FEElasticMaterial>(); if (pme == nullptr) return false; if (dom.Class() == FE_DOMAIN_SOLID) { FESolidDomain& bd = static_cast<FESolidDomain&>(dom); for (int i=0; i<bd.Elements(); ++i) { FESolidElement& el = bd.Element(i); double *H; double* gw = el.GaussWeights(); // get nodal velocities vec3d vt[FEElement::MAX_NODES]; vec3d vn[FEElement::MAX_NODES]; for (int j=0; j<el.Nodes(); ++j) { vt[j] = mesh.Node(el.m_node[j]).get_vec3d(dof_VX, dof_VY, dof_VZ); } // evaluate velocities at integration points for (int j=0; j<el.GaussPoints(); ++j) { H = el.H(j); vn[j] = vec3d(0, 0, 0); for (int k=0; k<el.Nodes(); ++k) vn[j] += vt[k]*H[k]; } // integrate kinetic energy double ew = 0; double V = 0; for (int j=0; j<el.GaussPoints(); ++j) { FEMaterialPoint& mp = *el.GetMaterialPoint(j); double detJ = bd.detJ0(el, j)*gw[j]; V += detJ; ew += vn[j]*vn[j]*(pme->Density(mp)/2*detJ); } a << ew/V; } return true; } else if (dom.Class() == FE_DOMAIN_SHELL) { FESSIShellDomain* bd = dynamic_cast<FESSIShellDomain*>(&dom); if (bd == 0) return false; for (int i=0; i<bd->Elements(); ++i) { FEShellElement& el = bd->Element(i); double* gw = el.GaussWeights(); double ew = 0.0; if ((dof_VU >= 0) && (dof_VV >= 0) && (dof_VW >= 0)) { // get nodal velocities vec3d vt[FEElement::MAX_NODES]; vec3d wt[FEElement::MAX_NODES]; vec3d vn[FEElement::MAX_NODES]; for (int j = 0; j < el.Nodes(); ++j) { vt[j] = mesh.Node(el.m_node[j]).get_vec3d(dof_VX, dof_VY, dof_VZ); wt[j] = mesh.Node(el.m_node[j]).get_vec3d(dof_VU, dof_VV, dof_VW); } // evaluate velocities at integration points for (int j = 0; j < el.GaussPoints(); ++j) vn[j] = bd->evaluate(el, vt, wt, j); // integrate kinetic energy double ew = 0; double V = 0; for (int j = 0; j < el.GaussPoints(); ++j) { FEMaterialPoint& mp = *el.GetMaterialPoint(j); double detJ = bd->detJ0(el, j) * gw[j]; V += detJ; ew += vn[j] * vn[j] * (pme->Density(mp) / 2 * detJ); } // normalize by volume ew /= V; } a << ew; } return true; } return false; } //----------------------------------------------------------------------------- // TODO: Should I call the density for remodeling materials something else? // Or maybe the FEElasticMaterialPoint should define a density parameter // that will be updated by the materials to define the current density? class FEDensity { public: FEDensity(FEElasticMaterial* pm) : m_mat(pm) {} double operator()(const FEMaterialPoint& mp) { const FEElasticMaterialPoint& ep = *mp.ExtractData<FEElasticMaterialPoint>(); double J = ep.m_F.det(); return m_mat->Density(const_cast<FEMaterialPoint&>(mp)) / J; } private: FEElasticMaterial* m_mat; }; class FERemodelingDensity { public: double operator()(const FEMaterialPoint& mp) { const FERemodelingMaterialPoint* pt = (mp.ExtractData<FERemodelingMaterialPoint>()); return (pt ? pt->m_rhor : 0.0); } }; bool FEPlotDensity::Save(FEDomain &dom, FEDataStream& a) { if (dom.Class() == FE_DOMAIN_SOLID) { FESolidDomain& bd = static_cast<FESolidDomain&>(dom); FEElasticMaterial* em = bd.GetMaterial()->ExtractProperty<FEElasticMaterial>(); if (em == 0) return false; FERemodelingElasticMaterial* rm = dynamic_cast<FERemodelingElasticMaterial*>(em); if (rm) { FERemodelingDensity dens; writeAverageElementValue<double>(dom, a, dens); return true; } else { FEDensity dens(em); writeAverageElementValue<double>(dom, a, dens); return true; } } else if (dom.Class() == FE_DOMAIN_SHELL) { FEElasticMaterial* em = dom.GetMaterial()->ExtractProperty<FEElasticMaterial>(); if (em == 0) return false; FEDensity dens(em); writeAverageElementValue<double>(dom, a, dens); return true; } return false; } //----------------------------------------------------------------------------- bool FEPlotElementStrainEnergy::Save(FEDomain &dom, FEDataStream& a) { FEElasticMaterial* pme = dom.GetMaterial()->ExtractProperty<FEElasticMaterial>(); if (pme == 0) return false; if (dom.Class() == FE_DOMAIN_SOLID) { FESolidDomain& bd = static_cast<FESolidDomain&>(dom); writeIntegratedElementValue<double>(bd, a, FEStrainEnergy(pme)); return true; } else if (dom.Class() == FE_DOMAIN_SHELL) { FESSIShellDomain* bd = dynamic_cast<FESSIShellDomain*>(&dom); if (bd == 0) return false; writeIntegratedElementValue(*bd, a, FEStrainEnergy(pme)); return true; } return false; } //----------------------------------------------------------------------------- // integrated element kinetic energy class FEKineticEnergyDensity { public: FEKineticEnergyDensity(FEElasticMaterial* pm) : m_mat(pm) {} double operator()(const FEMaterialPoint& mp) { const FEElasticMaterialPoint& ep = *(mp.ExtractData<FEElasticMaterialPoint>()); return 0.5*(ep.m_v*ep.m_v)*m_mat->Density(const_cast<FEMaterialPoint&>(mp)); } private: FEElasticMaterial* m_mat; }; bool FEPlotElementKineticEnergy::Save(FEDomain &dom, FEDataStream& a) { FEElasticMaterial* pme = dom.GetMaterial()->ExtractProperty<FEElasticMaterial>(); if (pme == nullptr) return false; if (dom.Class() == FE_DOMAIN_SOLID) { FESolidDomain& bd = static_cast<FESolidDomain&>(dom); writeIntegratedElementValue<double>(bd, a, FEKineticEnergyDensity(pme)); return true; } else if (dom.Class() == FE_DOMAIN_SHELL) { FESSIShellDomain* bd = dynamic_cast<FESSIShellDomain*>(&dom); if (bd == 0) return false; writeIntegratedElementValue(*bd, a, FEKineticEnergyDensity(pme)); return true; } return false; } //----------------------------------------------------------------------------- bool FEPlotElementCenterOfMass::Save(FEDomain &dom, FEDataStream& a) { FEElasticMaterial* pme = dom.GetMaterial()->ExtractProperty<FEElasticMaterial>(); if (pme == nullptr) return false; if (dom.Class() == FE_DOMAIN_SOLID) { FESolidDomain& bd = static_cast<FESolidDomain&>(dom); for (int i = 0; i<bd.Elements(); ++i) { FESolidElement& el = bd.Element(i); double* gw = el.GaussWeights(); // integrate zeroth and first mass moments vec3d ew = vec3d(0, 0, 0); double m = 0; for (int j = 0; j<el.GaussPoints(); ++j) { FEMaterialPoint& mp = *el.GetMaterialPoint(j); double detJ = bd.detJ0(el, j)*gw[j]; ew += mp.m_rt*(pme->Density(mp)*detJ); m += pme->Density(mp)*detJ; } a << ew / m; } return true; } else if (dom.Class() == FE_DOMAIN_SHELL) { FESSIShellDomain* bd = dynamic_cast<FESSIShellDomain*>(&dom); if (bd == 0) return false; for (int i = 0; i<bd->Elements(); ++i) { FEShellElement& el = bd->Element(i); double* gw = el.GaussWeights(); // integrate zeroth and first mass moments vec3d ew = vec3d(0, 0, 0); double m = 0; for (int j = 0; j<el.GaussPoints(); ++j) { FEMaterialPoint& pt = *el.GetMaterialPoint(j); double detJ = bd->detJ0(el, j)*gw[j]; ew += pt.m_rt*(pme->Density(pt)*detJ); m += pme->Density(pt)*detJ; } a << ew / m; } return true; } return false; } //----------------------------------------------------------------------------- class FEElementLinearMomentum { public: FEElementLinearMomentum(FEElasticMaterial* pm) : m_mat(pm) {} vec3d operator()(const FEMaterialPoint& mp) { const FEElasticMaterialPoint& pt = *(mp.ExtractData<FEElasticMaterialPoint>()); return pt.m_v*m_mat->Density(const_cast<FEMaterialPoint&>(mp)); } private: FEElasticMaterial* m_mat; }; bool FEPlotElementLinearMomentum::Save(FEDomain &dom, FEDataStream& a) { FEElasticMaterial* pme = dom.GetMaterial()->ExtractProperty<FEElasticMaterial>(); if (pme == nullptr) return false; if (dom.Class() == FE_DOMAIN_SOLID) { FESolidDomain& bd = static_cast<FESolidDomain&>(dom); writeIntegratedElementValue<vec3d>(bd, a, FEElementLinearMomentum(pme)); return true; } else if (dom.Class() == FE_DOMAIN_SHELL) { FESSIShellDomain* bd = dynamic_cast<FESSIShellDomain*>(&dom); if (bd == 0) return false; writeIntegratedElementValue(*bd, a, FEElementLinearMomentum(pme)); return true; } return false; } //----------------------------------------------------------------------------- // Integrated element angular momentum class FEElementAngularMomentum { public: FEElementAngularMomentum(FEElasticMaterial* pm) : m_mat(pm) {} vec3d operator()(const FEMaterialPoint& mp) { const FEElasticMaterialPoint& pt = *(mp.ExtractData<FEElasticMaterialPoint>()); return (mp.m_rt ^ pt.m_v)*m_mat->Density(const_cast<FEMaterialPoint&>(mp)); } private: FEElasticMaterial* m_mat; }; bool FEPlotElementAngularMomentum::Save(FEDomain &dom, FEDataStream& a) { FEElasticMaterial* pme = dom.GetMaterial()->ExtractProperty<FEElasticMaterial>(); if (pme == nullptr) return false; if (dom.Class() == FE_DOMAIN_SOLID) { FESolidDomain& bd = static_cast<FESolidDomain&>(dom); writeIntegratedElementValue<vec3d>(bd, a, FEElementAngularMomentum(pme)); return true; } else if (dom.Class() == FE_DOMAIN_SHELL) { FESSIShellDomain* bd = dynamic_cast<FESSIShellDomain*>(&dom); writeIntegratedElementValue(*bd, a, FEElementAngularMomentum(pme)); return true; } return false; } //----------------------------------------------------------------------------- class FEElementStressPower { public: double operator()(const FEMaterialPoint& mp) { const FEElasticMaterialPoint& ep = *mp.ExtractData<FEElasticMaterialPoint>(); return ep.m_s.dotdot(ep.m_L.sym())*ep.m_J; } }; bool FEPlotElementStressPower::Save(FEDomain &dom, FEDataStream& a) { FEElasticMaterial* pme = dom.GetMaterial()->ExtractProperty<FEElasticMaterial>(); if (pme == nullptr) return false; if (dom.Class() == FE_DOMAIN_SOLID) { FESolidDomain& bd = static_cast<FESolidDomain&>(dom); writeIntegratedElementValue<double>(bd, a, FEElementStressPower()); return true; } else if (dom.Class() == FE_DOMAIN_SHELL) { FESSIShellDomain* bd = dynamic_cast<FESSIShellDomain*>(&dom); if (bd == 0) return false; writeIntegratedElementValue(*bd, a, FEElementStressPower()); return true; } return false; } //----------------------------------------------------------------------------- class FECurrentElementStrainEnergy { public: double operator()(const FEMaterialPoint& mp) { const FEElasticMaterialPoint& ep = *mp.ExtractData<FEElasticMaterialPoint>(); return ep.m_Wt; } }; bool FEPlotCurrentElementStrainEnergy::Save(FEDomain &dom, FEDataStream& a) { FEElasticMaterial* pme = dom.GetMaterial()->ExtractProperty<FEElasticMaterial>(); if (pme == nullptr) return false; if (dom.Class() == FE_DOMAIN_SOLID) { FESolidDomain& bd = static_cast<FESolidDomain&>(dom); writeIntegratedElementValue<double>(bd, a, FECurrentElementStrainEnergy()); return true; } else if (dom.Class() == FE_DOMAIN_SHELL) { FESSIShellDomain* bd = dynamic_cast<FESSIShellDomain*>(&dom); if (bd == 0) return false; writeIntegratedElementValue(*bd, a, FECurrentElementStrainEnergy()); return true; } return false; } //----------------------------------------------------------------------------- bool FEPlotCurrentElementKineticEnergy::Save(FEDomain &dom, FEDataStream& a) { const int dof_VX = GetFEModel()->GetDOFIndex("vx"); const int dof_VY = GetFEModel()->GetDOFIndex("vy"); const int dof_VZ = GetFEModel()->GetDOFIndex("vz"); const int dof_VU = GetFEModel()->GetDOFIndex("vu"); const int dof_VV = GetFEModel()->GetDOFIndex("vv"); const int dof_VW = GetFEModel()->GetDOFIndex("vw"); FEMesh& mesh = *dom.GetMesh(); FEElasticMaterial* pme = dom.GetMaterial()->ExtractProperty<FEElasticMaterial>(); if (pme == nullptr) return false; const int NELN = FEElement::MAX_NODES; if (dom.Class() == FE_DOMAIN_SOLID) { FESolidDomain& bd = static_cast<FESolidDomain&>(dom); for (int i=0; i<bd.Elements(); ++i) { FESolidElement& el = bd.Element(i); double* gw = el.GaussWeights(); // get nodal velocities vec3d vt[NELN], vn[NELN]; for (int j=0; j<el.Nodes(); ++j) vt[j] = mesh.Node(el.m_node[j]).get_vec3d(dof_VX, dof_VY, dof_VZ); // evaluate velocities at integration points for (int j=0; j<el.GaussPoints(); ++j) vn[j] = el.Evaluate(vt, j); // integrate kinetic energy double ew = 0; for (int j=0; j<el.GaussPoints(); ++j) { FEMaterialPoint& mp = *el.GetMaterialPoint(j); double detJ = bd.detJ0(el, j)*gw[j]* pme->Density(mp)/2; ew += vn[j]*vn[j]*detJ; } a << ew; } return true; } else if (dom.Class() == FE_DOMAIN_SHELL) { FESSIShellDomain* bd = dynamic_cast<FESSIShellDomain*>(&dom); if (bd == 0) return false; for (int i=0; i<bd->Elements(); ++i) { FEShellElement& el = bd->Element(i); double* gw = el.GaussWeights(); // get nodal velocities vec3d vt[NELN], wt[NELN], vn[NELN]; for (int j=0; j<el.Nodes(); ++j) { vt[j] = mesh.Node(el.m_node[j]).get_vec3d(dof_VX, dof_VY, dof_VZ); wt[j] = mesh.Node(el.m_node[j]).get_vec3d(dof_VU, dof_VV, dof_VW); } // evaluate velocities at integration points for (int j=0; j<el.GaussPoints(); ++j) vn[j] = bd->evaluate(el, vt, wt, j); // integrate kinetic energy double ew = 0; for (int j=0; j<el.GaussPoints(); ++j) { FEMaterialPoint& mp = *el.GetMaterialPoint(j); double detJ = bd->detJ0(el, j)*gw[j]* pme->Density(mp)/2; ew += vn[j]*vn[j]*detJ; } a << ew; } return true; } return false; } //----------------------------------------------------------------------------- bool FEPlotCurrentElementCenterOfMass::Save(FEDomain &dom, FEDataStream& a) { FEMesh& mesh = *dom.GetMesh(); FEElasticMaterial* pme = dom.GetMaterial()->ExtractProperty<FEElasticMaterial>(); if (pme == nullptr) return false; const int NELN = FEElement::MAX_NODES; if (dom.Class() == FE_DOMAIN_SOLID) { FESolidDomain& bd = static_cast<FESolidDomain&>(dom); for (int i=0; i<bd.Elements(); ++i) { FESolidElement& el = bd.Element(i); double* gw = el.GaussWeights(); // get nodal positions and velocities vec3d rt[NELN], rn[NELN]; for (int j=0; j<el.Nodes(); ++j) rt[j] = mesh.Node(el.m_node[j]).m_rt; // evaluate positions at integration points for (int j=0; j<el.GaussPoints(); ++j) rn[j] = el.Evaluate(rt, j); // integrate zeroth and first mass moment double ez = 0; vec3d ef = vec3d(0,0,0); for (int j=0; j<el.GaussPoints(); ++j) { FEMaterialPoint& mp = *el.GetMaterialPoint(j); double detJ = bd.detJ0(el, j)*gw[j]* pme->Density(mp); ez += detJ; ef += rn[j]*detJ; } a << ef/ez; } return true; } else if (dom.Class() == FE_DOMAIN_SHELL) { FESSIShellDomain* bd = dynamic_cast<FESSIShellDomain*>(&dom); if (bd == 0) return false; for (int i=0; i<bd->Elements(); ++i) { FEShellElement& el = bd->Element(i); double* gw = el.GaussWeights(); // get nodal velocities vec3d rt[NELN], st[NELN], rn[NELN]; for (int j=0; j<el.Nodes(); ++j) { rt[j] = mesh.Node(el.m_node[j]).m_rt; st[j] = mesh.Node(el.m_node[j]).st(); } // evaluate velocities at integration points for (int j=0; j<el.GaussPoints(); ++j) rn[j] = bd->evaluate(el, rt, st, j); // integrate zeroth and first mass moment double ez = 0; vec3d ef = vec3d(0,0,0); for (int j=0; j<el.GaussPoints(); ++j) { FEMaterialPoint& mp = *el.GetMaterialPoint(j); double detJ = bd->detJ0(el, j)*gw[j]* pme->Density(mp); ez += detJ; ef += rn[j]*detJ; } a << ef/ez; } return true; } return false; } //----------------------------------------------------------------------------- bool FEPlotCurrentElementLinearMomentum::Save(FEDomain &dom, FEDataStream& a) { const int dof_VX = GetFEModel()->GetDOFIndex("vx"); const int dof_VY = GetFEModel()->GetDOFIndex("vy"); const int dof_VZ = GetFEModel()->GetDOFIndex("vz"); const int dof_VU = GetFEModel()->GetDOFIndex("vu"); const int dof_VV = GetFEModel()->GetDOFIndex("vv"); const int dof_VW = GetFEModel()->GetDOFIndex("vw"); FEMesh& mesh = *dom.GetMesh(); FEElasticMaterial* pme = dom.GetMaterial()->ExtractProperty<FEElasticMaterial>(); if (pme == nullptr) return false; const int NELN = FEElement::MAX_NODES; if (dom.Class() == FE_DOMAIN_SOLID) { FESolidDomain& bd = static_cast<FESolidDomain&>(dom); for (int i=0; i<bd.Elements(); ++i) { FESolidElement& el = bd.Element(i); double* gw = el.GaussWeights(); // get nodal velocities vec3d vt[NELN], vn[NELN]; for (int j=0; j<el.Nodes(); ++j) { vt[j] = mesh.Node(el.m_node[j]).get_vec3d(dof_VX, dof_VY, dof_VZ); } // evaluate velocities at integration points for (int j=0; j<el.GaussPoints(); ++j) vn[j] = el.Evaluate(vt, j); // integrate linear momentum vec3d ew = vec3d(0,0,0); for (int j=0; j<el.GaussPoints(); ++j) { FEMaterialPoint& mp = *el.GetMaterialPoint(j); double detJ = bd.detJ0(el, j)*gw[j]; ew += vn[j]*(pme->Density(mp)*detJ); } a << ew; } return true; } else if (dom.Class() == FE_DOMAIN_SHELL) { FESSIShellDomain* bd = dynamic_cast<FESSIShellDomain*>(&dom); if (bd == 0) return false; for (int i=0; i<bd->Elements(); ++i) { FEShellElement& el = bd->Element(i); double* gw = el.GaussWeights(); // get nodal velocities vec3d vt[NELN], wt[NELN], vn[NELN]; for (int j=0; j<el.Nodes(); ++j) { vt[j] = mesh.Node(el.m_node[j]).get_vec3d(dof_VX, dof_VY, dof_VZ); wt[j] = mesh.Node(el.m_node[j]).get_vec3d(dof_VU, dof_VV, dof_VW); } // evaluate velocities at integration points for (int j=0; j<el.GaussPoints(); ++j) vn[j] = bd->evaluate(el, vt, wt, j); // integrate linear momentum vec3d ew = vec3d(0,0,0); for (int j=0; j<el.GaussPoints(); ++j) { FEMaterialPoint& mp = *el.GetMaterialPoint(j); double detJ = bd->detJ0(el, j)*gw[j]; ew += vn[j]*(pme->Density(mp)*detJ); } a << ew; } return true; } return false; } //----------------------------------------------------------------------------- bool FEPlotCurrentElementAngularMomentum::Save(FEDomain &dom, FEDataStream& a) { const int dof_VX = GetFEModel()->GetDOFIndex("vx"); const int dof_VY = GetFEModel()->GetDOFIndex("vy"); const int dof_VZ = GetFEModel()->GetDOFIndex("vz"); const int dof_SVX = GetFEModel()->GetDOFIndex("svx"); const int dof_SVY = GetFEModel()->GetDOFIndex("svy"); const int dof_SVZ = GetFEModel()->GetDOFIndex("svz"); FEMesh& mesh = *dom.GetMesh(); FEElasticMaterial* pme = dom.GetMaterial()->ExtractProperty<FEElasticMaterial>(); if (pme == nullptr) return false; const int NELN = FEElement::MAX_NODES; if (dom.Class() == FE_DOMAIN_SOLID) { FESolidDomain& bd = static_cast<FESolidDomain&>(dom); for (int i=0; i<bd.Elements(); ++i) { FESolidElement& el = bd.Element(i); double* gw = el.GaussWeights(); // get nodal positions and velocities vec3d rt[NELN], rn[NELN]; vec3d vt[NELN], vn[NELN]; for (int j=0; j<el.Nodes(); ++j) { rt[j] = mesh.Node(el.m_node[j]).m_rt; vt[j] = mesh.Node(el.m_node[j]).get_vec3d(dof_VX, dof_VY, dof_VZ); } // evaluate velocities at integration points for (int j=0; j<el.GaussPoints(); ++j) { rn[j] = el.Evaluate(rt, j); vn[j] = el.Evaluate(vt, j); } // integrate angular momentum vec3d ew = vec3d(0,0,0); for (int j=0; j<el.GaussPoints(); ++j) { FEMaterialPoint& mp = *el.GetMaterialPoint(j); double detJ = bd.detJ0(el, j)*gw[j]; ew += (rn[j] ^ vn[j])*(pme->Density(mp)*detJ); } a << ew; } return true; } else if (dom.Class() == FE_DOMAIN_SHELL) { FESSIShellDomain* bd = dynamic_cast<FESSIShellDomain*>(&dom); if (bd == 0) return false; for (int i=0; i<bd->Elements(); ++i) { FEShellElement& el = bd->Element(i); double* gw = el.GaussWeights(); // get nodal velocities vec3d rt[NELN], st[NELN], rn[NELN]; vec3d vt[NELN], wt[NELN], vn[NELN]; for (int j=0; j<el.Nodes(); ++j) { rt[j] = mesh.Node(el.m_node[j]).m_rt; st[j] = mesh.Node(el.m_node[j]).st(); vt[j] = mesh.Node(el.m_node[j]).get_vec3d(dof_VX, dof_VY, dof_VZ); wt[j] = mesh.Node(el.m_node[j]).get_vec3d(dof_SVX, dof_SVY, dof_SVZ); } // evaluate velocities at integration points for (int j=0; j<el.GaussPoints(); ++j) { rn[j] = bd->evaluate(el, rt, st, j); vn[j] = bd->evaluate(el, vt, wt, j); } // integrate angular momentum vec3d ew = vec3d(0,0,0); for (int j=0; j<el.GaussPoints(); ++j) { FEMaterialPoint& mp = *el.GetMaterialPoint(j); double detJ = bd->detJ0(el, j)*gw[j]; ew += (rn[j] ^ vn[j])*(pme->Density(mp)*detJ); } a << ew; } return true; } return false; } //----------------------------------------------------------------------------- bool FEPlotRelativeVolume::Save(FEDomain &dom, FEDataStream& a) { if (dom.Class() == FE_DOMAIN_SOLID) { writeAverageElementValue<double>(dom, a, [](const FEMaterialPoint& mp) { const FEElasticMaterialPoint* pt = mp.ExtractData<FEElasticMaterialPoint>(); return (pt ? pt->m_J : 0.0); }); } else if (dom.Class() == FE_DOMAIN_SHELL) { FEShellDomain* sd = dynamic_cast<FEShellDomain*>(&dom); assert(sd); // a filter to get J from a strain tensor auto getJfromE = [](const mat3ds& E) { mat3ds C = mat3dd(1) + E * 2; return sqrt(C.det()); }; FEShellDomainNew* newsd = dynamic_cast<FEShellDomainNew*>(sd); FEElasticEASShellDomain* easd = dynamic_cast<FEElasticEASShellDomain*>(newsd); FEElasticANSShellDomain* ansd = dynamic_cast<FEElasticANSShellDomain*>(newsd); if (easd || ansd) { writeAverageElementValue<mat3ds, double>(dom, a, [](FEElement& el, int ip) { FEShellElementNew& se = static_cast<FEShellElementNew&>(el); return se.m_E[ip]; }, getJfromE); } else { writeAverageElementValue<double>(dom, a, [](const FEMaterialPoint& mp) { const FEElasticMaterialPoint* pt = mp.ExtractData<FEElasticMaterialPoint>(); return (pt ? pt->m_J : 0.0); }); } return true; } else return false; return true; } bool FEPlotSPRRelativeVolume::Save(FEDomain& dom, FEDataStream& a) { if (dom.Class() == FE_DOMAIN_SOLID) { FESolidDomain& solidDomain = dynamic_cast<FESolidDomain&>(dom); writeSPRElementValue(solidDomain, a, [](const FEMaterialPoint& mp) { const FEElasticMaterialPoint* pt = mp.ExtractData<FEElasticMaterialPoint>(); return (pt ? pt->m_J : 0.0); }); return true; } return false; } bool FEPlotShellRelativeVolume::Save(FEDomain& dom, FEDataStream& a) { FEShellDomain* sd = dynamic_cast<FEShellDomain*>(&dom); if (sd == nullptr) return false; // a filter to get J from a strain tensor auto getJfromE = [](const mat3ds& E) { mat3ds C = mat3dd(1) + E * 2; return sqrt(C.det()); }; FEShellDomainNew* newsd = dynamic_cast<FEShellDomainNew*>(sd); FEElasticEASShellDomain* easd = dynamic_cast<FEElasticEASShellDomain*>(newsd); FEElasticANSShellDomain* ansd = dynamic_cast<FEElasticANSShellDomain*>(newsd); if (easd || ansd) { writeAverageElementValue<mat3ds, double>(dom, a, [](FEElement& el, int ip) { FEShellElementNew& se = static_cast<FEShellElementNew&>(el); return se.m_E[ip]; }, getJfromE); } else { writeAverageElementValue<double>(dom, a, [](const FEMaterialPoint& mp) { const FEElasticMaterialPoint* pt = mp.ExtractData<FEElasticMaterialPoint>(); return (pt ? pt->m_J : 0.0); }); } return true; } //----------------------------------------------------------------------------- bool FEPlotFiberStretch::SetFilter(const char* szfilter) { m_matComp = szfilter; return true; } bool FEPlotFiberStretch::Save(FEDomain &dom, FEDataStream& a) { FEElasticMaterial* pme = dom.GetMaterial()->ExtractProperty<FEElasticMaterial>(); if (pme == nullptr) return false; if (m_matComp.empty() == false) { pme = dynamic_cast<FEElasticMaterial*>(pme->GetProperty(m_matComp.c_str())); if (pme == nullptr) return false; } // get the fiber property FEVec3dValuator* vec = dynamic_cast<FEVec3dValuator*>(pme->GetProperty("fiber")); if (vec == 0) return false; if (dom.Class() != FE_DOMAIN_SOLID) return false; writeAverageElementValue<double>(dom, a, [&](const FEMaterialPoint& mp) -> double { const FEElasticMaterialPoint& ep = *mp.ExtractData<FEElasticMaterialPoint>(); mat3d Q = pme->GetLocalCS(mp); vec3d a0 = vec->unitVector(mp); vec3d ar = Q * a0; mat3d F = ep.m_F; vec3d a = F*ar; return a.norm(); }); return true; } //----------------------------------------------------------------------------- class FEFiberVector { public: FEFiberVector(FEMaterial* pm, FEVec3dValuator& vec) : m_pm(pm), m_vec(vec) {} vec3d operator()(const FEMaterialPoint& mp) { const FEElasticMaterialPoint* pt = mp.ExtractData<const FEElasticMaterialPoint>(); if (pt) { mat3d Q = m_pm->GetLocalCS(mp); mat3d F = pt->m_F; vec3d a0 = m_vec.unitVector(mp); vec3d ar = Q * a0; vec3d a = F * ar; a.unit(); return a; } else return m_vec(mp); } private: FEMaterial* m_pm; FEVec3dValuator& m_vec; }; FEPlotFiberVector::FEPlotFiberVector(FEModel* pfem) : FEPlotDomainData(pfem, PLT_VEC3F, FMT_ITEM) { } bool FEPlotFiberVector::SetFilter(const char* szfilter) { m_matComp = szfilter; return true; } bool FEPlotFiberVector::Save(FEDomain &dom, FEDataStream& a) { FEElasticMaterial* pme = dom.GetMaterial()->ExtractProperty<FEElasticMaterial>(); if (pme == nullptr) return false; if (m_matComp.empty() == false) { pme = dynamic_cast<FEElasticMaterial*>(pme->GetProperty(m_matComp.c_str())); if (pme == nullptr) return false; } // get the fiber property FEVec3dValuator* vec = dynamic_cast<FEVec3dValuator*>(pme->GetProperty("fiber")); if (vec == 0) return false; writeAverageElementValue<vec3d, vec3d>(dom, a, FEFiberVector(pme, *vec), [](const vec3d& r) -> vec3d { vec3d n(r); n.unit(); return n; }); return true; } //----------------------------------------------------------------------------- bool FEPlotMaterialAxes::SetFilter(const char* szfilter) { m_matComp = szfilter; return true; } bool FEPlotMaterialAxes::Save(FEDomain &dom, FEDataStream& a) { FEElasticMaterial* pme = dom.GetMaterial()->ExtractProperty<FEElasticMaterial>(); if (pme == nullptr) return false; if (m_matComp.empty() == false) { pme = dynamic_cast<FEElasticMaterial*>(pme->GetProperty(m_matComp.c_str())); if (pme == nullptr) return false; } int BE = dom.Elements(); for (int i = 0; i<BE; ++i) { FEElement& el = dom.ElementRef(i); // I cannot average the material axes since the average may not be orthogonal // Until I find a better option, I'll just export the first integration point. FEMaterialPoint& mp = *el.GetMaterialPoint(0); mat3d Q = pme->GetLocalCS(mp); a << Q; } return true; } //----------------------------------------------------------------------------- // TODO: The factor Jm13 is not used. This doesn't look correct class FEDevFiberStretch { public: FEDevFiberStretch(FEElasticMaterial* mat) : m_mat(mat) {} public: double operator()(const FEMaterialPoint& mp) { const FEElasticMaterialPoint& pt = *mp.ExtractData<FEElasticMaterialPoint>(); mat3d Q = m_mat->GetLocalCS(mp); // get the material fiber axis vec3d r0 = Q.col(0); // apply deformation vec3d r = pt.m_F*r0; // calculate the deviatoric fiber stretch double lam = r.norm(); return lam; } private: FEElasticMaterial* m_mat; }; bool FEPlotDevFiberStretch::SetFilter(const char* szfilter) { m_matComp = szfilter; return true; } bool FEPlotDevFiberStretch::Save(FEDomain &dom, FEDataStream& a) { FEElasticMaterial* pme = dom.GetMaterial()->ExtractProperty<FEElasticMaterial>(); if (pme == nullptr) return false; if (m_matComp.empty() == false) { pme = dynamic_cast<FEElasticMaterial*>(pme->GetProperty(m_matComp.c_str())); if (pme == nullptr) return false; } if (dom.Class() != FE_DOMAIN_SOLID) return false; FEDevFiberStretch lam(pme); writeAverageElementValue<double>(dom, a, lam); return true; } //============================================================================= // Principal components of stress class FEPrincStresses { public: mat3dd operator()(const FEMaterialPoint& mp) { const FEElasticMaterialPoint& ep = *mp.ExtractData<FEElasticMaterialPoint>(); const mat3ds& s = ep.m_s; double l[3]; s.exact_eigen(l); return mat3dd(l[0], l[1], l[2]); } }; bool FEPlotSPRPrincStresses::Save(FEDomain& dom, FEDataStream& a) { // For now, this is only available for solid domains if (dom.Class() != FE_DOMAIN_SOLID) return false; // get the domain FESolidDomain& sd = static_cast<FESolidDomain&>(dom); writeSPRElementValueMat3dd(sd, a, FEPrincStresses()); return true; } //----------------------------------------------------------------------------- bool FEPlotDeformationGradient::Save(FEDomain& dom, FEDataStream& a) { FEElasticMaterial* pme = dom.GetMaterial()->ExtractProperty<FEElasticMaterial>(); if (pme == nullptr) return false; writeAverageElementValue<mat3d>(dom, a, [](const FEMaterialPoint& mp) { const FEElasticMaterialPoint& pt = *mp.ExtractData<FEElasticMaterialPoint>(); return pt.m_F; }); return true; } //============================================================================= //! Store the average Lagrangian strain class FELagrangeStrain { public: mat3ds operator()(const FEMaterialPoint& mp) { const FEElasticMaterialPoint* pt = mp.ExtractData<FEElasticMaterialPoint>(); if (pt == 0) return mat3ds(0, 0, 0, 0, 0, 0); mat3d C = pt->RightCauchyGreen(); mat3ds E = ((C - mat3dd(1.0))*0.5).sym(); return E; } }; //----------------------------------------------------------------------------- bool FEPlotLagrangeStrain::Save(FEDomain& dom, FEDataStream& a) { FEElasticMaterial* pme = dom.GetMaterial()->ExtractProperty<FEElasticMaterial>(); if (pme == nullptr) return false; if (dom.Class() == FE_DOMAIN_SOLID) { writeAverageElementValue<mat3ds>(dom, a, [](const FEMaterialPoint& mp) { const FEElasticMaterialPoint& pt = *mp.ExtractData<FEElasticMaterialPoint>(); return pt.Strain(); }); } else if (dom.Class() == FE_DOMAIN_SHELL) { FEShellDomain* sd = dynamic_cast<FEShellDomain*>(&dom); assert(sd); FEElasticEASShellDomain* easd = dynamic_cast<FEElasticEASShellDomain*>(&dom); FEElasticANSShellDomain* ansd = dynamic_cast<FEElasticANSShellDomain*>(&dom); if (easd || ansd) { writeAverageElementValue<mat3ds>(dom, a, [](FEElement& el, int ip) { FEShellElementNew& se = static_cast<FEShellElementNew&>(el); return se.m_E[ip]; }); } else { writeAverageElementValue<mat3ds>(dom, a, [](const FEMaterialPoint& mp) { const FEElasticMaterialPoint& pt = *mp.ExtractData<FEElasticMaterialPoint>(); return pt.Strain(); }); } } else return false; return true; } bool FEPlotShellStrain::Save(FEDomain& dom, FEDataStream& a) { FEElasticMaterial* pme = dom.GetMaterial()->ExtractProperty<FEElasticMaterial>(); if (pme == nullptr) return false; FEShellDomain* sd = dynamic_cast<FEShellDomain*>(&dom); if (sd == nullptr) return false; FEElasticEASShellDomain* easd = dynamic_cast<FEElasticEASShellDomain*>(&dom); FEElasticANSShellDomain* ansd = dynamic_cast<FEElasticANSShellDomain*>(&dom); if (easd || ansd) { writeAverageElementValue<mat3ds>(dom, a, [](FEElement& el, int ip) { FEShellElementNew& se = static_cast<FEShellElementNew&>(el); return se.m_E[ip]; }); } else { writeAverageElementValue<mat3ds>(dom, a, [](const FEMaterialPoint& mp) { const FEElasticMaterialPoint& pt = *mp.ExtractData<FEElasticMaterialPoint>(); return pt.Strain(); }); } return true; } //----------------------------------------------------------------------------- bool FEPlotInfStrain::Save(FEDomain& dom, FEDataStream& a) { FEElasticMaterial* pme = dom.GetMaterial()->ExtractProperty<FEElasticMaterial>(); if (pme == nullptr) return false; if (dom.Class() == FE_DOMAIN_SOLID) { writeAverageElementValue<mat3ds>(dom, a, [](const FEMaterialPoint& mp) { const FEElasticMaterialPoint& pt = *mp.ExtractData<FEElasticMaterialPoint>(); // displacement tensor mat3d U = pt.m_F - mat3dd(1.0); // evaluate small strain tensor eij = 0.5*(Uij + Uji) mat3ds e = U.sym(); return e; }); } else return false; return true; } //----------------------------------------------------------------------------- bool FEPlotSPRLagrangeStrain::Save(FEDomain& dom, FEDataStream& a) { // For now, this is only available for solid domains if (dom.Class() != FE_DOMAIN_SOLID) return false; FESolidDomain& sd = static_cast<FESolidDomain&>(dom); writeSPRElementValueMat3ds(sd, a, FELagrangeStrain()); return true; } bool FEPlotSPRInfStrain::Save(FEDomain& dom, FEDataStream& a) { // For now, this is only available for solid domains if (dom.Class() != FE_DOMAIN_SOLID) return false; FESolidDomain& sd = static_cast<FESolidDomain&>(dom); writeSPRElementValueMat3ds(sd, a, [](const FEMaterialPoint& mp) { const FEElasticMaterialPoint& pt = *mp.ExtractData<FEElasticMaterialPoint>(); // displacement tensor mat3d U = pt.m_F - mat3dd(1.0); // evaluate small strain tensor eij = 0.5*(Uij + Uji) mat3ds e = U.sym(); return e; }); return true; } //============================================================================= //! Store the average Almansi tensor class FEAlmansiStrain { public: mat3ds operator()(const FEMaterialPoint& mp) { const FEElasticMaterialPoint* pt = mp.ExtractData<FEElasticMaterialPoint>(); if (pt == 0) return mat3ds(0, 0, 0, 0, 0, 0); return pt->AlmansiStrain(); } }; //----------------------------------------------------------------------------- bool FEPlotAlmansiStrain::Save(FEDomain& dom, FEDataStream& a) { FEElasticMaterial* pme = dom.GetMaterial()->ExtractProperty<FEElasticMaterial>(); if (pme == nullptr) return false; writeAverageElementValue<mat3ds>(dom, a, FEAlmansiStrain()); return true; } //============================================================================= //! Store the average right Cauchy Green tensor class FERightCauchyGreen { public: mat3ds operator()(const FEMaterialPoint& mp) { const FEElasticMaterialPoint* pt = mp.ExtractData<FEElasticMaterialPoint>(); if (pt == 0) return mat3ds(0, 0, 0, 0, 0, 0); return pt->RightCauchyGreen(); } }; //----------------------------------------------------------------------------- bool FEPlotRightCauchyGreen::Save(FEDomain& dom, FEDataStream& a) { FEElasticMaterial* pme = dom.GetMaterial()->ExtractProperty<FEElasticMaterial>(); if (pme == nullptr) return false; writeAverageElementValue<mat3ds>(dom, a, FERightCauchyGreen()); return true; } //============================================================================= //! Store the average left Cauchy Green tensor class FELeftCauchyGreen { public: mat3ds operator()(const FEMaterialPoint& mp) { const FEElasticMaterialPoint* pt = mp.ExtractData<FEElasticMaterialPoint>(); if (pt == 0) return mat3ds(0, 0, 0, 0, 0, 0); return pt->LeftCauchyGreen(); } }; //----------------------------------------------------------------------------- bool FEPlotLeftCauchyGreen::Save(FEDomain& dom, FEDataStream& a) { FEElasticMaterial* pme = dom.GetMaterial()->ExtractProperty<FEElasticMaterial>(); if (pme == nullptr) return false; writeAverageElementValue<mat3ds>(dom, a, FELeftCauchyGreen()); return true; } //============================================================================= //! Store the average right stretch class FERightStretch { public: mat3ds operator()(const FEMaterialPoint& mp) { const FEElasticMaterialPoint* pt = mp.ExtractData<FEElasticMaterialPoint>(); if (pt == 0) return mat3ds(0, 0, 0, 0, 0, 0); return pt->RightStretch(); } }; //----------------------------------------------------------------------------- bool FEPlotRightStretch::Save(FEDomain& dom, FEDataStream& a) { FEElasticMaterial* pme = dom.GetMaterial()->ExtractProperty<FEElasticMaterial>(); if (pme == nullptr) return false; writeAverageElementValue<mat3ds>(dom, a, FERightStretch()); return true; } //============================================================================= //! Store the average right stretch class FELeftStretch { public: mat3ds operator()(const FEMaterialPoint& mp) { const FEElasticMaterialPoint* pt = mp.ExtractData<FEElasticMaterialPoint>(); if (pt == 0) return mat3ds(0, 0, 0, 0, 0, 0); return pt->LeftStretch(); } }; //----------------------------------------------------------------------------- bool FEPlotLeftStretch::Save(FEDomain& dom, FEDataStream& a) { FEElasticMaterial* pme = dom.GetMaterial()->ExtractProperty<FEElasticMaterial>(); if (pme == nullptr) return false; writeAverageElementValue<mat3ds>(dom, a, FELeftStretch()); return true; } //============================================================================= //! Store the average right Hencky class FERightHencky { public: mat3ds operator()(const FEMaterialPoint& mp) { const FEElasticMaterialPoint* pt = mp.ExtractData<FEElasticMaterialPoint>(); if (pt == 0) return mat3ds(0, 0, 0, 0, 0, 0); return pt->RightHencky(); } }; //----------------------------------------------------------------------------- bool FEPlotRightHencky::Save(FEDomain& dom, FEDataStream& a) { FEElasticMaterial* pme = dom.GetMaterial()->ExtractProperty<FEElasticMaterial>(); if (pme == nullptr) return false; writeAverageElementValue<mat3ds>(dom, a, FERightHencky()); return true; } //============================================================================= //! Store the average left Hencky class FELeftHencky { public: mat3ds operator()(const FEMaterialPoint& mp) { const FEElasticMaterialPoint* pt = mp.ExtractData<FEElasticMaterialPoint>(); if (pt == 0) return mat3ds(0, 0, 0, 0, 0, 0); return pt->LeftHencky(); } }; //----------------------------------------------------------------------------- bool FEPlotLeftHencky::Save(FEDomain& dom, FEDataStream& a) { FEElasticMaterial* pme = dom.GetMaterial()->ExtractProperty<FEElasticMaterial>(); if (pme == nullptr) return false; writeAverageElementValue<mat3ds>(dom, a, FELeftHencky()); return true; } //============================================================================= //! Store the average rate of deformation class FERateOfDeformation { public: mat3ds operator()(const FEMaterialPoint& mp) { const FEElasticMaterialPoint* pt = mp.ExtractData<FEElasticMaterialPoint>(); if (pt == 0) return mat3ds(0, 0, 0, 0, 0, 0); return pt->RateOfDeformation(); } }; //----------------------------------------------------------------------------- bool FEPlotRateOfDeformation::Save(FEDomain& dom, FEDataStream& a) { FEElasticMaterial* pme = dom.GetMaterial()->ExtractProperty<FEElasticMaterial>(); if (pme == nullptr) return false; writeAverageElementValue<mat3ds>(dom, a, FERateOfDeformation()); return true; } //----------------------------------------------------------------------------- //! Store shell thicknesses bool FEPlotShellThickness::Save(FEDomain &dom, FEDataStream &a) { if (dom.Class() == FE_DOMAIN_SHELL) { FEShellDomain& sd = static_cast<FEShellDomain&>(dom); int NS = sd.Elements(); for (int i=0; i<NS; ++i) { FEShellElement& e = sd.Element(i); int n = e.Nodes(); for (int j=0; j<n; ++j) a << e.m_ht[j]; } return true; } return false; } //----------------------------------------------------------------------------- //! Store shell directors bool FEPlotShellDirector::Save(FEDomain &dom, FEDataStream &a) { const int dof_X = GetFEModel()->GetDOFIndex("x"); const int dof_Y = GetFEModel()->GetDOFIndex("y"); const int dof_Z = GetFEModel()->GetDOFIndex("z"); const int dof_SX = GetFEModel()->GetDOFIndex("sx"); const int dof_SY = GetFEModel()->GetDOFIndex("sy"); const int dof_SZ = GetFEModel()->GetDOFIndex("sz"); if (dom.Class() == FE_DOMAIN_SHELL) { if (dynamic_cast<FEElasticShellDomainOld*>(&dom)) { FEShellDomainOld& sd = static_cast<FEShellDomainOld&>(dom); int NS = sd.Elements(); FEMesh& mesh = *sd.GetMesh(); for (int i = 0; i<NS; ++i) { FEShellElementOld& e = sd.ShellElement(i); int n = e.Nodes(); for (int j = 0; j<n; ++j) { FENode& nj = mesh.Node(e.m_node[j]); vec3d D = e.m_D0[j] + nj.get_vec3d(dof_SX, dof_SY, dof_SZ); a << D; } } return true; } else if (dynamic_cast<FESSIShellDomain*>(&dom)) { FESSIShellDomain* bd = dynamic_cast<FESSIShellDomain*>(&dom); int NS = bd->Elements(); FEMesh& mesh = *bd->GetMesh(); for (int i=0; i<NS; ++i) { FEShellElement& e = bd->Element(i); int n = e.Nodes(); for (int j=0; j<n; ++j) { FENode& nj = mesh.Node(e.m_node[j]); vec3d D; if (bd->m_bnodalnormals) { D = nj.m_d0; } else { D = e.m_d0[j]; } D += nj.get_vec3d(dof_X, dof_Y, dof_Z) - nj.get_vec3d(dof_SX, dof_SY, dof_SZ); a << D; } } return true; } } return false; } //============================================================================= FEPlotDamage::FEPlotDamage(FEModel* pfem) : FEPlotDomainData(pfem, PLT_FLOAT, FMT_ITEM) { m_comp = -1; } //----------------------------------------------------------------------------- bool FEPlotDamage::SetFilter(const char* szfilter) { int nread = sscanf(szfilter, "solid[%d]", &m_comp); return (nread == 1); } //----------------------------------------------------------------------------- bool FEPlotDamage::Save(FEDomain &dom, FEDataStream& a) { if (m_comp == -1) { writeAverageElementValue<double>(dom, a, [](const FEMaterialPoint& pt) { const FEReactiveMaterialPoint* ppd = pt.ExtractData<FEReactiveMaterialPoint>(); FEElasticMixtureMaterialPoint* pem = const_cast<FEElasticMixtureMaterialPoint*>(pt.ExtractData<FEElasticMixtureMaterialPoint>()); FEMultigenerationMaterialPoint* pmg = const_cast<FEMultigenerationMaterialPoint*>(pt.ExtractData<FEMultigenerationMaterialPoint>()); double D = 0.0; if (ppd) D += (float)ppd->BrokenBonds(); else if (pem) { for (int k = 0; k < pem->Components(); ++k) { const FEReactiveMaterialPoint* ppd = pem->GetPointData(k)->ExtractData<FEReactiveMaterialPoint>(); if (ppd) D += (float)ppd->BrokenBonds(); } } else if (pmg) { for (int k = 0; k < pmg->Components(); ++k) { FEReactiveMaterialPoint* ppd = pmg->GetPointData(k)->ExtractData<FEReactiveMaterialPoint>(); FEElasticMixtureMaterialPoint* pem = pmg->GetPointData(k)->ExtractData<FEElasticMixtureMaterialPoint>(); if (ppd) D += (float)ppd->BrokenBonds(); else if (pem) { for (int l = 0; l < pem->Components(); ++l) { FEReactiveMaterialPoint* ppd = pem->GetPointData(l)->ExtractData<FEReactiveMaterialPoint>(); if (ppd) D += (float)ppd->BrokenBonds(); } } } } return D; }); return true; } else { for (int i = 0; i < dom.Elements(); ++i) { FEElement& el = dom.ElementRef(i); double D = 0.0; for (int n = 0; n < el.GaussPoints(); ++n) { FEMaterialPoint& mp = *el.GetMaterialPoint(n); FEElasticMixtureMaterialPoint* mmp = mp.ExtractData< FEElasticMixtureMaterialPoint>(); if (mmp && (m_comp < mmp->Components())) { FEReactiveMaterialPoint* dp = mmp->GetPointData(m_comp)->ExtractData<FEReactiveMaterialPoint>(); if (dp) D += dp->BrokenBonds(); } } D /= (float)el.GaussPoints(); a << D; } return true; } } //============================================================================= FEPlotIntactBondFraction::FEPlotIntactBondFraction(FEModel* pfem) : FEPlotDomainData(pfem, PLT_FLOAT, FMT_ITEM) { m_comp = -1; } //----------------------------------------------------------------------------- bool FEPlotIntactBondFraction::SetFilter(const char* szfilter) { sscanf(szfilter, "solid[%d]", &m_comp); return true; } //----------------------------------------------------------------------------- bool FEPlotIntactBondFraction::Save(FEDomain &dom, FEDataStream& a) { if (m_comp == -1) { writeAverageElementValue<double>(dom, a, [](const FEMaterialPoint& pt) { FEMaterialPoint& mp = const_cast<FEMaterialPoint&>(pt); double D = 0.0; FEReactiveMaterialPoint* prm = mp.ExtractData<FEReactiveMaterialPoint>(); FEReactiveViscoelasticMaterialPoint* pve = mp.ExtractData<FEReactiveViscoelasticMaterialPoint>(); if (prm) D = (float) prm->IntactBonds(); else if (pve) { const FEReactiveMaterialPoint* pr = pve->GetPointData(0)->ExtractData< FEReactiveMaterialPoint>(); if (pr) D = (float) pr->IntactBonds(); } return D; }); return true; } else { for (int i = 0; i < dom.Elements(); ++i) { FEElement& el = dom.ElementRef(i); float D = 0.0; for (int n = 0; n < el.GaussPoints(); ++n) { FEMaterialPoint& mp = *el.GetMaterialPoint(n); FEElasticMixtureMaterialPoint* mmp = mp.ExtractData< FEElasticMixtureMaterialPoint>(); if (mmp && (m_comp < mmp->Components())) { FEReactiveMaterialPoint* prm = mmp->GetPointData(m_comp)->ExtractData<FEReactiveMaterialPoint>(); FEReactiveViscoelasticMaterialPoint* pve = mmp->GetPointData(m_comp)->ExtractData<FEReactiveViscoelasticMaterialPoint>(); if (prm) D += (float) prm->IntactBonds(); else if (pve) { FEReactiveMaterialPoint* pr = pve->GetPointData(0)->ExtractData<FEReactiveMaterialPoint>(); if (pr) D += (float) pr->IntactBonds(); } } } D /= (float)el.GaussPoints(); a << D; } return true; } } //============================================================================= FEPlotFatigueBondFraction::FEPlotFatigueBondFraction(FEModel* pfem) : FEPlotDomainData(pfem, PLT_FLOAT, FMT_ITEM) { m_comp = -1; } //----------------------------------------------------------------------------- bool FEPlotFatigueBondFraction::SetFilter(const char* szfilter) { sscanf(szfilter, "solid[%d]", &m_comp); return true; } //----------------------------------------------------------------------------- bool FEPlotFatigueBondFraction::Save(FEDomain &dom, FEDataStream& a) { if (m_comp == -1) { writeAverageElementValue<double>(dom, a, [](const FEMaterialPoint& pt) { FEMaterialPoint& mp = const_cast<FEMaterialPoint&>(pt); float wf = 0.0; FEReactiveMaterialPoint* prm = mp.ExtractData<FEReactiveMaterialPoint>(); FEReactiveViscoelasticMaterialPoint* pve = mp.ExtractData<FEReactiveViscoelasticMaterialPoint>(); if (prm) wf = (float) prm->FatigueBonds(); else if (pve) { FEReactiveMaterialPoint* pr = pve->GetPointData(0)->ExtractData<FEReactiveMaterialPoint>(); if (pr) wf = (float) pr->FatigueBonds(); } return wf; }); return true; } else { for (int i = 0; i < dom.Elements(); ++i) { FEElement& el = dom.ElementRef(i); float wf = 0.0; for (int n = 0; n < el.GaussPoints(); ++n) { FEMaterialPoint& mp = *el.GetMaterialPoint(n); FEElasticMixtureMaterialPoint* mmp = mp.ExtractData< FEElasticMixtureMaterialPoint>(); if (mmp && (m_comp < mmp->Components())) { FEReactiveMaterialPoint* ppr = mmp->GetPointData(m_comp)->ExtractData<FEReactiveMaterialPoint>(); FEReactiveViscoelasticMaterialPoint* pve = mmp->GetPointData(m_comp)->ExtractData<FEReactiveViscoelasticMaterialPoint>(); if (ppr) wf += (float) ppr->FatigueBonds(); else if (pve) { FEReactiveMaterialPoint* pr = pve->GetPointData(0)->ExtractData<FEReactiveMaterialPoint>(); if (pr) wf += (float) pr->FatigueBonds(); } } } wf /= (float)el.GaussPoints(); a << wf; } return true; } } //============================================================================= FEPlotYieldedBondFraction::FEPlotYieldedBondFraction(FEModel* pfem) : FEPlotDomainData(pfem, PLT_FLOAT, FMT_ITEM) { m_comp = -1; } //----------------------------------------------------------------------------- bool FEPlotYieldedBondFraction::SetFilter(const char* szfilter) { sscanf(szfilter, "solid[%d]", &m_comp); return true; } //----------------------------------------------------------------------------- bool FEPlotYieldedBondFraction::Save(FEDomain &dom, FEDataStream& a) { if (m_comp == -1) { writeAverageElementValue<double>(dom, a, [](const FEMaterialPoint& mp) { float wy = 0.0; const FEReactiveMaterialPoint* prp = mp.ExtractData<FEReactiveMaterialPoint>(); if (prp) wy = (float) prp->YieldedBonds(); return wy; }); return true; } else { for (int i = 0; i < dom.Elements(); ++i) { FEElement& el = dom.ElementRef(i); float wy = 0.0; for (int n = 0; n < el.GaussPoints(); ++n) { FEMaterialPoint& mp = *el.GetMaterialPoint(n); FEElasticMixtureMaterialPoint* mmp = mp.ExtractData< FEElasticMixtureMaterialPoint>(); if (mmp && (m_comp < mmp->Components())) { const FEReactiveMaterialPoint* prp = mmp->GetPointData(m_comp)->ExtractData<FEReactiveMaterialPoint>(); if (prp) wy += (float) prp->YieldedBonds(); } } wy /= (float)el.GaussPoints(); a << wy; } return true; } } //============================================================================= FEPlotReactivePlasticityHeatSupply::FEPlotReactivePlasticityHeatSupply(FEModel* pfem) : FEPlotDomainData(pfem, PLT_FLOAT, FMT_ITEM) { m_comp = -1; } //----------------------------------------------------------------------------- bool FEPlotReactivePlasticityHeatSupply::SetFilter(const char* szfilter) { sscanf(szfilter, "solid[%d]", &m_comp); return true; } //----------------------------------------------------------------------------- bool FEPlotReactivePlasticityHeatSupply::Save(FEDomain &dom, FEDataStream& a) { if (m_comp == -1) { writeAverageElementValue<double>(dom, a, [](const FEMaterialPoint& mp) { float Rhat = 0.0; const FEReactivePlasticityMaterialPoint* prp = mp.ExtractData<FEReactivePlasticityMaterialPoint>(); const FEReactivePlasticDamageMaterialPoint* ppp = mp.ExtractData<FEReactivePlasticDamageMaterialPoint>(); if (prp) Rhat = (float) prp->m_Rhat; else if (ppp) Rhat = (float) ppp->m_Rhat; return Rhat; }); return true; } else { for (int i = 0; i < dom.Elements(); ++i) { FEElement& el = dom.ElementRef(i); float Rhat = 0.0; for (int n = 0; n < el.GaussPoints(); ++n) { FEMaterialPoint& mp = *el.GetMaterialPoint(n); FEElasticMixtureMaterialPoint* mmp = mp.ExtractData< FEElasticMixtureMaterialPoint>(); if (mmp && (m_comp < mmp->Components())) { const FEReactivePlasticityMaterialPoint* prp = mmp->GetPointData(m_comp)->ExtractData<FEReactivePlasticityMaterialPoint>(); const FEReactivePlasticDamageMaterialPoint* ppp = mmp->GetPointData(m_comp)->ExtractData<FEReactivePlasticDamageMaterialPoint>(); if (prp) Rhat += (float) prp->m_Rhat; else if (ppp) Rhat += (float) ppp->m_Rhat; } } Rhat /= (float)el.GaussPoints(); a << Rhat; } return true; } } //============================================================================= FEPlotOctahedralPlasticStrain::FEPlotOctahedralPlasticStrain(FEModel* pfem) : FEPlotDomainData(pfem, PLT_FLOAT, FMT_ITEM) { m_comp = -1; } //----------------------------------------------------------------------------- bool FEPlotOctahedralPlasticStrain::SetFilter(const char* szfilter) { sscanf(szfilter, "solid[%d]", &m_comp); return true; } //----------------------------------------------------------------------------- bool FEPlotOctahedralPlasticStrain::Save(FEDomain &dom, FEDataStream& a) { if (m_comp == -1) { writeAverageElementValue<double>(dom, a, [](const FEMaterialPoint& mp) { float gp = 0.0; const FEReactivePlasticityMaterialPoint* prp = mp.ExtractData<FEReactivePlasticityMaterialPoint>(); const FEReactivePlasticDamageMaterialPoint* ppp = mp.ExtractData<FEReactivePlasticDamageMaterialPoint>(); if (prp && prp->m_gp.size()) gp = (float) prp->m_gp[0]; else if (ppp && ppp->m_gp.size()) gp = (float) ppp->m_gp[0]; return gp; }); return true; } else { for (int i = 0; i < dom.Elements(); ++i) { FEElement& el = dom.ElementRef(i); float gp = 0.0; for (int n = 0; n < el.GaussPoints(); ++n) { FEMaterialPoint& mp = *el.GetMaterialPoint(n); FEElasticMixtureMaterialPoint* mmp = mp.ExtractData< FEElasticMixtureMaterialPoint>(); if (mmp && (m_comp < mmp->Components())) { const FEReactivePlasticityMaterialPoint* prp = mmp->GetPointData(m_comp)->ExtractData<FEReactivePlasticityMaterialPoint>(); const FEReactivePlasticDamageMaterialPoint* ppp = mmp->GetPointData(m_comp)->ExtractData<FEReactivePlasticDamageMaterialPoint>(); if (prp && prp->m_gp.size()) gp += (float) prp->m_gp[0]; else if (ppp && ppp->m_gp.size()) gp += (float) ppp->m_gp[0]; } } gp /= (float)el.GaussPoints(); a << gp; } return true; } } //----------------------------------------------------------------------------- bool FEPlotMixtureVolumeFraction::Save(FEDomain &dom, FEDataStream &a) { // extract the mixture material FEMaterial* pmat = dom.GetMaterial(); FEElasticMixture* pm = dynamic_cast<FEElasticMixture*>(pmat); if (pm == 0) return false; writeAverageElementValue<double>(dom, a, [](const FEMaterialPoint& mp) { const FEElasticMixtureMaterialPoint& pt = *mp.ExtractData<FEElasticMixtureMaterialPoint>(); return pt.m_w[0]; }); return true; } //----------------------------------------------------------------------------- bool FEPlotUT4NodalStresses::Save(FEDomain& dom, FEDataStream& a) { // make sure this is a UT4 domain FEUT4Domain* pd = dynamic_cast<FEUT4Domain*>(&dom); if (pd == 0) return false; // write the nodal values writeNodalValues<mat3ds>(dom, a, [=](int i) { FEUT4Domain::UT4NODE& n = pd->UT4Node(i); return n.si; }); return true; } //============================================================================== // R I G I D B O D Y D A T A //============================================================================== //----------------------------------------------------------------------------- bool FEPlotRigidDisplacement::Save(FEDomain& dom, FEDataStream& a) { // get the rigid material FEMaterial* pm = dom.GetMaterial(); FERigidMaterial* prm = dynamic_cast<FERigidMaterial*>(pm); if (prm == 0) return false; // get the rigid body FEMechModel& fem = static_cast<FEMechModel&>(*GetFEModel()); FERigidBody& rb = *fem.GetRigidBody(prm->GetRigidBodyID()); // store the rigid body position // TODO: why do we not store displacement? a << rb.m_rt; return true; } //----------------------------------------------------------------------------- bool FEPlotRigidVelocity::Save(FEDomain& dom, FEDataStream& a) { // get the rigid material FEMaterial* pm = dom.GetMaterial(); FERigidMaterial* prm = dynamic_cast<FERigidMaterial*>(pm); if (prm == 0) return false; // get the rigid body FEMechModel& fem = static_cast<FEMechModel&>(*GetFEModel()); FERigidBody& rb = *fem.GetRigidBody(prm->GetRigidBodyID()); // store the rigid velocity a << rb.m_vt; return true; } //----------------------------------------------------------------------------- bool FEPlotRigidAcceleration::Save(FEDomain& dom, FEDataStream& a) { // get the rigid material FEMaterial* pm = dom.GetMaterial(); FERigidMaterial* prm = dynamic_cast<FERigidMaterial*>(pm); if (prm == 0) return false; // get the rigid body FEMechModel& fem = static_cast<FEMechModel&>(*GetFEModel()); FERigidBody& rb = *fem.GetRigidBody(prm->GetRigidBodyID()); // store rigid body acceleration a << rb.m_at; return true; } //----------------------------------------------------------------------------- bool FEPlotRigidRotation::Save(FEDomain& dom, FEDataStream& a) { // get the rigid material FEMaterial* pm = dom.GetMaterial(); FERigidMaterial* prm = dynamic_cast<FERigidMaterial*>(pm); if (prm == 0) return false; // get the rigid body FEMechModel& fem = static_cast<FEMechModel&>(*GetFEModel()); FERigidBody& rb = *fem.GetRigidBody(prm->GetRigidBodyID()); vec3d q = rb.GetRotation().GetRotationVector(); // store rotation vector a << q; return true; } //----------------------------------------------------------------------------- bool FEPlotRigidAngularVelocity::Save(FEDomain& dom, FEDataStream& a) { // get the rigid material FEMaterial* pm = dom.GetMaterial(); FERigidMaterial* prm = dynamic_cast<FERigidMaterial*>(pm); if (prm == 0) return false; // get the rigid body FEMechModel& fem = static_cast<FEMechModel&>(*GetFEModel()); FERigidBody& rb = *fem.GetRigidBody(prm->GetRigidBodyID()); // store rigid angular velocity a << rb.m_wt; return true; } //----------------------------------------------------------------------------- bool FEPlotRigidAngularAcceleration::Save(FEDomain& dom, FEDataStream& a) { // get the rigid material FEMaterial* pm = dom.GetMaterial(); FERigidMaterial* prm = dynamic_cast<FERigidMaterial*>(pm); if (prm == 0) return false; // get the rigid body FEMechModel& fem = static_cast<FEMechModel&>(*GetFEModel()); FERigidBody& rb = *fem.GetRigidBody(prm->GetRigidBodyID()); // store angular acceleration a << rb.m_alt; return true; } //----------------------------------------------------------------------------- bool FEPlotRigidKineticEnergy::Save(FEDomain& dom, FEDataStream& a) { // get the rigid material FEMaterial* pm = dom.GetMaterial(); FERigidMaterial* prm = dynamic_cast<FERigidMaterial*>(pm); if (prm == 0) return false; // get the rigid body FEMechModel& fem = static_cast<FEMechModel&>(*GetFEModel()); FERigidBody& rb = *fem.GetRigidBody(prm->GetRigidBodyID()); vec3d v = rb.m_vt; double m = rb.m_mass; vec3d w = rb.m_wt; mat3d Rt = rb.GetRotation().RotationMatrix(); mat3ds Jt = (Rt*rb.m_moi*Rt.transpose()).sym(); double ke = ((v*v)*m + w*(Jt*w))/2; // store kinetic energy a << ke; return true; } //----------------------------------------------------------------------------- bool FEPlotRigidLinearMomentum::Save(FEDomain& dom, FEDataStream& a) { // get the rigid material FEMaterial* pm = dom.GetMaterial(); FERigidMaterial* prm = dynamic_cast<FERigidMaterial*>(pm); if (prm == 0) return false; // get the rigid body FEMechModel& fem = static_cast<FEMechModel&>(*GetFEModel()); FERigidBody& rb = *fem.GetRigidBody(prm->GetRigidBodyID()); // store linear momentum (mass x velocity) a << rb.m_vt*rb.m_mass; return true; } //----------------------------------------------------------------------------- bool FEPlotRigidAngularMomentum::Save(FEDomain& dom, FEDataStream& a) { // get the rigid material FEMaterial* pm = dom.GetMaterial(); FERigidMaterial* prm = dynamic_cast<FERigidMaterial*>(pm); if (prm == 0) return false; // get the rigid body FEMechModel& fem = static_cast<FEMechModel&>(*GetFEModel()); FERigidBody& rb = *fem.GetRigidBody(prm->GetRigidBodyID()); // store angular momentum (mass moment of inertia x angular velocity) mat3d Rt = rb.GetRotation().RotationMatrix(); mat3ds Jt = (Rt*rb.m_moi*Rt.transpose()).sym(); a << Jt*rb.m_wt; return true; } //----------------------------------------------------------------------------- bool FEPlotRigidEuler::Save(FEDomain& dom, FEDataStream& a) { // get the rigid material FEMaterial* pm = dom.GetMaterial(); FERigidMaterial* prm = dynamic_cast<FERigidMaterial*>(pm); if (prm == 0) return false; // get the rigid body FEMechModel& fem = static_cast<FEMechModel&>(*GetFEModel()); FERigidBody& rb = *fem.GetRigidBody(prm->GetRigidBodyID()); // get the Euler angles double E[3]; quat2euler(rb.GetRotation(), E); // store Euler a << E[0] << E[1] << E[2]; return true; } //----------------------------------------------------------------------------- // TODO: I think this already gets stored somewhere bool FEPlotRigidRotationVector::Save(FEDomain& dom, FEDataStream& a) { // get the rigid material FEMaterial* pm = dom.GetMaterial(); FERigidMaterial* prm = dynamic_cast<FERigidMaterial*>(pm); if (prm == 0) return false; // get the rigid body FEMechModel& fem = static_cast<FEMechModel&>(*GetFEModel()); FERigidBody& rb = *fem.GetRigidBody(prm->GetRigidBodyID()); // get the rotation vector and angle vec3d r = rb.GetRotation().GetRotationVector(); // store rotation vector a << r; return true; } //============================================================================= bool FEPlotRigidReactionForce::Save(FEDomain& dom, FEDataStream& a) { // get the material FEMaterial* pmat = dom.GetMaterial(); FERigidMaterial* prm = dynamic_cast<FERigidMaterial*>(pmat); if (prm == 0) return false; // get the rigid body ID int nrid = prm->GetRigidBodyID(); if (nrid < 0) return false; // get the rigid body FEMechModel& fem = static_cast<FEMechModel&>(*GetFEModel()); FERigidBody& rb = *fem.GetRigidBody(nrid); a << rb.m_Fr; return true; } //----------------------------------------------------------------------------- bool FEPlotRigidReactionTorque::Save(FEDomain& dom, FEDataStream& a) { // get the material FEMaterial* pmat = dom.GetMaterial(); FERigidMaterial* prm = dynamic_cast<FERigidMaterial*>(pmat); if (prm == 0) return false; // get the rigid body ID int nrid = prm->GetRigidBodyID(); if (nrid < 0) return false; // get the rigid body FEMechModel& fem = static_cast<FEMechModel&>(*GetFEModel()); FERigidBody& rb = *fem.GetRigidBody(nrid); a << rb.m_Mr; return true; } //----------------------------------------------------------------------------- bool FEPlotStressError::Save(FEDomain& dom, FEDataStream& a) { writeRelativeError(dom, a, [](FEMaterialPoint& mp) { FEElasticMaterialPoint* ep = mp.ExtractData<FEElasticMaterialPoint>(); mat3ds& s = ep->m_s; double v = s.effective_norm(); return v; }); return true; } //----------------------------------------------------------------------------- bool FEPlotFiberTargetStretch::Save(FEDomain& dom, FEDataStream& a) { FEMaterial* mat = dom.GetMaterial(); FEPrestrainMaterial * pmat = dynamic_cast<FEPrestrainMaterial*>(mat); if (pmat == nullptr) return false; // get the elastic component FEProperty* prop = mat->FindProperty("elastic"); if (prop == nullptr) return false; FEElasticMaterial* pme = dynamic_cast<FEElasticMaterial*>(prop->get(0)); if (pme == 0) return false; // get the fiber property FEVec3dValuator* vec = dynamic_cast<FEVec3dValuator*>(pme->GetProperty("fiber")); if (vec == 0) return false; // we're good so store the in-situ stretch int NE = dom.Elements(); for (int i = 0; i<NE; ++i) { FEElement& e = dom.ElementRef(i); int nint = e.GaussPoints(); double lam = 0.0; for (int j = 0; j<nint; ++j) { FEMaterialPoint& mp = *e.GetMaterialPoint(j)->GetPointData(0); FEPrestrainMaterialPoint& pp = *mp.ExtractData<FEPrestrainMaterialPoint>(); mat3d Fp = pp.initialPrestrain(); mat3d Q = mat->GetLocalCS(mp); vec3d a0 = vec->unitVector(mp); vec3d ar = Q * a0; vec3d a = Fp*ar; double lamp = a.norm(); lam += lamp; } lam /= (double)nint; a << lam; } return true; } //----------------------------------------------------------------------------- bool FEPlotPreStrainStretch::Save(FEDomain& dom, FEDataStream& a) { FEMaterial* mat = dom.GetMaterial(); FEPrestrainMaterial* pmat = dynamic_cast<FEPrestrainMaterial*>(mat); if (pmat == 0) return false; // get the elastic component FEProperty* prop = mat->FindProperty("elastic"); if (prop == nullptr) return false; FEElasticMaterial* pme = dynamic_cast<FEElasticMaterial*>(prop->get(0)); if (pme== 0) return false; // get the fiber property FEVec3dValuator* vec = dynamic_cast<FEVec3dValuator*>(pme->GetProperty("fiber")); if (vec == 0) return false; int NE = dom.Elements(); for (int i = 0; i<NE; ++i) { FEElement& e = dom.ElementRef(i); int nint = e.GaussPoints(); double lam = 0.0; for (int j = 0; j<nint; ++j) { FEMaterialPoint& mp = *e.GetMaterialPoint(j)->GetPointData(0); FEElasticMaterialPoint& pt = *mp.ExtractData<FEElasticMaterialPoint>(); FEPrestrainMaterialPoint& pp = *mp.ExtractData<FEPrestrainMaterialPoint>(); mat3d& F = pt.m_F; mat3d Fp = pp.prestrain(); mat3d Ft = F*Fp; mat3d Q = mat->GetLocalCS(mp); vec3d a0 = vec->unitVector(mp); vec3d ar = Q * a0; vec3d a = Ft*ar; double lambda = a.norm(); lam += lambda; } lam /= (double)nint; a << lam; } return true; } //----------------------------------------------------------------------------- bool FEPlotPreStrainStretchError::Save(FEDomain& dom, FEDataStream& a) { FEMaterial* mat = dom.GetMaterial(); FEPrestrainMaterial* pmat = dynamic_cast<FEPrestrainMaterial*>(mat); if (pmat == 0) return false; // get the elastic component FEProperty* prop = mat->FindProperty("elastic"); if (prop == nullptr) return false; FEElasticMaterial* pme = dynamic_cast<FEElasticMaterial*>(prop->get(0)); if (pme == 0) return false; // get the fiber property FEVec3dValuator* vec = dynamic_cast<FEVec3dValuator*>(pme->GetProperty("fiber")); if (vec == 0) return false; int NE = dom.Elements(); for (int i = 0; i<NE; ++i) { FEElement& e = dom.ElementRef(i); int nint = e.GaussPoints(); double err = 0.0; for (int j = 0; j<nint; ++j) { FEMaterialPoint& mp = *e.GetMaterialPoint(j)->GetPointData(0); FEElasticMaterialPoint& pt = *mp.ExtractData<FEElasticMaterialPoint>(); FEPrestrainMaterialPoint& pp = *mp.ExtractData<FEPrestrainMaterialPoint>(); // initial fiber vector mat3d Q = mat->GetLocalCS(mp); vec3d a0 = vec->unitVector(mp); vec3d ar = Q * a0; // target stretch mat3d Fp = pp.initialPrestrain(); vec3d a = Fp*ar; double lam_trg = a.norm(); // current stretch mat3d& F = pt.m_F; Fp = pp.prestrain(); mat3d Ft = F*Fp; a = Ft*ar; double lam_cur = a.norm(); err += fabs(lam_cur / lam_trg - 1.0); } err /= (double)nint; a << err; } return true; } //----------------------------------------------------------------------------- bool FEPlotPreStrainCorrection::Save(FEDomain& dom, FEDataStream& a) { FEMaterial* mat = dom.GetMaterial(); FEElasticMaterial* solidMat = mat->ExtractProperty<FEElasticMaterial>(); FEPrestrainMaterial* pmat = dynamic_cast<FEPrestrainMaterial*>(solidMat); if (pmat == 0) return false; int NE = dom.Elements(); for (int i = 0; i<NE; ++i) { FEElement& e = dom.ElementRef(i); int nint = e.GaussPoints(); mat3d Fc; Fc.zero(); for (int j = 0; j<nint; ++j) { FEMaterialPoint& mp = *e.GetMaterialPoint(j)->GetPointData(0); FEPrestrainMaterialPoint& pt = *mp.ExtractData<FEPrestrainMaterialPoint>(); Fc += pt.PrestrainCorrection(); } Fc *= 1.0 / (double)nint; a << Fc; } return true; } //----------------------------------------------------------------------------- bool FEPlotSPRPreStrainCorrection::Save(FEDomain& dom, FEDataStream& a) { const int LUT[9][2] = { { 0,0 },{ 0,1 },{ 0,2 },{ 1,0 },{ 1,1 },{ 1,2 },{ 2,0 },{ 2,1 },{ 2,2 } }; FEPrestrainMaterial* pmat = dynamic_cast<FEPrestrainMaterial*>(dom.GetMaterial()); if (pmat == 0) return false; // For now, this is only available for solid domains if (dom.Class() != FE_DOMAIN_SOLID) return false; // get the domain FESolidDomain& sd = static_cast<FESolidDomain&>(dom); int NN = sd.Nodes(); int NE = sd.Elements(); // build the element data array vector< vector<double> > ED; ED.resize(NE); for (int i = 0; i<NE; ++i) { FESolidElement& e = sd.Element(i); int nint = e.GaussPoints(); ED[i].assign(nint, 0.0); } // this array will store the results FESPRProjection map(sd); vector<double> val[9]; // loop over stress components for (int n = 0; n<9; ++n) { // fill the ED array for (int i = 0; i<NE; ++i) { FESolidElement& el = sd.Element(i); int nint = el.GaussPoints(); for (int j = 0; j<nint; ++j) { FEMaterialPoint& mp = *el.GetMaterialPoint(j)->GetPointData(0); FEPrestrainMaterialPoint& pt = *mp.ExtractData<FEPrestrainMaterialPoint>(); const mat3d& F = pt.PrestrainCorrection(); ED[i][j] = F(LUT[n][0], LUT[n][1]); } } // project to nodes map.Project(ED, val[n]); } // copy results to archive for (int i = 0; i<NN; ++i) { a << val[0][i]; a << val[1][i]; a << val[2][i]; a << val[3][i]; a << val[4][i]; a << val[5][i]; a << val[6][i]; a << val[7][i]; a << val[8][i]; } return true; } //----------------------------------------------------------------------------- bool FEPlotPreStrainCompatibility::Save(FEDomain& dom, FEDataStream& a) { const int LUT[9][2] = { { 0,0 },{ 0,1 },{ 0,2 },{ 1,0 },{ 1,1 },{ 1,2 },{ 2,0 },{ 2,1 },{ 2,2 } }; // make sure this is a pre-strain material FEPrestrainMaterial* pmat = dynamic_cast<FEPrestrainMaterial*>(dom.GetMaterial()); if (pmat == 0) return false; // For now, this is only available for solid domains if (dom.Class() != FE_DOMAIN_SOLID) return false; // get the domain FESolidDomain& sd = static_cast<FESolidDomain&>(dom); int NE = sd.Elements(); // STEP 1 - first we do an SPR recovery of the pre-strain gradient // build the element data array vector< vector<double> > ED; ED.resize(NE); for (int i = 0; i<NE; ++i) { FESolidElement& e = sd.Element(i); int nint = e.GaussPoints(); ED[i].assign(nint, 0.0); } // this array will store the results FESPRProjection map(sd); vector<double> val[9]; // create a global-to-local node list FEMesh& mesh = *dom.GetMesh(); vector<int> g2l; g2l.assign(mesh.Nodes(), -1); int nn = 0; for (int i = 0; i<NE; ++i) { FESolidElement& el = sd.Element(i); int neln = el.Nodes(); for (int j = 0; j<neln; ++j) { if (g2l[el.m_node[j]] == -1) g2l[el.m_node[j]] = nn++; } } // loop over tensor components for (int n = 0; n<9; ++n) { // fill the ED array for (int i = 0; i<NE; ++i) { FESolidElement& el = sd.Element(i); int nint = el.GaussPoints(); for (int j = 0; j<nint; ++j) { FEMaterialPoint& mp = *el.GetMaterialPoint(j)->GetPointData(0); FEPrestrainMaterialPoint& pt = *mp.ExtractData<FEPrestrainMaterialPoint>(); mat3d Fp = pt.prestrain(); ED[i][j] = Fp(LUT[n][0], LUT[n][1]); } } // project to nodes map.Project(ED, val[n]); } // STEP 2 - now we calculate the gradient of the nodal values at the integration points vector<double> vn(FEElement::MAX_NODES); for (int i = 0; i<NE; ++i) { FESolidElement& el = sd.Element(i); int neln = el.Nodes(); int nint = el.GaussPoints(); vector<mat3d> gF[3]; gF[0].assign(nint, mat3dd(0)); gF[1].assign(nint, mat3dd(0)); gF[2].assign(nint, mat3dd(0)); for (int n = 0; n<9; ++n) { // get the nodal values for (int m = 0; m<neln; ++m) vn[m] = val[n][g2l[el.m_node[m]]]; // calculate the gradient at the integration points for (int j = 0; j<nint; ++j) { vec3d g = sd.gradient(el, vn, j); gF[0][j](LUT[n][0], LUT[n][1]) = g.x; gF[1][j](LUT[n][0], LUT[n][1]) = g.y; gF[2][j](LUT[n][0], LUT[n][1]) = g.z; } } double c = 0.0; for (int j = 0; j<nint; ++j) { mat3d C; C(0, 0) = gF[1][j](0, 2) - gF[2][j](0, 1); C(0, 1) = gF[1][j](1, 2) - gF[2][j](1, 1); C(0, 2) = gF[1][j](2, 2) - gF[2][j](2, 1); C(1, 0) = gF[2][j](0, 0) - gF[0][j](0, 2); C(1, 1) = gF[2][j](1, 0) - gF[0][j](1, 2); C(1, 2) = gF[2][j](2, 0) - gF[0][j](2, 2); C(2, 0) = gF[0][j](0, 1) - gF[1][j](0, 0); C(2, 1) = gF[0][j](1, 1) - gF[1][j](1, 0); C(2, 2) = gF[0][j](2, 1) - gF[1][j](2, 0); c += sqrt(C.dotdot(C)); } c /= (double)nint; // store the compatibility a << c; } return true; } bool FEPlotDiscreteElementStretch::Save(FEDomain& dom, FEDataStream& a) { FEDiscreteDomain* pdiscreteDomain = dynamic_cast<FEDiscreteDomain*>(&dom); if (pdiscreteDomain == nullptr) return false; FEDiscreteDomain& discreteDomain = *pdiscreteDomain; FEMesh& mesh = *dom.GetMesh(); int NE = discreteDomain.Elements(); for (int i = 0; i < NE; ++i) { FEDiscreteElement& el = discreteDomain.Element(i); vec3d ra0 = mesh.Node(el.m_node[0]).m_r0; vec3d ra1 = mesh.Node(el.m_node[0]).m_rt; vec3d rb0 = mesh.Node(el.m_node[1]).m_r0; vec3d rb1 = mesh.Node(el.m_node[1]).m_rt; double L0 = (rb0 - ra0).norm(); double Lt = (rb1 - ra1).norm(); double l = Lt / L0; a << l; } return true; } bool FEPlotDiscreteElementElongation::Save(FEDomain& dom, FEDataStream& a) { FEDiscreteDomain* pdiscreteDomain = dynamic_cast<FEDiscreteDomain*>(&dom); if (pdiscreteDomain == nullptr) return false; FEDiscreteDomain& discreteDomain = *pdiscreteDomain; FEMesh& mesh = *dom.GetMesh(); int NE = discreteDomain.Elements(); for (int i = 0; i < NE; ++i) { FEDiscreteElement& el = discreteDomain.Element(i); vec3d ra0 = mesh.Node(el.m_node[0]).m_r0; vec3d ra1 = mesh.Node(el.m_node[0]).m_rt; vec3d rb0 = mesh.Node(el.m_node[1]).m_r0; vec3d rb1 = mesh.Node(el.m_node[1]).m_rt; double L0 = (rb0 - ra0).norm(); double Lt = (rb1 - ra1).norm(); double l = Lt - L0; a << l; } return true; } bool FEPlotDiscreteElementPercentElongation::Save(FEDomain& dom, FEDataStream& a) { FEDiscreteDomain* pdiscreteDomain = dynamic_cast<FEDiscreteDomain*>(&dom); if (pdiscreteDomain == nullptr) return false; FEDiscreteDomain& discreteDomain = *pdiscreteDomain; FEMesh& mesh = *dom.GetMesh(); int NE = discreteDomain.Elements(); for (int i = 0; i < NE; ++i) { FEDiscreteElement& el = discreteDomain.Element(i); vec3d ra0 = mesh.Node(el.m_node[0]).m_r0; vec3d ra1 = mesh.Node(el.m_node[0]).m_rt; vec3d rb0 = mesh.Node(el.m_node[1]).m_r0; vec3d rb1 = mesh.Node(el.m_node[1]).m_rt; double L0 = (rb0 - ra0).norm(); double Lt = (rb1 - ra1).norm(); double l = (Lt - L0)/L0; a << l; } return true; } bool FEPlotDiscreteElementDirection::Save(FEDomain& dom, FEDataStream& a) { FEDiscreteDomain* pdiscreteDomain = dynamic_cast<FEDiscreteDomain*>(&dom); if (pdiscreteDomain == nullptr) return false; FEDiscreteDomain& discreteDomain = *pdiscreteDomain; FEMesh& mesh = *dom.GetMesh(); int NE = discreteDomain.Elements(); for (int i = 0; i < NE; ++i) { FEDiscreteElement& el = discreteDomain.Element(i); vec3d ra = mesh.Node(el.m_node[0]).m_rt; vec3d rb = mesh.Node(el.m_node[1]).m_rt; vec3d e = (rb - ra); e.unit(); a << e; } return true; } bool FEPlotDiscreteElementLength::Save(FEDomain& dom, FEDataStream& a) { FEDiscreteDomain* pdiscreteDomain = dynamic_cast<FEDiscreteDomain*>(&dom); if (pdiscreteDomain == nullptr) return false; FEDiscreteDomain& discreteDomain = *pdiscreteDomain; FEMesh& mesh = *dom.GetMesh(); int NE = discreteDomain.Elements(); for (int i = 0; i < NE; ++i) { FEDiscreteElement& el = discreteDomain.Element(i); vec3d ra = mesh.Node(el.m_node[0]).m_rt; vec3d rb = mesh.Node(el.m_node[1]).m_rt; double L = (rb - ra).Length(); a << L; } return true; } bool FEPlotDiscreteElementForce::Save(FEDomain& dom, FEDataStream& a) { FEDiscreteElasticDomain* pdiscreteDomain = dynamic_cast<FEDiscreteElasticDomain*>(&dom); if (pdiscreteDomain == nullptr) return false; FEDiscreteElasticDomain& discreteDomain = *pdiscreteDomain; int NE = discreteDomain.Elements(); for (int i = 0; i < NE; ++i) { FEDiscreteElement& el = discreteDomain.Element(i); // get the (one) material point data FEMaterialPoint& mp = *el.GetMaterialPoint(0); FEDiscreteElasticMaterialPoint& dmp = *mp.ExtractData<FEDiscreteElasticMaterialPoint>(); // write the force a << dmp.m_Ft; } return true; } bool FEPlotDiscreteElementSignedForce::Save(FEDomain& dom, FEDataStream& a) { FEDiscreteElasticDomain* pdiscreteDomain = dynamic_cast<FEDiscreteElasticDomain*>(&dom); if (pdiscreteDomain == nullptr) return false; FEDiscreteElasticDomain& discreteDomain = *pdiscreteDomain; int NE = discreteDomain.Elements(); for (int i = 0; i < NE; ++i) { FEDiscreteElement& el = discreteDomain.Element(i); // get the (one) material point data FEMaterialPoint& mp = *el.GetMaterialPoint(0); FEDiscreteElasticMaterialPoint& dmp = *mp.ExtractData<FEDiscreteElasticMaterialPoint>(); vec3d ra1 = dom.Node(el.m_lnode[0]).m_rt; vec3d rb1 = dom.Node(el.m_lnode[1]).m_rt; vec3d e = rb1 - ra1; e.unit(); vec3d F = dmp.m_Ft; double Fm = F * e; // write the force a << Fm; } return true; } bool FEPlotDiscreteElementStrainEnergy::Save(FEDomain& dom, FEDataStream& a) { FEDiscreteElasticDomain* pdiscreteDomain = dynamic_cast<FEDiscreteElasticDomain*>(&dom); if (pdiscreteDomain == nullptr) return false; FEDiscreteElasticDomain& discreteDomain = *pdiscreteDomain; FEDiscreteElasticMaterial* discreteMaterial = dynamic_cast<FEDiscreteElasticMaterial*>(discreteDomain.GetMaterial()); int NE = discreteDomain.Elements(); for (int i = 0; i < NE; ++i) { FEDiscreteElement& el = discreteDomain.Element(i); // get the (one) material point data FEMaterialPoint& mp = *el.GetMaterialPoint(0); FEDiscreteElasticMaterialPoint& dmp = *mp.ExtractData<FEDiscreteElasticMaterialPoint>(); // write the strain energy a << discreteMaterial->StrainEnergy(dmp); } return true; } //================================================================================================= FEPlotContinuousDamage_::FEPlotContinuousDamage_(FEModel* fem, int n) : FEPlotDomainData(fem, PLT_FLOAT, FMT_ITEM) { m_propIndex = 0; m_comp = n; } bool FEPlotContinuousDamage_::SetFilter(const char* sz) { m_prop = sz; return true; } bool FEPlotContinuousDamage_::Save(FEDomain& dom, FEDataStream& a) { // get the material FEMaterial* domMat = dom.GetMaterial(); if (domMat == nullptr) return false; // get the fiber damage component FEDamageElasticFiber* mat = nullptr; if (m_prop.empty()) mat = dynamic_cast<FEDamageElasticFiber*>(domMat); else { ParamString ps(m_prop.c_str()); m_propIndex = ps.Index(); mat = dynamic_cast<FEDamageElasticFiber*>(domMat->GetProperty(ps)); } if (mat == nullptr) return false; int NE = dom.Elements(); for (int i = 0; i < NE; ++i) { FEElement& el = dom.ElementRef(i); double D = 0.0; int nint = el.GaussPoints(); for (int j = 0; j < nint; ++j) { FEMaterialPoint& mp = *el.GetMaterialPoint(j); FEMaterialPoint* pt = mp.GetPointData(m_propIndex); double Dj = mat->Damage(*pt, m_comp); D += Dj; } D /= (double)nint; a << D; } return true; } //----------------------------------------------------------------------------- bool FEPlotRVEgenerations::SetFilter(const char* szfilter) { sscanf(szfilter, "solid[%d]", &m_comp); return true; } bool FEPlotRVEgenerations::Save(FEDomain& dom, FEDataStream& a) { int N = dom.Elements(); FEElasticMaterial* pmat = dom.GetMaterial()->ExtractProperty<FEElasticMaterial>(); if (pmat == nullptr) return false; FEReactiveViscoelasticMaterial* rvmat = nullptr; FEUncoupledReactiveViscoelasticMaterial* rumat = nullptr; if (m_comp > -1) { FEElasticMixture* pmm = dynamic_cast<FEElasticMixture*>(pmat); FEUncoupledElasticMixture* pum = dynamic_cast<FEUncoupledElasticMixture*>(pmat); if (pmm) rvmat = dynamic_cast<FEReactiveViscoelasticMaterial*>(pmm->GetMaterial(m_comp)); if (pum) rumat = dynamic_cast<FEUncoupledReactiveViscoelasticMaterial*>(pum->GetMaterial(m_comp)); } else { rvmat = dynamic_cast<FEReactiveViscoelasticMaterial*>(pmat); rumat = dynamic_cast<FEUncoupledReactiveViscoelasticMaterial*>(pmat); } if (rvmat) { for (int iel=0; iel<N; ++iel) { FEElement& el = dom.ElementRef(iel); int nint = el.GaussPoints(); double bmf = 0; for (int j=0; j<nint; ++j) bmf += rvmat->RVEGenerations(*el.GetMaterialPoint(j)); a << bmf/nint; } } else if (rumat) { for (int iel=0; iel<N; ++iel) { FEElement& el = dom.ElementRef(iel); int nint = el.GaussPoints(); double bmf = 0; for (int j=0; j<nint; ++j) bmf += rumat->RVEGenerations(*el.GetMaterialPoint(j)); a << bmf/nint; } } else { return false; } return true; } //----------------------------------------------------------------------------- bool FEPlotRVEbonds::SetFilter(const char* szfilter) { sscanf(szfilter, "solid[%d]", &m_comp); return true; } bool FEPlotRVEbonds::Save(FEDomain& dom, FEDataStream& a) { int N = dom.Elements(); FEElasticMaterial* pmat = dom.GetMaterial()->ExtractProperty<FEElasticMaterial>(); if (pmat == nullptr) return false; FEReactiveViscoelasticMaterial* rvmat = nullptr; FEUncoupledReactiveViscoelasticMaterial* rumat = nullptr; if (m_comp > -1) { FEElasticMixture* pmm = dynamic_cast<FEElasticMixture*>(pmat); FEUncoupledElasticMixture* pum = dynamic_cast<FEUncoupledElasticMixture*>(pmat); if (pmm) rvmat = dynamic_cast<FEReactiveViscoelasticMaterial*>(pmm->GetMaterial(m_comp)); if (pum) rumat = dynamic_cast<FEUncoupledReactiveViscoelasticMaterial*>(pum->GetMaterial(m_comp)); } else { rvmat = dynamic_cast<FEReactiveViscoelasticMaterial*>(pmat); rumat = dynamic_cast<FEUncoupledReactiveViscoelasticMaterial*>(pmat); } if (rvmat) { for (int iel=0; iel<N; ++iel) { FEElement& el = dom.ElementRef(iel); int nint = el.GaussPoints(); double bmf = 0; for (int j=0; j<nint; ++j) bmf += rvmat->ReformingBondMassFraction(*rvmat->GetBondMaterialPoint(*el.GetMaterialPoint(j))); a << bmf/nint; } } else if (rumat) { for (int iel=0; iel<N; ++iel) { FEElement& el = dom.ElementRef(iel); int nint = el.GaussPoints(); double bmf = 0; for (int j=0; j<nint; ++j) bmf += rumat->ReformingBondMassFraction(*rumat->GetBondMaterialPoint(*el.GetMaterialPoint(j))); a << bmf/nint; } } else { return false; } return true; } //----------------------------------------------------------------------------- bool FEPlotRVErecruitment::SetFilter(const char* szfilter) { sscanf(szfilter, "solid[%d]", &m_comp); return true; } bool FEPlotRVErecruitment::Save(FEDomain& dom, FEDataStream& a) { int N = dom.Elements(); FEElasticMaterial* pmat = dom.GetMaterial()->ExtractProperty<FEElasticMaterial>(); if (pmat == nullptr) return false; FEReactiveViscoelasticMaterial* rvmat = nullptr; FEUncoupledReactiveViscoelasticMaterial* rumat = nullptr; if (m_comp > -1) { FEElasticMixture* pmm = dynamic_cast<FEElasticMixture*>(pmat); FEUncoupledElasticMixture* pum = dynamic_cast<FEUncoupledElasticMixture*>(pmat); if (pmm) rvmat = dynamic_cast<FEReactiveViscoelasticMaterial*>(pmm->GetMaterial(m_comp)); if (pum) rumat = dynamic_cast<FEUncoupledReactiveViscoelasticMaterial*>(pum->GetMaterial(m_comp)); } else { rvmat = dynamic_cast<FEReactiveViscoelasticMaterial*>(pmat); rumat = dynamic_cast<FEUncoupledReactiveViscoelasticMaterial*>(pmat); } if (rvmat) { for (int iel=0; iel<N; ++iel) { FEElement& el = dom.ElementRef(iel); int nint = el.GaussPoints(); double bmf = 0; for (int j=0; j<nint; ++j) { FEMaterialPoint& mp = *rvmat->GetBondMaterialPoint(*el.GetMaterialPoint(j)); FEReactiveVEMaterialPoint& pt = *mp.ExtractData<FEReactiveVEMaterialPoint>(); if (!pt.m_wv.empty()) bmf += pt.m_wv.back(); else bmf += 1.0; } a << bmf/nint; } } else if (rumat) { for (int iel=0; iel<N; ++iel) { FEElement& el = dom.ElementRef(iel); int nint = el.GaussPoints(); double bmf = 0; for (int j=0; j<nint; ++j) { FEMaterialPoint& mp = *rvmat->GetBondMaterialPoint(*el.GetMaterialPoint(j)); FEReactiveVEMaterialPoint & pt = *mp.ExtractData<FEReactiveVEMaterialPoint>(); if (!pt.m_wv.empty()) bmf += pt.m_wv.back(); else bmf += 1.0; } a << bmf/nint; } } else { return false; } return true; } //----------------------------------------------------------------------------- bool FEPlotRVEstrain::SetFilter(const char* szfilter) { sscanf(szfilter, "solid[%d]", &m_comp); return true; } bool FEPlotRVEstrain::Save(FEDomain& dom, FEDataStream& a) { int N = dom.Elements(); FEElasticMaterial* pmat = dom.GetMaterial()->ExtractProperty<FEElasticMaterial>(); if (pmat == nullptr) return false; FEReactiveViscoelasticMaterial* rvmat = nullptr; FEUncoupledReactiveViscoelasticMaterial* rumat = nullptr; if (m_comp > -1) { FEElasticMixture* pmm = dynamic_cast<FEElasticMixture*>(pmat); FEUncoupledElasticMixture* pum = dynamic_cast<FEUncoupledElasticMixture*>(pmat); if (pmm) rvmat = dynamic_cast<FEReactiveViscoelasticMaterial*>(pmm->GetMaterial(m_comp)); if (pum) rumat = dynamic_cast<FEUncoupledReactiveViscoelasticMaterial*>(pum->GetMaterial(m_comp)); } else { rvmat = dynamic_cast<FEReactiveViscoelasticMaterial*>(pmat); rumat = dynamic_cast<FEUncoupledReactiveViscoelasticMaterial*>(pmat); } if (rvmat) { for (int iel=0; iel<N; ++iel) { FEElement& el = dom.ElementRef(iel); int nint = el.GaussPoints(); double bmf = 0; for (int j=0; j<nint; ++j) bmf += rvmat->ScalarStrain(*rvmat->GetBondMaterialPoint(*el.GetMaterialPoint(j))); a << bmf/nint; } } else if (rumat) { for (int iel=0; iel<N; ++iel) { FEElement& el = dom.ElementRef(iel); int nint = el.GaussPoints(); double bmf = 0; for (int j=0; j<nint; ++j) bmf += rumat->ScalarStrain(*rumat->GetBondMaterialPoint(*el.GetMaterialPoint(j))); a << bmf/nint; } } else { return false; } return true; } //----------------------------------------------------------------------------- class FEStrongBondSED { public: FEStrongBondSED(FEElasticMaterial* pm) : m_mat(pm) {} double operator()(const FEMaterialPoint& mp) { return m_mat->StrongBondSED(const_cast<FEMaterialPoint&>(mp)); } private: FEElasticMaterial* m_mat; }; bool FEPlotStrongBondSED::Save(FEDomain& dom, FEDataStream& a) { FEElasticMaterial* pme = dom.GetMaterial()->ExtractProperty<FEElasticMaterial>(); if (pme == 0) return false; if (dom.Class() == FE_DOMAIN_SOLID) { FEStrongBondSED W(pme); writeAverageElementValue<double>(dom, a, W); return true; } return false; } //----------------------------------------------------------------------------- class FEWeakBondSED { public: FEWeakBondSED(FEElasticMaterial* pm) : m_mat(pm) {} double operator()(const FEMaterialPoint& mp) { return m_mat->WeakBondSED(const_cast<FEMaterialPoint&>(mp)); } private: FEElasticMaterial* m_mat; }; bool FEPlotWeakBondSED::Save(FEDomain& dom, FEDataStream& a) { FEElasticMaterial* pme = dom.GetMaterial()->ExtractProperty<FEElasticMaterial>(); if (pme == 0) return false; if (dom.Class() == FE_DOMAIN_SOLID) { FEWeakBondSED W(pme); writeAverageElementValue<double>(dom, a, W); return true; } return false; } //----------------------------------------------------------------------------- class FEStrongBondDevSED { public: FEStrongBondDevSED(FEUncoupledMaterial* pm) : m_mat(pm) {} double operator()(const FEMaterialPoint& mp) { return m_mat->StrongBondDevSED(const_cast<FEMaterialPoint&>(mp)); } private: FEUncoupledMaterial* m_mat; }; bool FEPlotStrongBondDevSED::Save(FEDomain& dom, FEDataStream& a) { FEUncoupledMaterial* pme = dom.GetMaterial()->ExtractProperty<FEUncoupledMaterial>(); if (pme == 0) return false; if (dom.Class() == FE_DOMAIN_SOLID) { FEStrongBondDevSED W(pme); writeAverageElementValue<double>(dom, a, W); return true; } return false; } //----------------------------------------------------------------------------- class FEWeakBondDevSED { public: FEWeakBondDevSED(FEUncoupledMaterial* pm) : m_mat(pm) {} double operator()(const FEMaterialPoint& mp) { return m_mat->WeakBondDevSED(const_cast<FEMaterialPoint&>(mp)); } private: FEUncoupledMaterial* m_mat; }; bool FEPlotWeakBondDevSED::Save(FEDomain& dom, FEDataStream& a) { FEUncoupledMaterial* pme = dom.GetMaterial()->ExtractProperty<FEUncoupledMaterial>(); if (pme == 0) return false; if (dom.Class() == FE_DOMAIN_SOLID) { FEWeakBondDevSED W(pme); writeAverageElementValue<double>(dom, a, W); return true; } return false; } //----------------------------------------------------------------------------- bool FEPlotTrussStretch::Save(FEDomain& dom, FEDataStream& a) { FETrussDomain* td = dynamic_cast<FETrussDomain*>(&dom); if (td == nullptr) return false; for (int i = 0; i < td->Elements(); ++i) { FETrussElement& el = td->Element(i); a << el.m_lam; } return true; } //============================================================================= //! Store the average growth Lagrangian strain class FEGrowthLagrangeStrain { public: mat3ds operator()(const FEMaterialPoint& mp) { const FEElasticMaterialPoint* pe = mp.ExtractData<FEElasticMaterialPoint>(); if (pe == nullptr) return mat3ds(0, 0, 0, 0, 0, 0); const FEKinematicMaterialPoint* kp = pe->ExtractData<FEKinematicMaterialPoint>(); if (kp == 0) return mat3ds(0, 0, 0, 0, 0, 0); mat3d Fg = kp->m_Fg; mat3d C = Fg.transpose()*Fg; mat3ds E = ((C - mat3dd(1.0))*0.5).sym(); return E; } }; //----------------------------------------------------------------------------- bool FEPlotGrowthLagrangeStrain::Save(FEDomain& dom, FEDataStream& a) { FEKinematicGrowth* pme = dom.GetMaterial()->ExtractProperty<FEKinematicGrowth>(); if (pme == nullptr) return false; if (dom.Class() == FE_DOMAIN_SOLID) { writeAverageElementValue<mat3ds>(dom, a, [](const FEMaterialPoint& mp) { const FEElasticMaterialPoint* pe = mp.ExtractData<FEElasticMaterialPoint>(); if (pe == nullptr) return mat3ds(0, 0, 0, 0, 0, 0); const FEKinematicMaterialPoint* kp = pe->ExtractData<FEKinematicMaterialPoint>(); if (kp == 0) return mat3ds(0, 0, 0, 0, 0, 0); mat3d Fg = kp->m_Fg; FEElasticMaterialPoint pe2; pe2.m_F = Fg; return pe2.Strain(); }); } else if (dom.Class() == FE_DOMAIN_SHELL) { FEShellDomain* sd = dynamic_cast<FEShellDomain*>(&dom); assert(sd); FEElasticEASShellDomain* easd = dynamic_cast<FEElasticEASShellDomain*>(&dom); FEElasticANSShellDomain* ansd = dynamic_cast<FEElasticANSShellDomain*>(&dom); if (easd || ansd) { return false; } else { writeAverageElementValue<mat3ds>(dom, a, [](const FEMaterialPoint& mp) { const FEElasticMaterialPoint* pe = mp.ExtractData<FEElasticMaterialPoint>(); if (pe == nullptr) return mat3ds(0, 0, 0, 0, 0, 0); const FEKinematicMaterialPoint* kp = pe->ExtractData<FEKinematicMaterialPoint>(); if (kp == 0) return mat3ds(0, 0, 0, 0, 0, 0); mat3d Fg = kp->m_Fg; FEElasticMaterialPoint pe2; pe2.m_F = Fg; return pe2.Strain(); }); } } else return false; return true; } //----------------------------------------------------------------------------- bool FEPlotGrowthInfStrain::Save(FEDomain& dom, FEDataStream& a) { FEKinematicGrowth* pme = dom.GetMaterial()->ExtractProperty<FEKinematicGrowth>(); if (pme == nullptr) return false; if (dom.Class() == FE_DOMAIN_SOLID) { writeAverageElementValue<mat3ds>(dom, a, [](const FEMaterialPoint& mp) { const FEElasticMaterialPoint* pe = mp.ExtractData<FEElasticMaterialPoint>(); if (pe == nullptr) return mat3ds(0, 0, 0, 0, 0, 0); const FEKinematicMaterialPoint* kp = pe->ExtractData<FEKinematicMaterialPoint>(); if (kp == 0) return mat3ds(0, 0, 0, 0, 0, 0); mat3d Fg = kp->m_Fg; // displacement tensor mat3d U = Fg - mat3dd(1.0); // evaluate small strain tensor eij = 0.5*(Uij + Uji) mat3ds e = U.sym(); return e; }); } else return false; return true; } //------------------------------------------------------------------------------- bool FEPlotBeamStress::Save(FEDomain& dom, FEDataStream& a) { FEElasticBeamDomain* beam = dynamic_cast<FEElasticBeamDomain*>(&dom); if (beam == nullptr) return false; for (int i = 0; i < beam->Elements(); ++i) { FEBeamElement& el = beam->Element(i); vec3d t(0, 0, 0); int nint = el.GaussPoints(); for (int n = 0; n < nint; ++n) { // get the material point FEElasticBeamMaterialPoint& mp = *(el.GetMaterialPoint(n)->ExtractData<FEElasticBeamMaterialPoint>()); t += mp.m_t; } t /= (double)nint; a << t; } return true; } //------------------------------------------------------------------------------- bool FEPlotBeamReferenceStress::Save(FEDomain& dom, FEDataStream& a) { FEElasticBeamDomain* beam = dynamic_cast<FEElasticBeamDomain*>(&dom); if (beam == nullptr) return false; for (int i = 0; i < beam->Elements(); ++i) { FEBeamElement& el = beam->Element(i); vec3d T(0, 0, 0); int nint = el.GaussPoints(); for (int n = 0; n < nint; ++n) { // get the material point FEElasticBeamMaterialPoint& mp = *(el.GetMaterialPoint(n)->ExtractData<FEElasticBeamMaterialPoint>()); quatd Ri = mp.m_Rt.Conjugate(); T += Ri*mp.m_t; } T /= (double)nint; a << T; } return true; } //------------------------------------------------------------------------------- bool FEPlotBeamStressCouple::Save(FEDomain& dom, FEDataStream& a) { FEElasticBeamDomain* beam = dynamic_cast<FEElasticBeamDomain*>(&dom); if (beam == nullptr) return false; for (int i = 0; i < beam->Elements(); ++i) { FEBeamElement& el = beam->Element(i); vec3d m(0, 0, 0); int nint = el.GaussPoints(); for (int n = 0; n < nint; ++n) { // get the material point FEElasticBeamMaterialPoint& mp = *(el.GetMaterialPoint(n)->ExtractData<FEElasticBeamMaterialPoint>()); m += mp.m_m; } m /= (double)nint; a << m; } return true; } //------------------------------------------------------------------------------- bool FEPlotBeamReferenceStressCouple::Save(FEDomain& dom, FEDataStream& a) { FEElasticBeamDomain* beam = dynamic_cast<FEElasticBeamDomain*>(&dom); if (beam == nullptr) return false; for (int i = 0; i < beam->Elements(); ++i) { FEBeamElement& el = beam->Element(i); vec3d M(0, 0, 0); int nint = el.GaussPoints(); for (int n = 0; n < nint; ++n) { // get the material point FEElasticBeamMaterialPoint& mp = *(el.GetMaterialPoint(n)->ExtractData<FEElasticBeamMaterialPoint>()); quatd Ri = mp.m_Rt.Conjugate(); M += Ri*mp.m_m; } M /= (double)nint; a << M; } return true; } //------------------------------------------------------------------------------- bool FEPlotBeamStrain::Save(FEDomain& dom, FEDataStream& a) { FEElasticBeamDomain* beam = dynamic_cast<FEElasticBeamDomain*>(&dom); if (beam == nullptr) return false; for (int i = 0; i < beam->Elements(); ++i) { FEBeamElement& el = beam->Element(i); vec3d t(0, 0, 0); int nint = el.GaussPoints(); for (int n = 0; n < nint; ++n) { // get the material point FEElasticBeamMaterialPoint& mp = *(el.GetMaterialPoint(n)->ExtractData<FEElasticBeamMaterialPoint>()); t += mp.m_Rt * mp.m_Gamma; } t /= (double)nint; a << t; } return true; } //------------------------------------------------------------------------------- bool FEPlotBeamCurvature::Save(FEDomain& dom, FEDataStream& a) { FEElasticBeamDomain* beam = dynamic_cast<FEElasticBeamDomain*>(&dom); if (beam == nullptr) return false; for (int i = 0; i < beam->Elements(); ++i) { FEBeamElement& el = beam->Element(i); vec3d t(0, 0, 0); int nint = el.GaussPoints(); for (int n = 0; n < nint; ++n) { // get the material point FEElasticBeamMaterialPoint& mp = *(el.GetMaterialPoint(n)->ExtractData<FEElasticBeamMaterialPoint>()); t += mp.m_Rt*mp.m_Kappa; } t /= (double)nint; a << t; } return true; } //============================================================================= //! Store the average right stretch class FEGrowthRightStretch { public: mat3ds operator()(const FEMaterialPoint& mp) { const FEElasticMaterialPoint* pe = mp.ExtractData<FEElasticMaterialPoint>(); if (pe == nullptr) return mat3ds(0, 0, 0, 0, 0, 0); const FEKinematicMaterialPoint* kp = pe->ExtractData<FEKinematicMaterialPoint>(); if (kp == 0) return mat3ds(0, 0, 0, 0, 0, 0); mat3d Fg = kp->m_Fg; FEElasticMaterialPoint pe2; pe2.m_F = Fg; return pe2.RightStretch(); } }; //----------------------------------------------------------------------------- bool FEPlotGrowthRightStretch::Save(FEDomain& dom, FEDataStream& a) { FEKinematicGrowth* pme = dom.GetMaterial()->ExtractProperty<FEKinematicGrowth>(); if (pme == nullptr) return false; writeAverageElementValue<mat3ds>(dom, a, FEGrowthRightStretch()); return true; } //============================================================================= //! Store the average right stretch class FEGrowthLeftStretch { public: mat3ds operator()(const FEMaterialPoint& mp) { const FEElasticMaterialPoint* pe = mp.ExtractData<FEElasticMaterialPoint>(); if (pe == nullptr) return mat3ds(0, 0, 0, 0, 0, 0); const FEKinematicMaterialPoint* kp = pe->ExtractData<FEKinematicMaterialPoint>(); if (kp == 0) return mat3ds(0, 0, 0, 0, 0, 0); mat3d Fg = kp->m_Fg; FEElasticMaterialPoint pe2; pe2.m_F = Fg; return pe2.LeftStretch(); } }; //----------------------------------------------------------------------------- bool FEPlotGrowthLeftStretch::Save(FEDomain& dom, FEDataStream& a) { FEKinematicGrowth* pme = dom.GetMaterial()->ExtractProperty<FEKinematicGrowth>(); if (pme == nullptr) return false; writeAverageElementValue<mat3ds>(dom, a, FEGrowthLeftStretch()); return true; } //============================================================================= //! Store the average growth right Hencky class FEGrowthRightHencky { public: mat3ds operator()(const FEMaterialPoint& mp) { const FEElasticMaterialPoint* pe = mp.ExtractData<FEElasticMaterialPoint>(); if (pe == nullptr) return mat3ds(0, 0, 0, 0, 0, 0); const FEKinematicMaterialPoint* kp = pe->ExtractData<FEKinematicMaterialPoint>(); if (kp == 0) return mat3ds(0, 0, 0, 0, 0, 0); mat3d Fg = kp->m_Fg; FEElasticMaterialPoint pe2; pe2.m_F = Fg; return pe2.RightHencky(); } }; //----------------------------------------------------------------------------- bool FEPlotGrowthRightHencky::Save(FEDomain& dom, FEDataStream& a) { FEKinematicGrowth* pme = dom.GetMaterial()->ExtractProperty<FEKinematicGrowth>(); if (pme == nullptr) return false; writeAverageElementValue<mat3ds>(dom, a, FEGrowthRightHencky()); return true; } //============================================================================= //! Store the average left Hencky class FEGrowthLeftHencky { public: mat3ds operator()(const FEMaterialPoint& mp) { const FEElasticMaterialPoint* pe = mp.ExtractData<FEElasticMaterialPoint>(); if (pe == nullptr) return mat3ds(0, 0, 0, 0, 0, 0); const FEKinematicMaterialPoint* kp = pe->ExtractData<FEKinematicMaterialPoint>(); if (kp == 0) return mat3ds(0, 0, 0, 0, 0, 0); mat3d Fg = kp->m_Fg; FEElasticMaterialPoint pe2; pe2.m_F = Fg; return pe2.LeftHencky(); } }; //----------------------------------------------------------------------------- bool FEPlotGrowthLeftHencky::Save(FEDomain& dom, FEDataStream& a) { FEKinematicGrowth* pme = dom.GetMaterial()->ExtractProperty<FEKinematicGrowth>(); if (pme == nullptr) return false; writeAverageElementValue<mat3ds>(dom, a, FEGrowthLeftHencky()); return true; } //----------------------------------------------------------------------------- bool FEPlotGrowthRelativeVolume::Save(FEDomain &dom, FEDataStream& a) { if (dom.Class() == FE_DOMAIN_SOLID) { writeAverageElementValue<double>(dom, a, [](const FEMaterialPoint& mp) { const FEElasticMaterialPoint* pe = mp.ExtractData<FEElasticMaterialPoint>(); if (pe == nullptr) return 0.0; const FEKinematicMaterialPoint* kp = pe->ExtractData<FEKinematicMaterialPoint>(); return (kp ? kp->m_Fg.det() : 0.0); }); } else if (dom.Class() == FE_DOMAIN_SHELL) { // TODO: implement relative volume calculation for kinematic growth material in EAS and ANS shells FEShellDomain* sd = dynamic_cast<FEShellDomain*>(&dom); assert(sd); FEShellDomainNew* newsd = dynamic_cast<FEShellDomainNew*>(sd); FEElasticEASShellDomain* easd = dynamic_cast<FEElasticEASShellDomain*>(newsd); FEElasticANSShellDomain* ansd = dynamic_cast<FEElasticANSShellDomain*>(newsd); if (easd || ansd) { return false; } else { writeAverageElementValue<double>(dom, a, [](const FEMaterialPoint& mp) { const FEElasticMaterialPoint* pe = mp.ExtractData<FEElasticMaterialPoint>(); if (pe == nullptr) return 0.0; const FEKinematicMaterialPoint* kp = pe->ExtractData<FEKinematicMaterialPoint>(); return (kp ? kp->m_Fg.det() : 0.0); }); } return true; } else return false; return true; } bool FEPlotIdealGasPressure::Init() { FEModel* fem = GetFEModel(); if (fem == nullptr) return false; for (int i = 0; i < fem->ModelLoads(); ++i) { m_load = dynamic_cast<FEIdealGasPressure*>(fem->ModelLoad(i)); if (m_load) return true; } return (m_load != nullptr); } bool FEPlotIdealGasPressure::Save(FESurface& surf, FEDataStream& a) { if (m_binit == false) { if (!Init()) return false; m_binit = true; } if (m_load == nullptr) return false; if (m_load->GetSurface().GetFacetSet() == surf.GetFacetSet()) { a << m_load->GetCurrentPressure(); return true; } else return false; } bool FEPlotBodyForce::Save(FEDomain& dom, FEDataStream& a) { if (dom.Class() == FE_DOMAIN_SOLID) { FEModel* fem = GetFEModel(); FESolidDomain& sd = static_cast<FESolidDomain&>(dom); writeAverageElementValue<vec3d>(dom, a, [&](const FEMaterialPoint& mp) { int NBL = fem->ModelLoads(); vec3d bf(0, 0, 0); for (int j = 0; j < NBL; ++j) { FEBodyForce* pbf = dynamic_cast<FEBodyForce*>(fem->ModelLoad(j)); FEMaterialPoint& pt = const_cast<FEMaterialPoint&>(mp); if (pbf && pbf->IsActive()) bf += pbf->force(pt); } // NOTE: We flip the sign because FEBio applies the negative of the body force. // see FEElasticSolidDomain::BodyForce return -bf; }); return true; } return false; } bool FEPlotEdgeContactGap::Save(FEEdge& edge, FEDataStream& a) { FEEdgeToSurfaceSlidingContactEdge* pe = dynamic_cast<FEEdgeToSurfaceSlidingContactEdge*>(&edge); if (pe == nullptr) return false; for (int i = 0; i < pe->Nodes(); ++i) { FEE2SSlidingContactPoint& pt = pe->m_points[i]; a << pt.m_gap; } return true; } bool FEPlotTotalLinearMomentum::Save(FEDomain& dom, FEDataStream& a) { if (dom.Class() == FE_DOMAIN_SOLID) { FEElasticMaterial* pme = dom.GetMaterial()->ExtractProperty<FEElasticMaterial>(); if (pme == 0) return false; vec3d L(0,0,0); FESolidDomain& solidDomain = dynamic_cast<FESolidDomain&>(dom); for (int i = 0; i < solidDomain.Elements(); ++i) { FESolidElement& el = solidDomain.Element(i); int nint = el.GaussPoints(); double* w = el.GaussWeights(); for (int n = 0; n < nint; ++n) { FEMaterialPoint& mp = *el.GetMaterialPoint(n); FEElasticMaterialPoint& pt = *mp.ExtractData<FEElasticMaterialPoint>(); vec3d& v = pt.m_v; double J0 = solidDomain.detJ0(el, n); L.x += v.x * J0 * w[n]; L.y += v.y * J0 * w[n]; L.z += v.z * J0 * w[n]; } } a << L; return true; } return false; } bool FEPlotTotalAngularMomentum::Save(FEDomain& dom, FEDataStream& a) { if (dom.Class() == FE_DOMAIN_SOLID) { FEElasticMaterial* pme = dom.GetMaterial()->ExtractProperty<FEElasticMaterial>(); if (pme == 0) return false; vec3d J(0, 0, 0); FESolidDomain& solidDomain = dynamic_cast<FESolidDomain&>(dom); for (int i = 0; i < solidDomain.Elements(); ++i) { FESolidElement& el = solidDomain.Element(i); int nint = el.GaussPoints(); double* w = el.GaussWeights(); for (int n = 0; n < nint; ++n) { FEMaterialPoint& mp = *el.GetMaterialPoint(n); FEElasticMaterialPoint& pt = *mp.ExtractData<FEElasticMaterialPoint>(); vec3d& r = mp.m_rt; vec3d& v = pt.m_v; vec3d j = r ^ v; double J0 = solidDomain.detJ0(el, n); J.x += j.x * J0 * w[n]; J.y += j.y * J0 * w[n]; J.z += j.z * J0 * w[n]; } } a << J; return true; } return false; } bool FEPlotTotalEnergy::Save(FEDomain& dom, FEDataStream& a) { if (dom.Class() == FE_DOMAIN_SOLID) { FEElasticMaterial* pme = dom.GetMaterial()->ExtractProperty<FEElasticMaterial>(); if (pme == 0) return false; double E = 0.0; FESolidDomain& solidDomain = dynamic_cast<FESolidDomain&>(dom); for (int i = 0; i < solidDomain.Elements(); ++i) { FESolidElement& el = solidDomain.Element(i); int nint = el.GaussPoints(); double* w = el.GaussWeights(); for (int n = 0; n < nint; ++n) { FEMaterialPoint& mp = *el.GetMaterialPoint(n); FEElasticMaterialPoint& pt = *mp.ExtractData<FEElasticMaterialPoint>(); // strain energy double W = pme->StrainEnergyDensity(mp); // kinetic energy double D = pme->Density(mp); vec3d& v = pt.m_v; double K = 0.5 * (v * v) * D; double J0 = solidDomain.detJ0(el, n); E += (K + W) * J0 * w[n]; } } a << E; return true; } return false; }
C++
3D
febiosoftware/FEBio
FEBioMech/FEMembraneMaterial.h
.h
3,064
104
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #pragma once #include <FECore/FEMaterial.h> #include <FECore/DumpStream.h> #include "febiomech_api.h" //----------------------------------------------------------------------------- class FEMembraneMaterialPoint : public FEMaterialPointData { public: FEMembraneMaterialPoint() { s[0] = s[1] = s[2] = 0; } FEMaterialPointData* Copy() { return new FEMembraneMaterialPoint(*this); } void Serialize(DumpStream& ar) { FEMaterialPointData::Serialize(ar); ar & g & s; } public: // calculate membrane strain void strain(double e[3]); public: double g[6]; // deformation gradient double s[3]; // in-plane PK2 stress }; //----------------------------------------------------------------------------- class FEBIOMECH_API FEMembraneMaterial : public FEMaterial { public: FEMembraneMaterial(FEModel* pfem) : FEMaterial(pfem) {} virtual ~FEMembraneMaterial() {} //! create material point data FEMaterialPointData* CreateMaterialPointData() { return new FEMembraneMaterialPoint; } public: //! calculate in-plane membrane stress virtual void Stress(FEMaterialPoint& mp, double s[3]) = 0; //! calculate in-plane membrane tangent virtual void Tangent(FEMaterialPoint& mp, double D[3][3]) = 0; FECORE_BASE_CLASS(FEMembraneMaterial) }; //----------------------------------------------------------------------------- // class for triangular membranes class FEElasticMembrane : public FEMembraneMaterial { public: //! constructor FEElasticMembrane(FEModel* pfem) : FEMembraneMaterial(pfem) {} public: //! calculate in-plane membrane stress void Stress(FEMaterialPoint& mp, double s[3]) override; //! calculate in-plane membrane tangent void Tangent(FEMaterialPoint& mp, double D[3][3]) override; public: double m_E; double m_v; DECLARE_FECORE_CLASS(); };
Unknown
3D
febiosoftware/FEBio
FEBioMech/FEFiberIntegrationTriangle.cpp
.cpp
15,204
508
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #include "stdafx.h" #include "FEFiberIntegrationTriangle.h" #include "triangle_sphere.h" #ifndef SQR #define SQR(x) ((x)*(x)) #endif class FEFiberIntegrationTriangle::Iterator : public FEFiberIntegrationSchemeIterator { public: Iterator(int nint, const double* cth, const double* cph, const double* sth, const double* sph, const double* wn) { m_nint = nint; m_cth = cth; m_cph = cph; m_sth = sth; m_sph = sph; m_wn = wn; n = -1; Next(); } bool IsValid() { return (n < m_nint); } // move to the next integration point bool Next() { n++; if (n < m_nint) { m_fiber.x = m_cth[n] * m_sph[n]; m_fiber.y = m_sth[n] * m_sph[n]; m_fiber.z = m_cph[n]; m_weight = m_wn[n]; return true; } else return false; } private: int n; int m_nint; const double* m_cth; const double* m_cph; const double* m_sth; const double* m_sph; const double* m_wn; }; //----------------------------------------------------------------------------- // define the material parameters BEGIN_FECORE_CLASS(FEFiberIntegrationTriangle, FEFiberIntegrationScheme) ADD_PARAMETER(m_nre, "resolution")->setEnums(" 20\0 34\0 60\0 74\0 196\0 210\0 396\0 410\0 596\0 610\0 796\0 810\0 996\0 1010\0 1196\0 1210\0 1396\0 1410\0 1596\0 1610\0 1796\0"); END_FECORE_CLASS(); FEFiberIntegrationTriangle::FEFiberIntegrationTriangle(FEModel* pfem) : FEFiberIntegrationScheme(pfem) { m_nres = 0; m_nre = -1; } FEFiberIntegrationTriangle::~FEFiberIntegrationTriangle() { } //----------------------------------------------------------------------------- bool FEFiberIntegrationTriangle::Init() { int list[21] = {NST20, NST34, NST60, NST74, NST196, NST210, NST396, NST410, NST596, NST610, NST796, NST810, NST996, NST1010, NST1196, NST1210, NST1396, NST1410, NST1596, NST1610, NST1796}; // this is needed to maintain backward compatibility if (m_nre > 21) m_nres = m_nre; else m_nres = list[m_nre]; // initialize integration rule data InitIntegrationRule(); // also initialize the parent class return FEFiberIntegrationScheme::Init(); } //----------------------------------------------------------------------------- void FEFiberIntegrationTriangle::Serialize(DumpStream& ar) { FEFiberIntegrationScheme::Serialize(ar); if (ar.IsSaving() == false) { InitIntegrationRule(); } } //----------------------------------------------------------------------------- void FEFiberIntegrationTriangle::InitIntegrationRule() { switch (m_nres) { case 20: m_nint=NST20; for (int n=0; n<m_nint; ++n) { m_cth[n] = cos(THETA20[n]); m_sth[n] = sin(THETA20[n]); m_cph[n] = cos(PHI20[n]); m_sph[n] = sin(PHI20[n]); m_w[n] = AREA20[n]; } break; case 34: m_nint=NST34; for (int n=0; n<m_nint; ++n) { m_cth[n] = cos(THETA34[n]); m_sth[n] = sin(THETA34[n]); m_cph[n] = cos(PHI34[n]); m_sph[n] = sin(PHI34[n]); m_w[n] = AREA34[n]; } break; case 60: m_nint=NST60; for (int n=0; n<m_nint; ++n) { m_cth[n] = cos(THETA60[n]); m_sth[n] = sin(THETA60[n]); m_cph[n] = cos(PHI60[n]); m_sph[n] = sin(PHI60[n]); m_w[n] = AREA60[n]; } break; case 74: m_nint=NST74; for (int n=0; n<m_nint; ++n) { m_cth[n] = cos(THETA74[n]); m_sth[n] = sin(THETA74[n]); m_cph[n] = cos(PHI74[n]); m_sph[n] = sin(PHI74[n]); m_w[n] = AREA74[n]; } break; case 196: m_nint=NST196; for (int n=0; n<m_nint; ++n) { m_cth[n] = cos(THETA196[n]); m_sth[n] = sin(THETA196[n]); m_cph[n] = cos(PHI196[n]); m_sph[n] = sin(PHI196[n]); m_w[n] = AREA196[n]; } break; case 210: m_nint=NST210; for (int n=0; n<m_nint; ++n) { m_cth[n] = cos(THETA210[n]); m_sth[n] = sin(THETA210[n]); m_cph[n] = cos(PHI210[n]); m_sph[n] = sin(PHI210[n]); m_w[n] = AREA210[n]; } break; case 396: m_nint=NST396; for (int n=0; n<m_nint; ++n) { m_cth[n] = cos(THETA396[n]); m_sth[n] = sin(THETA396[n]); m_cph[n] = cos(PHI396[n]); m_sph[n] = sin(PHI396[n]); m_w[n] = AREA396[n]; } break; case 410: m_nint=NST410; for (int n=0; n<m_nint; ++n) { m_cth[n] = cos(THETA410[n]); m_sth[n] = sin(THETA410[n]); m_cph[n] = cos(PHI410[n]); m_sph[n] = sin(PHI410[n]); m_w[n] = AREA410[n]; } break; case 596: m_nint=NST596; for (int n=0; n<m_nint; ++n) { m_cth[n] = cos(THETA596[n]); m_sth[n] = sin(THETA596[n]); m_cph[n] = cos(PHI596[n]); m_sph[n] = sin(PHI596[n]); m_w[n] = AREA596[n]; } break; case 610: m_nint=NST610; for (int n=0; n<m_nint; ++n) { m_cth[n] = cos(THETA610[n]); m_sth[n] = sin(THETA610[n]); m_cph[n] = cos(PHI610[n]); m_sph[n] = sin(PHI610[n]); m_w[n] = AREA610[n]; } break; case 796: m_nint=NST796; for (int n=0; n<m_nint; ++n) { m_cth[n] = cos(THETA796[n]); m_sth[n] = sin(THETA796[n]); m_cph[n] = cos(PHI796[n]); m_sph[n] = sin(PHI796[n]); m_w[n] = AREA796[n]; } break; case 810: m_nint=NST810; for (int n=0; n<m_nint; ++n) { m_cth[n] = cos(THETA810[n]); m_sth[n] = sin(THETA810[n]); m_cph[n] = cos(PHI810[n]); m_sph[n] = sin(PHI810[n]); m_w[n] = AREA810[n]; } break; case 996: m_nint=NST996; for (int n=0; n<m_nint; ++n) { m_cth[n] = cos(THETA996[n]); m_sth[n] = sin(THETA996[n]); m_cph[n] = cos(PHI996[n]); m_sph[n] = sin(PHI996[n]); m_w[n] = AREA996[n]; } break; case 1010: m_nint=NST1010; for (int n=0; n<m_nint; ++n) { m_cth[n] = cos(THETA1010[n]); m_sth[n] = sin(THETA1010[n]); m_cph[n] = cos(PHI1010[n]); m_sph[n] = sin(PHI1010[n]); m_w[n] = AREA1010[n]; } break; case 1196: m_nint=NST1196; for (int n=0; n<m_nint; ++n) { m_cth[n] = cos(THETA1196[n]); m_sth[n] = sin(THETA1196[n]); m_cph[n] = cos(PHI1196[n]); m_sph[n] = sin(PHI1196[n]); m_w[n] = AREA1196[n]; } break; case 1210: m_nint=NST1210; for (int n=0; n<m_nint; ++n) { m_cth[n] = cos(THETA1210[n]); m_sth[n] = sin(THETA1210[n]); m_cph[n] = cos(PHI1210[n]); m_sph[n] = sin(PHI1210[n]); m_w[n] = AREA1210[n]; } break; case 1396: m_nint=NST1396; for (int n=0; n<m_nint; ++n) { m_cth[n] = cos(THETA1396[n]); m_sth[n] = sin(THETA1396[n]); m_cph[n] = cos(PHI1396[n]); m_sph[n] = sin(PHI1396[n]); m_w[n] = AREA1396[n]; } break; case 1410: m_nint=NST1410; for (int n=0; n<m_nint; ++n) { m_cth[n] = cos(THETA1410[n]); m_sth[n] = sin(THETA1410[n]); m_cph[n] = cos(PHI1410[n]); m_sph[n] = sin(PHI1410[n]); m_w[n] = AREA1410[n]; } break; case 1596: m_nint=NST1596; for (int n=0; n<m_nint; ++n) { m_cth[n] = cos(THETA1596[n]); m_sth[n] = sin(THETA1596[n]); m_cph[n] = cos(PHI1596[n]); m_sph[n] = sin(PHI1596[n]); m_w[n] = AREA1596[n]; } break; case 1610: m_nint=NST1610; for (int n=0; n<m_nint; ++n) { m_cth[n] = cos(THETA1610[n]); m_sth[n] = sin(THETA1610[n]); m_cph[n] = cos(PHI1610[n]); m_sph[n] = sin(PHI1610[n]); m_w[n] = AREA1610[n]; } break; case 1796: m_nint=NST1796; for (int n=0; n<m_nint; ++n) { m_cth[n] = cos(THETA1796[n]); m_sth[n] = sin(THETA1796[n]); m_cph[n] = cos(PHI1796[n]); m_sph[n] = sin(PHI1796[n]); m_w[n] = AREA1796[n]; } break; } } //----------------------------------------------------------------------------- FEFiberIntegrationSchemeIterator* FEFiberIntegrationTriangle::GetIterator(FEMaterialPoint* mp) { return new Iterator(m_nint, &m_cth[0], &m_cph[0], &m_sth[0], &m_sph[0], &m_w[0]); } /* //----------------------------------------------------------------------------- mat3ds FEFiberIntegrationTriangle::Stress(FEMaterialPoint& mp) { FEElasticMaterialPoint& pt = *mp.ExtractData<FEElasticMaterialPoint>(); // get the local coordinate systems mat3d Q = GetLocalCS(mp); mat3d QT = Q.transpose(); // loop over all integration points double R; vec3d n0e, n0a; mat3ds s; s.zero(); for (int n=0; n<m_nint; ++n) { // set the global fiber direction in reference configuration n0e.x = m_cth[n]*m_sph[n]; n0e.y = m_sth[n]*m_sph[n]; n0e.z = m_cph[n]; m_pFmat->SetFiberDirection(mp, n0e); // get the local material fiber direction in reference configuration n0a = QT*n0e; // evaluate the fiber density R = m_pFDD->FiberDensity(n0a); // evaluate this fiber's contribution to the stress s += m_pFmat->Stress(mp)*(R*m_w[n]); } return s; } //----------------------------------------------------------------------------- tens4ds FEFiberIntegrationTriangle::Tangent(FEMaterialPoint& mp) { FEElasticMaterialPoint& pt = *mp.ExtractData<FEElasticMaterialPoint>(); // get the local coordinate systems mat3d Q = GetLocalCS(mp); mat3d QT = Q.transpose(); // loop over all integration points double R; vec3d n0e, n0a; tens4ds c; c.zero(); for (int n=0; n<m_nint; ++n) { // set the global fiber direction in reference configuration n0e.x = m_cth[n]*m_sph[n]; n0e.y = m_sth[n]*m_sph[n]; n0e.z = m_cph[n]; m_pFmat->SetFiberDirection(mp, n0e); // get the local material fiber direction in reference configuration n0a = QT*n0e; // evaluate the fiber density R = m_pFDD->FiberDensity(n0a); // evaluate this fiber's contribution to the tangent c += m_pFmat->Tangent(mp)*(R*m_w[n]); } return c; } //----------------------------------------------------------------------------- double FEFiberIntegrationTriangle::StrainEnergyDensity(FEMaterialPoint& mp) { FEElasticMaterialPoint& pt = *mp.ExtractData<FEElasticMaterialPoint>(); // get the local coordinate systems mat3d Q = GetLocalCS(mp); mat3d QT = Q.transpose(); // loop over all integration points double R; vec3d n0e, n0a; double sed = 0.0; for (int n=0; n<m_nint; ++n) { // set the global fiber direction in reference configuration n0e.x = m_cth[n]*m_sph[n]; n0e.y = m_sth[n]*m_sph[n]; n0e.z = m_cph[n]; m_pFmat->SetFiberDirection(mp, n0e); // get the local material fiber direction in reference configuration n0a = QT*n0e; // evaluate the fiber density R = m_pFDD->FiberDensity(n0a); // evaluate this fiber's contribution to the stress sed += m_pFmat->StrainEnergyDensity(mp)*(R*m_w[n]); } return sed; } //----------------------------------------------------------------------------- double FEFiberIntegrationTriangle::IntegratedFiberDensity() { // initialize integrated fiber density distribution double IFD = 1; // loop over all integration points double R; vec3d n0a; double C = 0; for (int n=0; n<m_nint; ++n) { // set the global fiber direction in reference configuration n0a.x = m_cth[n]*m_sph[n]; n0a.y = m_sth[n]*m_sph[n]; n0a.z = m_cph[n]; // evaluate the fiber density R = m_pFDD->FiberDensity(n0a); // integrate the fiber density C += R*m_w[n]; } IFD = C; return IFD; } */
C++
3D
febiosoftware/FEBio
FEBioMech/FEUncoupledElasticMixture.cpp
.cpp
9,900
292
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #include "stdafx.h" #include "FEUncoupledElasticMixture.h" #include <FECore/FECoreKernel.h> #include <FECore/log.h> // define the material parameters BEGIN_FECORE_CLASS(FEUncoupledElasticMixture, FEUncoupledMaterial) ADD_PROPERTY(m_pMat, "solid"); ADD_PROPERTY(m_Q, "mat_axis")->SetFlags(FEProperty::Optional); END_FECORE_CLASS(); ////////////////////////////////////////////////////////////////////// // Mixture of uncoupled elastic solids ////////////////////////////////////////////////////////////////////// //----------------------------------------------------------------------------- FEUncoupledElasticMixture::FEUncoupledElasticMixture(FEModel* pfem) : FEUncoupledMaterial(pfem) { } //----------------------------------------------------------------------------- FEMaterialPointData* FEUncoupledElasticMixture::CreateMaterialPointData() { FEElasticMixtureMaterialPoint* pt = new FEElasticMixtureMaterialPoint(); int NMAT = Materials(); for (int i=0; i<NMAT; ++i) pt->AddMaterialPoint(new FEMaterialPoint(m_pMat[i]->CreateMaterialPointData())); return pt; } //----------------------------------------------------------------------------- void FEUncoupledElasticMixture::AddMaterial(FEElasticMaterial* pm) { m_pMat.push_back(dynamic_cast<FEUncoupledMaterial*>(pm)); } //----------------------------------------------------------------------------- //! data initialization bool FEUncoupledElasticMixture::Init() { // check if any of the solid materials are elastic mixtures -- none allowed, // otherwise FEBio does not know which FEElasticMixtureMaterialPoint to access int nmix = 0; for (int i=0; i<Materials(); ++i) { if (dynamic_cast<FEElasticMixture*>(m_pMat[i])) nmix++; if (dynamic_cast<FEUncoupledElasticMixture*>(m_pMat[i])) nmix++; } if (nmix > 0) { feLogError("Solids in uncoupled solid mixture material cannot be solid mixtures"); return false; } return FEElasticMaterial::Init(); } //----------------------------------------------------------------------------- mat3ds FEUncoupledElasticMixture::DevStress(FEMaterialPoint& mp) { FEElasticMixtureMaterialPoint& pt = *mp.ExtractData<FEElasticMixtureMaterialPoint>(); vector<double>& w = pt.m_w; assert(w.size() == m_pMat.size()); // get the elastic material point FEElasticMaterialPoint& ep = *mp.ExtractData<FEElasticMaterialPoint>(); // calculate stress mat3ds s; s.zero(); for (int i=0; i < (int)m_pMat.size(); ++i) { FEMaterialPoint& mpi = *pt.GetPointData(i); mpi.m_elem = mp.m_elem; mpi.m_index = mp.m_index; mpi.m_rt = mp.m_rt; mpi.m_r0 = mp.m_r0; // copy the elastic material point data to the components FEElasticMaterialPoint& epi = *mpi.ExtractData<FEElasticMaterialPoint>(); epi.m_F = ep.m_F; epi.m_J = ep.m_J; epi.m_v = ep.m_v; epi.m_a = ep.m_a; epi.m_L = ep.m_L; FEUncoupledMaterial* uMat = dynamic_cast<FEUncoupledMaterial*>(m_pMat[i]); if (uMat) s += epi.m_s = uMat->DevStress(mpi)*w[i]; else s += epi.m_s = m_pMat[i]->Stress(mpi)*w[i]; } return s; } //----------------------------------------------------------------------------- tens4ds FEUncoupledElasticMixture::DevTangent(FEMaterialPoint& mp) { FEElasticMixtureMaterialPoint& pt = *mp.ExtractData<FEElasticMixtureMaterialPoint>(); vector<double>& w = pt.m_w; assert(w.size() == m_pMat.size()); // get the elastic material point FEElasticMaterialPoint& ep = *mp.ExtractData<FEElasticMaterialPoint>(); // calculate elasticity tensor tens4ds c(0.); for (int i=0; i < (int)m_pMat.size(); ++i) { FEMaterialPoint& mpi = *pt.GetPointData(i); mpi.m_elem = mp.m_elem; mpi.m_index = mp.m_index; mpi.m_rt = mp.m_rt; mpi.m_r0 = mp.m_r0; // copy the elastic material point data to the components FEElasticMaterialPoint& epi = *mpi.ExtractData<FEElasticMaterialPoint>(); epi.m_F = ep.m_F; epi.m_J = ep.m_J; epi.m_v = ep.m_v; epi.m_a = ep.m_a; epi.m_L = ep.m_L; FEUncoupledMaterial* uMat = dynamic_cast<FEUncoupledMaterial*>(m_pMat[i]); if (uMat) c += uMat->DevTangent(mpi)*w[i]; else c += m_pMat[i]->Tangent(mpi)*w[i]; } return c; } //----------------------------------------------------------------------------- double FEUncoupledElasticMixture::DevStrainEnergyDensity(FEMaterialPoint& mp) { FEElasticMixtureMaterialPoint& pt = *mp.ExtractData<FEElasticMixtureMaterialPoint>(); vector<double>& w = pt.m_w; assert(w.size() == m_pMat.size()); // get the elastic material point FEElasticMaterialPoint& ep = *mp.ExtractData<FEElasticMaterialPoint>(); // calculate strain energy density double sed = 0.0; for (int i=0; i < (int)m_pMat.size(); ++i) { FEMaterialPoint& mpi = *pt.GetPointData(i); mpi.m_elem = mp.m_elem; mpi.m_index = mp.m_index; mpi.m_rt = mp.m_rt; mpi.m_r0 = mp.m_r0; // copy the elastic material point data to the components FEElasticMaterialPoint& epi = *mpi.ExtractData<FEElasticMaterialPoint>(); epi.m_F = ep.m_F; epi.m_J = ep.m_J; epi.m_v = ep.m_v; epi.m_a = ep.m_a; epi.m_L = ep.m_L; FEUncoupledMaterial* uMat = dynamic_cast<FEUncoupledMaterial*>(m_pMat[i]); if (uMat) sed += uMat->DevStrainEnergyDensity(mpi)*w[i]; else sed += m_pMat[i]->StrainEnergyDensity(mpi)*w[i]; } return sed; } //----------------------------------------------------------------------------- double FEUncoupledElasticMixture::StrongBondDevSED(FEMaterialPoint& mp) { FEElasticMixtureMaterialPoint& pt = *mp.ExtractData<FEElasticMixtureMaterialPoint>(); vector<double>& w = pt.m_w; assert(w.size() == m_pMat.size()); // get the elastic material point FEElasticMaterialPoint& ep = *mp.ExtractData<FEElasticMaterialPoint>(); // calculate strain energy density double sed = 0.0; for (int i=0; i < (int)m_pMat.size(); ++i) { FEMaterialPoint& mpi = *pt.GetPointData(i); mpi.m_elem = mp.m_elem; mpi.m_index = mp.m_index; mpi.m_rt = mp.m_rt; mpi.m_r0 = mp.m_r0; // copy the elastic material point data to the components FEElasticMaterialPoint& epi = *mpi.ExtractData<FEElasticMaterialPoint>(); epi.m_F = ep.m_F; epi.m_J = ep.m_J; epi.m_v = ep.m_v; epi.m_a = ep.m_a; epi.m_L = ep.m_L; FEUncoupledMaterial* uMat = dynamic_cast<FEUncoupledMaterial*>(m_pMat[i]); if (uMat) sed += uMat->StrongBondDevSED(mpi)*w[i]; else sed += m_pMat[i]->StrongBondSED(mpi)*w[i]; } return sed; } //----------------------------------------------------------------------------- double FEUncoupledElasticMixture::WeakBondDevSED(FEMaterialPoint& mp) { FEElasticMixtureMaterialPoint& pt = *mp.ExtractData<FEElasticMixtureMaterialPoint>(); vector<double>& w = pt.m_w; assert(w.size() == m_pMat.size()); // get the elastic material point FEElasticMaterialPoint& ep = *mp.ExtractData<FEElasticMaterialPoint>(); // calculate strain energy density double sed = 0.0; for (int i=0; i < (int)m_pMat.size(); ++i) { FEMaterialPoint& mpi = *pt.GetPointData(i); mpi.m_elem = mp.m_elem; mpi.m_index = mp.m_index; mpi.m_rt = mp.m_rt; mpi.m_r0 = mp.m_r0; // copy the elastic material point data to the components FEElasticMaterialPoint& epi = *mpi.ExtractData<FEElasticMaterialPoint>(); epi.m_F = ep.m_F; epi.m_J = ep.m_J; epi.m_v = ep.m_v; epi.m_a = ep.m_a; epi.m_L = ep.m_L; FEUncoupledMaterial* uMat = dynamic_cast<FEUncoupledMaterial*>(m_pMat[i]); if (uMat) sed += uMat->WeakBondDevSED(*pt.GetPointData(i))*w[i]; else sed += m_pMat[i]->WeakBondSED(*pt.GetPointData(i))*w[i]; } return sed; } //----------------------------------------------------------------------------- //! specialized material points void FEUncoupledElasticMixture::UpdateSpecializedMaterialPoints(FEMaterialPoint& mp, const FETimeInfo& tp) { FEElasticMixtureMaterialPoint& pt = *mp.ExtractData<FEElasticMixtureMaterialPoint>(); for (int i=0; i < (int) m_pMat.size(); ++i) { FEMaterialPoint& mpi = *pt.GetPointData(i); mpi.m_elem = mp.m_elem; mpi.m_index = mp.m_index; mpi.m_rt = mp.m_rt; mpi.m_r0 = mp.m_r0; FEMaterial* pmj = GetMaterial(i); pmj->UpdateSpecializedMaterialPoints(mpi, tp); } }
C++
3D
febiosoftware/FEBio
FEBioMech/FEEFDNeoHookean.h
.h
3,065
102
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #pragma once #include "FECore/FEMaterial.h" #include "FENeoHookean.h" #include "FEEllipsoidalFiberDistribution.h" class FEEFDNeoHookean : public FEElasticMaterial { public: FEEFDNeoHookean(FEModel* pfem); public: double m_E; //!< Young's modulus double m_v; //!< Poisson's ratio double m_ksi[3]; //!< ksi double m_beta[3]; //!< beta public: //! calculate stress at material point virtual mat3ds Stress(FEMaterialPoint& pt) override; //! calculate tangent stiffness at material point virtual tens4ds Tangent(FEMaterialPoint& pt) override; //! calculate strain energy density at material point virtual double StrainEnergyDensity(FEMaterialPoint& pt) override; //! data initialization bool Init() override; //! serialization void Serialize(DumpStream& ar) override; public: FEEllipsoidalFiberDistribution m_EFD; FENeoHookean m_NH; // declare the parameter list DECLARE_FECORE_CLASS(); }; //---------------------------------------------------------------- // "old" version using full-sphere integration class FEEFDNeoHookeanOld : public FEElasticMaterial { public: FEEFDNeoHookeanOld(FEModel* pfem) : FEElasticMaterial(pfem), m_EFD(pfem), m_NH(pfem) {} public: //! calculate stress at material point virtual mat3ds Stress(FEMaterialPoint& pt) override; //! calculate tangent stiffness at material point virtual tens4ds Tangent(FEMaterialPoint& pt) override; //! calculate strain energy density at material point virtual double StrainEnergyDensity(FEMaterialPoint& pt) override; //! data initialization and checking bool Init() override; //! serialization void Serialize(DumpStream& ar) override; public: FEEllipsoidalFiberDistributionOld m_EFD; FENeoHookean m_NH; // declare the parameter list DECLARE_FECORE_CLASS(); };
Unknown
3D
febiosoftware/FEBio
FEBioMech/FEIdealGasPressure.h
.h
2,272
69
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #pragma once #include <FECore/FESurfaceLoad.h> #include <FECore/FEModelParam.h> //----------------------------------------------------------------------------- //! The pressure surface is a surface domain that sustains pressure boundary //! conditions //! class FEIdealGasPressure : public FESurfaceLoad { public: //! constructor FEIdealGasPressure(FEModel* pfem); //! initialization bool Init() override; void Activate() override; void Update() override; public: double GetCurrentPressure() const { return m_currentPressure; } public: //! calculate residual void LoadVector(FEGlobalVector& R) override; //! calculate stiffness void StiffnessMatrix(FELinearSystem& LS) override; protected: double m_initialPressure; //!< initial pressure value bool m_bsymm; //!< use symmetric formulation bool m_bshellb; //!< flag for prescribing pressure on shell bottom private: double m_initialVolume; double m_currentVolume; double m_currentPressure; DECLARE_FECORE_CLASS(); };
Unknown
3D
febiosoftware/FEBio
FEBioMech/FEEFDVerondaWestmann.cpp
.cpp
3,140
84
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #include "stdafx.h" #include "FEEFDVerondaWestmann.h" //----------------------------------------------------------------------------- // define the material parameters BEGIN_FECORE_CLASS(FEEFDVerondaWestmann, FEUncoupledMaterial) ADD_PARAMETER(m_VW.m_c1, "c1")->setUnits(UNIT_PRESSURE); ADD_PARAMETER(m_VW.m_c2, "c2"); ADD_PARAMETER(m_EFD.m_beta, 3, "beta"); ADD_PARAMETER(m_EFD.m_ksi , 3, "ksi" )->setUnits(UNIT_PRESSURE); END_FECORE_CLASS(); //----------------------------------------------------------------------------- FEEFDVerondaWestmann::FEEFDVerondaWestmann(FEModel* pfem) : FEUncoupledMaterial(pfem), m_VW(pfem), m_EFD(pfem) { m_VW.SetParent(this); m_EFD.SetParent(this); } //----------------------------------------------------------------------------- bool FEEFDVerondaWestmann::Init() { if (FEUncoupledMaterial::Init() == false) return false; if (m_VW.Init() == false) return false; if (m_EFD.Init() == false) return false; return true; } //----------------------------------------------------------------------------- void FEEFDVerondaWestmann::Serialize(DumpStream& ar) { FEUncoupledMaterial::Serialize(ar); m_VW.Serialize(ar); m_EFD.Serialize(ar); } //----------------------------------------------------------------------------- mat3ds FEEFDVerondaWestmann::DevStress(FEMaterialPoint& pt) { return m_VW.DevStress(pt) + m_EFD.DevStress(pt); } //----------------------------------------------------------------------------- tens4ds FEEFDVerondaWestmann::DevTangent(FEMaterialPoint& pt) { return m_VW.DevTangent(pt) + m_EFD.DevTangent(pt); } //----------------------------------------------------------------------------- //! calculate deviatoric strain energy density double FEEFDVerondaWestmann::DevStrainEnergyDensity(FEMaterialPoint& pt) { return m_VW.DevStrainEnergyDensity(pt) + m_EFD.DevStrainEnergyDensity(pt); }
C++
3D
febiosoftware/FEBio
FEBioMech/FEFungOrthoCompressible.h
.h
2,161
61
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #pragma once #include "FEElasticMaterial.h" class FEFungOrthoCompressible : public FEElasticMaterial { public: double E1, E2, E3; // Young's moduli double v12, v23, v31; // Poisson's ratio double G12, G23, G31; // Shear moduli double lam[3][3]; // first Lame coefficients double mu[3]; // second Lame coefficients double m_c; // c coefficient double m_k; // bulk modulus public: FEFungOrthoCompressible(FEModel* pfem) : FEElasticMaterial(pfem) {} //! calculate stress at material point mat3ds Stress(FEMaterialPoint& pt) override; //! calculate tangent stiffness at material point tens4ds Tangent(FEMaterialPoint& pt) override; //! calculate strain energy density at material point double StrainEnergyDensity(FEMaterialPoint& pt) override; //! data initialization bool Validate() override; // declare parameter list DECLARE_FECORE_CLASS(); };
Unknown
3D
febiosoftware/FEBio
FEBioMech/FENodeToNodeConstraint.h
.h
2,243
63
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #pragma once #include <FECore/FENLConstraint.h> class FENodeToNodeConstraint : public FENLConstraint { public: FENodeToNodeConstraint(FEModel* fem); // allocate equations int InitEquations(int neq) override; // The LoadVector function evaluates the "forces" that contribute to the residual of the system void LoadVector(FEGlobalVector& R, const FETimeInfo& tp) override; // Evaluates the contriubtion to the stiffness matrix void StiffnessMatrix(FELinearSystem& LS, const FETimeInfo& tp) override; // Build the matrix profile void BuildMatrixProfile(FEGlobalMatrix& M) override; protected: void UnpackLM(vector<int>& lm); void Serialize(DumpStream& ar) override; void PrepStep(); void Update(const std::vector<double>& Ui, const std::vector<double>& ui) override; void UpdateIncrements(std::vector<double>& Ui, const std::vector<double>& ui) override; private: int m_a, m_b; vec3d m_Lm, m_Lp; vector<int> m_LM; DECLARE_FECORE_CLASS(); };
Unknown
3D
febiosoftware/FEBio
FEBioMech/FEDonnanEquilibrium.cpp
.cpp
7,468
234
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #include "stdafx.h" #include "FEDonnanEquilibrium.h" #include <FECore/FEModel.h> #include <FECore/log.h> FEMaterialPointData* FEDonnanEquilibriumMaterialPoint::Copy() { FEDonnanEquilibriumMaterialPoint* pt = new FEDonnanEquilibriumMaterialPoint(*this); if (m_pNext) pt->m_pNext = m_pNext->Copy(); return pt; } void FEDonnanEquilibriumMaterialPoint::Init() { FEMaterialPointData::Init(); // intialize data to zero m_cF = 0; m_osm = 0; m_p = 0; m_bpi = 0; } void FEDonnanEquilibriumMaterialPoint::Serialize(DumpStream& ar) { FEMaterialPointData::Serialize(ar); ar & m_cFr & m_cF & m_osm & m_p & m_bpi; } //----------------------------------------------------------------------------- // define the material parameters BEGIN_FECORE_CLASS(FEDonnanEquilibrium, FEElasticMaterial) ADD_PARAMETER(m_phiwr, FE_RANGE_LEFT_OPEN(0.0, 1.0), "phiw0"); ADD_PARAMETER(m_phisr, "phis0"); ADD_PARAMETER(m_cFr , "cF0")->setUnits(UNIT_CONCENTRATION); ADD_PARAMETER(m_bosm , FE_RANGE_GREATER_OR_EQUAL(0.0), "bosm")->setUnits(UNIT_CONCENTRATION); ADD_PARAMETER(m_Phi , FE_RANGE_GREATER_OR_EQUAL(0.0), "Phi"); END_FECORE_CLASS(); //----------------------------------------------------------------------------- FEDonnanEquilibrium::FEDonnanEquilibrium(FEModel* pfem) : FEElasticMaterial(pfem) { m_Rgas = 0; m_Tabs = 0; m_cFr = 0; m_phiwr = -1; m_phisr = -1; m_bnew = false; m_binit = false; m_Phi = 1; } //----------------------------------------------------------------------------- // FEDonnanEquilibrium bool FEDonnanEquilibrium::Init() { if (!m_binit) { if (m_phisr >= 0) { m_bnew = true; m_phiwr = 1 - m_phisr; // use value at t=0 to initialize } m_binit = true; } m_Rgas = GetFEModel()->GetGlobalConstant("R"); m_Tabs = GetFEModel()->GetGlobalConstant("T"); if (m_Rgas <= 0) { feLogError("A positive universal gas constant R must be defined in Globals section"); return false; } if (m_Tabs <= 0) { feLogError("A positive absolute temperature T must be defined in Globals section"); return false; } return FEElasticMaterial::Init(); } void FEDonnanEquilibrium::Serialize(DumpStream& ar) { FEElasticMaterial::Serialize(ar); ar & m_Rgas & m_Tabs & m_binit & m_bnew & m_phiwr; } //----------------------------------------------------------------------------- mat3ds FEDonnanEquilibrium::Stress(FEMaterialPoint& mp) { FEElasticMaterialPoint& pt = *mp.ExtractData<FEElasticMaterialPoint>(); // jacobian double J = pt.m_J; // calculate fixed charge density in current configuration double cF; if (m_bnew) cF = m_phiwr*m_cFr(mp)/(J-m_phisr); else cF = m_phiwr*m_cFr(mp)/(J-1+m_phiwr); // calculate osmotic pressure double p = m_Rgas*m_Tabs*m_Phi*(sqrt(cF*cF+m_bosm*m_bosm) - m_bosm); // calculate T = -p*I mat3dd I(1.0); // identity tensor mat3ds s = -p*I; return s; } //----------------------------------------------------------------------------- tens4ds FEDonnanEquilibrium::Tangent(FEMaterialPoint& mp) { FEElasticMaterialPoint& pt = *mp.ExtractData<FEElasticMaterialPoint>(); // jacobian double J = pt.m_J; // calculate fixed charge density in current configuration double cF; if (m_bnew) cF = m_phiwr*m_cFr(mp)/(J-m_phisr); else cF = m_phiwr*m_cFr(mp)/(J-1+m_phiwr); // calculate osmotic pressure double tosm = sqrt(cF*cF+m_bosm*m_bosm); // tissue osmolarity double p = m_Rgas*m_Tabs*m_Phi*(tosm - m_bosm); // osmotic pressure // calculate derivative of osmotic pressure w.r.t. J double bpi; if (m_bnew) bpi = m_Rgas*m_Tabs*m_Phi*J*cF*cF/(J-m_phisr)/tosm; else bpi = m_Rgas*m_Tabs*m_Phi*J*cF*cF/(J-1+m_phiwr)/tosm; mat3dd I(1.0); // Identity tens4ds IxI = dyad1s(I); tens4ds I4 = dyad4s(I); // calculate tangent osmotic modulus tens4ds c = bpi*IxI + p*(2.0*I4 - IxI); return c; } //----------------------------------------------------------------------------- double FEDonnanEquilibrium::FixedChargeDensity(FEMaterialPoint& mp) { FEElasticMaterialPoint& pt = *mp.ExtractData<FEElasticMaterialPoint>(); // jacobian double J = pt.m_J; // calculate fixed charge density in current configuration double cF; if (m_bnew) cF = m_phiwr*m_cFr(mp)/(J-m_phisr); else cF = m_phiwr*m_cFr(mp)/(J-1+m_phiwr); return cF; } //----------------------------------------------------------------------------- double FEDonnanEquilibrium::OsmoticPressure(FEMaterialPoint& mp) { double cF = FixedChargeDensity(mp); // calculate osmotic pressure double p = m_Rgas*m_Tabs*m_Phi*(sqrt(cF*cF+m_bosm*m_bosm) - m_bosm); return p; } //----------------------------------------------------------------------------- double FEDonnanEquilibrium::OsmoticPressureTangent(FEMaterialPoint& mp) { FEElasticMaterialPoint& pt = *mp.ExtractData<FEElasticMaterialPoint>(); // jacobian double J = pt.m_J; double cF = FixedChargeDensity(mp); double tosm = Osmolarity(mp); // calculate derivative of osmotic pressure w.r.t. J double bpi; if (m_bnew) bpi = m_Rgas*m_Tabs*m_Phi*J*cF*cF/(J-m_phisr)/tosm; else bpi = m_Rgas*m_Tabs*m_Phi*J*cF*cF/(J-1+m_phiwr)/tosm; return bpi; } //----------------------------------------------------------------------------- double FEDonnanEquilibrium::Osmolarity(FEMaterialPoint& mp) { double cF = FixedChargeDensity(mp); double tosm = sqrt(cF*cF+m_bosm*m_bosm); // tissue osmolarity return tosm; } //----------------------------------------------------------------------------- // update Donnan equilibrium material point at each iteration void FEDonnanEquilibrium::UpdateSpecializedMaterialPoints(FEMaterialPoint& pt, const FETimeInfo& tp) { // get the Donnan equilibrium material point data FEDonnanEquilibriumMaterialPoint& pd = *pt.ExtractData<FEDonnanEquilibriumMaterialPoint>(); pd.m_cFr = m_cFr(pt); pd.m_cF = FixedChargeDensity(pt); pd.m_osm = Osmolarity(pt); pd.m_p = OsmoticPressure(pt); pd.m_bpi = OsmoticPressureTangent(pt); }
C++
3D
febiosoftware/FEBio
FEBioMech/FEConstPrestrain.h
.h
2,025
61
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #pragma once #include "FEPreStrainElastic.h" //----------------------------------------------------------------------------- // A constant, full-tensor pre-strain gradient class FEConstPrestrainGradient : public FEPrestrainGradient { public: class MaterialPointData : public FEMaterialPointData { public: MaterialPointData(); void Init(bool bflag); FEMaterialPointData* Copy(); void Serialize(DumpStream& ar); public: mat3d Fp; }; public: FEConstPrestrainGradient(FEModel* pfem); FEMaterialPointData* CreateMaterialPointData() override; mat3d Prestrain(FEMaterialPoint& mp) override; void Initialize(const mat3d& F, FEMaterialPoint& mp) override; protected: double m_ramp; FEParamMat3d m_Fp; DECLARE_FECORE_CLASS(); };
Unknown
3D
febiosoftware/FEBio
FEBioMech/FEDamageCDF.cpp
.cpp
12,081
389
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #include "stdafx.h" #include "FEDamageCDF.h" #include "FEDamageCriterion.h" #include "FEDamageMaterialPoint.h" #include <FECore/log.h> #include <FECore/gamma.h> #include <math.h> #ifndef M_PI #define M_PI 3.141592653589793238462643 #endif /////////////////////////////////////////////////////////////////////////////// //----------------------------------------------------------------------------- // define the material parameters BEGIN_FECORE_CLASS(FEDamageCDF, FEMaterialProperty) ADD_PARAMETER(m_Dmax , FE_RANGE_CLOSED(0.0, 1.0), "Dmax"); END_FECORE_CLASS(); //----------------------------------------------------------------------------- //! Constructor. double FEDamageCDF::Damage(FEMaterialPoint& mp) { // get the damage material point data FEDamageMaterialPoint& dp = *mp.ExtractData<FEDamageMaterialPoint>(); // get the damage criterion (assuming dp.m_Etrial is up-to-date) double Es = max(dp.m_Etrial, dp.m_Emax); dp.m_D = cdf(mp,Es)*m_Dmax; return dp.m_D; } /////////////////////////////////////////////////////////////////////////////// //----------------------------------------------------------------------------- // define the material parameters BEGIN_FECORE_CLASS(FEDamageCDFSimo, FEDamageCDF) ADD_PARAMETER(m_alpha, FE_RANGE_GREATER(0.0), "a"); ADD_PARAMETER(m_beta , FE_RANGE_CLOSED(0.0, 1.0), "b"); END_FECORE_CLASS(); //----------------------------------------------------------------------------- //! Constructor. FEDamageCDFSimo::FEDamageCDFSimo(FEModel* pfem) : FEDamageCDF(pfem) { } //----------------------------------------------------------------------------- // Simo damage cumulative distribution function // Simo, CMAME 60 (1987), 153-173 // Simo damage cumulative distribution function double FEDamageCDFSimo::cdf(FEMaterialPoint& mp, const double X) { double alpha = m_alpha(mp); double beta = m_beta(mp); if (alpha == 0) { return 0; } double cdf = 0; // this CDF only admits positive values if (X >= 0) { if (X > 1e-12) cdf = 1 - beta - (1.0 - beta)*(1.0 - exp(-X/alpha))*alpha/X; else cdf = 0.5*(1.0 - beta)/alpha*X; } return cdf; } // Simo damage probability density function double FEDamageCDFSimo::pdf(FEMaterialPoint& mp, const double X) { double alpha = m_alpha(mp); double beta = m_beta(mp); if (alpha == 0) { return 0; } double pdf = 0; // this CDF only admits positive values if (X >= 0) { if (X > 1e-12) pdf = (1.0 - beta)*(alpha - (alpha + X)*exp(-X/alpha))/(X*X); else pdf = (1.0 - beta)/alpha*(0.5 - X/3/alpha); } return pdf; } /////////////////////////////////////////////////////////////////////////////// //----------------------------------------------------------------------------- // define the material parameters BEGIN_FECORE_CLASS(FEDamageCDFLogNormal, FEDamageCDF) ADD_PARAMETER(m_mu , FE_RANGE_GREATER(0.0), "mu"); ADD_PARAMETER(m_sigma, FE_RANGE_GREATER(0.0), "sigma"); END_FECORE_CLASS(); //----------------------------------------------------------------------------- //! Constructor. FEDamageCDFLogNormal::FEDamageCDFLogNormal(FEModel* pfem) : FEDamageCDF(pfem) { m_mu = 1; m_sigma = 1; m_Dmax = 1; } //----------------------------------------------------------------------------- // Lognormal damage cumulative distribution function double FEDamageCDFLogNormal::cdf(FEMaterialPoint& mp, const double X) { double cdf = 0; double mu = m_mu(mp); double sigma = m_sigma(mp); // this CDF only admits positive values if (X >= 0) cdf = 0.5*erfc(-log(X/mu)/sigma/sqrt(2.)); return cdf; } // Lognormal damage probability density function double FEDamageCDFLogNormal::pdf(FEMaterialPoint& mp, const double X) { double pdf = 0; double mu = m_mu(mp); double sigma = m_sigma(mp); // this CDF only admits positive values if (X > 1e-12) pdf = exp(-pow(log(X/mu)/sigma,2)/2)/(sqrt(2*M_PI)*X*sigma); return pdf; } /////////////////////////////////////////////////////////////////////////////// //----------------------------------------------------------------------------- // define the material parameters BEGIN_FECORE_CLASS(FEDamageCDFWeibull, FEDamageCDF) ADD_PARAMETER(m_alpha, FE_RANGE_GREATER_OR_EQUAL(0.0), "alpha"); ADD_PARAMETER(m_mu , FE_RANGE_GREATER_OR_EQUAL(0.0), "mu"); ADD_PARAMETER(m_ploc, "ploc"); END_FECORE_CLASS(); //----------------------------------------------------------------------------- //! Constructor. FEDamageCDFWeibull::FEDamageCDFWeibull(FEModel* pfem) : FEDamageCDF(pfem) { m_alpha = 1; m_mu = 1; m_ploc = 0; } //----------------------------------------------------------------------------- // Weibull damage cumulative distribution function double FEDamageCDFWeibull::cdf(FEMaterialPoint& mp, const double X) { double cdf = 0; double alpha = m_alpha(mp); double mu = m_mu(mp); double ploc = m_ploc(mp); // this CDF only admits positive values if (X > ploc) cdf = 1 - exp(-pow((X-ploc)/mu,alpha)); return cdf; } // Weibull damage probability density function double FEDamageCDFWeibull::pdf(FEMaterialPoint& mp, const double X) { double pdf = 0; double alpha = m_alpha(mp); double mu = m_mu(mp); double ploc = m_ploc(mp); // this CDF only admits positive values if ((alpha > 1) && (X > ploc)) pdf = exp(-pow((X-ploc)/mu,alpha))*alpha*pow(X-ploc, alpha-1)/pow(mu, alpha); else if ((alpha == 1) && (X > ploc)) pdf = exp(-(X-ploc)/mu)/mu; return pdf; } /////////////////////////////////////////////////////////////////////////////// //----------------------------------------------------------------------------- // define the material parameters BEGIN_FECORE_CLASS(FEDamageCDFStep, FEDamageCDF) ADD_PARAMETER(m_mu , FE_RANGE_GREATER_OR_EQUAL(0.0), "mu"); END_FECORE_CLASS(); //----------------------------------------------------------------------------- //! Constructor. FEDamageCDFStep::FEDamageCDFStep(FEModel* pfem) : FEDamageCDF(pfem) { m_mu = 1; } //----------------------------------------------------------------------------- // Step cumulative distribution function (sudden fracture) // Step damage cumulative distribution function double FEDamageCDFStep::cdf(FEMaterialPoint& mp, const double X) { double cdf = 0; double mu = m_mu(mp); // this CDF only admits positive values if (X > mu) cdf = 1.0; return cdf; } // Step damage probability density function double FEDamageCDFStep::pdf(FEMaterialPoint& mp, const double X) { double pdf = 0; double mu = m_mu(mp); // this PDF only admits positive values if (X == mu) pdf = 1.0; return pdf; } /////////////////////////////////////////////////////////////////////////////// //----------------------------------------------------------------------------- // define the material parameters BEGIN_FECORE_CLASS(FEDamageCDFPQP, FEDamageCDF) ADD_PARAMETER(m_mumin, FE_RANGE_GREATER_OR_EQUAL(0.0), "mumin"); ADD_PARAMETER(m_mumax, "mumax"); END_FECORE_CLASS(); //----------------------------------------------------------------------------- //! Constructor. FEDamageCDFPQP::FEDamageCDFPQP(FEModel* pfem) : FEDamageCDF(pfem) { m_mumin = 0; m_mumax = 1; } //----------------------------------------------------------------------------- //! Initialization. bool FEDamageCDFPQP::Validate() { return FEDamageCDF::Validate(); } //----------------------------------------------------------------------------- // Piecewise S-shaped quintic polynomial damage cumulative distribution function double FEDamageCDFPQP::cdf(FEMaterialPoint& mp, const double X) { double cdf = 0; double mumin = m_mumin(mp); double mumax = m_mumax(mp); if (X <= mumin) cdf = 0; else if (X >= mumax) cdf = 1; else { double x = (X - mumin)/(mumax - mumin); cdf = pow(x,3)*(10 - 15*x + 6*x*x); } return cdf; } // Piecewise S-shaped quintic polynomial damage probability density function double FEDamageCDFPQP::pdf(FEMaterialPoint& mp, const double X) { double pdf = 0; double mumin = m_mumin(mp); double mumax = m_mumax(mp); if (X <= mumin) pdf = 0; else if (X >= mumax) pdf = 0; else { double x = (X - mumin)/(mumax - mumin); pdf = pow(x*(x-1),2)*30; } return pdf; } /////////////////////////////////////////////////////////////////////////////// //----------------------------------------------------------------------------- // define the material parameters BEGIN_FECORE_CLASS(FEDamageCDFGamma, FEDamageCDF) ADD_PARAMETER(m_alpha, FE_RANGE_GREATER(0) , "alpha"); ADD_PARAMETER(m_mu , FE_RANGE_GREATER_OR_EQUAL(0.0), "mu" ); END_FECORE_CLASS(); //----------------------------------------------------------------------------- //! Constructor. FEDamageCDFGamma::FEDamageCDFGamma(FEModel* pfem) : FEDamageCDF(pfem) { m_alpha = 2; m_mu = 4; } //----------------------------------------------------------------------------- // Gamma damage cumulative distribution function double FEDamageCDFGamma::cdf(FEMaterialPoint& mp, const double X) { double cdf = 0; double alpha = m_alpha(mp); double mu = m_mu(mp); // this CDF only admits positive values double scale = gamma_inc_Q(alpha,0); if (X > 0) cdf = gamma_inc_P(alpha,X/mu)/scale; return cdf; } // Gamma damage probability density function double FEDamageCDFGamma::pdf(FEMaterialPoint& mp, const double X) { double pdf = 0; double alpha = m_alpha(mp); double mu = m_mu(mp); // this CDF only admits positive values if (X > 0) pdf = pow(X/mu, alpha-1)*exp(-X/mu)/mu*gammainv(alpha); return pdf; } /////////////////////////////////////////////////////////////////////////////// //----------------------------------------------------------------------------- // define the material parameters BEGIN_FECORE_CLASS(FEDamageCDFUser, FEDamageCDF) ADD_PROPERTY(m_cdf, "cdf"); END_FECORE_CLASS(); //----------------------------------------------------------------------------- //! Constructor. FEDamageCDFUser::FEDamageCDFUser(FEModel* pfem) : FEDamageCDF(pfem) { m_cdf = nullptr; } //----------------------------------------------------------------------------- // User-defined loadcurve for damage cumulative distribution function double FEDamageCDFUser::cdf(FEMaterialPoint& mp, const double X) { return m_cdf->value(X); } // Derivative of user-defined loadcurve damage probability density function double FEDamageCDFUser::pdf(FEMaterialPoint& mp, const double X) { return m_cdf->derive(X); }
C++
3D
febiosoftware/FEBio
FEBioMech/FESolidModule.cpp
.cpp
3,311
74
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2020 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #include "FESolidModule.h" #include <FECore/DOFS.h> #include <FECore/FEModel.h> #include "FEBioMech.h" FESolidModule::FESolidModule() {} void FESolidModule::InitModel(FEModel* fem) { // Allocate degrees of freedom DOFS& dofs = fem->GetDOFS(); int varD = dofs.AddVariable(FEBioMech::GetVariableName(FEBioMech::DISPLACEMENT), VAR_VEC3); dofs.SetDOFName(varD, 0, "x"); dofs.SetDOFName(varD, 1, "y"); dofs.SetDOFName(varD, 2, "z"); int varQ = dofs.AddVariable(FEBioMech::GetVariableName(FEBioMech::ROTATION), VAR_VEC3); dofs.SetDOFName(varQ, 0, "u"); dofs.SetDOFName(varQ, 1, "v"); dofs.SetDOFName(varQ, 2, "w"); int varQR = dofs.AddVariable(FEBioMech::GetVariableName(FEBioMech::RIGID_ROTATION), VAR_VEC3); dofs.SetDOFName(varQR, 0, "Ru"); dofs.SetDOFName(varQR, 1, "Rv"); dofs.SetDOFName(varQR, 2, "Rw"); int varV = dofs.AddVariable(FEBioMech::GetVariableName(FEBioMech::VELOCITY), VAR_VEC3); dofs.SetDOFName(varV, 0, "vx"); dofs.SetDOFName(varV, 1, "vy"); dofs.SetDOFName(varV, 2, "vz"); int varSU = dofs.AddVariable(FEBioMech::GetVariableName(FEBioMech::SHELL_DISPLACEMENT), VAR_VEC3); dofs.SetDOFName(varSU, 0, "sx"); dofs.SetDOFName(varSU, 1, "sy"); dofs.SetDOFName(varSU, 2, "sz"); int varSV = dofs.AddVariable(FEBioMech::GetVariableName(FEBioMech::SHELL_VELOCITY), VAR_VEC3); dofs.SetDOFName(varSV, 0, "svx"); dofs.SetDOFName(varSV, 1, "svy"); dofs.SetDOFName(varSV, 2, "svz"); int varSA = dofs.AddVariable(FEBioMech::GetVariableName(FEBioMech::SHELL_ACCELERATION), VAR_VEC3); dofs.SetDOFName(varSA, 0, "sax"); dofs.SetDOFName(varSA, 1, "say"); dofs.SetDOFName(varSA, 2, "saz"); int varBW = dofs.AddVariable(FEBioMech::GetVariableName(FEBioMech::BEAM_ANGULAR_VELOCITY), VAR_VEC3); dofs.SetDOFName(varBW, 0, "bwx"); dofs.SetDOFName(varBW, 1, "bwy"); dofs.SetDOFName(varBW, 2, "bwz"); int varBA = dofs.AddVariable(FEBioMech::GetVariableName(FEBioMech::BEAM_ANGULAR_ACCELERATION), VAR_VEC3); dofs.SetDOFName(varBA, 0, "bax"); dofs.SetDOFName(varBA, 1, "bay"); dofs.SetDOFName(varBA, 2, "baz"); }
C++
3D
febiosoftware/FEBio
FEBioMech/FERigidAngularDamper.cpp
.cpp
7,195
243
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #include "stdafx.h" #include "FERigidAngularDamper.h" #include "FERigidBody.h" #include "FECore/log.h" #include "FECore/FEAnalysis.h" #include "FECore/FEMaterial.h" #include <FECore/FELinearSystem.h> //----------------------------------------------------------------------------- BEGIN_FECORE_CLASS(FERigidAngularDamper, FERigidConnector); ADD_PARAMETER(m_c, "c"); END_FECORE_CLASS(); //----------------------------------------------------------------------------- FERigidAngularDamper::FERigidAngularDamper(FEModel* pfem) : FERigidConnector(pfem) { m_nID = m_ncount++; } //----------------------------------------------------------------------------- //! TODO: This function is called twice: once in the Init and once in the Solve //! phase. Is that necessary? bool FERigidAngularDamper::Init() { // base class first if (FERigidConnector::Init() == false) return false; // reset force m_F = vec3d(0,0,0); return true; } //----------------------------------------------------------------------------- void FERigidAngularDamper::Serialize(DumpStream& ar) { FERigidConnector::Serialize(ar); ar & m_c; } //----------------------------------------------------------------------------- //! \todo Why is this class not using the FESolver for assembly? void FERigidAngularDamper::LoadVector(FEGlobalVector& R, const FETimeInfo& tp) { vector<double> fa(6); vector<double> fb(6); FERigidBody& RBa = *m_rbA; FERigidBody& RBb = *m_rbB; double alpha = tp.alphaf; // body A vec3d wa = RBa.m_wt*alpha + RBa.m_wp*(1-alpha); // body b vec3d wb = RBb.m_wt*alpha + RBb.m_wp*(1-alpha); m_M = (wb - wa)*m_c; fa[0] = 0; fa[1] = 0; fa[2] = 0; fa[3] = m_M.x; fa[4] = m_M.y; fa[5] = m_M.z; fb[0] = 0; fb[1] = 0; fb[2] = 0; fb[3] = -m_M.x; fb[4] = -m_M.y; fb[5] = -m_M.z; for (int i=0; i<6; ++i) if (RBa.m_LM[i] >= 0) R[RBa.m_LM[i]] += fa[i]; for (int i=0; i<6; ++i) if (RBb.m_LM[i] >= 0) R[RBb.m_LM[i]] += fb[i]; RBa.m_Fr -= vec3d(fa[0],fa[1],fa[2]); RBa.m_Mr -= vec3d(fa[3],fa[4],fa[5]); RBb.m_Fr -= vec3d(fb[0],fb[1],fb[2]); RBb.m_Mr -= vec3d(fb[3],fb[4],fb[5]); } //----------------------------------------------------------------------------- //! \todo Why is this class not using the FESolver for assembly? void FERigidAngularDamper::StiffnessMatrix(FELinearSystem& LS, const FETimeInfo& tp) { double alpha = tp.alphaf; double beta = tp.beta; double gamma = tp.gamma; // get time increment double dt = tp.timeIncrement; int j; vector<int> LM(12); FEElementMatrix ke; ke.resize(12, 12); ke.zero(); FERigidBody& RBa = *m_rbA; FERigidBody& RBb = *m_rbB; mat3dd I(1); // body A vec3d wa = RBa.m_wt*alpha + RBa.m_wp*(1-alpha); quatd qai = RBa.GetRotation()*RBa.m_qp.Inverse(); qai.MakeUnit(); vec3d cai = qai.GetVector()*(2*tan(qai.GetAngle()/2)); mat3d Ta = I + skew(cai)/2 + dyad(cai)/4; // body b vec3d wb = RBb.m_wt*alpha + RBb.m_wp*(1-alpha); quatd qbi = RBb.GetRotation()*RBb.m_qp.Inverse(); qbi.MakeUnit(); vec3d cbi = qbi.GetVector()*(2*tan(qbi.GetAngle()/2)); mat3d Tb = I + skew(cbi)/2 + dyad(cbi)/4; m_M = (wb - wa)*m_c; mat3d Ba = Ta.transpose()*(gamma/beta/dt); mat3d Bb = Tb.transpose()*(gamma/beta/dt); mat3d K; K.zero(); // (2,2) K = Ba*(alpha*m_c); ke[3][3] = K[0][0]; ke[3][4] = K[0][1]; ke[3][5] = K[0][2]; ke[4][3] = K[1][0]; ke[4][4] = K[1][1]; ke[4][5] = K[1][2]; ke[5][3] = K[2][0]; ke[5][4] = K[2][1]; ke[5][5] = K[2][2]; // (2,4) K = Bb*(-alpha*m_c); ke[3][9] = K[0][0]; ke[3][10] = K[0][1]; ke[3][11] = K[0][2]; ke[4][9] = K[1][0]; ke[4][10] = K[1][1]; ke[4][11] = K[1][2]; ke[5][9] = K[2][0]; ke[5][10] = K[2][1]; ke[5][11] = K[2][2]; // (4,2) K = Ba*(-alpha*m_c); ke[9 ][3] = K[0][0]; ke[ 9][4] = K[0][1]; ke[ 9][5] = K[0][2]; ke[10][3] = K[1][0]; ke[10][4] = K[1][1]; ke[10][5] = K[1][2]; ke[11][3] = K[2][0]; ke[11][4] = K[2][1]; ke[11][5] = K[2][2]; // (4,4) K = Bb*(alpha*m_c); ke[9 ][9] = K[0][0]; ke[ 9][10] = K[0][1]; ke[ 9][11] = K[0][2]; ke[10][9] = K[1][0]; ke[10][10] = K[1][1]; ke[10][11] = K[1][2]; ke[11][9] = K[2][0]; ke[11][10] = K[2][1]; ke[11][11] = K[2][2]; for (j=0; j<6; ++j) { LM[j ] = RBa.m_LM[j]; LM[j+6] = RBb.m_LM[j]; } ke.SetIndices(LM); LS.Assemble(ke); } //----------------------------------------------------------------------------- bool FERigidAngularDamper::Augment(int naug, const FETimeInfo& tp) { return true; } //----------------------------------------------------------------------------- void FERigidAngularDamper::Update() { FERigidBody& RBa = *m_rbA; FERigidBody& RBb = *m_rbB; const FETimeInfo& tp = GetTimeInfo(); double alpha = tp.alphaf; // body A vec3d wa = RBa.m_wt*alpha + RBa.m_wp*(1-alpha); // body b vec3d wb = RBb.m_wt*alpha + RBb.m_wp*(1-alpha); m_M = (wb - wa)*m_c; } //----------------------------------------------------------------------------- void FERigidAngularDamper::Reset() { m_F = vec3d(0,0,0); m_M = vec3d(0,0,0); } //----------------------------------------------------------------------------- vec3d FERigidAngularDamper::RelativeTranslation(const bool global) { return vec3d(0,0,0); } //----------------------------------------------------------------------------- vec3d FERigidAngularDamper::RelativeRotation(const bool global) { FERigidBody& RBa = *m_rbA; FERigidBody& RBb = *m_rbB; // get relative rotation quatd Q = RBb.GetRotation()*RBa.GetRotation().Inverse(); Q.MakeUnit(); // relative rotation vector vec3d q = Q.GetRotationVector(); return q; }
C++
3D
febiosoftware/FEBio
FEBioMech/FENewtonianViscousSolid.h
.h
2,090
57
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #pragma once #include "FEElasticMaterial.h" class FENewtonianViscousSolid : public FEElasticMaterial { public: FENewtonianViscousSolid(FEModel* pfem); public: double m_kappa; //!< bulk viscosity double m_mu; //!< shear viscosity bool m_secant_tangent; //!< flag for using secant tangent calculation public: //! calculate stress at material point mat3ds Stress(FEMaterialPoint& pt) override; //! calculate tangent stiffness at material point tens4ds Tangent(FEMaterialPoint& pt) override; //! calculate strain energy density at material point double StrainEnergyDensity(FEMaterialPoint& pt) override; bool UseSecantTangent() override { return m_secant_tangent; } // declare the parameter list DECLARE_FECORE_CLASS(); };
Unknown
3D
febiosoftware/FEBio
FEBioMech/RigidBC.h
.h
5,761
239
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #pragma once #include <FECore/FEBoundaryCondition.h> #include <FECore/FEInitialCondition.h> #include "febiomech_api.h" class FERigidBody; //----------------------------------------------------------------------------- class FEBIOMECH_API FERigidBC : public FEBoundaryCondition { FECORE_BASE_CLASS(FERigidBC) public: FERigidBC(FEModel* fem); bool Init() override; virtual void InitTimeStep(); void Serialize(DumpStream& ar) override; FERigidBody& GetRigidBody(); void CopyFrom(FEBoundaryCondition* pbc) override; void SetRigidMaterial(int rigidMat); private: int m_rb; // rigid body ID protected: int m_rigidMat; // rigid material ID bool m_binit; }; //----------------------------------------------------------------------------- class FEBIOMECH_API FERigidIC : public FEInitialCondition { FECORE_BASE_CLASS(FERigidIC) public: FERigidIC(FEModel* fem); bool Init() override; void Activate() override; void Serialize(DumpStream& ar) override; FERigidBody& GetRigidBody(); private: int m_rigidMat; // rigid material ID int m_rb; // rigid body ID DECLARE_FECORE_CLASS(); }; //----------------------------------------------------------------------------- //! fixed rigid body constraint class FEBIOMECH_API FERigidFixedBC : public FERigidBC { public: FERigidFixedBC(FEModel* pfem); }; //----------------------------------------------------------------------------- //! fixed rigid body constraint class FEBIOMECH_API FERigidFixedBCNew : public FERigidFixedBC { public: FERigidFixedBCNew(FEModel* pfem); void Activate() override; void Deactivate() override; public: bool m_dof[6]; //!< constrained dof list private: DECLARE_FECORE_CLASS(); }; //----------------------------------------------------------------------------- //! fixed rigid body constraint class FEBIOMECH_API FERigidFixedBCOld : public FERigidFixedBC { public: FERigidFixedBCOld(FEModel* pfem); bool Init() override; void Activate() override; void Deactivate() override; public: vector<int> m_dofs; //!< constrained dof list DECLARE_FECORE_CLASS(); }; //----------------------------------------------------------------------------- //! rigid body displacement class FEBIOMECH_API FERigidPrescribedBC : public FERigidBC { public: FERigidPrescribedBC(FEModel* pfem); bool Init() override; double Value(); void InitTimeStep() override; void Serialize(DumpStream& ar) override; void Activate() override; void Deactivate() override; void SetBC(int bc) { m_dof = bc; } int GetBC() const { return m_dof; } void SetRelativeFlag(bool b) { m_brel = b; } bool GetRelativeFlag() const { return m_brel; } void SetValue(double v) { m_val = v; } protected: int m_dof; //!< displacement direction double m_val; //!< displacement value double m_ref; //!< reference value for relative displacement bool m_brel; //!< relative displacement flag bool m_binit; //!init flag }; //----------------------------------------------------------------------------- //! prescribed rigid body rotation class FEBIOMECH_API FERigidDisplacement : public FERigidPrescribedBC { public: FERigidDisplacement(FEModel* pfem); bool Init() override; private: int m_bc; DECLARE_FECORE_CLASS(); }; //----------------------------------------------------------------------------- //! prescribed rigid body rotation class FEBIOMECH_API FERigidRotation : public FERigidPrescribedBC { public: FERigidRotation(FEModel* pfem); bool Init() override; private: int m_bc; DECLARE_FECORE_CLASS(); }; //----------------------------------------------------------------------------- //! Obsolete rigid prescribed bc class. Used only for backward compatibility. class FEBIOMECH_API FERigidPrescribedOld : public FERigidPrescribedBC { public: FERigidPrescribedOld(FEModel* pfem); DECLARE_FECORE_CLASS(); }; //----------------------------------------------------------------------------- //! rigid body initial velocity class FEBIOMECH_API FERigidBodyVelocity : public FERigidIC { public: FERigidBodyVelocity(FEModel* pfem); void Activate() override; public: vec3d m_vel; //!< initial velocity DECLARE_FECORE_CLASS(); }; //----------------------------------------------------------------------------- //! rigid body initial angular velocity class FEBIOMECH_API FERigidBodyAngularVelocity : public FERigidIC { public: FERigidBodyAngularVelocity(FEModel* pfem); void Activate() override; public: vec3d m_w; //!< value DECLARE_FECORE_CLASS(); };
Unknown
3D
febiosoftware/FEBio
FEBioMech/FEPointBodyForce.h
.h
2,232
61
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #pragma once #include "FEBodyForce.h" #include <FECore/FESolidElement.h> //----------------------------------------------------------------------------- class FEBIOMECH_API FEPointBodyForce : public FEBodyForce { public: FEPointBodyForce(FEModel* pfem); vec3d force(FEMaterialPoint& mp) override; double divforce(FEMaterialPoint& mp) override; mat3d stiffness(FEMaterialPoint& mp) override; void Serialize(DumpStream& ar) override; bool Init() override; void Update() override; public: double m_a, m_b; //!< coefficients of exponential decay of body force vec3d m_rc; //!< center point of body force int m_inode; //!< node number of center of body force, or -1 if not a node bool m_brigid; //!< flag if center point is located within a rigid body FESolidElement* m_pel; //!< element in which point m_r0 lies double m_rs[3]; //!< isoparametric coordinates DECLARE_FECORE_CLASS(); };
Unknown
3D
febiosoftware/FEBio
FEBioMech/FERelativeVolumeCriterion.cpp
.cpp
1,841
49
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #include "stdafx.h" #include "FERelativeVolumeCriterion.h" #include "FEElasticMaterial.h" BEGIN_FECORE_CLASS(FERelativeVolumeCriterion, FEMeshAdaptorCriterion) END_FECORE_CLASS(); FERelativeVolumeCriterion::FERelativeVolumeCriterion(FEModel* fem) : FEMeshAdaptorCriterion(fem) { } bool FERelativeVolumeCriterion::GetMaterialPointValue(FEMaterialPoint& mp, double& value) { FEElasticMaterialPoint* ep = mp.ExtractData<FEElasticMaterialPoint>(); if (ep == nullptr) return false; // evaluate the relative volume at this point value = ep->m_J; return true; }
C++
3D
febiosoftware/FEBio
FEBioMech/FETorsionalSpring.cpp
.cpp
2,502
92
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #include "stdafx.h" #include "FETorsionalSpring.h" BEGIN_FECORE_CLASS(FETorsionalSpring, FEDiscreteElasticMaterial) ADD_PARAMETER(m_r, "r"); END_FECORE_CLASS(); FETorsionalSpring::FETorsionalSpring(FEModel* fem) : FEDiscreteElasticMaterial(fem) { m_r = 0.0; } // evaluate the force at a discrete element vec3d FETorsionalSpring::Force(FEDiscreteMaterialPoint& mp) { vec3d e0 = mp.m_dr0; e0.unit(); vec3d et = mp.m_drt; double l = et.unit(); double w = e0 * et; mat3ds exe = dyad(et); mat3dd I(1.0); mat3ds P = (I - exe) / l; vec3d t = P * e0; double F = -m_r*w; return t*F; } // evaluate the stiffness at a discrete element (= dF / dr) mat3d FETorsionalSpring::Stiffness(FEDiscreteMaterialPoint& mp) { vec3d e0 = mp.m_dr0; e0.unit(); vec3d et = mp.m_drt; double l = et.unit(); double w = e0 * et; mat3ds exe = dyad(et); mat3dd I(1.0); mat3ds P = (I - exe) / l; vec3d t = P * e0; mat3ds Q = dyads(e0, et) + I*w - exe*(3.0*w); mat3ds T = dyad(t); return T*(m_r) + Q*(m_r*w); } double FETorsionalSpring::StrainEnergy(FEDiscreteMaterialPoint& mp) { vec3d e0 = mp.m_dr0; e0.unit(); vec3d et = mp.m_drt; double l = et.unit(); double w = e0 * et; double E = m_r*(1-w*w)/2; return E; }
C++
3D
febiosoftware/FEBio
FEBioMech/FECellGrowth.cpp
.cpp
3,631
110
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #include "stdafx.h" #include "FECellGrowth.h" #include <FECore/log.h> //----------------------------------------------------------------------------- // define the material parameters BEGIN_FECORE_CLASS(FECellGrowth, FEElasticMaterial) ADD_PARAMETER(m_phir, FE_RANGE_GREATER(0.0), "phir"); ADD_PARAMETER(m_cr , FE_RANGE_GREATER(0.0), "cr")->setUnits(UNIT_CONCENTRATION); ADD_PARAMETER(m_ce , FE_RANGE_GREATER(0.0), "ce")->setUnits(UNIT_CONCENTRATION); END_FECORE_CLASS(); //----------------------------------------------------------------------------- FECellGrowth::FECellGrowth(FEModel* pfem) : FEElasticMaterial(pfem) { m_Rgas = 0; m_Tabs = 0; m_phir = 0; m_cr = 0; m_ce = 0; } //----------------------------------------------------------------------------- bool FECellGrowth::Init() { if (FEElasticMaterial::Init() == false) return false; m_Rgas = GetGlobalConstant("R"); m_Tabs = GetGlobalConstant("T"); if (m_Rgas <= 0) { feLogError("A positive universal gas constant R must be defined in Globals section"); return false; } if (m_Tabs <= 0) { feLogError("A positive absolute temperature T must be defined in Globals section"); return false; } return true; } //----------------------------------------------------------------------------- mat3ds FECellGrowth::Stress(FEMaterialPoint& mp) { FEElasticMaterialPoint& pt = *mp.ExtractData<FEElasticMaterialPoint>(); // jacobian double J = pt.m_J; // calculate intracellular osmolarity relative to mixture volume in reference configuration double c = m_cr/(J-m_phir); // calculate osmotic pressure double p = m_Rgas*m_Tabs*(c - m_ce); // calculate T = -p*I mat3dd I(1.0); // identity tensor mat3ds s = -p*I; return s; } //----------------------------------------------------------------------------- tens4ds FECellGrowth::Tangent(FEMaterialPoint& mp) { FEElasticMaterialPoint& pt = *mp.ExtractData<FEElasticMaterialPoint>(); // jacobian double J = pt.m_J; // calculate intracellular osmolarity relative to mixture volume in reference configuration double c = m_cr/(J-m_phir); // calculate osmotic pressure double p = m_Rgas*m_Tabs*(c - m_ce); mat3dd I(1.0); // Identity tens4ds I1 = dyad1s(I); tens4ds I4 = dyad4s(I); // calculate tangent osmotic modulus tens4ds C = I4*(2*p) - I1*(p-m_Rgas*m_Tabs*c*J/(J-m_phir)); return C; }
C++
3D
febiosoftware/FEBio
FEBioMech/FEFacet2FacetSliding.h
.h
5,358
173
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #pragma once #include "FEContactInterface.h" #include "FEContactSurface.h" //----------------------------------------------------------------------------- //! Contact surface for facet-to-facet sliding interfaces class FEFacetSlidingSurface : public FEContactSurface { public: //! Integration point data class Data : public FEContactMaterialPoint { public: Data(); void Serialize(DumpStream& ar); void Init() override; public: double m_Lm; //!< Lagrange multipliers double m_eps; //!< penalty value at integration point vec3d m_nu; //!< secondary surface normal at integration points vec2d m_rs; //!< natural coordinates of projection of integration point }; public: //! constructor FEFacetSlidingSurface(FEModel* pfem); //! initialization bool Init() override; //! evaluate net contact force vec3d GetContactForce() override; //! evaluate net contact area double GetContactArea() override; //! create material point data FEMaterialPoint* CreateMaterialPoint() override; //! serialization void Serialize(DumpStream& ar) override; public: void GetContactTraction(int nface, vec3d& pt) override; void GetNodalContactPressure(int nface, double* pn) override; void GetNodalContactTraction(int nface, vec3d* tn) override; public: vector<vec3d> m_Fn; //!< equivalent nodal forces }; //----------------------------------------------------------------------------- //! Sliding interface with facet to facet integration //! This class is similar to the sliding interface except that it uses //! a Gaussian quadrature rule in stead of a nodal integration rule //! as its base class does. // class FEFacet2FacetSliding : public FEContactInterface { public: //! constructor FEFacet2FacetSliding(FEModel* pfem); //! initialization routine bool Init() override; //! interface activation void Activate() override; //! calculate contact pressures for file output void UpdateContactPressures(); //! serialize data to archive void Serialize(DumpStream& ar) override; //! get primary and secondary surfaces FESurface* GetPrimarySurface() override { return &m_ss; } FESurface* GetSecondarySurface() override { return &m_ms; } //! return integration rule class bool UseNodalIntegration() override { return false; } //! build the matrix profile for use in the stiffness matrix void BuildMatrixProfile(FEGlobalMatrix& K) override; public: //! calculate contact forces void LoadVector(FEGlobalVector& R, const FETimeInfo& tp) override; //! calculate contact stiffness void StiffnessMatrix(FELinearSystem& LS, const FETimeInfo& tp) override; //! calculate Lagrangian augmentations bool Augment(int naug, const FETimeInfo& tp) override; //! update void Update() override; protected: //! project primary surface onto secondary void ProjectSurface(FEFacetSlidingSurface& ss, FEFacetSlidingSurface& ms, bool bsegup, bool bmove = false); //! calculate auto-penalty void UpdateAutoPenalty(); void CalcAutoPenalty(FEFacetSlidingSurface& s); public: double m_epsn; //!< normal penalty factor double m_knmult; //!< normal stiffness multiplier double m_stol; //!< search tolerance bool m_btwo_pass; //!< two-pass flag bool m_bautopen; //!< auto-penalty flag bool m_bupdtpen; //!< update penalty at each time step double m_srad; //!< search radius (% of model size) int m_nsegup; //!< segment update parameter bool m_breloc; //!< node relocation on initialization bool m_bsmaug; //!< smooth augmentation double m_atol; //!< aug lag tolerance double m_gtol; //!< gap tolerance int m_naugmin; //!< min nr of augmentations int m_naugmax; //!< max nr of augmentations double m_mu; //!< friction coefficient (not implemented yet) double m_epsf; //!< penalty scale factor for friction (not implementer yet) double m_dxtol; //!< penalty insertion distance FEFacetSlidingSurface m_ss; //!< primary surface FEFacetSlidingSurface m_ms; //!< secondary surface private: bool m_bfirst; double m_normg0; public: DECLARE_FECORE_CLASS(); };
Unknown
3D
febiosoftware/FEBio
FEBioMech/FERigidFollowerMoment.cpp
.cpp
4,513
129
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #include "stdafx.h" #include "FERigidFollowerMoment.h" #include "FERigidBody.h" #include "FECore/FEAnalysis.h" #include "FECore/FEMaterial.h" #include "FECore/FELoadCurve.h" #include "FEMechModel.h" #include "FERigidMaterial.h" #include <FECore/FELinearSystem.h> //============================================================================= BEGIN_FECORE_CLASS(FERigidFollowerMoment, FERigidLoad); ADD_PARAMETER(m_rid , "rb" )->setEnums("$(rigid_materials)"); ADD_PARAMETER(m_m , "moment" ); END_FECORE_CLASS(); //----------------------------------------------------------------------------- FERigidFollowerMoment::FERigidFollowerMoment(FEModel* pfem) : FERigidLoad(pfem) { m_rid = -1; m_m = vec3d(0,0,0); } //----------------------------------------------------------------------------- //! do some sanity checks bool FERigidFollowerMoment::Init() { // At this point the rigid ID's are still associated with the materials. // We want to associate them with the rigid objects instead. FEMechModel& fem = static_cast<FEMechModel&>(*GetFEModel()); FERigidMaterial* pm = dynamic_cast<FERigidMaterial*>(fem.GetMaterial(m_rid-1)); if (pm == 0) return false; m_rid = pm->GetRigidBodyID(); if (m_rid < 0) return false; // all is well in the world return true; } //----------------------------------------------------------------------------- void FERigidFollowerMoment::Serialize(DumpStream& ar) { FEModelLoad::Serialize(ar); ar & m_rid; ar & m_m; } //----------------------------------------------------------------------------- //! Residual void FERigidFollowerMoment::LoadVector(FEGlobalVector& R) { FEMechModel& fem = static_cast<FEMechModel&>(*GetFEModel()); FERigidBody& body = *fem.GetRigidBody(m_rid); const FETimeInfo& tp = fem.GetTime(); double alpha = tp.alphaf; // calculate the moment value vec3d mt = body.GetRotation()*m_m; vec3d mp = body.GetPreviousRotation()*m_m; vec3d m = mt*alpha + mp*(1-alpha); // apply force and moment to body int n; n = body.m_LM[3]; if (n >= 0) R[n] += m.x; n = body.m_LM[4]; if (n >= 0) R[n] += m.y; n = body.m_LM[5]; if (n >= 0) R[n] += m.z; body.m_Mr += m; } //----------------------------------------------------------------------------- //! Stiffness matrix //! TODO: Only the stiffness contribution in the were the axial forces are applied //! to the center of mass has been implemented. void FERigidFollowerMoment::StiffnessMatrix(FELinearSystem& LS) { FEMechModel& fem = static_cast<FEMechModel&>(*GetFEModel()); FERigidBody& body = *fem.GetRigidBody(m_rid); const FETimeInfo& tp = fem.GetTime(); double alpha = tp.alphaf; // calculate the moment value vec3d mt = body.GetRotation()*m_m; // build the stiffness matrix components mat3da mthat(mt); mat3d Kqq = mthat*(-alpha); // put it all together FEElementMatrix K; K.resize(3, 3); K.zero(); K.sub(0,0, Kqq); // get the equation numbers vector<int> lm(3); lm[ 0] = body.m_LM[3]; lm[ 1] = body.m_LM[4]; lm[ 2] = body.m_LM[5]; // assemble into global matrix K.SetIndices(lm); LS.Assemble(K); }
C++
3D
febiosoftware/FEBio
FEBioMech/FEFiberExpPowUncoupled.cpp
.cpp
6,194
204
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #include "stdafx.h" #include "FEFiberExpPowUncoupled.h" #include <FECore/log.h> // define the material parameters BEGIN_FECORE_CLASS(FEFiberExpPowUC, FEFiberMaterialUncoupled) ADD_PARAMETER(m_alpha, FE_RANGE_GREATER_OR_EQUAL(0.0), "alpha"); ADD_PARAMETER(m_beta , FE_RANGE_GREATER_OR_EQUAL(2.0), "beta"); ADD_PARAMETER(m_ksi , FE_RANGE_GREATER_OR_EQUAL(0.0), "ksi" )->setUnits(UNIT_PRESSURE); ADD_PARAMETER(m_mu, FE_RANGE_GREATER_OR_EQUAL(0.0), "mu")->setUnits(UNIT_PRESSURE); END_FECORE_CLASS(); //----------------------------------------------------------------------------- // FEFiberExpPowUC //----------------------------------------------------------------------------- FEFiberExpPowUC::FEFiberExpPowUC(FEModel* pfem) : FEFiberMaterialUncoupled(pfem) { m_ksi = 0.0; m_alpha = 0.0; m_beta = 2.0; m_mu = 0; } //----------------------------------------------------------------------------- mat3ds FEFiberExpPowUC::DevFiberStress(FEMaterialPoint& mp, const vec3d& n0) { FEElasticMaterialPoint& pt = *mp.ExtractData<FEElasticMaterialPoint>(); // deformation gradient double J = pt.m_J; mat3d F = pt.m_F*pow(J,-1.0/3.0); // loop over all integration points const double eps = 0; mat3ds C = pt.DevRightCauchyGreen(); mat3ds s; // Calculate In = n0*C*n0 double In_1 = n0*(C*n0) - 1.0; double ksi = m_ksi(mp); // only take fibers in tension into consideration if (In_1 >= eps) { // get the global spatial fiber direction in current configuration vec3d nt = F*n0; // calculate the outer product of nt mat3ds N = dyad(nt); // calculate strain energy derivative double Wl = ksi*pow(In_1, m_beta-1.0)*exp(m_alpha*pow(In_1, m_beta)); // calculate the fiber stress s = N*(2.0*Wl/J); // add the contribution from shear mat3ds BmI = pt.DevLeftCauchyGreen() - mat3dd(1); s += (N*BmI).sym()*(m_mu / J); } else { s.zero(); } return s.dev(); } //----------------------------------------------------------------------------- tens4ds FEFiberExpPowUC::DevFiberTangent(FEMaterialPoint& mp, const vec3d& n0) { FEElasticMaterialPoint& pt = *mp.ExtractData<FEElasticMaterialPoint>(); // deformation gradient double J = pt.m_J; mat3d F = pt.m_F*pow(J,-1.0/3.0); // loop over all integration points const double eps = 0; mat3ds C = pt.DevRightCauchyGreen(); mat3ds s; tens4ds c; // Calculate In = n0*C*n0 double In_1 = n0*(C*n0) - 1.0; double ksi = m_ksi(mp); // only take fibers in tension into consideration if (In_1 >= eps) { // get the global spatial fiber direction in current configuration vec3d nt = F*n0; // calculate the outer product of nt mat3ds N = dyad(nt); tens4ds NxN = dyad1s(N); mat3dd I(1); tens4ds IxI = dyad1s(I); tens4ds I4 = dyad4s(I); // calculate strain energy derivatives double tmp = m_alpha*pow(In_1, m_beta); double Wl = ksi*pow(In_1, m_beta-1.0)*exp(m_alpha*pow(In_1, m_beta)); double Wll = ksi*pow(In_1, m_beta-2.0)*((tmp+1)*m_beta-1.0)*exp(tmp); // calculate the fiber stress s = N*(2.0*Wl/J); // add the contribution from shear mat3ds B = pt.DevLeftCauchyGreen(); mat3ds BmI = B - I; s += (N*BmI).sym()*(m_mu / J); // calculate the fiber tangent c = NxN*(4.0*Wll/J); // add the contribution from shear c += dyad4s(N, B)*(m_mu / J); // This is the final value of the elasticity tensor c += ((I4+IxI/3.0)*s.tr() - dyad1s(I,s))*(2./3.) - (ddots(IxI, c)-IxI*(c.tr()/3.))/3.; } else { c.zero(); } return c; } //----------------------------------------------------------------------------- double FEFiberExpPowUC::DevFiberStrainEnergyDensity(FEMaterialPoint& mp, const vec3d& n0) { double sed = 0.0; FEElasticMaterialPoint& pt = *mp.ExtractData<FEElasticMaterialPoint>(); // loop over all integration points mat3ds C = pt.DevRightCauchyGreen(); mat3ds C2 = C.sqr(); // Calculate In = n0*C*n0 double In_1 = n0*(C*n0) - 1.0; double ksi = m_ksi(mp); // only take fibers in tension into consideration const double eps = 0; if (In_1 >= eps) { // calculate strain energy derivative if (m_alpha > 0) { sed = ksi/(m_alpha*m_beta)*(exp(m_alpha*pow(In_1, m_beta))-1); } else sed = ksi/m_beta*pow(In_1, m_beta); // add the contribution from shear sed += m_mu*(n0*(C2*n0) - 2 * In_1 - 1) / 4.0; } return sed; } // define the material parameters BEGIN_FECORE_CLASS(FEUncoupledFiberExpPow, FEElasticFiberMaterialUC) ADD_PARAMETER(m_fib.m_alpha, FE_RANGE_GREATER_OR_EQUAL(0.0), "alpha"); ADD_PARAMETER(m_fib.m_beta , FE_RANGE_GREATER_OR_EQUAL(2.0), "beta"); ADD_PARAMETER(m_fib.m_ksi , FE_RANGE_GREATER_OR_EQUAL(0.0), "ksi" )->setUnits(UNIT_PRESSURE); ADD_PARAMETER(m_fib.m_mu, FE_RANGE_GREATER_OR_EQUAL(0.0), "mu")->setUnits(UNIT_PRESSURE); END_FECORE_CLASS();
C++
3D
febiosoftware/FEBio
FEBioMech/FERigidForce.cpp
.cpp
14,943
510
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #include "stdafx.h" #include "FERigidForce.h" #include "FERigidBody.h" #include "FECore/FEAnalysis.h" #include "FECore/FEMaterial.h" #include "FECore/FELoadCurve.h" #include "FEMechModel.h" #include "FERigidMaterial.h" #include <FECore/FELinearSystem.h> #include <FECore/log.h> //============================================================================= BEGIN_FECORE_CLASS(FERigidAxialForce, FERigidLoad); ADD_PARAMETER(m_ida , "rbA" )->setEnums("$(rigid_materials)"); ADD_PARAMETER(m_idb , "rbB" )->setEnums("$(rigid_materials)"); ADD_PARAMETER(m_ra0 , "ra" ); ADD_PARAMETER(m_rb0 , "rb" ); ADD_PARAMETER(m_s , "force" )->setUnits(UNIT_FORCE); ADD_PARAMETER(m_brelative, "relative"); END_FECORE_CLASS(); //----------------------------------------------------------------------------- FERigidAxialForce::FERigidAxialForce(FEModel* pfem) : FERigidLoad(pfem) { m_ida = m_idb = -1; m_ra0 = m_rb0 = vec3d(0,0,0); m_s = 0.0; m_brelative = false; } //----------------------------------------------------------------------------- //! do some sanity checks bool FERigidAxialForce::Init() { // At this point the rigid ID's are still associated with the materials. // We want to associate them with the rigid objects instead. FEMechModel& fem = static_cast<FEMechModel&>(*GetFEModel()); FERigidMaterial* pm = dynamic_cast<FERigidMaterial*>(fem.GetMaterial(m_ida-1)); if (pm == 0) return false; m_ida = pm->GetRigidBodyID(); if (m_ida < 0) return false; pm = dynamic_cast<FERigidMaterial*>(fem.GetMaterial(m_idb-1)); if (pm == 0) return false; m_idb = pm->GetRigidBodyID(); if (m_idb < 0) return false; // get the actual rigid bodies FERigidBody& bodyA = *fem.GetRigidBody(m_ida); FERigidBody& bodyB = *fem.GetRigidBody(m_idb); // get the attachment position in global coordinates for body A vec3d da0 = (m_brelative ? m_ra0 : m_ra0 - bodyA.m_r0); vec3d da = bodyA.GetRotation()*da0; vec3d a = da + bodyA.m_rt; // get the attachment position in global coordinates for body B vec3d db0 = (m_brelative ? m_rb0 : m_rb0 - bodyB.m_r0); vec3d db = bodyB.GetRotation()*db0; vec3d b = db + bodyB.m_rt; // get the unit axial vector // and make sure it is of finite length vec3d N = b - a; double L = N.unit(); if (L < 1e-17) return false; // all is well in the world return true; } //----------------------------------------------------------------------------- void FERigidAxialForce::Serialize(DumpStream& ar) { FEModelLoad::Serialize(ar); ar & m_ida & m_idb; ar & m_ra0 & m_rb0; ar & m_s & m_brelative; } //----------------------------------------------------------------------------- //! Residual void FERigidAxialForce::LoadVector(FEGlobalVector& R) { FEMechModel& fem = static_cast<FEMechModel&>(*GetFEModel()); FERigidBody& bodyA = *fem.GetRigidBody(m_ida); FERigidBody& bodyB = *fem.GetRigidBody(m_idb); // get the attachment position in global coordinates for body A vec3d da0 = (m_brelative ? m_ra0 : m_ra0 - bodyA.m_r0); vec3d da = bodyA.GetRotation()*da0; vec3d a = da + bodyA.m_rt; // get the attachment position in global coordinates for body B vec3d db0 = (m_brelative ? m_rb0 : m_rb0 - bodyB.m_r0); vec3d db = bodyB.GetRotation()*db0; vec3d b = db + bodyB.m_rt; // get the unit axial vector vec3d N = b - a; N.unit(); // calculate the force value double f = m_s; // get the axial force and torques vec3d F = N*f; vec3d Ma = da^F; vec3d Mb = db^F; // apply force and torque to body A int n; n = bodyA.m_LM[0]; if (n >= 0) R[n] += F.x; n = bodyA.m_LM[1]; if (n >= 0) R[n] += F.y; n = bodyA.m_LM[2]; if (n >= 0) R[n] += F.z; n = bodyA.m_LM[3]; if (n >= 0) R[n] += Ma.x; n = bodyA.m_LM[4]; if (n >= 0) R[n] += Ma.y; n = bodyA.m_LM[5]; if (n >= 0) R[n] += Ma.z; // apply force and torque to body B n = bodyB.m_LM[0]; if (n >= 0) R[n] -= F.x; n = bodyB.m_LM[1]; if (n >= 0) R[n] -= F.y; n = bodyB.m_LM[2]; if (n >= 0) R[n] -= F.z; n = bodyB.m_LM[3]; if (n >= 0) R[n] -= Mb.x; n = bodyB.m_LM[4]; if (n >= 0) R[n] -= Mb.y; n = bodyB.m_LM[5]; if (n >= 0) R[n] -= Mb.z; bodyA.m_Fr += F; bodyA.m_Mr += Ma; bodyB.m_Fr -= F; bodyB.m_Mr -= Mb; } //----------------------------------------------------------------------------- //! Stiffness matrix //! TODO: Only the stiffness contribution in the were the axial forces are applied //! to the center of mass has been implemented. void FERigidAxialForce::StiffnessMatrix(FELinearSystem& LS) { // Get the rigid bodies FEMechModel& fem = static_cast<FEMechModel&>(*GetFEModel()); FERigidBody& bodyA = *fem.GetRigidBody(m_ida); FERigidBody& bodyB = *fem.GetRigidBody(m_idb); // get the attachment position in global coordinates for body A vec3d da0 = (m_brelative ? m_ra0 : m_ra0 - bodyA.m_r0); vec3d da = bodyA.GetRotation()*da0; vec3d pa = da + bodyA.m_rt; // get the attachment position in global coordinates for body B vec3d db0 = (m_brelative ? m_rb0 : m_rb0 - bodyB.m_r0); vec3d db = bodyB.GetRotation()*db0; vec3d pb = db + bodyB.m_rt; // setup the axial unit vector vec3d N = pb - pa; double L = N.unit(); // calculate the force value double f = -m_s / L; // build the stiffness matrix components mat3ds M = mat3dd(1.0) - dyad(N); mat3da A(-da); mat3da B(-db); mat3da S(-N); mat3d MA = M*A; mat3d MB = M*B; mat3d AM = A*M; mat3d AMA = A*MA; mat3d BMB = B*MB; mat3d AMB = A*MB; mat3d SA = S*A; mat3d SB = S*B; // put it all together FEElementMatrix K; K.resize(12, 12); K.zero(); K.sub(0,0, M); K.sub(0,3, MA); K.add(0,6, M); K.add(0,9, MB); K.add(3,3, SA*L + AMA); K.add(3,6, AM); K.sub(3,9, AMB); K.sub(6,6,M); K.sub(6,9, MB); K.add(9,9, SB*(-L) + BMB); // since this is a symmetric matrix, fill the bottom triangular part K.copy_ut(); // and multiply by f K *= f; // get the equation numbers vector<int> lm(12); lm[ 0] = bodyA.m_LM[0]; lm[ 1] = bodyA.m_LM[1]; lm[ 2] = bodyA.m_LM[2]; lm[ 3] = bodyA.m_LM[3]; lm[ 4] = bodyA.m_LM[4]; lm[ 5] = bodyA.m_LM[5]; lm[ 6] = bodyB.m_LM[0]; lm[ 7] = bodyB.m_LM[1]; lm[ 8] = bodyB.m_LM[2]; lm[ 9] = bodyB.m_LM[3]; lm[10] = bodyB.m_LM[4]; lm[11] = bodyB.m_LM[5]; // assemble into global matrix K.SetIndices(lm); LS.Assemble(K); } //============================================================================= BEGIN_FECORE_CLASS(FERigidBodyForce, FERigidLoad) ADD_PARAMETER(m_rigidMat, "rb")->setEnums("$(rigid_materials)")->setLongName("Rigid material"); ADD_PARAMETER(m_dof, "dof", 0, "Rx\0Ry\0Rz"); ADD_PARAMETER(m_force, "value")->SetFlags(FE_PARAM_ADDLC | FE_PARAM_VOLATILE)->setUnits(UNIT_FORCE); ADD_PARAMETER(m_ntype, "load_type")->setEnums("LOAD\0FOLLOW\0TARGET"); ADD_PARAMETER(m_brelative, "relative"); END_FECORE_CLASS(); FERigidBodyForce::FERigidBodyForce(FEModel* pfem) : FERigidLoad(pfem) { m_rigidMat = -1; m_ntype = FORCE_LOAD; m_rid = -1; m_brelative = false; m_force0 = 0.0; m_force = 0.0; m_dof = 0; } void FERigidBodyForce::SetRigidMaterialID(int nid) { m_rigidMat = nid; } void FERigidBodyForce::SetDOF(int bc) { m_dof = bc; } void FERigidBodyForce::SetLoadType(int loadType) { m_ntype = loadType; } void FERigidBodyForce::SetForce(double f) { m_force = f; } //----------------------------------------------------------------------------- bool FERigidBodyForce::Init() { // At this point the rigid ID's are still associated with the materials. // We want to associate them with the rigid objects instead. FEModel& fem = *GetFEModel(); FERigidMaterial* pm = dynamic_cast<FERigidMaterial*>(fem.GetMaterial(m_rigidMat - 1)); if (pm == 0) return false; // check the dof value if ((m_dof < 0) || (m_dof >= 3)) return false; return FEModelLoad::Init(); } //----------------------------------------------------------------------------- void FERigidBodyForce::Activate() { FEModelLoad::Activate(); FEMechModel& fem = static_cast<FEMechModel&>(*GetFEModel()); FERigidMaterial* pm = dynamic_cast<FERigidMaterial*>(fem.GetMaterial(m_rigidMat - 1)); m_rid = pm->GetRigidBodyID(); assert(m_rid >= 0); FERigidBody& rb = *fem.GetRigidBody(m_rid); if (m_ntype == FORCE_TARGET) { switch (m_dof) { case 0: m_force0 = rb.m_Fr.x; break; case 1: m_force0 = rb.m_Fr.y; break; case 2: m_force0 = rb.m_Fr.z; break; } } if ((m_ntype == FORCE_LOAD) && m_brelative) { switch (m_dof) { case 0: m_force0 = rb.m_Fr.x; break; case 1: m_force0 = rb.m_Fr.y; break; case 2: m_force0 = rb.m_Fr.z; break; } } } //----------------------------------------------------------------------------- void FERigidBodyForce::Serialize(DumpStream& ar) { FEModelLoad::Serialize(ar); ar & m_ntype & m_dof & m_rigidMat & m_force & m_rid; } //----------------------------------------------------------------------------- //! Residual void FERigidBodyForce::LoadVector(FEGlobalVector& R) { FEMechModel& fem = static_cast<FEMechModel&>(*GetFEModel()); FERigidBody& rb = *fem.GetRigidBody(m_rid); double t = CurrentTime(); if (m_ntype == FORCE_FOLLOW) { // setup the force vector vec3d f(0,0,0); if (m_dof == 0) f.x = m_force; else if (m_dof == 1) f.y = m_force; else if (m_dof == 2) f.z = m_force; // apply the rigid body rotation f = rb.GetRotation()*f; // add to the residual int n; n = rb.m_LM[0]; if (n >= 0) R[n] += f.x; n = rb.m_LM[1]; if (n >= 0) R[n] += f.y; n = rb.m_LM[2]; if (n >= 0) R[n] += f.z; } else { int I = rb.m_LM[m_dof]; if (I >= 0) { double incVal = 0.0; if (m_ntype == FORCE_LOAD) { incVal = m_force + m_force0; } else if (m_ntype == FORCE_TARGET) { // get the current analysis step FEAnalysis* pstep = fem.GetCurrentStep(); double t0 = pstep->m_tstart; double t1 = pstep->m_tend; double w = (t - t0) / (t1 - t0); assert((w >= -0.0000001) && (w <= 1.0000001)); double f0 = m_force0, f1 = m_force; double f = f0 * (1.0 - w) + f1 * w; incVal = f; } R[I] += incVal; } } } //----------------------------------------------------------------------------- //! Stiffness matrix void FERigidBodyForce::StiffnessMatrix(FELinearSystem& LS) { // I think for follower forces I need to contribute to the stiffness matrix, but I'm not sure yet what. } //============================================================================= BEGIN_FECORE_CLASS(FERigidBodyMoment, FERigidLoad) ADD_PARAMETER(m_rigidMat, "rb")->setEnums("$(rigid_materials)")->setLongName("Rigid material"); ADD_PARAMETER(m_dof, "dof", 0, "Ru\0Rv\0Rw\0"); ADD_PARAMETER(m_value, "value")->SetFlags(FE_PARAM_ADDLC | FE_PARAM_VOLATILE)->setUnits(UNIT_MOMENT); ADD_PARAMETER(m_brelative, "relative"); ADD_PARAMETER(m_ntype, "load_type")->setEnums("LOAD\0FOLLOW\0TARGET"); END_FECORE_CLASS(); FERigidBodyMoment::FERigidBodyMoment(FEModel* pfem) : FERigidLoad(pfem) { m_rigidMat = -1; m_rid = -1; m_brelative = false; m_value0 = 0.0; m_value = 0.0; m_dof = 0; m_ntype = MOMENT_LOAD; } void FERigidBodyMoment::SetRigidMaterialID(int nid) { m_rigidMat = nid; } void FERigidBodyMoment::SetDOF(int bc) { m_dof = bc; } void FERigidBodyMoment::SetValue(double f) { m_value = f; } //----------------------------------------------------------------------------- bool FERigidBodyMoment::Init() { // At this point the rigid ID's are still associated with the materials. // We want to associate them with the rigid objects instead. FEModel& fem = *GetFEModel(); FERigidMaterial* pm = dynamic_cast<FERigidMaterial*>(fem.GetMaterial(m_rigidMat - 1)); if (pm == 0) return false; // follower moments are not supported yet. if (m_ntype == MOMENT_FOLLOW) { feLogError("Follower moments are not supported."); return false; } return FEModelLoad::Init(); } //----------------------------------------------------------------------------- void FERigidBodyMoment::Activate() { FEModelLoad::Activate(); FEMechModel& fem = static_cast<FEMechModel&>(*GetFEModel()); FERigidMaterial* pm = dynamic_cast<FERigidMaterial*>(fem.GetMaterial(m_rigidMat - 1)); m_rid = pm->GetRigidBodyID(); assert(m_rid >= 0); FERigidBody& rb = *fem.GetRigidBody(m_rid); if (m_ntype == MOMENT_TARGET) { switch (m_dof) { case 0: m_value0 = rb.m_Mr.x; break; case 1: m_value0 = rb.m_Mr.y; break; case 2: m_value0 = rb.m_Mr.z; break; } } if ((m_ntype == MOMENT_LOAD) && m_brelative) { switch (m_dof) { case 0: m_value0 = rb.m_Mr.x; break; case 1: m_value0 = rb.m_Mr.y; break; case 2: m_value0 = rb.m_Mr.z; break; } } } //----------------------------------------------------------------------------- void FERigidBodyMoment::Serialize(DumpStream& ar) { FEModelLoad::Serialize(ar); ar & m_value0 & m_rid; } //----------------------------------------------------------------------------- //! Residual void FERigidBodyMoment::LoadVector(FEGlobalVector& R) { FEMechModel& fem = static_cast<FEMechModel&>(*GetFEModel()); FERigidBody& rb = *fem.GetRigidBody(m_rid); double t = CurrentTime(); int I = rb.m_LM[m_dof + 3]; if (I >= 0) { double incVal = 0.0; if (m_ntype == MOMENT_LOAD) { incVal = m_value + m_value0; } else if (m_ntype == MOMENT_TARGET) { // get the current analysis step FEAnalysis* pstep = fem.GetCurrentStep(); double t0 = pstep->m_tstart; double t1 = pstep->m_tend; double w = (t - t0) / (t1 - t0); assert((w >= -0.0000001) && (w <= 1.0000001)); double M0 = m_value0, M1 = m_value; double M = M0 * (1.0 - w) + M1 * w; incVal = M; } R[I] += incVal; } } //----------------------------------------------------------------------------- //! Stiffness matrix void FERigidBodyMoment::StiffnessMatrix(FELinearSystem& LS) { }
C++
3D
febiosoftware/FEBio
FEBioMech/FERigidSolver.cpp
.cpp
48,216
1,588
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #include "stdafx.h" #include "FERigidSolver.h" #include "FESolidSolver2.h" #include "FERigidMaterial.h" #include "FERigidBody.h" #include <FECore/FEModel.h> #include "RigidBC.h" #include <FECore/FEAnalysis.h> #include <FECore/SparseMatrix.h> #include <FECore/log.h> #include <FECore/FEMaterial.h> #include "FEMechModel.h" #include <FECore/FELinearSystem.h> #include "FESolidAnalysis.h" FERigidSolver::FERigidSolver(FEModel* fem) { m_fem = dynamic_cast<FEMechModel*>(fem); m_dofX = m_dofY = m_dofZ = -1; m_bAllowMixedBCs = false; } int FERigidSolver::InitEquations(int neq) { // Next, we assign equation numbers to the rigid body degrees of freedom if (m_fem == nullptr) return neq; int nrb = m_fem->RigidBodies(); for (int i = 0; i<nrb; ++i) { FERigidBody& RB = *m_fem->GetRigidBody(i); for (int j = 0; j<6; ++j) { int bcj = RB.m_BC[j]; int lmj = RB.m_LM[j]; if (bcj == DOF_OPEN ) { RB.m_LM[j] = neq; neq++; } else if (bcj == DOF_PRESCRIBED) { RB.m_LM[j] = -neq - 2; neq++; } else if (bcj == DOF_FIXED ) { RB.m_LM[j] = -1; } else { assert(false); return -1; } } } // get the DOF indices m_dofX = m_fem->GetDOFIndex("x"); m_dofY = m_fem->GetDOFIndex("y"); m_dofZ = m_fem->GetDOFIndex("z"); m_dofVX = m_fem->GetDOFIndex("vx"); m_dofVY = m_fem->GetDOFIndex("vy"); m_dofVZ = m_fem->GetDOFIndex("vz"); m_dofU = m_fem->GetDOFIndex("u"); m_dofV = m_fem->GetDOFIndex("v"); m_dofW = m_fem->GetDOFIndex("w"); m_dofSX = m_fem->GetDOFIndex("sx"); m_dofSY = m_fem->GetDOFIndex("sy"); m_dofSZ = m_fem->GetDOFIndex("sz"); m_dofSVX = m_fem->GetDOFIndex("svx"); m_dofSVY = m_fem->GetDOFIndex("svy"); m_dofSVZ = m_fem->GetDOFIndex("svz"); int dofRU = m_fem->GetDOFIndex("Ru"); int dofRV = m_fem->GetDOFIndex("Rv"); int dofRW = m_fem->GetDOFIndex("Rw"); // we assign the rigid body equation number to // Also make sure that the nodes are NOT constrained! FEMesh& mesh = m_fem->GetMesh(); for (int i = 0; i<mesh.Nodes(); ++i) { FENode& node = mesh.Node(i); if (node.m_rid >= 0) { FERigidBody& RB = *m_fem->GetRigidBody(node.m_rid); node.m_ID[m_dofX] = (RB.m_LM[0] >= 0 ? -RB.m_LM[0] - 2 : RB.m_LM[0]); node.m_ID[m_dofY] = (RB.m_LM[1] >= 0 ? -RB.m_LM[1] - 2 : RB.m_LM[1]); node.m_ID[m_dofZ] = (RB.m_LM[2] >= 0 ? -RB.m_LM[2] - 2 : RB.m_LM[2]); node.m_ID[dofRU] = (RB.m_LM[3] >= 0 ? -RB.m_LM[3] - 2 : RB.m_LM[3]); node.m_ID[dofRV] = (RB.m_LM[4] >= 0 ? -RB.m_LM[4] - 2 : RB.m_LM[4]); node.m_ID[dofRW] = (RB.m_LM[5] >= 0 ? -RB.m_LM[5] - 2 : RB.m_LM[5]); if (node.HasFlags(FENode::SHELL) && node.HasFlags(FENode::RIGID_CLAMP)) { node.m_ID[m_dofU] = (RB.m_LM[0] >= 0 ? -RB.m_LM[0] - 2 : RB.m_LM[0]); node.m_ID[m_dofV] = (RB.m_LM[1] >= 0 ? -RB.m_LM[1] - 2 : RB.m_LM[1]); node.m_ID[m_dofW] = (RB.m_LM[2] >= 0 ? -RB.m_LM[2] - 2 : RB.m_LM[2]); node.m_ID[m_dofSX] = (RB.m_LM[0] >= 0 ? -RB.m_LM[0] - 2 : RB.m_LM[0]); node.m_ID[m_dofSY] = (RB.m_LM[1] >= 0 ? -RB.m_LM[1] - 2 : RB.m_LM[1]); node.m_ID[m_dofSZ] = (RB.m_LM[2] >= 0 ? -RB.m_LM[2] - 2 : RB.m_LM[2]); } } } return neq; } //----------------------------------------------------------------------------- //! Serialization void FERigidSolver::Serialize(DumpStream& ar) { if (ar.IsShallow()) return; ar & m_dofX & m_dofY & m_dofZ; ar & m_dofVX & m_dofVY & m_dofVZ; ar & m_dofU & m_dofV & m_dofW; ar & m_dofSX & m_dofSY & m_dofSZ; ar & m_dofSVX & m_dofSVY & m_dofSVZ; ar & m_bAllowMixedBCs; } //----------------------------------------------------------------------------- //! return the FEModel FEModel* FERigidSolver::GetFEModel() { return m_fem; } //----------------------------------------------------------------------------- // \todo: eliminate need for ui parameter void FERigidSolver::PrepStep(const FETimeInfo& timeInfo, vector<double>& ui) { if (m_fem == nullptr) return; FEMechModel& fem = *m_fem; int NO = fem.RigidBodies(); for (int i = 0; i<NO; ++i) fem.GetRigidBody(i)->Init(); // calculate local rigid displacements int NRBC = fem.RigidBCs(); for (int i = 0; i < NRBC; ++i) { FERigidBC& rbc = *fem.GetRigidBC(i); if (rbc.IsActive()) rbc.InitTimeStep(); } // calculate global rigid displacements for (int i = 0; i<NO; ++i) { FERigidBody* prb = fem.GetRigidBody(i); if (prb) { FERigidBody& RB = *prb; if (RB.m_prb == 0) { // if all rotation dofs are fixed or prescribed, set the flag if (m_bAllowMixedBCs==false) { RB.m_bpofr = false; if (RB.m_pDC[3] || RB.m_pDC[4] || RB.m_pDC[5]) { bool bpofr[3] = { false }; for (int j = 3; j<6; ++j) if (RB.m_pDC[j] || (RB.m_LM[j] < 0)) bpofr[j - 3] = true; if (bpofr[0] && bpofr[1] && bpofr[2]) RB.m_bpofr = true; else { feLogError("Rigid body rotations cannot mix prescribed and free components.\nRigid body: %d, Material: %d\n", RB.m_nID, RB.GetMaterialID()); throw "FATAL ERROR"; } // see if all or none prescribed dofs are relative bool br[3] = { false, false, false }; for (int j = 3; j < 6; ++j) { FERigidPrescribedBC* dc = RB.m_pDC[j]; if (dc && dc->GetRelativeFlag()) br[j - 3] = true; } bool bf = ((br[0] == br[1]) && (br[1] == br[2]) && (br[0] == br[2])); if (bf==false) { feLogError("All or none rigid rotations must have relative flag set.\nRigid body: %d, Material: %d\n", RB.m_nID, RB.GetMaterialID()); throw "FATAL ERROR"; } } } for (int j = 0; j<6; ++j) RB.m_du[j] = RB.m_dul[j]; } else { double* dul = RB.m_dul; vec3d dr = vec3d(dul[0], dul[1], dul[2]); vec3d v = vec3d(dul[3], dul[4], dul[5]); double w = sqrt(v.x*v.x + v.y*v.y + v.z*v.z); quatd dq = quatd(w, v); FERigidBody* pprb = RB.m_prb; vec3d r0 = RB.m_rt; quatd Q0 = RB.GetRotation(); dr = Q0*dr; dq = Q0*dq*Q0.Inverse(); while (pprb) { vec3d r1 = pprb->m_rt; dul = pprb->m_dul; quatd Q1 = pprb->GetRotation(); dr = r0 + dr - r1; // grab the parent's local displacements vec3d dR = vec3d(dul[0], dul[1], dul[2]); v = vec3d(dul[3], dul[4], dul[5]); w = sqrt(v.x*v.x + v.y*v.y + v.z*v.z); quatd dQ = quatd(w, v); dQ = Q1*dQ*Q1.Inverse(); // update global displacements quatd Qi = Q1.Inverse(); dr = dR + r1 + dQ*dr - r0; dq = dQ*dq; // move up in the chain pprb = pprb->m_prb; Q0 = Q1; } // set global displacements double* du = RB.m_du; du[0] = dr.x; du[1] = dr.y; du[2] = dr.z; v = dq.GetVector(); w = dq.GetAngle(); du[3] = w*v.x; du[4] = w*v.y; du[5] = w*v.z; } } } // store rigid displacements in Ui vector for (int i = 0; i<NO; ++i) { FERigidBody& RB = *fem.GetRigidBody(i); for (int j = 0; j<6; ++j) { int I = -RB.m_LM[j] - 2; if (I >= 0) ui[I] = RB.m_du[j]; } } for (int i = 0; i<NO; ++i) { FERigidBody& RB = *fem.GetRigidBody(i); quatd q = RB.GetRotation()*RB.m_qp.Inverse(); q.MakeUnit(); // update RB variables // translation RB.m_rp = RB.m_rt; RB.m_vp = RB.m_vt; RB.m_ap = RB.m_at; // rotation RB.m_qp = RB.GetRotation(); RB.m_wp = RB.m_wt; RB.m_alp = RB.m_alt; // angular momentum RB.m_hp = RB.m_ht; RB.m_dhp = RB.m_dht; // rigid body reaction force and moment RB.m_Fp = RB.m_Fr; RB.m_Mp = RB.m_Mr; // estimate RB kinematics at current time double dt = timeInfo.timeIncrement; double beta = timeInfo.beta; double gamma = timeInfo.gamma; double a = 1.0 / (beta*dt); double b = a / dt; double c = 1.0 - 0.5 / beta; // acceleration and velocity of center of mass RB.m_at = RB.m_ap*c - RB.m_vp*a; RB.m_vt = RB.m_vp + (RB.m_at*gamma + RB.m_ap*(1-gamma))*dt; // angular acceleration and velocity of rigid body vec3d vq = q.GetVector()*(2 * tan(q.GetAngle() / 2)); // Cayley transform RB.m_wt = vq*(a*gamma) - RB.m_wp + (RB.m_wp + RB.m_alp*dt / 2.)*(2 - gamma / beta); q.RotateVector(RB.m_wt); RB.m_alt = vq*b - RB.m_wp*a + RB.m_alp*c; q.RotateVector(RB.m_alt); } } //----------------------------------------------------------------------------- //! This function calculates the rigid stiffness matrices void FERigidSolver::RigidStiffness(SparseMatrix& K, vector<double>& ui, vector<double>& F, const FEElementMatrix& ke, double alpha) { if (m_fem == nullptr) return; const vector<int>& en = ke.Nodes(); int n = (int)en.size(); FEMesh& mesh = m_fem->GetMesh(); bool bclamped_shell = false; for (int j = 0; j<n; ++j) { if (en[j] >= 0) { if (mesh.Node(en[j]).HasFlags(FENode::SHELL) && mesh.Node(en[j]).HasFlags(FENode::RIGID_CLAMP)) { bclamped_shell = true; break; } } } if (bclamped_shell) RigidStiffnessShell(K, ui, F, en, ke.RowIndices(), ke.ColumnsIndices(), ke, alpha); else RigidStiffnessSolid(K, ui, F, en, ke.RowIndices(), ke.ColumnsIndices(), ke, alpha); return; } //----------------------------------------------------------------------------- //! This function calculates the rigid stiffness matrices //! correct stiffness matrix for rigid-solid interfaces void FERigidSolver::RigidStiffnessSolid(SparseMatrix& K, vector<double>& ui, vector<double>& F, const vector<int>& en, const vector<int>& elmi, const std::vector<int>& elmj, const matrix& ke, double alpha) { if (m_fem == nullptr) return; FEMechModel& fem = *m_fem; if (fem.RigidBodies() == 0) return; if (en.empty()) return; int n = (int)en.size(); // get nodal DOFS DOFS& fedofs = m_fem->GetDOFS(); int MAX_NDOFS = fedofs.GetTotalDOFS(); int ndof = ke.columns() / n; matrix kij(ndof, ndof); matrix KF(ndof, 6); double KR[6][6]; FEMesh& mesh = m_fem->GetMesh(); // loop over columns for (int j = 0; j<n; ++j) { if (en[j] >= 0) { FENode& nodej = mesh.Node(en[j]); if (nodej.m_rid >= 0) { // this is a rigid interface node // get the rigid body this node is attached to FERigidBody& RBj = *fem.GetRigidBody(nodej.m_rid); // get the rigid body equation nrs. int* lmj = RBj.m_LM; // get the relative distance to the center of mass vec3d zj = nodej.m_rt - RBj.m_rt; mat3d Zj; Zj.skew(zj); // loop over rows for (int i = 0; i < n; ++i) { // get the element sub-matrix for (int k = 0; k < ndof; ++k) for (int l = 0; l < ndof; ++l) kij[k][l] = ke[ndof*i + k][ndof*j + l]; mat3d Kuu(kij[0][0], kij[0][1], kij[0][2], kij[1][0], kij[1][1], kij[1][2], kij[2][0], kij[2][1], kij[2][2]); if (en[i] >= 0) { FENode& nodei = mesh.Node(en[i]); if (nodei.m_rid >= 0) { // node i is also a rigid body node // get the rigid body this node is attached to FERigidBody& RBi = *fem.GetRigidBody(nodei.m_rid); int* lmi = RBi.m_LM; // get the relative distance (use alpha rule) vec3d zi = (nodei.m_rt - RBi.m_rt)*alpha + (nodei.m_rp - RBi.m_rp)*(1 - alpha); mat3d Zi; Zi.skew(zi); mat3d M; // Kuu transformation to Krr M = Kuu; KR[0][0] = M[0][0]; KR[0][1] = M[0][1]; KR[0][2] = M[0][2]; KR[1][0] = M[1][0]; KR[1][1] = M[1][1]; KR[1][2] = M[1][2]; KR[2][0] = M[2][0]; KR[2][1] = M[2][1]; KR[2][2] = M[2][2]; // Kuu transformation to Krq M = Kuu * Zj*(-1); KR[0][3] = M[0][0]; KR[0][4] = M[0][1]; KR[0][5] = M[0][2]; KR[1][3] = M[1][0]; KR[1][4] = M[1][1]; KR[1][5] = M[1][2]; KR[2][3] = M[2][0]; KR[2][4] = M[2][1]; KR[2][5] = M[2][2]; // Kuu transformation to Kqr M = Zi * Kuu; KR[3][0] = M[0][0]; KR[3][1] = M[0][1]; KR[3][2] = M[0][2]; KR[4][0] = M[1][0]; KR[4][1] = M[1][1]; KR[4][2] = M[1][2]; KR[5][0] = M[2][0]; KR[5][1] = M[2][1]; KR[5][2] = M[2][2]; // Kuu transformation to Kqq M = Zi * Kuu*Zj*(-1); KR[3][3] = M[0][0]; KR[3][4] = M[0][1]; KR[3][5] = M[0][2]; KR[4][3] = M[1][0]; KR[4][4] = M[1][1]; KR[4][5] = M[1][2]; KR[5][3] = M[2][0]; KR[5][4] = M[2][1]; KR[5][5] = M[2][2]; // add the stiffness components to the Krr matrix for (int k = 0; k < 6; ++k) for (int l = 0; l < 6; ++l) { int J = lmj[k]; int I = lmi[l]; if (I >= 0) { // multiply KR by alpha for alpha rule if (J < -1) { #pragma omp atomic F[I] -= KR[l][k] * ui[-J - 2]; } else if (J >= 0) K.add(I, J, KR[l][k]); } } // we still need to couple the non-rigid degrees of node i to the // rigid dofs of node j for (int k = 3; k < ndof; ++k) { vec3d kpu(kij[k][0], kij[k][1], kij[k][2]); vec3d m = kpu; KF[k][0] = m.x; KF[k][1] = m.y; KF[k][2] = m.z; m = Zj * kpu; KF[k][3] = m.x; KF[k][4] = m.y; KF[k][5] = m.z; } for (int k = 0; k < 6; ++k) for (int l = 3; l < ndof; ++l) { int J = lmj[k]; int I = elmi[ndof*i + l]; if (I >= 0) { // multiply KF by alpha for alpha rule if (J < -1) { #pragma omp atomic F[I] -= KF[l][k] * ui[-J - 2]; } else if (J >= 0) K.add(I, J, KF[l][k]); } } // now the transpose location for (int l = 3; l < ndof; ++l) { vec3d kup(kij[0][l], kij[1][l], kij[2][l]); vec3d m = Zi * kup; KF[l][0] = kup.x; KF[l][1] = kup.y; KF[l][2] = kup.z; KF[l][3] = m.x; KF[l][4] = m.y; KF[l][5] = m.z; } for (int k = 0; k < 6; ++k) for (int l = 3; l < ndof; ++l) { int J = elmj[ndof*j + l]; int I = lmi[k]; if (I >= 0) { if (J < -1) { #pragma omp atomic F[I] -= KF[l][k] * ui[-J - 2]; } else if (J >= 0) K.add(I, J, KF[l][k]); } } } else { // node i is not a rigid body node // add the stiffness components to the Kfr matrix // Kij for (int k = 0; k < ndof; ++k) { vec3d kpu(kij[k][0], kij[k][1], kij[k][2]); vec3d m = kpu; KF[k][0] = m.x; KF[k][1] = m.y; KF[k][2] = m.z; m = Zj * kpu; KF[k][3] = m.x; KF[k][4] = m.y; KF[k][5] = m.z; } for (int k = 0; k < 6; ++k) for (int l = 0; l < ndof; ++l) { int J = lmj[k]; int I = elmi[ndof*i + l]; if (I >= 0) { // multiply KF by alpha for alpha rule if (J < -1) { #pragma omp atomic F[I] -= KF[l][k] * ui[-J - 2]; } else if (J >= 0) K.add(I, J, KF[l][k]); } } } } } } else { // loop over rows for (int i = 0; i < n; ++i) { if (en[i] >= 0) { FENode& nodei = mesh.Node(en[i]); if (nodei.m_rid >= 0) { // node i is a rigid body // get the rigid body this node is attached to FERigidBody& RBi = *fem.GetRigidBody(nodei.m_rid); // get the rigid body equation nrs. int* lmi = RBi.m_LM; // get the relative distance (use alpha rule) vec3d zi = (nodei.m_rt - RBi.m_rt)*alpha + (nodei.m_rp - RBi.m_rp)*(1 - alpha); mat3d Zi; Zi.skew(zi); // get the element sub-matrix for (int k = 0; k < ndof; ++k) for (int l = 0; l < ndof; ++l) kij[k][l] = ke[ndof*i + k][ndof*j + l]; // add the stiffness components to the Krf matrix // Kij for (int k = 0; k < ndof; ++k) { vec3d kup(kij[0][k], kij[1][k], kij[2][k]); vec3d m = Zi * kup; KF[k][0] = kup.x; KF[k][1] = kup.y; KF[k][2] = kup.z; KF[k][3] = m.x; KF[k][4] = m.y; KF[k][5] = m.z; } for (int k = 0; k < 6; ++k) for (int l = 0; l < ndof; ++l) { int I = lmi[k]; int J = elmj[ndof*j + l]; if (I >= 0) { if (J < -1) { #pragma omp atomic F[I] -= KF[l][k] * ui[-J - 2]; } else if (J >= 0) K.add(I, J, KF[l][k]); } } } } } } } } } //----------------------------------------------------------------------------- //! This function calculates the rigid stiffness matrices //! correct stiffness matrix for rigid bodies accounting for rigid-body-deformable-shell interfaces void FERigidSolver::RigidStiffnessShell(SparseMatrix& K, vector<double>& ui, vector<double>& F, const vector<int>& en, const vector<int>& elmi, const vector<int>& elmj, const matrix& ke, double alpha) { if (m_fem == nullptr) return; FEMechModel& fem = *m_fem; if (fem.RigidBodies() == 0) return; int i, j, k, l, n = (int)en.size(); // get nodal DOFS DOFS& fedofs = m_fem->GetDOFS(); int MAX_NDOFS = fedofs.GetTotalDOFS(); vector< vector<double> > kij; kij.assign(MAX_NDOFS, vector<double>(MAX_NDOFS)); vector< vector<double> > KF; KF.assign(MAX_NDOFS, vector<double>(6)); double KR[6][6]; int *lmi, *lmj; int I, J; vec3d ai, aj, bi, bj; mat3d Ai, Aj, Bi, Bj; int ndof = ke.columns() / n; FEMesh& mesh = m_fem->GetMesh(); // loop over columns for (j = 0; j<n; ++j) { FENode& nodej = mesh.Node(en[j]); if (nodej.m_rid >= 0) { // this is a rigid interface node // get the rigid body this node is attached to FERigidBody& RBj = *fem.GetRigidBody(nodej.m_rid); // get the rigid body equation nrs. lmj = RBj.m_LM; // get the relative distance to the center of mass aj = nodej.m_rt - RBj.m_rt; Aj.skew(aj); // get the shell director bj = aj - nodej.m_dt; Bj.skew(bj); // loop over rows for (i = 0; i<n; ++i) { // get the element sub-matrix for (k = 0; k<ndof; ++k) for (l = 0; l<ndof; ++l) kij[k][l] = ke[ndof*i + k][ndof*j + l]; mat3d Kuu(kij[0][0], kij[0][1], kij[0][2], kij[1][0], kij[1][1], kij[1][2], kij[2][0], kij[2][1], kij[2][2]); mat3d Kuw(kij[0][3], kij[0][4], kij[0][5], kij[1][3], kij[1][4], kij[1][5], kij[2][3], kij[2][4], kij[2][5]); mat3d Kwu(kij[3][0], kij[3][1], kij[3][2], kij[4][0], kij[4][1], kij[4][2], kij[5][0], kij[5][1], kij[5][2]); mat3d Kww(kij[3][3], kij[3][4], kij[3][5], kij[4][3], kij[4][4], kij[4][5], kij[5][3], kij[5][4], kij[5][5]); FENode& nodei = mesh.Node(en[i]); if (nodei.m_rid >= 0) { // node i is also a rigid body node // get the rigid body this node is attached to FERigidBody& RBi = *fem.GetRigidBody(nodei.m_rid); lmi = RBi.m_LM; // get the relative distance (use alpha rule) ai = (nodei.m_rt - RBi.m_rt)*alpha + (nodei.m_rp - RBi.m_rp)*(1 - alpha); Ai.skew(ai); // get the shell director bi = ai - nodei.m_dt; Bi.skew(bi); mat3d M; // Kuu transformation M = (Kuu + Kwu + Kuw + Kww); KR[0][0] = M[0][0]; KR[0][1] = M[0][1]; KR[0][2] = M[0][2]; KR[1][0] = M[1][0]; KR[1][1] = M[1][1]; KR[1][2] = M[1][2]; KR[2][0] = M[2][0]; KR[2][1] = M[2][1]; KR[2][2] = M[2][2]; // Kuw transformation M = ((Kuu + Kwu)*Aj + (Kuw + Kww)*Bj)*(-1); KR[0][3] = M[0][0]; KR[0][4] = M[0][1]; KR[0][5] = M[0][2]; KR[1][3] = M[1][0]; KR[1][4] = M[1][1]; KR[1][5] = M[1][2]; KR[2][3] = M[2][0]; KR[2][4] = M[2][1]; KR[2][5] = M[2][2]; // Kwu transformation M = (Ai*(Kuu + Kuw) + Bi*(Kwu + Kww)); KR[3][0] = M[0][0]; KR[3][1] = M[0][1]; KR[3][2] = M[0][2]; KR[4][0] = M[1][0]; KR[4][1] = M[1][1]; KR[4][2] = M[1][2]; KR[5][0] = M[2][0]; KR[5][1] = M[2][1]; KR[5][2] = M[2][2]; // Kww transformation M = ((Ai*Kuu + Bi*Kwu)*Aj + (Ai*Kuw + Bi*Kww)*Bj)*(-1); KR[3][3] = M[0][0]; KR[3][4] = M[0][1]; KR[3][5] = M[0][2]; KR[4][3] = M[1][0]; KR[4][4] = M[1][1]; KR[4][5] = M[1][2]; KR[5][3] = M[2][0]; KR[5][4] = M[2][1]; KR[5][5] = M[2][2]; // add the stiffness components to the Krr matrix for (k = 0; k<6; ++k) for (l = 0; l<6; ++l) { J = lmj[k]; I = lmi[l]; if (I >= 0) { // multiply KR by alpha for alpha rule if (J < -1) { #pragma omp atomic F[I] -= KR[l][k] * ui[-J - 2]; } else if (J >= 0) K.add(I, J, KR[l][k]); } } // we still need to couple the non-rigid degrees of node i to the // rigid dofs of node j for (k = 6; k<ndof; ++k) { vec3d kpu(kij[k][0], kij[k][1], kij[k][2]); vec3d kpw(kij[k][3], kij[k][4], kij[k][5]); vec3d m = (kpu + kpw); KF[k][0] = m.x; KF[k][1] = m.y; KF[k][2] = m.z; m = (Aj*kpu + Bj*kpw); KF[k][3] = m.x; KF[k][4] = m.y; KF[k][5] = m.z; } for (k = 0; k<6; ++k) for (l = 6; l<ndof; ++l) { J = lmj[k]; I = elmi[ndof*i + l]; if (I >= 0) { // multiply KF by alpha for alpha rule if (J < -1) { #pragma omp atomic F[I] -= KF[l][k] * ui[-J - 2]; } else if (J >= 0) K.add(I, J, KF[l][k]); } } // now the transpose location for (l = 6; l<ndof; ++l) { vec3d kup(kij[0][l], kij[1][l], kij[2][l]); vec3d kwp(kij[3][l], kij[4][l], kij[5][l]); vec3d m = kup + kwp; KF[l][0] = m.x; KF[l][1] = m.y; KF[l][2] = m.z; m = Ai*kup + Bi*kwp; KF[l][3] = m.x; KF[l][4] = m.y; KF[l][5] = m.z; } for (k = 0; k<6; ++k) for (l = 6; l<ndof; ++l) { J = elmj[ndof*j + l]; I = lmi[k]; if (I >= 0) { if (J < -1) { #pragma omp atomic F[I] -= KF[l][k] * ui[-J - 2]; } else if (J >= 0) K.add(I, J, KF[l][k]); } } } else { // node i is not a rigid body node // add the stiffness components to the Kfr matrix // Kij for (k = 0; k<ndof; ++k) { vec3d kpu(kij[k][0], kij[k][1], kij[k][2]); vec3d kpw(kij[k][3], kij[k][4], kij[k][5]); vec3d m = (kpu + kpw); KF[k][0] = m.x; KF[k][1] = m.y; KF[k][2] = m.z; m = (Aj*kpu + Bj*kpw); KF[k][3] = m.x; KF[k][4] = m.y; KF[k][5] = m.z; } for (k = 0; k<6; ++k) for (l = 0; l<ndof; ++l) { J = lmj[k]; I = elmi[ndof*i + l]; if (I >= 0) { // multiply KF by alpha for alpha rule if (J < -1) { #pragma omp atomic F[I] -= KF[l][k] * ui[-J - 2]; } else if (J >= 0) K.add(I, J, KF[l][k]); } } } } } else { // loop over rows for (i = 0; i<n; ++i) { FENode& nodei = mesh.Node(en[i]); if (nodei.m_rid >= 0) { // node i is a rigid body // get the rigid body this node is attached to FERigidBody& RBi = *fem.GetRigidBody(nodei.m_rid); // get the rigid body equation nrs. lmi = RBi.m_LM; // get the relative distance (use alpha rule) ai = (nodei.m_rt - RBi.m_rt)*alpha + (nodei.m_rp - RBi.m_rp)*(1 - alpha); Ai.skew(ai); // get the shell director bi = ai - nodei.m_dt; Bi.skew(bi); // get the element sub-matrix for (k = 0; k<ndof; ++k) for (l = 0; l<ndof; ++l) kij[k][l] = ke[ndof*i + k][ndof*j + l]; // add the stiffness components to the Krf matrix // Kij for (k = 0; k<ndof; ++k) { vec3d kup(kij[0][k], kij[1][k], kij[2][k]); vec3d kwp(kij[3][k], kij[4][k], kij[5][k]); vec3d m = kup + kwp; KF[k][0] = m.x; KF[k][1] = m.y; KF[k][2] = m.z; m = Ai*kup + Bi*kwp; KF[k][3] = m.x; KF[k][4] = m.y; KF[k][5] = m.z; } for (k = 0; k<6; ++k) for (l = 0; l<ndof; ++l) { I = lmi[k]; J = elmj[ndof*j + l]; if (I >= 0) { if (J < -1) { #pragma omp atomic F[I] -= KF[l][k] * ui[-J - 2]; } else if (J >= 0) K.add(I, J, KF[l][k]); } } } } } } } //----------------------------------------------------------------------------- void FERigidSolver::AssembleResidual(int node_id, int dof, double f, vector<double>& R) { if (m_fem == nullptr) return; FEMechModel& fem = *m_fem; FEMesh& mesh = m_fem->GetMesh(); // get the equation number FENode& node = mesh.Node(node_id); int n = node.m_ID[dof]; // assemble into global vector if (n >= 0) { #pragma omp atomic R[n] += f; } else if (node.m_rid >= 0) { // this is a rigid body node FERigidBody& RB = *fem.GetRigidBody(node.m_rid); // get the relative position vec3d a = node.m_rt - RB.m_rt; int* lm = RB.m_LM; if (dof == m_dofX) { if (lm[0] >= 0) { #pragma omp atomic R[lm[0]] += f; } if (lm[4] >= 0) { #pragma omp atomic R[lm[4]] += a.z * f; } if (lm[5] >= 0) { #pragma omp atomic R[lm[5]] += -a.y * f; } } else if (dof == m_dofY) { if (lm[1] >= 0) { #pragma omp atomic R[lm[1]] += f; } if (lm[3] >= 0) { #pragma omp atomic R[lm[3]] += -a.z * f; } if (lm[5] >= 0) { #pragma omp atomic R[lm[5]] += a.x * f; } } else if (dof == m_dofZ) { if (lm[2] >= 0) { #pragma omp atomic R[lm[2]] += f; } if (lm[3] >= 0) { #pragma omp atomic R[lm[3]] += a.y * f; } if (lm[4] >= 0) { #pragma omp atomic R[lm[4]] += -a.x * f; } } if (node.HasFlags(FENode::SHELL) && node.HasFlags(FENode::RIGID_CLAMP)) { // get the shell director vec3d d = node.m_dt; vec3d b = a - d; if (dof == m_dofSX) { if (lm[0] >= 0) { #pragma omp atomic R[lm[0]] += f; } if (lm[4] >= 0) { #pragma omp atomic R[lm[4]] += b.z * f; } if (lm[5] >= 0) { #pragma omp atomic R[lm[5]] += -b.y * f; } } else if (dof == m_dofSY) { if (lm[1] >= 0) { #pragma omp atomic R[lm[1]] += f; } if (lm[3] >= 0) { #pragma omp atomic R[lm[3]] += -b.z * f; } if (lm[5] >= 0) { #pragma omp atomic R[lm[5]] += b.x * f; } } else if (dof == m_dofSZ) { if (lm[2] >= 0) { #pragma omp atomic R[lm[2]] += f; } if (lm[3] >= 0) { #pragma omp atomic R[lm[3]] += b.y * f; } if (lm[4] >= 0) { #pragma omp atomic R[lm[4]] += -b.x * f; } } } } } //----------------------------------------------------------------------------- void FERigidSolver::Residual() { if (m_fem == nullptr) return; FEMechModel& fem = *m_fem; int NRB = fem.RigidBodies(); for (int i = 0; i<NRB; ++i) { FERigidBody& RB = *fem.GetRigidBody(i); RB.m_Fr = RB.m_Mr = vec3d(0, 0, 0); } } //----------------------------------------------------------------------------- void FERigidSolver::StiffnessMatrix(SparseMatrix& K, const FETimeInfo& tp) { if (m_fem == nullptr) return; FEMechModel& fem = *m_fem; // we still need to set the diagonal elements to 1 // for the prescribed rigid body dofs. int NRB = fem.RigidBodies(); for (int i = 0; i<NRB; ++i) { FERigidBody& rb = *fem.GetRigidBody(i); for (int j = 0; j<6; ++j) if (rb.m_LM[j] < -1) { int I = -rb.m_LM[j] - 2; K.set(I, I, 1); } } } //----------------------------------------------------------------------------- //! This function calculates the contribution to the mass matrix from the rigid bodies void FERigidSolver::RigidMassMatrix(FELinearSystem& LS, const FETimeInfo& timeInfo) { if (m_fem == nullptr) return; FEMechModel& fem = *m_fem; // element stiffness matrix vector<int> lm; FEElementMatrix ke; // 6 dofs per rigid body ke.resize(6, 6); // Newmark integration rule double dt = timeInfo.timeIncrement; double alpham = timeInfo.alpham; double beta = timeInfo.beta; double gamma = timeInfo.gamma; double a = 1. / (beta*dt*dt); if (timeInfo.currentTime == 0) { a = alpham = 1; } for (int i=0; i<fem.RigidBodies(); ++i) { FERigidBody& RB = *fem.GetRigidBody(i); // mass matrix double M = RB.m_mass*a*alpham; ke.zero(); ke[0][0] = M; ke[1][1] = M; ke[2][2] = M; // evaluate mass moment of inertia at t mat3d Rt = RB.GetRotation().RotationMatrix(); mat3ds Jt = (Rt*RB.m_moi*Rt.transpose()).sym(); // incremental rotation in spatial frame quatd q = RB.GetRotation()*RB.m_qp.Inverse(); q.MakeUnit(); // clean-up roundoff errors double theta = 2 * tan(q.GetAngle() / 2); // get theta from Cayley transform vec3d e = q.GetVector(); // skew-symmetric tensor whose axial vector is the incremental rotation mat3d qhat; qhat.skew(e*theta); // generate tensor T(theta) mat3d T = mat3dd(1) + qhat / 2 + dyad(e*theta) / 4; // skew-symmetric of angular momentum mat3d hhat; hhat.skew(RB.m_ht); // skew-symmetric angular velocity mat3d Omega; Omega.skew(RB.m_wt); mat3d Dht; Dht.skew(RB.m_dht); // rotational inertia stiffness mat3d K = ((((Omega*gamma+mat3dd(1./dt))*Jt - hhat*gamma)/(beta*dt))*T - Dht)*alpham; ke[3][3] = K(0, 0); ke[3][4] = K(0, 1); ke[3][5] = K(0, 2); ke[4][3] = K(1, 0); ke[4][4] = K(1, 1); ke[4][5] = K(1, 2); ke[5][3] = K(2, 0); ke[5][4] = K(2, 1); ke[5][5] = K(2, 2); lm.assign(RB.m_LM, RB.m_LM + 6); ke.SetIndices(lm); LS.Assemble(ke); } } //================================================================================================= // FERigidSolverOld //================================================================================================= //----------------------------------------------------------------------------- //! This function updates the rigid body linear and angular velocity by solving //! an overdetermined system of linear equations using the least-square method. void FERigidSolverOld::UpdateRigidKinematics() { // get the model and mesh if (m_fem == nullptr) return; FEMechModel& fem = *m_fem; FEMesh& mesh = fem.GetMesh(); // loop over all rigid bodies int NRB = fem.RigidBodies(); for (int j = 0; j<NRB; ++j) { // get the rigid body FERigidBody& rb = *fem.GetRigidBody(j); // right-hand side and least-square matrix vector<double> r; r.assign(6, 0.0); matrix m(6, 6); m.zero(); // we need to loop over all domains that define this rigid body int ncnt = 0; int NDOM = mesh.Domains(); for (int n = 0; n<NDOM; ++n) { FEDomain& dom = mesh.Domain(n); FERigidMaterial* prm = dynamic_cast<FERigidMaterial*>(dom.GetMaterial()); if (prm) { if (prm->GetRigidBodyID() == j) { // now loop over all the nodes int NN = dom.Nodes(); for (int i = 0; i<NN; ++i, ncnt++) { vec3d ri = dom.Node(i).m_rt - rb.m_rt; vec3d vi = dom.Node(i).get_vec3d(m_dofVX, m_dofVY, m_dofVZ); vec3d wi = ri ^ vi; // right-hand side r[0] += vi.x; r[1] += vi.y; r[2] += vi.z; r[3] += wi.x; r[4] += wi.y; r[5] += wi.z; // least-squares matrix m[0][0] += 1.0; m[1][1] += 1.0; m[2][2] += 1.0; m[0][4] += ri.z; m[0][5] += -ri.y; m[1][3] += -ri.z; m[1][5] += ri.x; m[2][3] += ri.y; m[2][4] += -ri.x; m[3][4] += -ri.z; m[3][5] += ri.y; m[4][3] += ri.z; m[4][5] += -ri.x; m[5][3] += -ri.y; m[5][4] += ri.x; m[3][3] += ri.y*ri.y + ri.z*ri.z; m[3][4] += -ri.x*ri.y; m[3][5] += -ri.x*ri.z; m[4][4] += ri.x*ri.x + ri.z*ri.z; m[4][3] += -ri.x*ri.y; m[4][5] += -ri.y*ri.z; m[5][5] += ri.x*ri.x + ri.y*ri.y; m[5][3] += -ri.x*ri.z; m[5][4] += -ri.y*ri.z; } } } } // solve for the rigid body velocity (if we have enough nodes) if (ncnt > 2) { vector<double> VR = r / m; rb.m_vt = vec3d(VR[0], VR[1], VR[2]); rb.m_wt = vec3d(VR[3], VR[4], VR[5]); } } } //----------------------------------------------------------------------------- //! Updates the rigid body data void FERigidSolverOld::UpdateRigidBodies(vector<double>& Ui, vector<double>& ui, bool bnewUpdate) { if (m_fem == nullptr) return; FEMechModel& fem = *m_fem; const int NRB = fem.RigidBodies(); // first calculate the rigid body displacement increments for (int i = 0; i<NRB; ++i) { // get the rigid body FERigidBody& RB = *fem.GetRigidBody(i); int *lm = RB.m_LM; double* du = RB.m_du; if (RB.m_prb == 0) { for (int j = 0; j<6; ++j) { du[j] = (lm[j] >= 0 ? Ui[lm[j]] + ui[lm[j]] : 0); } } } // for prescribed displacements, the displacement increments are evaluated differently // TODO: Is this really necessary? Why can't the ui vector contain the correct values? for (int i = 0; i < NRB; ++i) { // get the rigid body FERigidBody& RB = *fem.GetRigidBody(i); if (RB.m_prb == nullptr) { for (int j = 0; j < 6; ++j) { FERigidPrescribedBC* dc = RB.m_pDC[j]; if (dc && dc->IsActive()) { int I = dc->GetBC(); RB.m_du[I] = dc->Value() - RB.m_Up[I]; } } } } // update the rigid bodies for (int i = 0; i<NRB; ++i) { // get the rigid body FERigidBody& RB = *fem.GetRigidBody(i); double* du = RB.m_du; if (bnewUpdate) { // This is the "new" update algorithm which addressesses a couple issues // with the old method, namely that prescribed rotational dofs aren't update correctly. // Unfortunately, it seems to produce worse convergence in some cases, especially with line search // and it doesn't work when rigid bodies are used in a hierarchy if (RB.m_prb) du = RB.m_dul; RB.m_Ut[0] = RB.m_Up[0] + du[0]; RB.m_Ut[1] = RB.m_Up[1] + du[1]; RB.m_Ut[2] = RB.m_Up[2] + du[2]; RB.m_Ut[3] = RB.m_Up[3] + du[3]; RB.m_Ut[4] = RB.m_Up[4] + du[4]; RB.m_Ut[5] = RB.m_Up[5] + du[5]; RB.m_rt = RB.m_r0 + vec3d(RB.m_Ut[0], RB.m_Ut[1], RB.m_Ut[2]); vec3d Rt(RB.m_Ut[3], RB.m_Ut[4], RB.m_Ut[5]); RB.SetRotation(quatd(Rt)); } else { // This is the "old" update algorithm which has some issues. It does not produce the correct // rigid body orientation when the rotational degrees of freedom are prescribed. RB.m_rt.x = RB.m_rp.x + du[0]; RB.m_rt.y = RB.m_rp.y + du[1]; RB.m_rt.z = RB.m_rp.z + du[2]; vec3d r = vec3d(du[3], du[4], du[5]); double w = sqrt(r.x*r.x + r.y*r.y + r.z*r.z); quatd dq = quatd(w, r); quatd Q = dq*RB.m_qp; Q.MakeUnit(); RB.SetRotation(Q); if (RB.m_prb) du = RB.m_dul; RB.m_Ut[0] = RB.m_Up[0] + du[0]; RB.m_Ut[1] = RB.m_Up[1] + du[1]; RB.m_Ut[2] = RB.m_Up[2] + du[2]; RB.m_Ut[3] = RB.m_Up[3] + du[3]; RB.m_Ut[4] = RB.m_Up[4] + du[4]; RB.m_Ut[5] = RB.m_Up[5] + du[5]; } } // we need to update the position of rigid nodes fem.UpdateRigidMesh(); // Since the rigid nodes are repositioned we need to update the displacement DOFS FEMesh& mesh = m_fem->GetMesh(); int N = mesh.Nodes(); for (int i = 0; i<N; ++i) { FENode& node = mesh.Node(i); if (node.m_rid >= 0) { vec3d ut = node.m_rt - node.m_r0; node.set_vec3d(m_dofX, m_dofY, m_dofZ, ut); } } } //================================================================================================= // FERigidSolverNew //================================================================================================= //----------------------------------------------------------------------------- void FERigidSolverNew::UpdateIncrements(vector<double>& Ui, vector<double>& ui, bool emap) { if (m_fem == nullptr) return; FEMechModel& fem = *m_fem; int nrb = fem.RigidBodies(); for (int i = 0; i<nrb; ++i) { // get the rigid body FERigidBody& RB = *fem.GetRigidBody(i); if (RB.m_prb == 0) { int *lm = RB.m_LM; vec3d v; quatd qUi; // first do the displacements for (int j = 0; j<3; ++j) if (lm[j] >= 0) Ui[lm[j]] += ui[lm[j]]; // next, we do the rotations. We do this separately since // they need to be interpreted differently than displacements vec3d vUi(0, 0, 0); vec3d vui(0, 0, 0); if (lm[3] >= 0) { vUi.x = Ui[lm[3]]; vui.x = ui[lm[3]]; } if (lm[4] >= 0) { vUi.y = Ui[lm[4]]; vui.y = ui[lm[4]]; } if (lm[5] >= 0) { vUi.z = Ui[lm[5]]; vui.z = ui[lm[5]]; } if (emap) qUi = quatd(vUi); else qUi = quatd(2 * atan(vUi.norm() / 2), vUi); // Cayley transform quatd qui(2 * atan(vui.norm() / 2), vui); // Cayley transform quatd q = qui*qUi; q.MakeUnit(); if (emap) v = q.GetVector()*q.GetAngle(); else v = q.GetVector()*(2 * tan(q.GetAngle() / 2)); // Cayley transform if (lm[3] >= 0) Ui[lm[3]] = v.x; if (lm[4] >= 0) Ui[lm[4]] = v.y; if (lm[5] >= 0) Ui[lm[5]] = v.z; } } } //----------------------------------------------------------------------------- //! Updates the rigid body data void FERigidSolverNew::UpdateRigidBodies(vector<double>& Ui, vector<double>& ui) { // update rigid bodies if (m_fem == nullptr) return; FEMechModel& fem = *m_fem; int nrb = fem.RigidBodies(); for (int i = 0; i<nrb; ++i) { // get the rigid body FERigidBody& RB = *fem.GetRigidBody(i); int *lm = RB.m_LM; double* du = RB.m_du; // first do the displacements if (RB.m_prb == 0) { for (int j = 0; j<3; ++j) { FERigidPrescribedBC* pdc = RB.m_pDC[j]; if (pdc) { // TODO: do I need to take the line search step into account here? du[j] = pdc->Value() - RB.m_Up[j]; } else { du[j] = (lm[j] >= 0 ? Ui[lm[j]] + ui[lm[j]] : 0); } } } RB.m_rt.x = RB.m_rp.x + du[0]; RB.m_rt.y = RB.m_rp.y + du[1]; RB.m_rt.z = RB.m_rp.z + du[2]; // update RB center of mass translations if (RB.m_prb) du = RB.m_dul; RB.m_Ut[0] = RB.m_Up[0] + du[0]; RB.m_Ut[1] = RB.m_Up[1] + du[1]; RB.m_Ut[2] = RB.m_Up[2] + du[2]; // next, we do the rotations. We do this seperatly since // they need to be interpreted differently than displacements if (RB.m_prb == 0) { if (RB.m_bpofr) { // if all rotation components are known (prescribed or fixed) // evaluate net increment from load curve double Ut[3] = { 0 }; for (int j = 3; j<6; ++j) { if (RB.m_pDC[j]) { Ut[j - 3] = RB.m_pDC[j]->Value(); } } quatd qUt(vec3d(Ut[0], Ut[1], Ut[2])); RB.SetRotation(qUt); RB.m_Ut[3] = Ut[0]; RB.m_Ut[4] = Ut[1]; RB.m_Ut[5] = Ut[2]; } else { // rotation components are either free or fixed vec3d vUi(0, 0, 0); // initialize total increment so far vec3d vui(0, 0, 0); // initialize current increment if (lm[3] >= 0) { vUi.x = Ui[lm[3]]; vui.x = ui[lm[3]]; } if (lm[4] >= 0) { vUi.y = Ui[lm[4]]; vui.y = ui[lm[4]]; } if (lm[5] >= 0) { vUi.z = Ui[lm[5]]; vui.z = ui[lm[5]]; } quatd qUi(2 * atan(vUi.norm() / 2), vUi); // Cayley transform quatd qui(2 * atan(vui.norm() / 2), vui); // Cayley transform quatd qdu = qui*qUi; // quaternion of net increment qdu.MakeUnit(); // clean-up roundoff errors quatd Q = qdu*RB.m_qp; Q.MakeUnit(); // update at the current time step RB.SetRotation(Q); // update RB rotations vec3d vUt = Q.GetRotationVector(); RB.m_Ut[3] = vUt.x; RB.m_Ut[4] = vUt.y; RB.m_Ut[5] = vUt.z; } } } // Newmark rule FETimeInfo& timeInfo = GetFEModel()->GetTime(); double alpham = timeInfo.alpham; double beta = timeInfo.beta; double gamma = timeInfo.gamma; double dt = timeInfo.timeIncrement; double a = 1.0 / (beta*dt); double b = a / dt; double c = 1.0 - 0.5 / beta; for (int i = 0; i<nrb; ++i) { // get the rigid body FERigidBody& RB = *fem.GetRigidBody(i); // acceleration and velocity of center of mass RB.m_at = (RB.m_rt - RB.m_rp)*b - RB.m_vp*a + RB.m_ap*c; RB.m_vt = RB.m_vp + (RB.m_ap*(1.0 - gamma) + RB.m_at*gamma)*dt; // angular acceleration and velocity of rigid body quatd q = RB.GetRotation()*RB.m_qp.Inverse(); q.MakeUnit(); vec3d vq = q.GetVector()*(2 * tan(q.GetAngle() / 2)); // Cayley transform RB.m_wt = vq*(a*gamma) - RB.m_wp + (RB.m_wp + RB.m_alp*dt / 2.)*(2 - gamma / beta); q.RotateVector(RB.m_wt); RB.m_alt = vq*b - RB.m_wp*a + RB.m_alp*c; q.RotateVector(RB.m_alt); // evaluate mass moment of inertia at t mat3d Rt = RB.GetRotation().RotationMatrix(); mat3ds Jt = (Rt*RB.m_moi*Rt.transpose()).sym(); // evaluate angular momentum and its rate of change at current time RB.m_ht = Jt*RB.m_wt; RB.m_dht = (RB.m_ht - RB.m_hp)/(gamma*dt) + RB.m_dhp*(1-1./gamma); } // update the mesh' nodes fem.UpdateRigidMesh(); // Since the rigid nodes are repositioned we need to update the displacement DOFS FEMesh& mesh = m_fem->GetMesh(); int N = mesh.Nodes(); for (int i = 0; i<N; ++i) { FENode& node = mesh.Node(i); if (node.m_rid >= 0) { vec3d ut = node.m_rt - node.m_r0; node.set_vec3d(m_dofX, m_dofY, m_dofZ, ut); if (node.HasFlags(FENode::SHELL) && node.HasFlags(FENode::RIGID_CLAMP)) { // get the rigid body FERigidBody& RB = *fem.GetRigidBody(node.m_rid); // evaluate the director in the current configuration vec3d d = RB.GetRotation()*node.m_d0 - node.m_d0; // evaluate the back face displacement increments node.set_vec3d(m_dofSX, m_dofSY, m_dofSZ, ut - d); } } } } //----------------------------------------------------------------------------- //! evaluate inertia forces void FERigidSolverNew::InertialForces(FEGlobalVector& R, const FETimeInfo& timeInfo) { // Newmark rule double alpham = timeInfo.alpham; if (m_fem == nullptr) return; FEMechModel& fem = *m_fem; int nrb = fem.RigidBodies(); // calculate rigid body inertial forces for (int i = 0; i<nrb; ++i) { FERigidBody& RB = *fem.GetRigidBody(i); // 6 dofs per rigid body vector<double> fe(6); vector<int> LM(6); // rate of change of linear momentum = mass*acceleration vec3d F = (RB.m_at*alpham + RB.m_ap*(1-alpham))*RB.m_mass; fe[0] = -F.x; fe[1] = -F.y; fe[2] = -F.z; // evaluate mass moment of inertia at t and tp mat3d Rt = RB.GetRotation().RotationMatrix(); mat3ds Jt = (Rt*RB.m_moi*Rt.transpose()).sym(); RB.m_ht = Jt*RB.m_wt; // evaluate rate of change of angular momentum RB.m_dht = (RB.m_wt ^ RB.m_ht) + Jt*RB.m_alt; vec3d M = (RB.m_dht*alpham + RB.m_dhp*(1-alpham)); fe[3] = -M.x; fe[4] = -M.y; fe[5] = -M.z; // pack the equation numbers LM[0] = RB.m_LM[0]; LM[1] = RB.m_LM[1]; LM[2] = RB.m_LM[2]; LM[3] = RB.m_LM[3]; LM[4] = RB.m_LM[4]; LM[5] = RB.m_LM[5]; R.Assemble(LM, fe); } }
C++
3D
febiosoftware/FEBio
FEBioMech/FEDamageNeoHookean.h
.h
2,637
76
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #pragma once #include "FEElasticMaterial.h" #include "FEDamageMaterialPoint.h" //----------------------------------------------------------------------------- // This material is a first attempt to include damage in hyper-elastic materials. // It assumes the simple damage model as defined in Simo, CMAME 60 (1987), 153-173 //----------------------------------------------------------------------------- class FEDamageNeoHookean : public FEElasticMaterial { public: FEDamageNeoHookean(FEModel* pfem); public: double m_E; //!< Young's modulus double m_v; //!< Poisson's ratio double m_alpha; //!< damage parameter alpha double m_beta; //!< damage parameter beta protected: double m_lam; double m_mu; public: //! calculate stress at material point virtual mat3ds Stress(FEMaterialPoint& pt) override; //! calculate tangent stiffness at material point virtual tens4ds Tangent(FEMaterialPoint& pt) override; //! calculate strain energy density at material point virtual double StrainEnergyDensity(FEMaterialPoint& pt) override; //! data initialization and checking bool Init() override; // returns a pointer to a new material point object FEMaterialPointData* CreateMaterialPointData() override; // calculate damage reduction factor double Damage(FEMaterialPoint& pt); // declare the parameter list DECLARE_FECORE_CLASS(); };
Unknown
3D
febiosoftware/FEBio
FEBioMech/FEElasticMaterialPoint.cpp
.cpp
14,926
421
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #include "stdafx.h" #include "FEElasticMaterialPoint.h" //----------------------------------------------------------------------------- FEElasticMaterialPoint::FEElasticMaterialPoint(FEMaterialPointData* mp) : FEMaterialPointData(mp) { m_F.unit(); m_J = 1; m_s.zero(); m_v = m_a = vec3d(0, 0, 0); m_buncoupled = false; m_Wt = m_Wp = 0; m_p = 0; } //----------------------------------------------------------------------------- FEMaterialPointData* FEElasticMaterialPoint::Copy() { FEElasticMaterialPoint* pt = new FEElasticMaterialPoint(*this); if (m_pNext) pt->m_pNext = m_pNext->Copy(); return pt; } //----------------------------------------------------------------------------- void FEElasticMaterialPoint::Init() { m_F.unit(); m_J = 1; m_s.zero(); m_v = m_a = vec3d(0, 0, 0); m_L.zero(); m_Wt = m_Wp = 0; m_p = 0; // don't forget to initialize the base class FEMaterialPointData::Init(); } //----------------------------------------------------------------------------- void FEElasticMaterialPoint::Serialize(DumpStream& ar) { FEMaterialPointData::Serialize(ar); ar & m_F & m_J & m_s & m_v & m_a & m_L & m_Wt & m_Wp & m_p; ar & m_buncoupled; } //----------------------------------------------------------------------------- //! Calculates the right Cauchy-Green tensor at the current material point mat3ds FEElasticMaterialPoint::RightCauchyGreen() const { // get the right Cauchy-Green tensor // C = Ft*F const mat3d& F = m_F; mat3ds C; C.xx() = F[0][0]*F[0][0]+F[1][0]*F[1][0]+F[2][0]*F[2][0]; // = C[0][0] C.yy() = F[0][1]*F[0][1]+F[1][1]*F[1][1]+F[2][1]*F[2][1]; // = C[1][1] C.zz() = F[0][2]*F[0][2]+F[1][2]*F[1][2]+F[2][2]*F[2][2]; // = C[2][2] C.xy() = F[0][0]*F[0][1]+F[1][0]*F[1][1]+F[2][0]*F[2][1]; // = C[0][1] C.yz() = F[0][1]*F[0][2]+F[1][1]*F[1][2]+F[2][1]*F[2][2]; // = C[1][2] C.xz() = F[0][0]*F[0][2]+F[1][0]*F[1][2]+F[2][0]*F[2][2]; // = C[0][2] return C; } //----------------------------------------------------------------------------- //! Calculates the left Cauchy-Green tensor at the current material point mat3ds FEElasticMaterialPoint::LeftCauchyGreen() const { // get the left Cauchy-Green tensor // b = F*Ft const mat3d& F = m_F; mat3ds b; b.xx() = F[0][0]*F[0][0]+F[0][1]*F[0][1]+F[0][2]*F[0][2]; // = b[0][0] b.yy() = F[1][0]*F[1][0]+F[1][1]*F[1][1]+F[1][2]*F[1][2]; // = b[1][1] b.zz() = F[2][0]*F[2][0]+F[2][1]*F[2][1]+F[2][2]*F[2][2]; // = b[2][2] b.xy() = F[0][0]*F[1][0]+F[0][1]*F[1][1]+F[0][2]*F[1][2]; // = b[0][1] b.yz() = F[1][0]*F[2][0]+F[1][1]*F[2][1]+F[1][2]*F[2][2]; // = b[1][2] b.xz() = F[0][0]*F[2][0]+F[0][1]*F[2][1]+F[0][2]*F[2][2]; // = b[0][2] return b; } //----------------------------------------------------------------------------- //! Calculates the right Cauchy-Green tensor at the current material point mat3ds FEElasticMaterialPoint::DevRightCauchyGreen() const { double Jm23 = pow(m_J, -2.0/3.0); // get the deviatoric right Cauchy-Green tensor // C = Ft*F const mat3d& F = m_F; mat3ds C; C.xx() = Jm23*(F[0][0]*F[0][0]+F[1][0]*F[1][0]+F[2][0]*F[2][0]); // = C[0][0] C.yy() = Jm23*(F[0][1]*F[0][1]+F[1][1]*F[1][1]+F[2][1]*F[2][1]); // = C[1][1] C.zz() = Jm23*(F[0][2]*F[0][2]+F[1][2]*F[1][2]+F[2][2]*F[2][2]); // = C[2][2] C.xy() = Jm23*(F[0][0]*F[0][1]+F[1][0]*F[1][1]+F[2][0]*F[2][1]); // = C[0][1] C.yz() = Jm23*(F[0][1]*F[0][2]+F[1][1]*F[1][2]+F[2][1]*F[2][2]); // = C[1][2] C.xz() = Jm23*(F[0][0]*F[0][2]+F[1][0]*F[1][2]+F[2][0]*F[2][2]); // = C[0][2] return C; } //----------------------------------------------------------------------------- //! Calculates the left Cauchy-Green tensor at the current material point mat3ds FEElasticMaterialPoint::DevLeftCauchyGreen() const { double Jm23 = pow(m_J, -2.0/3.0); // get the left Cauchy-Green tensor // b = F*Ft const mat3d& F = m_F; mat3ds b; b.xx() = Jm23*(F[0][0]*F[0][0]+F[0][1]*F[0][1]+F[0][2]*F[0][2]); // = b[0][0] b.yy() = Jm23*(F[1][0]*F[1][0]+F[1][1]*F[1][1]+F[1][2]*F[1][2]); // = b[1][1] b.zz() = Jm23*(F[2][0]*F[2][0]+F[2][1]*F[2][1]+F[2][2]*F[2][2]); // = b[2][2] b.xy() = Jm23*(F[0][0]*F[1][0]+F[0][1]*F[1][1]+F[0][2]*F[1][2]); // = b[0][1] b.yz() = Jm23*(F[1][0]*F[2][0]+F[1][1]*F[2][1]+F[1][2]*F[2][2]); // = b[1][2] b.xz() = Jm23*(F[0][0]*F[2][0]+F[0][1]*F[2][1]+F[0][2]*F[2][2]); // = b[0][2] return b; } //----------------------------------------------------------------------------- //! Calculates the right stretch tensor at the current material point mat3ds FEElasticMaterialPoint::RightStretch() const { // get the right stretch tensor mat3ds C = RightCauchyGreen(); double l2[3]; vec3d v[3]; C.eigen2(l2, v); mat3ds U = dyad(v[0])*sqrt(l2[0]) + dyad(v[1])*sqrt(l2[1]) + dyad(v[2])*sqrt(l2[2]); return U; } //----------------------------------------------------------------------------- //! Calculates the left stretch tensor at the current material point mat3ds FEElasticMaterialPoint::LeftStretch() const { // get the left stretch tensor mat3ds B = LeftCauchyGreen(); double l2[3]; vec3d v[3]; B.eigen2(l2, v); mat3ds V = dyad(v[0])*sqrt(l2[0]) + dyad(v[1])*sqrt(l2[1]) + dyad(v[2])*sqrt(l2[2]); return V; } //----------------------------------------------------------------------------- //! Calculates the right stretch tensor at the current material point mat3ds FEElasticMaterialPoint::RightStretchInverse() const { // get the right stretch tensor mat3ds C = RightCauchyGreen(); double l2[3]; vec3d v[3]; C.eigen2(l2, v); mat3ds U = dyad(v[0])/sqrt(l2[0]) + dyad(v[1])/sqrt(l2[1]) + dyad(v[2])/sqrt(l2[2]); return U; } //----------------------------------------------------------------------------- //! Calculates the left stretch tensor at the current material point mat3ds FEElasticMaterialPoint::LeftStretchInverse() const { // get the left stretch tensor mat3ds B = LeftCauchyGreen(); double l2[3]; vec3d v[3]; B.eigen2(l2, v); mat3ds V = dyad(v[0])/sqrt(l2[0]) + dyad(v[1])/sqrt(l2[1]) + dyad(v[2])/sqrt(l2[2]); return V; } //----------------------------------------------------------------------------- //! Calculates the right stretch tensor at the current material point mat3ds FEElasticMaterialPoint::RightHencky() const { // get the right stretch tensor mat3ds C = RightCauchyGreen(); double l2[3]; vec3d v[3]; C.eigen2(l2, v); mat3ds H = dyad(v[0])*log(l2[0])/2 + dyad(v[1])*log(l2[1])/2 + dyad(v[2])*log(l2[2])/2; return H; } //----------------------------------------------------------------------------- //! Calculates the left stretch tensor at the current material point mat3ds FEElasticMaterialPoint::LeftHencky() const { // get the left stretch tensor mat3ds B = LeftCauchyGreen(); double l2[3]; vec3d v[3]; B.eigen2(l2, v); mat3ds h = dyad(v[0])*log(l2[0])/2 + dyad(v[1])*log(l2[1])/2 + dyad(v[2])*log(l2[2])/2; return h; } //----------------------------------------------------------------------------- //! Calculates the rotation tensor at the current material point mat3d FEElasticMaterialPoint::Rotation() const { return m_F*RightStretchInverse(); } //----------------------------------------------------------------------------- //! Calculates the Lagrangian strain at the current material point mat3ds FEElasticMaterialPoint::Strain() const { // get the right Cauchy-Green tensor // C = Ft*F const mat3d& F = m_F; mat3ds C; C.xx() = F[0][0]*F[0][0]+F[1][0]*F[1][0]+F[2][0]*F[2][0]; // = C[0][0] C.yy() = F[0][1]*F[0][1]+F[1][1]*F[1][1]+F[2][1]*F[2][1]; // = C[1][1] C.zz() = F[0][2]*F[0][2]+F[1][2]*F[1][2]+F[2][2]*F[2][2]; // = C[2][2] C.xy() = F[0][0]*F[0][1]+F[1][0]*F[1][1]+F[2][0]*F[2][1]; // = C[0][1] C.yz() = F[0][1]*F[0][2]+F[1][1]*F[1][2]+F[2][1]*F[2][2]; // = C[1][2] C.xz() = F[0][0]*F[0][2]+F[1][0]*F[1][2]+F[2][0]*F[2][2]; // = C[0][2] // calculate the Lagrangian strain // E = 1/2*(C - 1) mat3ds E = (C - mat3dd(1))*0.5; return E; } //----------------------------------------------------------------------------- //! Calculates the small-strain tensor from the deformation gradient mat3ds FEElasticMaterialPoint::SmallStrain() const { // caculate small strain tensor const mat3d& F = m_F; return mat3ds(F[0][0] - 1.0, F[1][1] - 1.0, F[2][2] - 1.0, 0.5*(F[0][1] + F[1][0]), 0.5*(F[0][2] + F[2][0]), 0.5*(F[1][2] + F[2][1])); } //----------------------------------------------------------------------------- //! Calculates the Almansi strain tensor mat3ds FEElasticMaterialPoint::AlmansiStrain() const { // caculate small strain tensor mat3ds B = LeftCauchyGreen(); return (mat3dd(1)-B.inverse())/2.; } //----------------------------------------------------------------------------- //! Calculates the 2nd PK stress from the Cauchy stress stored in the point mat3ds FEElasticMaterialPoint::pull_back(const mat3ds& A) const { const mat3d& F = m_F; double J = m_J; mat3d Fi = F.inverse(); mat3d P = Fi*A; return mat3ds(J*(P[0][0]*Fi[0][0]+P[0][1]*Fi[0][1]+P[0][2]*Fi[0][2]), J*(P[1][0]*Fi[1][0]+P[1][1]*Fi[1][1]+P[1][2]*Fi[1][2]), J*(P[2][0]*Fi[2][0]+P[2][1]*Fi[2][1]+P[2][2]*Fi[2][2]), J*(P[0][0]*Fi[1][0]+P[0][1]*Fi[1][1]+P[0][2]*Fi[1][2]), J*(P[1][0]*Fi[2][0]+P[1][1]*Fi[2][1]+P[1][2]*Fi[2][2]), J*(P[0][0]*Fi[2][0]+P[0][1]*Fi[2][1]+P[0][2]*Fi[2][2])); } //----------------------------------------------------------------------------- mat3ds FEElasticMaterialPoint::push_forward(const mat3ds& A) const { const mat3d& F = m_F; mat3d P = F*A; double Ji = 1 / m_J; return mat3ds(Ji*(P[0][0]*F[0][0]+P[0][1]*F[0][1]+P[0][2]*F[0][2]), Ji*(P[1][0]*F[1][0]+P[1][1]*F[1][1]+P[1][2]*F[1][2]), Ji*(P[2][0]*F[2][0]+P[2][1]*F[2][1]+P[2][2]*F[2][2]), Ji*(P[0][0]*F[1][0]+P[0][1]*F[1][1]+P[0][2]*F[1][2]), Ji*(P[1][0]*F[2][0]+P[1][1]*F[2][1]+P[1][2]*F[2][2]), Ji*(P[0][0]*F[2][0]+P[0][1]*F[2][1]+P[0][2]*F[2][2])); } //----------------------------------------------------------------------------- // This function converts the spatial tangent to the material tangent tens4ds FEElasticMaterialPoint::pull_back(const tens4ds& c) const { const mat3d& F = m_F; mat3d Fi = F.inverse(); double J = F.det(); double C[6][6] = {0}; for (int i=0; i<3; ++i) for (int j=0; j<3; ++j) for (int k=0; k<3; ++k) for (int l=0; l<3; ++l) { C[0][0] += J*Fi[0][i]*Fi[0][j]*Fi[0][k]*Fi[0][l]*c(i,j,k,l); C[0][1] += J*Fi[0][i]*Fi[0][j]*Fi[1][k]*Fi[1][l]*c(i,j,k,l); C[0][2] += J*Fi[0][i]*Fi[0][j]*Fi[2][k]*Fi[2][l]*c(i,j,k,l); C[0][3] += J*Fi[0][i]*Fi[0][j]*Fi[0][k]*Fi[1][l]*c(i,j,k,l); C[0][4] += J*Fi[0][i]*Fi[0][j]*Fi[1][k]*Fi[2][l]*c(i,j,k,l); C[0][5] += J*Fi[0][i]*Fi[0][j]*Fi[0][k]*Fi[2][l]*c(i,j,k,l); C[1][1] += J*Fi[1][i]*Fi[1][j]*Fi[1][k]*Fi[1][l]*c(i,j,k,l); C[1][2] += J*Fi[1][i]*Fi[1][j]*Fi[2][k]*Fi[2][l]*c(i,j,k,l); C[1][3] += J*Fi[1][i]*Fi[1][j]*Fi[0][k]*Fi[1][l]*c(i,j,k,l); C[1][4] += J*Fi[1][i]*Fi[1][j]*Fi[1][k]*Fi[2][l]*c(i,j,k,l); C[1][5] += J*Fi[1][i]*Fi[1][j]*Fi[0][k]*Fi[2][l]*c(i,j,k,l); C[2][2] += J*Fi[2][i]*Fi[2][j]*Fi[2][k]*Fi[2][l]*c(i,j,k,l); C[2][3] += J*Fi[2][i]*Fi[2][j]*Fi[0][k]*Fi[1][l]*c(i,j,k,l); C[2][4] += J*Fi[2][i]*Fi[2][j]*Fi[1][k]*Fi[2][l]*c(i,j,k,l); C[2][5] += J*Fi[2][i]*Fi[2][j]*Fi[0][k]*Fi[2][l]*c(i,j,k,l); C[3][3] += J*Fi[0][i]*Fi[1][j]*Fi[0][k]*Fi[1][l]*c(i,j,k,l); C[3][4] += J*Fi[0][i]*Fi[1][j]*Fi[1][k]*Fi[2][l]*c(i,j,k,l); C[3][5] += J*Fi[0][i]*Fi[1][j]*Fi[0][k]*Fi[2][l]*c(i,j,k,l); C[4][4] += J*Fi[1][i]*Fi[2][j]*Fi[1][k]*Fi[2][l]*c(i,j,k,l); C[4][5] += J*Fi[1][i]*Fi[2][j]*Fi[0][k]*Fi[2][l]*c(i,j,k,l); C[5][5] += J*Fi[0][i]*Fi[2][j]*Fi[0][k]*Fi[2][l]*c(i,j,k,l); } return tens4ds(C); } //----------------------------------------------------------------------------- // This function converts the material tangent to the spatial tangent tens4ds FEElasticMaterialPoint::push_forward(const tens4ds& C) const { const mat3d& F = m_F; double Ji = 1/F.det(); double c[6][6] = {0}; for (int i=0; i<3; ++i) for (int j=0; j<3; ++j) for (int k=0; k<3; ++k) for (int l=0; l<3; ++l) { c[0][0] += Ji*F[0][i]*F[0][j]*F[0][k]*F[0][l]*C(i,j,k,l); c[0][1] += Ji*F[0][i]*F[0][j]*F[1][k]*F[1][l]*C(i,j,k,l); c[0][2] += Ji*F[0][i]*F[0][j]*F[2][k]*F[2][l]*C(i,j,k,l); c[0][3] += Ji*F[0][i]*F[0][j]*F[0][k]*F[1][l]*C(i,j,k,l); c[0][4] += Ji*F[0][i]*F[0][j]*F[1][k]*F[2][l]*C(i,j,k,l); c[0][5] += Ji*F[0][i]*F[0][j]*F[0][k]*F[2][l]*C(i,j,k,l); c[1][1] += Ji*F[1][i]*F[1][j]*F[1][k]*F[1][l]*C(i,j,k,l); c[1][2] += Ji*F[1][i]*F[1][j]*F[2][k]*F[2][l]*C(i,j,k,l); c[1][3] += Ji*F[1][i]*F[1][j]*F[0][k]*F[1][l]*C(i,j,k,l); c[1][4] += Ji*F[1][i]*F[1][j]*F[1][k]*F[2][l]*C(i,j,k,l); c[1][5] += Ji*F[1][i]*F[1][j]*F[0][k]*F[2][l]*C(i,j,k,l); c[2][2] += Ji*F[2][i]*F[2][j]*F[2][k]*F[2][l]*C(i,j,k,l); c[2][3] += Ji*F[2][i]*F[2][j]*F[0][k]*F[1][l]*C(i,j,k,l); c[2][4] += Ji*F[2][i]*F[2][j]*F[1][k]*F[2][l]*C(i,j,k,l); c[2][5] += Ji*F[2][i]*F[2][j]*F[0][k]*F[2][l]*C(i,j,k,l); c[3][3] += Ji*F[0][i]*F[1][j]*F[0][k]*F[1][l]*C(i,j,k,l); c[3][4] += Ji*F[0][i]*F[1][j]*F[1][k]*F[2][l]*C(i,j,k,l); c[3][5] += Ji*F[0][i]*F[1][j]*F[0][k]*F[2][l]*C(i,j,k,l); c[4][4] += Ji*F[1][i]*F[2][j]*F[1][k]*F[2][l]*C(i,j,k,l); c[4][5] += Ji*F[1][i]*F[2][j]*F[0][k]*F[2][l]*C(i,j,k,l); c[5][5] += Ji*F[0][i]*F[2][j]*F[0][k]*F[2][l]*C(i,j,k,l); } return tens4ds(c); }
C++
3D
febiosoftware/FEBio
FEBioMech/FECubicCLE.cpp
.cpp
7,726
241
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #include "stdafx.h" #include "FECubicCLE.h" #include <FECore/log.h> //----------------------------------------------------------------------------- // define the material parameters BEGIN_FECORE_CLASS(FECubicCLE, FEElasticMaterial) ADD_PARAMETER(m_lp1, "lp1")->setUnits(UNIT_PRESSURE); ADD_PARAMETER(m_lm1, "lm1")->setUnits(UNIT_PRESSURE); ADD_PARAMETER(m_l2 , "l2")->setUnits(UNIT_PRESSURE); ADD_PARAMETER(m_mu , FE_RANGE_GREATER_OR_EQUAL(0.0), "mu")->setUnits(UNIT_PRESSURE); ADD_PROPERTY(m_Q, "mat_axis")->SetFlags(FEProperty::Optional); END_FECORE_CLASS(); //----------------------------------------------------------------------------- //! Check material parameters. bool FECubicCLE::Validate() { if (FEElasticMaterial::Validate() == false) return false; // Evaluate Lame coefficients double lam[3][3]; double mu[3]; mu[0] = m_mu; mu[1] = m_mu; mu[2] = m_mu; lam[0][0] = m_lm1; lam[0][1] = m_l2 ; lam[0][2] = m_l2; lam[1][0] = m_l2 ; lam[1][1] = m_lm1; lam[1][2] = m_l2; lam[2][0] = m_l2 ; lam[2][1] = m_l2 ; lam[2][2] = m_lm1; // check that stiffness matrix is positive definite mat3ds c(lam[0][0]+2*mu[0],lam[1][1]+2*mu[1],lam[2][2]+2*mu[2],lam[0][1],lam[1][2],lam[0][2]); double l[3]; c.exact_eigen(l); if ((l[0] < 0) || (l[1] < 0) || (l[2] < 0)) { feLogError("Stiffness matrix is not positive definite."); return false; } // repeat check with all tensile diagonal first lamé constants lam[0][0] = m_lp1; lam[1][1] = m_lp1; lam[2][2] = m_lp1; // check that compliance matrix is positive definite c = mat3ds(lam[0][0]+2*mu[0],lam[1][1]+2*mu[1],lam[2][2]+2*mu[2],lam[0][1],lam[1][2],lam[0][2]); c.exact_eigen(l); if ((l[0] < 0) || (l[1] < 0) || (l[2] < 0)) { feLogError("Stiffness matrix is not positive definite."); return false; } return true; } //----------------------------------------------------------------------------- //! Calculates the stress mat3ds FECubicCLE::Stress(FEMaterialPoint& mp) { FEElasticMaterialPoint& pt = *mp.ExtractData<FEElasticMaterialPoint>(); // Evaluate Lame coefficients double lam[3][3]; double mu[3]; mu[0] = m_mu; mu[1] = m_mu; mu[2] = m_mu; lam[0][0] = m_lm1; lam[0][1] = m_l2 ; lam[0][2] = m_l2; lam[1][0] = m_l2 ; lam[1][1] = m_lm1; lam[1][2] = m_l2; lam[2][0] = m_l2 ; lam[2][1] = m_l2 ; lam[2][2] = m_lm1; int i,j; vec3d a0; // texture direction in reference configuration mat3ds A0[3]; // texture tensor in reference configuration double AE[3]; // E:A mat3ds E = pt.Strain(); mat3d F = pt.m_F; double J = pt.m_J; // get the local coordinate systems mat3d Q = GetLocalCS(mp); for (i=0; i<3; i++) { // Perform sum over all three texture directions // Copy the texture direction in the reference configuration to a0 a0.x = Q[0][i]; a0.y = Q[1][i]; a0.z = Q[2][i]; A0[i] = dyad(a0); AE[i] = a0*(E*a0); } lam[0][0] = (AE[0] >= 0) ? m_lp1 : m_lm1; lam[1][1] = (AE[1] >= 0) ? m_lp1 : m_lm1; lam[2][2] = (AE[2] >= 0) ? m_lp1 : m_lm1; mat3ds s; s.zero(); for (i=0; i<3; ++i) { s += (A0[i]*E).sym()*(mu[i]); for (j=0; j<3; ++j) { s += A0[j]*(lam[i][j]*AE[i]); } } s = (F*s*F.transpose()).sym()/J; return s; } //----------------------------------------------------------------------------- //! Calculates the elasticity tensor tens4ds FECubicCLE::Tangent(FEMaterialPoint& mp) { FEElasticMaterialPoint& pt = *mp.ExtractData<FEElasticMaterialPoint>(); // Evaluate Lame coefficients double lam[3][3]; double mu[3]; mu[0] = m_mu; mu[1] = m_mu; mu[2] = m_mu; lam[0][0] = m_lm1; lam[0][1] = m_l2 ; lam[0][2] = m_l2; lam[1][0] = m_l2 ; lam[1][1] = m_lm1; lam[1][2] = m_l2; lam[2][0] = m_l2 ; lam[2][1] = m_l2 ; lam[2][2] = m_lm1; int i,j; vec3d a0; // texture direction in reference configuration mat3ds A[3]; // texture tensor in current configuration double AE[3]; // E:A mat3ds E = pt.Strain(); mat3d F = pt.m_F; double J = pt.m_J; // get the local coordinate systems mat3d Q = GetLocalCS(mp); for (i=0; i<3; i++) { // Perform sum over all three texture directions // Copy the texture direction in the reference configuration to a0 a0.x = Q[0][i]; a0.y = Q[1][i]; a0.z = Q[2][i]; A[i] = dyad(F*a0); AE[i] = a0*(E*a0); } lam[0][0] = (AE[0] >= 0) ? m_lp1 : m_lm1; lam[1][1] = (AE[1] >= 0) ? m_lp1 : m_lm1; lam[2][2] = (AE[2] >= 0) ? m_lp1 : m_lm1; tens4ds c; c.zero(); mat3ds B = pt.LeftCauchyGreen(); for (i=0; i<3; ++i) { c += dyad4s(A[i], B)*mu[i]; for (j=0; j<3; ++j) { c += dyad1s(A[i],A[j])*lam[i][j]/2; } } c /= J; return c; } //----------------------------------------------------------------------------- //! Calculates the strain energy density double FECubicCLE::StrainEnergyDensity(FEMaterialPoint& mp) { FEElasticMaterialPoint& pt = *mp.ExtractData<FEElasticMaterialPoint>(); // Evaluate Lame coefficients double lam[3][3]; double mu[3]; mu[0] = m_mu; mu[1] = m_mu; mu[2] = m_mu; lam[0][0] = m_lm1; lam[0][1] = m_l2 ; lam[0][2] = m_l2; lam[1][0] = m_l2 ; lam[1][1] = m_lm1; lam[1][2] = m_l2; lam[2][0] = m_l2 ; lam[2][1] = m_l2 ; lam[2][2] = m_lm1; int i,j; vec3d a0; // texture direction in reference configuration mat3ds A0; // texture tensor in reference configuration double AE[3], AE2[3]; // Ka mat3ds E = pt.Strain(); // get the local coordinate systems mat3d Q = GetLocalCS(mp); for (i=0; i<3; i++) { // Perform sum over all three texture directions // Copy the texture direction in the reference configuration to a0 a0.x = Q[0][i]; a0.y = Q[1][i]; a0.z = Q[2][i]; A0 = dyad(a0); AE[i] = a0*(E*a0); AE2[i] = a0*(E*E*a0); } lam[0][0] = (AE[0] >= 0) ? m_lp1 : m_lm1; lam[1][1] = (AE[1] >= 0) ? m_lp1 : m_lm1; lam[2][2] = (AE[2] >= 0) ? m_lp1 : m_lm1; double W = 0; for (i=0; i<3; ++i) { W += AE2[i]*mu[i]; for (j=0; j<3; ++j) { W += AE[i]*AE[j]*lam[i][j]/2; } } return W; }
C++
3D
febiosoftware/FEBio
FEBioMech/FETransIsoMREstrada.h
.h
2,831
77
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2022 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #pragma once #include "FEUncoupledMaterial.h" #include "FEUncoupledFiberExpLinear.h" #include "FEActiveContractionMaterial.h" #include <FECore/FEModelParam.h> //----------------------------------------------------------------------------- //! Transversely Isotropic Mooney-Rivlin-Estrada material based on doi: 10.1115/1.4044030 //! This material has an isotopric Mooney-Rivlin basis and single preferred //! fiber direction. class FETransIsoMREstrada: public FEUncoupledMaterial { public: enum { MAX_TERMS = 3 }; public: FETransIsoMREstrada(FEModel* pfem); public: FEParamDouble c1; //!< Mooney-Rivlin coefficient C1 FEParamDouble c2; //!< Mooney-Rivlin coefficient C2 public: //! calculate deviatoric stress at material point mat3ds DevStress(FEMaterialPoint& pt) override; //! calculate deviatoric tangent stiffness at material point tens4ds DevTangent(FEMaterialPoint& pt) override; //! calculate deviatoric strain energy density at material point double DevStrainEnergyDensity(FEMaterialPoint& pt) override; //! create material point data FEMaterialPointData* CreateMaterialPointData() override; // update force-velocity material point void UpdateSpecializedMaterialPoints(FEMaterialPoint& mp, const FETimeInfo& tp) override; protected: FEFiberExpLinearUC m_fib; FEActiveContractionMaterial* m_ac; FEVec3dValuator* m_fiber; // declare parameter list DECLARE_FECORE_CLASS(); };
Unknown
3D
febiosoftware/FEBio
FEBioMech/FENewtonianViscousSolidUC.h
.h
2,103
57
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #pragma once #include "FEUncoupledMaterial.h" class FENewtonianViscousSolidUC : public FEUncoupledMaterial { public: FENewtonianViscousSolidUC(FEModel* pfem); public: double m_kappa; //!< bulk viscosity double m_mu; //!< shear viscosity bool m_secant_tangent; //!< flag for using secant tangent calculation public: //! calculate stress at material point mat3ds DevStress(FEMaterialPoint& pt) override; //! calculate tangent stiffness at material point tens4ds DevTangent(FEMaterialPoint& pt) override; //! calculate strain energy density at material point double DevStrainEnergyDensity(FEMaterialPoint& pt) override; bool UseSecantTangent() override { return m_secant_tangent; } // declare the parameter list DECLARE_FECORE_CLASS(); };
Unknown
3D
febiosoftware/FEBio
FEBioMech/FESurfaceAttractionBodyForce.h
.h
2,181
64
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #pragma once #include "FEBodyForce.h" #include <FECore/FESurface.h> //----------------------------------------------------------------------------- //! This class defines a surface attraction body force class FESurfaceAttractionBodyForce : public FEBodyForce { public: FESurfaceAttractionBodyForce(FEModel* pfem); vec3d force(FEMaterialPoint& mp) override; double divforce(FEMaterialPoint& mp) override; mat3d stiffness(FEMaterialPoint& mp) override; // initialize bool Init() override; private: vector< vector<vec3d> > m_q; //!< projection points public: FESurface* m_s; //!< the attractive surface public: double m_blt; //!< boundary layer thickness double m_bsf; //!< body force scale factor double m_stol; //!< search tolerance double m_sradius; //!< search radius DECLARE_FECORE_CLASS(); };
Unknown
3D
febiosoftware/FEBio
FEBioMech/FERigidBody.h
.h
5,222
153
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #pragma once #include <FECore/fecore_enum.h> #include <FECore/vec3d.h> #include <FECore/quatd.h> #include <FECore/FECoreBase.h> #include "febiomech_api.h" //----------------------------------------------------------------------------- class FEModel; class FERigidPrescribedBC; //----------------------------------------------------------------------------- //! rigid body class //! \todo perhaps the rigid body should store a list of domains it uses. //! That way, we can have multiple domains per RB using multiple //! materials. class FEBIOMECH_API FERigidBody : public FECoreBase { FECORE_SUPER_CLASS(FEOBJECT_ID) FECORE_BASE_CLASS(FERigidBody) public: // Constructor FERigidBody(FEModel* pfem); //! desctructor virtual ~FERigidBody(); //! Set the center of mass directly void SetCOM(vec3d rc); //! Update the mass of the rigid body void UpdateMass(); //! Update total mass and center of mass void UpdateCOM(); //! Update the moment of intertia void UpdateMOI(); //! reset rigid body data void Reset(); //! initialize data bool Init() override; //! serialize data to archive void Serialize(DumpStream& ar) override; //! get the material ID int GetMaterialID() { return m_mat; } //! incremental compound rotation from Cayley transform vec3d CayleyIncrementalCompoundRotation(); public: const quatd& GetRotation() const { return m_qt; } quatd GetPreviousRotation() const { return m_qp; } void SetRotation(const quatd& q) { m_qt = q; m_qt.GetEuler(m_euler.x, m_euler.y, m_euler.z); } public: int m_nID; //!< ID of rigid body int m_mat; //!< material ID (TODO: Since rigid bodies can have multiple materials, I want to remove this) double m_mass; //!< total mass of rigid body mat3ds m_moi; //!< mass moment of inertia about center of mass vec3d m_Fr, m_Mr; //!< reaction force and torque vec3d m_Fp, m_Mp; //!< reaction force and torque at the end of the previous step vec3d m_r0; //!< initial position of rigid body vec3d m_rp; //!< previous position of rigid body vec3d m_rt; //!< current position of rigid body vec3d m_vp; //!< previous velocity of rigid body vec3d m_vt; //!< current velocity of rigid body vec3d m_ap; //!< previous acceleration of rigid body vec3d m_at; //!< current acceleration of rigid body quatd m_qp; //!< previous orientation of rigid body private: // TODO: This is a hack!I only need this so I can access the euler angles directly from // the optimization module. Need to figure out a better way. quatd m_qt; //!< current orientation of rigid body vec3d m_euler; //!< Euler angles of rotation public: vec3d m_wp; //!< previous angular velocity of rigid body vec3d m_wt; //!< current angular velocity of rigid body vec3d m_alp; //!< previous angular acceleration of rigid body vec3d m_alt; //!< current angular acceleration of rigid body vec3d m_hp; //!< previous angular momentum vec3d m_ht; //!< current angular momentum vec3d m_dhp; //!< previous time rate of change of angular momentum vec3d m_dht; //!< current time rate of change of angular momentum int m_BC[6]; //!< DOF types int m_LM[6]; //!< dof equation numbers double m_Up[6]; //!< previous displacement/rotation vector double m_Ut[6]; //!< total displacement/rotation vector double m_du[6]; //!< incremental displacement vector double m_dul[6]; //!< displacement in local coordinates system bool m_bpofr; //!< flag for all or none of rotation dofs prescribed/fixed public: FERigidPrescribedBC* m_pDC[6]; //!< active displacement constraints FERigidBody* m_prb; //!< parent rigid body public: // return the helical axis relative to the ground void InstantaneousHelicalAxis(vec3d& omega, vec3d& s, double& tdot); void FiniteHelicalAxis(vec3d& omega, vec3d& s, double& tdot); public: DECLARE_FECORE_CLASS(); };
Unknown
3D
febiosoftware/FEBio
FEBioMech/FEPressureRobinBC.cpp
.cpp
5,587
168
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #include "stdafx.h" #include "FEPressureRobinBC.h" #include "FEBioMech.h" #include <FECore/FEFacetSet.h> #include <FECore/FEModel.h> //----------------------------------------------------------------------------- // Parameter block for pressure loads BEGIN_FECORE_CLASS(FEPressureRobinBC, FESurfaceLoad) ADD_PARAMETER(m_epsk , "spring_eps")->setUnits("P/L"); ADD_PARAMETER(m_epsc , "dashpot_eps")->setUnits("P.t/L"); ADD_PARAMETER(m_bshellb , "shell_bottom"); END_FECORE_CLASS() //----------------------------------------------------------------------------- //! constructor FEPressureRobinBC::FEPressureRobinBC(FEModel* pfem) : FESurfaceLoad(pfem) { m_epsk = 0.0; m_epsc = 0.0; m_bshellb = false; } //----------------------------------------------------------------------------- bool FEPressureRobinBC::Init() { FESurface& surf = GetSurface(); surf.SetShellBottom(m_bshellb); // get the degrees of freedom m_dof.Clear(); if (m_bshellb == false) { m_dof.AddVariable(FEBioMech::GetVariableName(FEBioMech::DISPLACEMENT)); } else { m_dof.AddVariable(FEBioMech::GetVariableName(FEBioMech::SHELL_DISPLACEMENT)); } if (m_dof.IsEmpty()) return false; return FESurfaceLoad::Init(); } //----------------------------------------------------------------------------- void FEPressureRobinBC::Update() { FETimeInfo tp = GetFEModel()->GetTime(); FESurface& surf = GetSurface(); for (int i=0; i<surf.Elements(); ++i) { FESurfaceElement& el = surf.Element(i); int nint = el.GaussPoints(); for (int n=0; n<nint; ++n) { FEMaterialPoint* mp = el.GetMaterialPoint(n); mp->Update(tp); } } surf.Update(tp); } //----------------------------------------------------------------------------- void FEPressureRobinBC::LoadVector(FEGlobalVector& R) { if (GetFEModel()->GetTime().currentTime == 0) return; double dt = GetFEModel()->GetTime().timeIncrement; // evaluate the integral FESurface& surf = GetSurface(); surf.LoadVector(R, m_dof, false, [&](FESurfaceMaterialPoint& pt, const FESurfaceDofShape& dof_a, std::vector<double>& val) { // evaluate pressure at this material point vec3d n = (pt.dxr ^ pt.dxs); double J = n.unit(); double epsk = m_epsk(pt); double epsc = m_epsc(pt); vec3d u = pt.m_rt - pt.m_r0; vec3d udot = (dt > 0) ? (pt.m_rt - pt.m_rp)/dt : vec3d(0,0,0); double un = u*n; double vn = udot*n; // prescribe a pressure only when the boundary is moving in the direction of the normal double p = (un > 0) ? epsk*un + epsc*vn : 0; if (m_bshellb) p = -p; // force vector vec3d t = -n*p; double Na = dof_a.shape; val[0] = Na*t.x*J; val[1] = Na*t.y*J; val[2] = Na*t.z*J; }); } //----------------------------------------------------------------------------- void FEPressureRobinBC::StiffnessMatrix(FELinearSystem& LS) { if (GetFEModel()->GetTime().currentTime == 0) return; double dt = GetFEModel()->GetTime().timeIncrement; // evaluate the integral FESurface& surf = GetSurface(); surf.LoadStiffness(LS, m_dof, m_dof, [&](FESurfaceMaterialPoint& pt, const FESurfaceDofShape& dof_a, const FESurfaceDofShape& dof_b, matrix& kab) { // evaluate pressure at this material point vec3d n = (pt.dxr ^ pt.dxs); double J = n.unit(); mat3dd I(1); double epsk = m_epsk(pt); double epsc = m_epsc(pt); vec3d u = pt.m_rt - pt.m_r0; vec3d udot = (dt > 0) ? (pt.m_rt - pt.m_rp)/dt : vec3d(0,0,0); double un = u*n; double vn = udot*n; double p = (un > 0) ? epsk*un + epsc*vn : 0; if (m_bshellb) p = -p; double Na = dof_a.shape; double dNar = dof_a.shape_deriv_r; double dNas = dof_a.shape_deriv_s; double Nb = dof_b.shape; double dNbr = dof_b.shape_deriv_r; double dNbs = dof_b.shape_deriv_s; mat3da Ab = mat3da(pt.dxs*(dNbr/J)-pt.dxr*(dNbs/J)); mat3d Kab = (n & n)*(J*Na*Nb)*(epsk+epsc/dt) +(n & (Ab*(u*epsk+udot*epsc))*(Na*J)) +(mat3da(pt.dxr*dNbs - pt.dxs*dNbr)*(Na*p)); // prescribe a pressure only when the boundary is moving in the direction of the normal if (un > 0) kab.set(0, 0, Kab); }); }
C++
3D
febiosoftware/FEBio
FEBioMech/FEMaxStressCriterion.cpp
.cpp
2,158
72
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #include "stdafx.h" #include "FEMaxStressCriterion.h" #include "FEElasticMaterial.h" #include <FECore/FEElement.h> BEGIN_FECORE_CLASS(FEStressCriterion, FEMeshAdaptorCriterion) ADD_PARAMETER(m_metric, "metric"); END_FECORE_CLASS(); FEStressCriterion::FEStressCriterion(FEModel* fem) : FEMeshAdaptorCriterion(fem) { m_metric = 0; } bool FEStressCriterion::GetMaterialPointValue(FEMaterialPoint& mp, double& value) { FEElasticMaterialPoint* ep = mp.ExtractData<FEElasticMaterialPoint>(); if (ep == nullptr) return false; mat3ds s = ep->m_s; // get the metric value = 0.0; switch (m_metric) { case 0: value = s.effective_norm(); break; case 1: { mat3ds devs = s.dev(); double l[3], lmax; devs.exact_eigen(l); lmax = l[0]; if (l[1] > lmax) lmax = l[1]; if (l[2] > lmax) lmax = l[2]; value = lmax; } break; default: return false; } return true; }
C++
3D
febiosoftware/FEBio
FEBioMech/FEReactiveVEMaterialPoint.h
.h
3,082
83
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #pragma once #include "FECore/FEMaterialPoint.h" #include "FEReactiveViscoelastic.h" #include "FEUncoupledReactiveViscoelastic.h" #include <deque> class FEReactiveViscoelasticMaterial; class FEUncoupledReactiveViscoelasticMaterial; //----------------------------------------------------------------------------- //! Material point data array for reactive viscoelastic materials //! class FEReactiveViscoelasticMaterialPoint : public FEMaterialPointArray { public: //! constructor FEReactiveViscoelasticMaterialPoint(); //! Copy material point data FEMaterialPointData* Copy(); }; //----------------------------------------------------------------------------- //! Material point data for reactive viscoelastic materials class FEReactiveVEMaterialPoint : public FEMaterialPointData { public: //! olverloaded constructors FEReactiveVEMaterialPoint(FEMaterialPointData*pt) : FEMaterialPointData(pt) {} //! copy material point data FEMaterialPointData* Copy() override; //! Initialize material point data void Init() override; //! Update material point data void Update(const FETimeInfo& timeInfo) override; //! Serialize data to archive void Serialize(DumpStream& ar) override; public: // multigenerational material data deque <mat3ds> m_Uv; //!< right stretch tensor at tv (when generation u starts breaking) deque <double> m_Jv; //!< determinant of Uv (store for efficiency) deque <double> m_v; //!< time tv when generation starts breaking deque <double> m_f; //!< mass fraction when generation starts breaking public: // weak bond recruitment parameters double m_Et; //!< trial strain value at time t deque <double> m_wv; //!< total mass fraction of weak bonds };
Unknown
3D
febiosoftware/FEBio
FEBioMech/FEDamageTransIsoMooneyRivlin.cpp
.cpp
15,815
605
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #include "stdafx.h" #include "FEDamageTransIsoMooneyRivlin.h" FETIMRDamageMaterialPoint::FETIMRDamageMaterialPoint(FEMaterialPointData*pt) : FEMaterialPointData(pt) {} FEMaterialPointData* FETIMRDamageMaterialPoint::Copy() { FETIMRDamageMaterialPoint* pt = new FETIMRDamageMaterialPoint(*this); if (m_pNext) pt->m_pNext = m_pNext->Copy(); return pt; } void FETIMRDamageMaterialPoint::Init() { FEMaterialPointData::Init(); // intialize data to zero m_MEmax = 0; m_MEtrial = 0; m_Dm = 0; m_FEmax = 0; m_FEtrial = 0; m_Df = 0; } void FETIMRDamageMaterialPoint::Update(const FETimeInfo& timeInfo) { FEMaterialPointData::Update(timeInfo); m_MEmax = max(m_MEmax, m_MEtrial); m_FEmax = max(m_FEmax, m_FEtrial); } void FETIMRDamageMaterialPoint::Serialize(DumpStream& ar) { FEMaterialPointData::Serialize(ar); ar & m_MEtrial & m_MEmax & m_Dm; ar & m_FEtrial & m_FEmax & m_Df; } // define the material parameters BEGIN_FECORE_CLASS(FEDamageTransIsoMooneyRivlin, FEUncoupledMaterial) ADD_PARAMETER(m_c1, FE_RANGE_GREATER(0.0), "c1")->setUnits(UNIT_PRESSURE); ADD_PARAMETER(m_c2, "c2")->setUnits(UNIT_PRESSURE); ADD_PARAMETER(m_c3, "c3")->setUnits(UNIT_PRESSURE); ADD_PARAMETER(m_c4, FE_RANGE_GREATER(0.0), "c4"); ADD_PARAMETER(m_Mbeta, "Mbeta"); ADD_PARAMETER(m_Msmin, "Msmin"); ADD_PARAMETER(m_Msmax, "Msmax"); ADD_PARAMETER(m_Fbeta, "Fbeta"); ADD_PARAMETER(m_Fsmin, "Fsmin"); ADD_PARAMETER(m_Fsmax, "Fsmax"); ADD_PROPERTY(m_Q, "mat_axis")->SetFlags(FEProperty::Optional); END_FECORE_CLASS(); //----------------------------------------------------------------------------- FEDamageTransIsoMooneyRivlin::FEDamageTransIsoMooneyRivlin(FEModel* pfem) : FEUncoupledMaterial(pfem) { } //----------------------------------------------------------------------------- FEMaterialPointData* FEDamageTransIsoMooneyRivlin::CreateMaterialPointData() { return new FETIMRDamageMaterialPoint(new FEElasticMaterialPoint); } //----------------------------------------------------------------------------- mat3ds FEDamageTransIsoMooneyRivlin::DevStress(FEMaterialPoint& mp) { // matrix stress mat3ds sm = MatrixStress(mp); // matrix reduction factor double gm = MatrixDamage(mp); // fiber stress mat3ds sf = FiberStress(mp); // fiber reduction factor double gf = FiberDamage(mp); return sm*gm + sf*gf; } //----------------------------------------------------------------------------- //! Calculate the deviatoric stress mat3ds FEDamageTransIsoMooneyRivlin::MatrixStress(FEMaterialPoint& mp) { FEElasticMaterialPoint& pt = *mp.ExtractData<FEElasticMaterialPoint>(); // determinant of deformation gradient double J = pt.m_J; // calculate deviatoric left Cauchy-Green tensor mat3ds B = pt.DevLeftCauchyGreen(); // calculate square of B mat3ds B2 = B.sqr(); // Invariants of B (= invariants of C) // Note that these are the invariants of Btilde, not of B! double I1 = B.tr(); // --- TODO: put strain energy derivatives here --- // // W = C1*(I1 - 3) + C2*(I2 - 3) // // Wi = dW/dIi double W1 = m_c1; double W2 = m_c2; // --- // calculate T = F*dW/dC*Ft // T = F*dW/dC*Ft mat3ds T = B*(W1 + W2*I1) - B2*W2; return T.dev()*(2.0/J); } //----------------------------------------------------------------------------- // Calculate the fiber stress mat3ds FEDamageTransIsoMooneyRivlin::FiberStress(FEMaterialPoint &mp) { FEElasticMaterialPoint& pt = *mp.ExtractData<FEElasticMaterialPoint>(); // deformation gradient mat3d& F = pt.m_F; double J = pt.m_J; double Jm13 = pow(J, -1.0/3.0); // get the local coordinate systems mat3d Q = GetLocalCS(mp); // get the initial fiber direction vec3d a0 = Q.col(0); // calculate the current material axis lam*a = F*a0; vec3d a = F*a0; // normalize material axis and store fiber stretch double lam, lamd; lam = a.unit(); lamd = lam*Jm13; // i.e. lambda tilde // invariant I4 double I4 = lamd*lamd; // strain energy derivative double W4 = (I4 - 1)*m_c3*exp(m_c4*(I4-1)*(I4-1)); // calculate dyad of a: AxA = (a x a) mat3ds AxA = dyad(a); // calculate FdWf/dCFt = I4*W4*(a x a) mat3ds T = AxA*(W4*I4); // return stress return T.dev()*(2.0/J); } //----------------------------------------------------------------------------- tens4ds FEDamageTransIsoMooneyRivlin::DevTangent(FEMaterialPoint& mp) { // matrix tangent tens4ds Cm = MatrixTangent(mp); // matrix damage double gm = MatrixDamage(mp); // fiber tangent tens4ds Cf = FiberTangent(mp); // fiber damage double gf = FiberDamage(mp); return Cm*gm + Cf*gf; } //----------------------------------------------------------------------------- //! Calculate the deviatoric tangent tens4ds FEDamageTransIsoMooneyRivlin::MatrixTangent(FEMaterialPoint& mp) { FEElasticMaterialPoint& pt = *mp.ExtractData<FEElasticMaterialPoint>(); // determinant of deformation gradient double J = pt.m_J; double Ji = 1.0/J; // calculate deviatoric left Cauchy-Green tensor: B = F*Ft mat3ds B = pt.DevLeftCauchyGreen(); // calculate square of B mat3ds B2 = B.sqr(); // Invariants of B (= invariants of C) double I1 = B.tr(); double I2 = 0.5*(I1*I1 - B2.tr()); // --- TODO: put strain energy derivatives here --- // Wi = dW/dIi double W1, W2; W1 = m_c1; W2 = m_c2; // --- // calculate dWdC:C double WC = W1*I1 + 2*W2*I2; // calculate C:d2WdCdC:C double CWWC = 2*I2*W2; // deviatoric cauchy-stress, trs = trace[s]/3 mat3ds T = B * (W1 + W2 * I1) - B2 * W2; mat3ds devs = T.dev() * (2.0 / J); // Identity tensor mat3ds I(1,1,1,0,0,0); tens4ds IxI = dyad1s(I); tens4ds I4 = dyad4s(I); tens4ds BxB = dyad1s(B); tens4ds B4 = dyad4s(B); // d2W/dCdC:C mat3ds WCCxC = B*(W2*I1) - B2*W2; tens4ds cw = (BxB - B4)*(W2*4.0*Ji) - dyad1s(WCCxC, I)*(4.0/3.0*Ji) + IxI*(4.0/9.0*Ji*CWWC); tens4ds c = dyad1s(devs, I)*(-2.0/3.0) + (I4 - IxI/3.0)*(4.0/3.0*Ji*WC) + cw; return c; } //----------------------------------------------------------------------------- // Fiber material tangent // tens4ds FEDamageTransIsoMooneyRivlin::FiberTangent(FEMaterialPoint &mp) { FEElasticMaterialPoint& pt = *mp.ExtractData<FEElasticMaterialPoint>(); // deformation gradient mat3d& F = pt.m_F; double J = pt.m_J; double Jm13 = pow(J, -1.0/3.0); double Ji = 1.0/J; // get the local coordinate systems mat3d Q = GetLocalCS(mp); // get initial local material axis vec3d a0 = Q.col(0); // calculate current local material axis vec3d a = F*a0; double lam = a.unit(); // deviatoric stretch double lamd = lam*Jm13; double I4 = lamd*lamd; // strain energy derivative double W4 = (I4 - 1)*m_c3*exp(m_c4*(I4-1)*(I4-1)); double W44 = m_c3*exp(m_c4*(I4 - 1)*(I4 - 1)) + 2*m_c3*m_c4*(I4 - 1)*(I4 - 1)*exp(m_c4*(I4 - 1)*(I4 - 1)); // calculate dWdC:C double WC = W4*I4; // calculate C:d2WdCdC:C double CWWC = W44*I4*I4; mat3dd I(1); // Identity tens4ds IxI = dyad1s(I); tens4ds Id4 = dyad4s(I); mat3ds AxA = dyad(a); tens4ds AxAxAxA = dyad1s(AxA); tens4ds cw = AxAxAxA*(4.0*Ji*W44*I4*I4) - dyad1s(I, AxA)*(4.0/3.0*Ji*W44*I4*I4); tens4ds c = (Id4 - IxI/3.0)*(4.0/3.0*Ji*WC) + IxI*(4.0/9.0*Ji*CWWC) + cw; // see if we need to add the stress FETIMRDamageMaterialPoint& dp = *mp.ExtractData<FETIMRDamageMaterialPoint>(); if (dp.m_FEtrial > dp.m_FEmax) { mat3ds devs = pt.m_s.dev(); double dg = FiberDamageDerive(mp); c += dyad1s(devs)*(J*dg/dp.m_FEtrial); } return c; } //----------------------------------------------------------------------------- double FEDamageTransIsoMooneyRivlin::DevStrainEnergyDensity(FEMaterialPoint& mp) { // matrix sed double sedm = MatrixStrainEnergyDensity(mp); // matrix reduction factor double gm = MatrixDamage(mp); // fiber sed double sedf = FiberStrainEnergyDensity(mp); // fiber reduction factor double gf = FiberDamage(mp); return sedm*gm + sedf*gf; } //----------------------------------------------------------------------------- //! Calculate the matrix strain energy density double FEDamageTransIsoMooneyRivlin::MatrixStrainEnergyDensity(FEMaterialPoint& mp) { FEElasticMaterialPoint& pt = *mp.ExtractData<FEElasticMaterialPoint>(); // calculate deviatoric left Cauchy-Green tensor mat3ds B = pt.DevLeftCauchyGreen(); // calculate square of B mat3ds B2 = B.sqr(); // Invariants of B (= invariants of C) // Note that these are the invariants of Btilde, not of B! double I1 = B.tr(); double I2 = 0.5*(I1*I1 - B2.tr()); // --- TODO: put strain energy derivatives here --- // // W = C1*(I1 - 3) + C2*(I2 - 3) // double sed = m_c1*(I1 - 3) + m_c2*(I2 - 3); return sed; } //----------------------------------------------------------------------------- // Calculate the fiber strain energy density double FEDamageTransIsoMooneyRivlin::FiberStrainEnergyDensity(FEMaterialPoint &mp) { FEElasticMaterialPoint& pt = *mp.ExtractData<FEElasticMaterialPoint>(); // deformation gradient mat3d& F = pt.m_F; double J = pt.m_J; double Jm13 = pow(J, -1.0/3.0); // get the local coordinate systems mat3d Q = GetLocalCS(mp); // get the initial fiber direction vec3d a0 = Q.col(0); // calculate the current material axis lam*a = F*a0; vec3d a = F*a0; // normalize material axis and store fiber stretch double lam, lamd; lam = a.unit(); lamd = lam*Jm13; // i.e. lambda tilde // invariant I4 double I4 = lamd*lamd; // strain energy derivative double sed = 0.5*m_c3/m_c4*(exp(m_c4*(I4-1)*(I4-1))-1); // return sed return sed; } //----------------------------------------------------------------------------- // Calculate damage reduction factor for matrix double FEDamageTransIsoMooneyRivlin::MatrixDamage(FEMaterialPoint &mp) { FEElasticMaterialPoint& pt = *mp.ExtractData<FEElasticMaterialPoint>(); // calculate right Cauchy-Green tensor mat3ds C = pt.DevRightCauchyGreen(); mat3ds C2 = C.sqr(); // Invariants double I1 = C.tr(); double I2 = 0.5*(I1*I1 - C2.tr()); // strain-energy value double SEF = m_c1*(I1 - 3) + m_c2*(I2 - 3); // get the damage material point data FETIMRDamageMaterialPoint& dp = *mp.ExtractData<FETIMRDamageMaterialPoint>(); // calculate trial-damage parameter dp.m_MEtrial = sqrt(2.0*fabs(SEF)); // calculate damage parameter double Es = max(dp.m_MEtrial, dp.m_MEmax); // calculate reduction parameter double g = 1.0; if (Es < m_Msmin) g = 1.0; else if (Es > m_Msmax) g = 0.0; else { double F = (Es - m_Msmin)/(m_Msmin - m_Msmax); g = 1.0 - (1.0 - m_Mbeta + m_Mbeta*F*F)*(F*F); } dp.m_Dm = 1-g; return g; } //----------------------------------------------------------------------------- // Calculate damage reduction factor for matrix double FEDamageTransIsoMooneyRivlin::MatrixDamageDerive(FEMaterialPoint &mp) { FEElasticMaterialPoint& pt = *mp.ExtractData<FEElasticMaterialPoint>(); // calculate right Cauchy-Green tensor mat3ds C = pt.DevRightCauchyGreen(); mat3ds C2 = C.sqr(); // Invariants double I1 = C.tr(); double I2 = 0.5*(I1*I1 - C2.tr()); // strain-energy value double SEF = m_c1*(I1 - 3) + m_c2*(I2 - 3); // get the damage material point data FETIMRDamageMaterialPoint& dp = *mp.ExtractData<FETIMRDamageMaterialPoint>(); // calculate trial-damage parameter dp.m_MEtrial = sqrt(2.0*fabs(SEF)); // calculate damage parameter double Es = max(dp.m_MEtrial, dp.m_MEmax); // calculate reduction parameter double dg = 0.0; if (Es < m_Msmin) dg = 0.0; else if (Es > m_Msmax) dg = 0.0; else { double h = m_Msmax - m_Msmin; double F = (Es - m_Msmin)/h; dg = -2.0*F/h*(1 - m_Mbeta + m_Mbeta*F*F)-(F*F)*(2.0*m_Mbeta*F/h); } return dg; } //----------------------------------------------------------------------------- // Calculate damage reduction factor for fibers double FEDamageTransIsoMooneyRivlin::FiberDamage(FEMaterialPoint &mp) { FEElasticMaterialPoint& pt = *mp.ExtractData<FEElasticMaterialPoint>(); // deformation gradient mat3d& F = pt.m_F; double J = pt.m_J; double Jm13 = pow(J, -1.0/3.0); // get the local coordinate systems mat3d Q = GetLocalCS(mp); // get the initial fiber direction vec3d a0 = Q.col(0); // calculate the current material axis lam*a = F*a0; vec3d a = F*a0; // normalize material axis and store fiber stretch double lam, lamd; lam = a.unit(); lamd = lam*Jm13; // i.e. lambda tilde // invariant I4 double I4 = lamd*lamd; // strain energy value double SEF = 0.5*m_c3/m_c4*(exp(m_c4*(I4-1)*(I4-1))-1); // get the damage material point data FETIMRDamageMaterialPoint& dp = *mp.ExtractData<FETIMRDamageMaterialPoint>(); // calculate trial-damage parameter dp.m_FEtrial = sqrt(2.0*fabs(SEF)); // calculate damage parameter double Es = max(dp.m_FEtrial, dp.m_FEmax); // calculate reduction parameter double g = 1.0; if (Es < m_Fsmin) g = 1.0; else if (Es > m_Fsmax) g = 0.0; else { double F = (Es - m_Fsmin)/(m_Fsmin - m_Fsmax); g = 1.0 - (1.0 - m_Fbeta + m_Fbeta*F*F)*(F*F); } dp.m_Df = 1-g; return g; } //----------------------------------------------------------------------------- // Calculate damage reduction factor for fibers double FEDamageTransIsoMooneyRivlin::FiberDamageDerive(FEMaterialPoint &mp) { FEElasticMaterialPoint& pt = *mp.ExtractData<FEElasticMaterialPoint>(); // deformation gradient mat3d& F = pt.m_F; double J = pt.m_J; double Jm13 = pow(J, -1.0/3.0); // get the local coordinate systems mat3d Q = GetLocalCS(mp); // get the initial fiber direction vec3d a0 = Q.col(0); // calculate the current material axis lam*a = F*a0; vec3d a = F*a0; // normalize material axis and store fiber stretch double lam, lamd; lam = a.unit(); lamd = lam*Jm13; // i.e. lambda tilde // invariant I4 double I4 = lamd*lamd; // strain energy value double SEF = 0.5*m_c3/m_c4*(exp(m_c4*(I4-1)*(I4-1))-1); // get the damage material point data FETIMRDamageMaterialPoint& dp = *mp.ExtractData<FETIMRDamageMaterialPoint>(); // calculate trial-damage parameter dp.m_FEtrial = sqrt(2.0*fabs(SEF)); // calculate damage parameter double Es = max(dp.m_FEtrial, dp.m_FEmax); // calculate reduction parameter double dg = 0.0; if (Es < m_Fsmin) dg = 0.0; else if (Es > m_Fsmax) dg = 0.0; else { double h = m_Fsmin - m_Fsmax; double F = (Es - m_Fsmin)/h; dg = -2.0*F/h*(1 - m_Fbeta + m_Fbeta*F*F)-(F*F)*(2.0*m_Fbeta*F/h); } return dg; } //----------------------------------------------------------------------------- //! damage double FEDamageTransIsoMooneyRivlin::Damage(FEMaterialPoint& pt) { return MatrixDamage(pt) + FiberDamage(pt); }
C++
3D
febiosoftware/FEBio
FEBioMech/FERigidConnector.cpp
.cpp
6,475
180
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #include "stdafx.h" #include "FERigidConnector.h" #include "FERigidBody.h" #include "FEMechModel.h" #include "FERigidMaterial.h" #include <FECore/FEMaterial.h> #include <FECore/log.h> //----------------------------------------------------------------------------- BEGIN_FECORE_CLASS(FERigidConnector, FENLConstraint); ADD_PARAMETER(m_nRBa, "body_a")->setEnums("$(rigid_materials)"); ADD_PARAMETER(m_nRBb, "body_b")->setEnums("$(rigid_materials)"); END_FECORE_CLASS(); int FERigidConnector::m_ncount = 0; //----------------------------------------------------------------------------- FERigidConnector::FERigidConnector(FEModel* pfem) : FENLConstraint(pfem) { m_F = m_M = vec3d(0, 0, 0); m_rbA = m_rbB = 0; }; //----------------------------------------------------------------------------- FERigidConnector::~FERigidConnector() {} //----------------------------------------------------------------------------- bool FERigidConnector::Init() { // do base class first if (FENLConstraint::Init() == false) return false; // When the rigid spring is read in, the ID's correspond to the rigid materials. // Now we want to make the ID's refer to the rigid body ID's FEMechModel& fem = static_cast<FEMechModel&>(*GetFEModel()); FERigidMaterial* pm = dynamic_cast<FERigidMaterial*>(fem.GetMaterial(m_nRBa - 1)); if (pm == nullptr) { feLogError("Rigid connector %d (spring) does not connect two rigid bodies\n", m_nID + 1); return false; } m_nRBa = pm->GetRigidBodyID(); pm = dynamic_cast<FERigidMaterial*>(fem.GetMaterial(m_nRBb - 1)); if (pm == nullptr) { feLogError("Rigid connector %d (spring) does not connect two rigid bodies\n", m_nID); return false; } m_nRBb = pm->GetRigidBodyID(); // get the actual rigid bodies m_rbA = fem.GetRigidBody(m_nRBa); m_rbB = fem.GetRigidBody(m_nRBb); return true; } //----------------------------------------------------------------------------- void FERigidConnector::BuildMatrixProfile(FEGlobalMatrix& M) { vector<int> lm(12); int* lm1 = m_rbA->m_LM; int* lm2 = m_rbB->m_LM; for (int j=0; j<6; ++j) lm[j ] = lm1[j]; for (int j=0; j<6; ++j) lm[j+6] = lm2[j]; M.build_add(lm); } //----------------------------------------------------------------------------- void FERigidConnector::Serialize(DumpStream& ar) { FENLConstraint::Serialize(ar); ar & m_nID; ar & m_nRBa & m_nRBb; ar & m_F & m_M; if (ar.IsLoading()) { // get the actual rigid bodies FEMechModel& fem = static_cast<FEMechModel&>(*GetFEModel()); m_rbA = fem.GetRigidBody(m_nRBa); m_rbB = fem.GetRigidBody(m_nRBb); } } //----------------------------------------------------------------------------- // return the instantaneous helical axis of Body b relative to Body a, in ground CS void FERigidConnector::InstantaneousHelicalAxis(vec3d& omega, vec3d& s, double& tdot) { double dt = GetFEModel()->GetTime().timeIncrement; // incremental rotation in spatial frame vec3d oma = (m_rbA->m_wp + m_rbA->m_wt)/2; vec3d omb = (m_rbB->m_wp + m_rbB->m_wt)/2; vec3d va = (m_rbA->m_vp + m_rbA->m_vt)/2; vec3d vb = (m_rbB->m_vp + m_rbB->m_vt)/2; // get the relative motion omega = (omb - oma); vec3d rdot = vb - va; double rdm = rdot.norm(); vec3d n(omega); n.unit(); vec3d w(omega); tdot = rdot*n; vec3d ra = (m_rbA->m_rt + m_rbA->m_rp)/2; vec3d rb = (m_rbB->m_rt + m_rbB->m_rp)/2; vec3d r = rb - ra; // midpoint value of r double w2 = w*w; s = (w2 > 0) ? (w ^ (rdot - n*tdot + (r ^ w)))/(w*w) : vec3d(0,0,0); if ((w2 == 0) && (rdm > 0)) { tdot = rdm; n = rdot.Normalize(); omega = n; } // now transform the helical axis to be represented relative to the ground s -= m_rbB->m_rt; omega = m_rbB->GetRotation().Inverse()*omega; } //----------------------------------------------------------------------------- // return the helical axis of Body b relative to Body a, in ground CS void FERigidConnector::FiniteHelicalAxis(vec3d& omega, vec3d& s, double& tdot) { // incremental rotation in spatial frame quatd oma = m_rbA->GetRotation()*m_rbA->GetPreviousRotation().Inverse(); quatd omb = m_rbB->GetRotation()*m_rbB->GetPreviousRotation().Inverse(); // clean-up roundoff errors oma.MakeUnit(); omb.MakeUnit(); vec3d rda = (m_rbA->m_rt - m_rbA->m_rp); vec3d rdb = (m_rbB->m_rt - m_rbB->m_rp); // get the relative motion quatd dQ = omb - oma; // TODO: Is this valid for rotations? omega = dQ.GetRotationVector(); vec3d rdot = rdb - rda; double rdm = rdot.norm(); vec3d n(omega); n.unit(); vec3d w(omega); tdot = rdot*n; vec3d ra = (m_rbA->m_rt + m_rbA->m_rp)/2; vec3d rb = (m_rbB->m_rt + m_rbB->m_rp)/2; vec3d r = rb - ra; // midpoint value of r double w2 = w*w; s = (w2 > 0) ? (w ^ (rdot - n*tdot + (r ^ w)))/(w*w) : vec3d(0,0,0); if ((w2 == 0) && (rdm > 0)) { tdot = rdm; n = rdot.Normalize(); omega = n; } // now transform the helical axis to be represented relative to the ground s -= m_rbB->m_rt; omega = m_rbB->GetRotation().Inverse()*omega; }
C++
3D
febiosoftware/FEBio
FEBioMech/FENodalForce.h
.h
2,019
58
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #pragma once #include <FECore/FENodalLoad.h> #include "febiomech_api.h" //----------------------------------------------------------------------------- // Class that implements an equivalent nodal force load. // This load will be applied directly to the load vector of the system class FEBIOMECH_API FENodalForce : public FENodalLoad { public: FENodalForce(FEModel* fem); // set the value void SetValue(const vec3d& v); protected: // required functions of FENodalLoad // Set the dof list bool SetDofList(FEDofList& dofList) override; // get the nodal values void GetNodalValues(int inode, std::vector<double>& val) override; private: FEParamVec3 m_f; //!< the applied force bool m_shellBottom; DECLARE_FECORE_CLASS(); };
Unknown
3D
febiosoftware/FEBio
FEBioMech/FEABUnconstrained.h
.h
1,979
60
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2019 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #pragma once #include "FEBioMech/FEUncoupledMaterial.h" class FEABUnconstrained : public FEElasticMaterial { //public: //enum { MAX_TERMS = 6 }; public: FEABUnconstrained(FEModel* pfem); //! calculate the stress mat3ds Stress(FEMaterialPoint& pt) override; //! calculate the tangent tens4ds Tangent(FEMaterialPoint& pt) override; //! calculate strain energy density at material point double StrainEnergyDensity(FEMaterialPoint& pt) override; protected: void EigenValues(mat3ds& A, double l[3], vec3d r[3], const double eps = 0); double m_eps; public: //FEParamDouble m_ksi; double m_N; int m_term; FEParamDouble m_ksi; FEParamDouble m_kappa; DECLARE_FECORE_CLASS(); };
Unknown
3D
febiosoftware/FEBio
FEBioMech/FEPRLig.h
.h
2,071
61
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #pragma once #include "FEElasticMaterial.h" class FEPRLig : public FEElasticMaterial { public: FEPRLig(FEModel* pfem); public: double m_c1; //!< fiber constant c1 double m_c2; //!< fiber constant c2 double m_u; //!< Lame Coefficient mu of the matrix double m_m; //!< Poisson's ratio slope double m_v0; //!< initial Poisson's ratio double m_k; //!< Penalty for the volumetric strain energy public: //! calculate stress at material point mat3ds Stress(FEMaterialPoint& pt) override; //! calculate tangent stiffness at material point tens4ds Tangent(FEMaterialPoint& pt) override; //! calculate strain energy density at material point double StrainEnergyDensity(FEMaterialPoint& pt) override; // declare the parameter list DECLARE_FECORE_CLASS(); };
Unknown
3D
febiosoftware/FEBio
FEBioMech/triangle_sphere.h
.h
743,619
347
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #pragma once const int NST20 = 20; const double AREA20[NST20] = { 0.628318530718,0.628318530718,0.628318530718,0.628318530718,0.628318530718,0.628318530718,0.628318530718,0.628318530718,0.628318530718,0.628318530718,0.628318530718,0.628318530718,0.628318530718,0.628318530718,0.628318530718,0.628318530718,0.628318530718,0.628318530718,0.628318530718,0.628318530718 }; const double PHI20[NST20] = { 2.48923451381,2.48923451381,2.48923451381,2.48923451381,2.48923451381,0.652358139784,0.652358139784,0.652358139784,0.652358139784,0.652358139784,1.38208579601,1.75950685758,1.75950685758,1.75950685758,1.38208579601,1.38208579601,1.75950685758,1.75950685758,1.38208579601,1.38208579601 }; const double THETA20[NST20] = { 2.51327412287,-1.25663706144,0,3.76991118431,1.25663706144,0.628318530718,4.39822971503,3.14159265359,-0.628318530718,1.88495559215,3.14159265359,2.51327412287,3.76991118431,0,0.628318530718,-0.628318530718,-1.25663706144,1.25663706144,4.39822971503,1.88495559215 }; const int NST34 = 34; const double AREA34[NST34] = { 0.383935577992,0.363384852082,0.404286699707,0.399662586846,0.354335283849,0.352347120947,0.393903444368,0.379809289616,0.348615415676,0.362162027018,0.352706956245,0.334201951381,0.38550990319,0.353366062299,0.353210862208,0.390916630874,0.350536536666,0.334426717588,0.401460216421,0.403845317927,0.339702141107,0.395964760734,0.354184187245,0.35253909316,0.379408560901,0.394927777324,0.35332404861,0.391201373908,0.379167729391,0.339928651639,0.397540807177,0.35214902586,0.352731483864,0.380977520538 }; const double PHI34[NST34] = { 0.992311860958,0.540938308295,0.740973555387,1.21706836975,1.4250943943,1.48988159961,2.21160798775,1.64632156581,1.61309409716,0.272718163585,1.12766830359,0.692114402353,0.331284915403,0.825383424239,1.24305999687,1.18761290633,1.81917628368,1.21867315735,1.21642807486,0.887592308181,2.54850378579,2.24712659371,1.71737990968,1.6503477742,2.04868066283,2.75219649767,1.90134757641,1.78830605485,2.14096763772,2.56416958122,2.86656487935,2.31787616339,2.01399005833,2.09881196833 }; const double THETA34[NST34] = { 2.84381372042,2.45969310542,1.44397272665,1.45316745591,2.50154805757,1.95763275851,0.161250110851,0.427494793002,0.976186514632,3.82722948119,-1.34124680328,0.591757041849,-0.374424949851,-0.786805077371,-0.366748217522,0.210267741996,4.21323110868,3.42427462827,4.33893673216,3.93695829964,-1.24684183905,-0.465522391576,-0.637552827163,-1.18265444754,-1.5544160045,3.8807156385,2.7749120359,3.32757398959,3.7256260405,0.797024363447,2.2253590719,2.35938161601,1.80394081727,1.20832067743 }; const int NST60 = 60; const double AREA60[NST60] = { 0.209439510239,0.209439510239,0.209439510239,0.209439510239,0.209439510239,0.209439510239,0.209439510239,0.209439510239,0.209439510239,0.209439510239,0.209439510239,0.209439510239,0.209439510239,0.209439510239,0.209439510239,0.209439510239,0.209439510239,0.209439510239,0.209439510239,0.209439510239,0.209439510239,0.209439510239,0.209439510239,0.209439510239,0.209439510239,0.209439510239,0.209439510239,0.209439510239,0.209439510239,0.209439510239,0.209439510239,0.209439510239,0.209439510239,0.209439510239,0.209439510239,0.209439510239,0.209439510239,0.209439510239,0.209439510239,0.209439510239,0.209439510239,0.209439510239,0.209439510239,0.209439510239,0.209439510239,0.209439510239,0.209439510239,0.209439510239,0.209439510239,0.209439510239,0.209439510239,0.209439510239,0.209439510239,0.209439510239,0.209439510239,0.209439510239,0.209439510239,0.209439510239,0.209439510239,0.209439510239 }; const double PHI60[NST60] = { 2.77901624839,2.77901624839,2.77901624839,2.77901624839,2.77901624839,0.362576405201,0.362576405201,0.362576405201,0.362576405201,0.362576405201,2.397020341,2.11317043701,1.73299308984,2.11317043701,1.73299308984,0.744572312593,1.02842221657,1.40859956375,1.02842221657,1.40859956375,2.397020341,2.11317043701,1.73299308984,1.73299308984,2.11317043701,2.397020341,2.11317043701,2.11317043701,1.73299308984,1.73299308984,0.744572312593,1.02842221657,1.40859956375,1.40859956375,1.02842221657,0.744572312593,1.02842221657,1.02842221657,1.40859956375,1.40859956375,2.11317043701,2.397020341,2.11317043701,1.73299308984,1.73299308984,2.11317043701,2.397020341,1.73299308984,2.11317043701,1.73299308984,1.02842221657,0.744572312593,1.02842221657,1.40859956375,1.40859956375,1.02842221657,0.744572312593,1.40859956375,1.40859956375,1.02842221657 }; const double THETA60[NST60] = { 1.88495559215,4.39822971503,-0.628318530718,3.14159265359,0.628318530718,1.25663706144,-1.25663706144,3.76991118431,0,2.51327412287,3.14159265359,3.54640644495,2.9287380957,2.73677886223,3.35444721148,0,-0.404813791358,0.21285455789,0.404813791358,-0.21285455789,-0.628318530718,-0.22350473936,-0.415463972828,-0.841173088608,-1.03313232208,0.628318530718,1.03313232208,0.22350473936,0.415463972828,0.841173088608,3.76991118431,3.36509739295,3.55705662642,3.9827657422,4.17472497567,2.51327412287,2.10846033151,2.91808791423,2.72612868076,2.30041956498,-1.4801418008,4.39822971503,3.99341592367,4.61108427292,4.18537515714,2.28976938351,1.88495559215,2.09781015004,1.4801418008,1.67210103426,4.62173445439,-1.25663706144,-0.851823270078,-1.04378250355,-1.46949161933,0.851823270078,1.25663706144,1.04378250355,1.46949161933,1.66145085279 }; const int NST74 = 74; const double AREA74[NST74] = { 0.172194497108,0.172616214738,0.156384928339,0.158507077935,0.181989031701,0.164489052852,0.170463214221,0.16791900153,0.174140795926,0.167638690642,0.163799740359,0.167974639108,0.174154539066,0.171879495364,0.166744662057,0.169537017558,0.185616681294,0.168799231951,0.168829055331,0.158481556172,0.17671435797,0.172868926325,0.18167436801,0.185611507665,0.15636355032,0.172247969404,0.18070564458,0.167150673674,0.181726232028,0.165314830546,0.169961200128,0.172654595308,0.171222346552,0.171246768459,0.167601272159,0.169450198726,0.167629614669,0.169508601315,0.165328142768,0.169914886884,0.164214499781,0.167677242098,0.17192283869,0.190385295886,0.16381928312,0.167103261273,0.180784609354,0.190430641824,0.164227106766,0.168116666569,0.180247005644,0.181982148896,0.172609862041,0.176818987391,0.158837157007,0.158858544541,0.168442689446,0.168486647778,0.160628620296,0.168636058657,0.159225581499,0.160273422768,0.168645193049,0.16061638219,0.168661465192,0.160240964724,0.159275111334,0.168607230802,0.166728581783,0.169458074264,0.168183535321,0.180160965744,0.170522960063,0.164487167827 }; const double PHI74[NST74] = { 1.37637747565,1.77848403736,1.40219574588,1.67945305427,1.92268587646,2.31568591025,2.34029288949,1.74919536568,2.0904221287,2.65976168911,2.07826715601,2.07982156114,2.31224176828,2.79200030874,2.9309419527,2.58144952406,1.1534990749,1.13996555245,1.30505558926,1.40234552605,1.73756509933,2.00215145978,0.19103172404,0.7696420396,0.731695622618,0.498670411242,1.59204101919,1.71932119701,1.11126669369,1.22012811405,0.987522913199,0.592108360768,1.55921318852,1.69204624116,1.47866187997,1.13117589437,1.16637514167,0.932676730736,0.469112235723,0.572650532114,1.92280468579,2.18769815342,2.51317688672,1.56555227458,1.48104448229,1.13721016656,0.824791654243,2.36395408104,2.73274234576,2.89973890344,2.54482479876,1.37368120261,1.07179674998,0.466803260621,0.786073451869,0.194230542378,0.801816920121,0.552063943806,1.31992333966,1.39377623123,1.09644735409,0.791733455504,0.941592618213,2.21540832028,1.8284785983,1.70848167882,1.96385985674,2.30044204202,2.31792447645,2.31575385231,1.98922622439,1.69986240845,1.98690641289,1.69868183315 }; const double THETA74[NST74] = { 4.23372155256,3.77350281851,3.84608000918,3.18484837654,3.45809438838,3.39077080754,2.91506076853,0.250156160968,0.316825916633,-0.143154113368,-0.84076048198,-0.426340636629,-0.106690018794,0.818610130238,2.33492710176,2.48483746082,3.5931710259,2.89909309915,3.22927360111,2.61469093203,2.80180069559,2.654831488,1.308041588,2.831818526,2.32376205684,1.78656726746,-1.30884279106,-0.960196437309,4.45822975191,-1.41123318914,-1.12411539369,-1.08459745398,-0.0945343132877,-0.363600184289,-0.696117769684,-0.744259801597,-0.0547273435112,-0.357678326852,0.321737854417,-0.353212976842,0.992995023213,0.714451163504,1.03342605354,0.861716307267,0.493572491076,0.334686032515,0.575808887909,-1.15430788691,-0.98649181298,4.15257530946,3.87038000761,2.24934454968,2.09486017238,4.63887041185,4.26918611221,3.70514048067,3.73735278376,3.33042501982,1.08705818641,1.47334175658,1.68393403727,1.42390002369,0.995745287995,-1.55050565608,-1.56134266036,4.37856330849,4.10130884779,4.24511018959,1.55945328606,2.04234454148,1.3922866091,1.63240927868,2.21673002442,2.01964818044 }; const int NST196 = 196; const double AREA196[NST196] = { 0.0638972311061,0.0668894692436,0.0649858303874,0.0616304009286,0.0652668671976,0.065266527635,0.0663350077825,0.0619973712494,0.0659695136296,0.0677211405895,0.0640119463478,0.0658673121802,0.0638707648582,0.0613608629933,0.0624495545788,0.060868522918,0.0674482226427,0.0671445089851,0.064837595448,0.062626039322,0.0617571980229,0.0626253474998,0.0657849326183,0.0650523303174,0.0644063159435,0.0632107557901,0.0661364206817,0.0670360363369,0.0641293778863,0.0611082806036,0.0663154376387,0.0631159265005,0.0644200031677,0.0639622415538,0.0624689285189,0.0670199827974,0.0618141056617,0.0661940957789,0.0626199310979,0.0661333082831,0.0630759889626,0.0646358006381,0.0632064948448,0.0657527651672,0.0650919188211,0.0614645705149,0.068038372082,0.0621728888174,0.0621604388567,0.0624503500411,0.0615810462997,0.0623772508079,0.0628872780195,0.0643338947915,0.0629750384363,0.0673882292199,0.0633495486256,0.0659467764361,0.0645347447336,0.0639615118178,0.0634791780095,0.0646338089292,0.0632190912109,0.0650657772645,0.0610130299864,0.0649286976652,0.0645341052298,0.0615521843399,0.0631564345319,0.0635087658748,0.0641850864396,0.0648102851225,0.0639681320617,0.0640018140136,0.0669712301109,0.0640833922652,0.0639546643343,0.065864856972,0.0629714016573,0.0647429367746,0.0649855121913,0.0656913043705,0.0610866775775,0.0627823095172,0.0650003056205,0.0638208777769,0.0613889570916,0.0638986821682,0.0648972457364,0.0657808734732,0.0647655104122,0.0642512111769,0.0624994214407,0.0675120161824,0.0654779359653,0.0651195316694,0.0613319113968,0.0681258859813,0.0635523806897,0.0634059245265,0.0635785126812,0.0635843220386,0.0672131922246,0.0674297560572,0.0633540087023,0.0633556232024,0.0622259647217,0.0621016756343,0.0625175919109,0.0615427568012,0.0625274688479,0.0663983992939,0.0617283672137,0.0649753513125,0.0644470747974,0.0668101556072,0.0612965420155,0.0671188646658,0.066844693631,0.0639306465074,0.0635281786511,0.0620441236157,0.0620105509386,0.0620206299095,0.0620323741906,0.0619472652273,0.0613419067267,0.0645874503395,0.0625951627553,0.0682956166143,0.0618125564724,0.0660826280633,0.0635518632664,0.0625994172267,0.0636431475865,0.0656899318151,0.0614506375482,0.069319385953,0.0626899203954,0.0639075010672,0.0610870417725,0.0659135629029,0.0648390635504,0.0645356233343,0.0615356150467,0.0651728841148,0.0647208956059,0.0614134063328,0.0632181648813,0.0671536214318,0.0664316351668,0.0634431678513,0.0635170076154,0.064137433268,0.0619366174429,0.0662827425601,0.0632340633187,0.0666931621427,0.0634852057939,0.0655424402549,0.0627586118204,0.0637870642746,0.0659670181209,0.0649179542241,0.0643158934673,0.0664030078897,0.0615439641304,0.0646235217071,0.0619671421584,0.0648177739233,0.0624309475518,0.0683794315543,0.0649214754714,0.0610500616617,0.0616095715887,0.0648169853985,0.0651418225484,0.0655188258374,0.0620442301568,0.0630219105744,0.0663489073152,0.0647882352238,0.0621295964819,0.066430603159,0.0626539499938,0.0640667376352,0.0637282714912,0.0654284504408,0.0610327460579,0.0665293001472,0.064299664322,0.0627676549845,0.0670393417749,0.0614484705382,0.0640106207734,0.0660463769293 }; const double PHI196[NST196] = { 1.80836671617,1.29832776991,0.94228751199,0.732905150597,2.19377370325,2.31639125438,0.966431658401,0.818889029927,1.37953490986,1.22925672388,1.05037045195,1.25926285733,1.18709403222,0.88111579647,1.10552091779,1.14838705952,1.31124258856,1.64990671373,1.36519575348,1.94572963976,1.57512415122,1.72009677992,2.12963710354,2.04756241373,2.04486196597,2.17108671434,2.11519971854,2.40247205336,0.602805457992,0.370214502354,0.265896414357,0.459050383423,2.3993218573,2.15960844178,2.14015125695,2.04323188674,2.36132260345,2.49982090068,2.37013126348,2.52237961342,2.72859268381,2.74927033539,2.45912165436,2.23865900628,2.25771531208,1.80552440002,1.68742933601,2.01869423775,2.0624576012,1.78824900142,1.68895467049,1.85577193941,1.39354056866,1.31843835311,1.45381725971,1.66974915202,1.45011354454,1.52010206323,2.32743187247,2.49552311052,2.71562823291,2.69941844724,2.31356410972,2.46836390872,2.23761848557,2.41885969296,2.36272762192,0.508161558671,0.590138992775,1.03121493528,1.10234167365,0.926146424803,1.33503863901,1.17749089228,1.48878894412,1.43103441945,1.23125592847,1.62364221231,2.03308212549,0.973514445626,1.69088311595,1.47606327184,1.06048610543,1.26774168139,1.10204828398,1.4265683055,1.33466591432,0.539478631249,0.772476502065,0.921903797273,0.875826122064,0.0895315987298,0.137851673947,0.327797088242,1.06443825113,1.27434703233,1.41698102098,1.34733271759,0.985625000209,1.12914259348,2.00882415627,1.96242175598,1.73300599931,1.8216024004,1.59791619364,1.553833713,1.71835252331,1.83555509629,1.49357365456,1.46983162977,1.68364939523,0.715958399061,0.948251487118,0.823591668672,0.64799502201,1.08545745922,1.02755896126,2.67811597869,2.86835724998,2.87289785746,3.07601049864,2.33993349868,2.40693462402,2.63558623579,2.49463322079,2.71176455438,1.77092556584,2.00337323549,1.70664796972,1.62778226531,1.93596754464,2.09347795197,1.5277243242,1.58761099372,1.87774948053,1.68226789429,1.96065151405,1.82328089079,1.78984467507,1.71260908411,1.87922075866,2.62444258213,2.81122931044,2.99553578578,2.55642150561,2.81834768778,2.62662967867,2.13211709458,1.76745276656,1.98062982002,1.12495708594,1.45562363485,1.35664636459,1.3539172001,0.729157727476,0.531935703048,0.625937913466,0.762894289957,0.391524660781,0.314600928392,0.737166675241,0.674089966637,0.478384402152,0.290930734262,1.0267248652,1.11358749938,1.16258939196,1.37316397925,2.00580168006,1.79674329049,2.12955413302,2.02811677239,2.12481846107,2.00872828191,2.42642342061,2.36143083527,2.24969869344,2.07292286777,1.01616262327,0.717088536216,0.785989747102,1.14922105765,0.882725643433,1.08160587844,0.432245579661,0.413317952937,0.80375186523,0.659586646746,0.794396809397,0.634598863078,1.68355379272,1.79551428286,1.44970886684,1.35309487299,1.4792185133,1.6857176227 }; const double THETA196[NST196] = { -1.39879016116,4.29290552688,-0.937064908269,-0.945764591142,0.869098980069,0.690132440686,4.00870550433,3.82380312656,0.133015465789,0.599313147326,-0.686521809384,-0.682918425682,0.172434683271,0.423138512991,0.411658556429,0.826635878645,0.992875148352,-1.23314119079,-0.886905027792,-0.96884804196,-0.869354478659,-1.04471898523,4.27325532862,4.50345754587,-1.35099218529,-1.53568741585,-1.09978895672,-1.49114157014,-0.622642130078,-0.637223824463,-0.0122066818501,0.286428223023,2.99803767246,2.96752777002,2.5384756761,2.74233298388,2.15165335374,1.90767868759,2.46926237165,2.68651765489,1.95644177919,2.53906368875,3.2944324046,3.76584122856,3.48887883771,2.7481727468,2.95028166459,3.14501287265,3.39061927511,3.12744171073,3.33923410152,3.50062744154,-0.480259347054,-0.280261383655,-0.0955986160253,-0.115072124391,0.560337364087,0.332811467341,-0.966088665087,-1.15358840735,-1.00046483975,-0.495079531284,-0.656905027578,-0.426289208525,1.15963296772,1.33027812736,1.62841713147,3.46452720013,3.87637290747,2.57254124801,4.42729833968,4.2979258923,4.05520263476,3.91130051605,3.37808403709,3.60568728296,3.66232850164,1.34933038882,1.25389783742,1.72062116747,2.5624323531,2.57770111415,1.30135084276,1.21086041804,1.55989690753,1.38396784491,1.59913908711,0.714237250946,0.678104317038,0.891467913842,1.16206278221,0.980860351692,3.7366501396,3.17053219172,-1.1609736903,-1.11483105316,-1.28202865411,-1.50653839836,-1.42055632555,4.68832861271,3.85934507402,4.07417898369,4.1234102221,3.70891434698,3.76977202055,3.97532239097,4.69341175964,4.49919725968,4.63742602288,4.40643541284,4.32299331985,-0.376787542551,-0.447800956207,0.126996343883,0.00339147810881,-0.246137658807,-0.0156009829997,3.45024745599,-1.52694920829,3.07068782174,3.97148448643,4.24701962691,3.94122471399,3.87663179939,4.50847308402,4.36225610912,-0.316895021078,-0.34084997707,-0.682444583324,-0.495236001174,-0.731694944088,-0.575115932759,0.938202810665,0.728783458353,1.07319603318,1.11700351484,0.839544182254,0.675566688733,0.0735329036302,0.294226246794,0.463895962205,0.335725758055,0.0408824865674,0.662965888283,0.739559114522,1.38708455103,1.13181546416,1.67766181592,1.53839731511,1.49197997337,2.78805152743,2.96980789241,2.78285090759,3.18564748945,4.4485884031,4.2418379763,-1.25866365282,-1.50771503471,-1.24790804871,4.48019766728,1.65781415434,1.3329621944,1.15233580815,1.53197984437,2.14960463908,1.96547091301,2.37163917892,2.37807131896,2.32927203473,2.34494634088,2.11105553679,1.90941226796,-0.144943351745,0.0670534847881,0.162117270986,-0.139931312373,0.392525929233,0.321756086501,3.00977844775,3.30463633459,3.02426735215,3.21838405974,3.53138794426,3.47196174541,2.62748473851,2.08062052909,2.50204962909,2.7205217448,2.18801705959,1.96178119228,1.75043866232,1.93156157162,1.77544514533,1.97567098299,2.16404739813,2.14589799835 }; const int NST210 = 210; const double AREA210[NST210] = { 0.0617261268408,0.0572021838321,0.0585417938648,0.0579280011801,0.0628324889081,0.0600692862341,0.0609854756845,0.0591470501748,0.058467055142,0.0572211510884,0.058526820186,0.0584063297697,0.0629212944849,0.058485970962,0.0587998679634,0.0597919176565,0.0617154681067,0.0593629151904,0.0584048672317,0.0584563269676,0.0565036549011,0.0604426835554,0.0616212055909,0.0567587686408,0.0590195766734,0.0626737849368,0.0604578213511,0.0580331450718,0.0601845861277,0.0609650862119,0.0602381574602,0.0614350575904,0.057675434257,0.0614435647344,0.0601357747143,0.0606436947824,0.058516660023,0.0603949705967,0.0612807382314,0.058676514521,0.062078711286,0.0591027958568,0.0627753295078,0.0568733542969,0.0614661025879,0.0599697922713,0.0578262691074,0.0604992858605,0.0573446399649,0.0608952893807,0.0575454564564,0.0596462828169,0.0584359546775,0.0613956781304,0.0581551890517,0.0596317463966,0.0568177903081,0.0624661475829,0.0594039733269,0.0595157041224,0.0625432382959,0.0589886090546,0.0599593815068,0.0614006997236,0.0609971295995,0.059644376798,0.0575743926486,0.0576005519456,0.0614582203163,0.0579799506881,0.0572147898719,0.0632280691993,0.0573247291651,0.0577851114325,0.0609633833708,0.0598527056738,0.061395890046,0.0588336341589,0.0589329561808,0.0588594830734,0.0575033699712,0.0636153242894,0.0614667698898,0.059836059967,0.0609490477428,0.0599427215578,0.060992235703,0.0617394120729,0.0597898915972,0.0616086081686,0.0599585833968,0.0603997301358,0.0579381733046,0.0613763590138,0.0607981981826,0.060961085144,0.0584203973588,0.0599616864129,0.0572786402672,0.0598138660989,0.0588934323424,0.0600343770278,0.0602415630196,0.0583684733324,0.0607680389403,0.062993320632,0.0574086256585,0.0584923329581,0.0601812167544,0.0579784139407,0.0573779165296,0.0630017327435,0.0583718210939,0.0585171184189,0.058155534865,0.0613669118278,0.0579409057712,0.062817072186,0.0613784399263,0.0597049728596,0.0585632128005,0.0586823214224,0.0628116061211,0.0572428072035,0.0629258462517,0.0584716026651,0.0590894912888,0.062075774712,0.0605919214638,0.0586325221713,0.058894588923,0.0595104634257,0.0625367518162,0.0590212952343,0.0567714437982,0.0594129165014,0.062469960423,0.0614876120822,0.0600550869591,0.0604977268336,0.0617609855461,0.059978943823,0.0608883354762,0.0596841192514,0.0607528377946,0.0573074068185,0.059779199051,0.0578427640479,0.0621323486405,0.0578323006126,0.0587510828722,0.0629538807279,0.0586873422163,0.0627785760775,0.0568780687601,0.0579805899646,0.061716254378,0.0593746734986,0.0629321845602,0.0578386572947,0.0589624905788,0.0620820432839,0.0628970090094,0.0584960013579,0.056514592837,0.0615457759188,0.0604177830247,0.0604087851543,0.0616301921087,0.0590449330796,0.0601335773987,0.0576854913489,0.0580541040744,0.0604638351777,0.0602104325046,0.0609567743297,0.0612931762639,0.0603727593784,0.0585154840033,0.0602179813966,0.0606605959591,0.0607402992078,0.0624186049465,0.0596818112761,0.0605764843196,0.0586418303659,0.0629173567506,0.0584563520542,0.0596765598385,0.0599895918732,0.0624447935436,0.0586029827012,0.0616856101553,0.0575607114475,0.0597098614745,0.0583943402342,0.0567541791485,0.062639679851,0.0572141888902,0.0632281967766,0.0584620551142,0.0613922234501,0.0591338295615,0.0613816159532,0.0574750795995,0.0635785441598,0.0578159100694,0.0572651244042,0.0628414012199,0.0587136259924 }; const double PHI210[NST210] = { 1.64205163325,1.69576891668,1.55302696835,1.65786003915,1.81035172201,2.95259004663,2.1249446318,0.741493568919,0.723553593224,1.93599048719,2.14282114279,1.25007811366,1.04182127262,1.02635892657,1.89145345108,1.79361677253,1.35938818867,1.42485102221,1.14838278674,0.99705814157,0.879634603933,0.661399804237,1.19669679328,0.901890653771,1.25556457096,1.09770289637,0.579064320031,0.621791804787,0.844020570294,0.984616886048,1.33441999678,1.06374203844,0.964463053263,0.832904133211,0.787902716094,0.384126785123,0.193770593424,0.230221614714,0.0258511719668,2.29424459936,1.57959835114,1.66096165612,2.02038929766,1.87437724004,2.7967870441,2.57806523377,2.54229714419,2.74506583765,2.56484307545,2.76896456441,2.79822718898,2.40784507977,2.39643720059,2.3985253715,2.01370066215,2.17944064897,2.24307873494,2.16227518747,2.26993357228,2.49615785582,2.59775839819,2.44354220202,0.689805061893,0.57833006518,0.229284323085,0.360440748487,1.0073335915,1.41544068882,1.36449124173,1.28860835751,0.959186224399,1.07431141218,1.3581705353,0.934410333228,1.24797450007,1.05837374614,1.18734698209,1.36397470589,1.57816229938,1.21923419499,1.55309323497,1.57152650421,2.17261512819,2.38703490527,2.39338068556,1.42189920262,1.40660925281,1.7655980271,1.57984248649,0.806267324898,0.818214934415,0.596523173251,0.386029486161,2.73802075954,2.51135842722,1.72581766695,1.45542742879,1.51104402873,2.19551383769,2.07767437816,1.8662363286,2.1120863193,0.924544541244,0.690862683385,0.463363640366,0.815794901293,0.763338309699,0.575726556235,0.39331749424,1.9457428196,1.32072054276,1.16256974512,1.21952868619,1.52597051393,0.397865345695,0.623162592102,0.528110489743,0.336544697462,0.771426356384,0.723598572609,1.64128627014,2.0707360693,1.92155721418,1.72141391838,2.28106769262,2.40959460303,2.28062500769,2.47147745477,2.51885325753,2.33072695699,2.79251702411,0.616314122133,0.806705678975,0.815716331747,0.661954521122,0.405339624566,0.4521778649,0.925064218937,1.0589084659,1.03320964047,1.28856108935,1.39045917049,1.26440078704,1.0242404107,1.19744440575,1.03369958106,1.21646246586,1.39237158135,1.40225505447,1.76758417533,1.93700633118,1.76454410323,1.9499660554,2.14730644024,2.13545656816,1.98608460922,1.6168700403,1.78783418139,2.05458452062,2.3685657813,2.00855332643,2.15563926497,1.61093369862,1.80538304526,1.54683911135,1.93510725406,1.84878497536,1.65814535928,1.09766452354,1.26262357329,1.14102277134,1.02812642169,1.44663233161,1.37207112602,1.33295478463,1.14864395093,1.89770419679,1.82155289681,1.74645486036,1.59454684036,1.52214661489,1.44352702927,1.75186435933,1.62439043882,1.72292328059,1.94695209096,2.07866750423,1.97770340891,2.69636664599,2.87665546543,2.63360042872,2.73120366038,3.09064928718,2.93583934137,1.67302751761,1.63464142831,1.47493025448,1.45193138294,2.18301658924,2.00211427025,1.82023680452,1.8367515343,2.19174625482,2.0262701945,2.59972261129,2.41393475512,2.24074845605,2.57216772373,2.37119677121,2.22279345708 }; const double THETA210[NST210] = { 2.3098846686,2.51498827854,2.68012833101,0.0253666627587,0.169392501915,0.657387339984,0.490992496048,2.65116816848,2.99039328198,-1.33637194821,-1.25929241163,-0.820476371327,-0.914252056679,-1.14541300435,2.61460431107,2.16523771779,2.05625646871,2.2600818858,2.00125526765,2.17173043291,-0.74576225749,-0.774975400854,1.37253440654,1.67259232958,1.61581745265,1.76047374954,0.966195650031,1.31010293167,1.39389491435,1.24123813693,1.25316102984,0.485401641265,0.965288700881,0.534975301238,0.805233885293,0.745276341802,1.21251649094,-0.764791583187,-1.12050850745,3.41360652402,3.05851654701,2.88457603863,3.00851756579,2.85098373261,0.161582322815,0.369567296303,-0.39571709708,-0.42610149364,-1.17299105175,-1.05040359745,1.26023224126,1.6191403593,-0.133349902,0.15804166089,0.0978082156619,0.257530292958,1.16067774104,0.919665482458,0.691073140548,0.68949601478,1.0575356908,1.27195547124,3.53384992091,3.21130754361,3.5834542682,3.03368656478,3.92616241998,3.77002143123,2.64946743748,2.43191979551,2.60811904911,2.40408063841,3.06261372911,3.06693442885,2.8588724022,2.844681848,4.07671837497,3.99066661754,-1.52993974539,-1.26792675509,4.10440742845,4.31203289817,-1.03235218752,-0.654603856943,-0.93371694055,-0.948376107971,-1.17259391141,-1.20673370066,-1.30175727126,-1.26120094063,-1.50510564814,-1.08064272864,-1.25879854111,1.86229151811,1.88769911124,1.95660042833,1.69543596408,1.90082692269,1.64348140361,1.8453758932,1.79774553277,1.3867140271,-0.463593331996,0.2993046879,0.285856421731,0.041182803929,-0.243671501861,-0.410145218339,-0.216522785756,0.916946204154,1.01696649562,0.873326483872,0.649257589157,0.956032860751,2.45251451828,2.41164607697,1.67153574443,1.8714005006,2.13046071178,1.8582050896,3.76128011224,3.85059706488,4.0269999738,3.9668915638,3.90980617712,3.67880926501,-1.4912014996,-1.51903458212,4.38233131068,4.19517607477,2.37620326197,3.83849032401,4.0337289192,4.30668850618,4.53228423379,4.00956877064,4.51110072448,3.50625848105,3.6827104587,3.28074139158,3.62143125874,3.42060521145,3.25877645417,4.42868725391,4.32026717414,4.67694501915,-1.49811204608,4.4350505116,4.65698916594,4.39365473246,-1.5703398017,4.61773603201,4.25255832151,4.34731261372,4.59255061866,-0.889545282254,-0.855347040364,-0.980104266793,2.49810713195,2.15703945805,2.24630581705,2.09035935479,1.53255344431,1.57641652788,1.32967977034,1.36736049108,1.13238464709,1.14075761621,-0.411900644574,-0.595308140516,0.277774073429,0.0706636747074,0.0726806696981,0.258746996198,-0.129780691837,-0.149468007419,0.535945714201,0.735798218433,0.381562620205,0.765355530577,0.420094078399,0.607744191893,3.60197558083,3.4114790067,3.24402822918,3.23324483432,3.42444692424,3.62831376894,4.22893605183,4.67549316729,3.74614924369,3.3674029025,4.22950188064,3.03273391803,-0.198591200116,-0.638277362782,-0.301397371083,-0.510682787489,-0.534757890292,-0.653251989401,-0.533215802892,-0.298009885792,-0.26480792881,-0.153162415167,2.62995761815,2.4684206133,2.63803785048,3.04010873968,3.12922806285,2.92481792802 }; const int NST396 = 396; const double AREA396[NST396] = { 0.03196806835,0.0307724814763,0.0326670909823,0.0316753895894,0.03241593564,0.0318400794937,0.0325723045501,0.0316902612656,0.0313380298612,0.0304442548717,0.0329109704209,0.0316294159061,0.0311261854815,0.0324481846991,0.0302529332871,0.0299337495325,0.0336586239237,0.0298606799971,0.038943019973,0.0313518618684,0.0324459235281,0.0300835348858,0.032919542974,0.030007112045,0.0339456101877,0.031439248786,0.0311274136036,0.0308412242929,0.0332299213076,0.0318391625081,0.0307473344078,0.0327271256857,0.0320582010291,0.0317433101989,0.0315504238471,0.0315502765064,0.0329668656051,0.0307051346218,0.0314888481773,0.0326729310569,0.0313903090479,0.0328447962789,0.0312767914791,0.0317042423325,0.0328018064884,0.0310766125467,0.0317446089275,0.0327723364577,0.0316257100321,0.0303708758793,0.0309141591621,0.0310952382243,0.0302798893944,0.0308007312497,0.0327397848397,0.0315083013587,0.0325358857685,0.0319347878067,0.0321014582275,0.032970012598,0.0294522431313,0.0318511860402,0.0321735593042,0.0317112070203,0.0319092112013,0.0316329736358,0.0307040867842,0.0306476131915,0.0308413200566,0.0304029429484,0.0333360012636,0.0303345472719,0.0307816747325,0.0310187657823,0.0336805232324,0.030452737782,0.0308530647428,0.0314817165838,0.0324917977933,0.0321975864164,0.0322787063524,0.032131488421,0.0313014745753,0.032024567557,0.0323005973735,0.0308533426957,0.030761375968,0.0304687609196,0.0328390590568,0.0314926720471,0.0323383202758,0.031274873493,0.0319807975883,0.0319575858874,0.0299756554502,0.0326093302885,0.030577241214,0.0380165862533,0.0336345019351,0.0310158066808,0.0313364596216,0.0325033809997,0.0310069926698,0.0327023874213,0.0306648669175,0.0331308246036,0.0316587111431,0.0316290706979,0.0312239071564,0.0318444879588,0.0313310499878,0.0326993452984,0.0319956577793,0.0323353884764,0.031139279012,0.0318422796366,0.031488419299,0.0317694166571,0.0325892444505,0.0315655265794,0.0322149103406,0.0318590285214,0.0321988505034,0.0321150233477,0.0312783897417,0.0314978456415,0.0308145540461,0.0319389362847,0.0305842802071,0.0304751069434,0.0303407069125,0.0309307558749,0.0312477297644,0.0329290265655,0.0304135212529,0.0327095998468,0.0318167332071,0.0322522842709,0.0311297488753,0.0313816509232,0.0317180516934,0.0313433164486,0.031234905619,0.0328214865829,0.0312255669176,0.0332255183054,0.0327989491842,0.0309694878391,0.031226670151,0.0323111999794,0.0327167412032,0.031385334616,0.032328856459,0.0325014437715,0.0318304554517,0.0318672729691,0.0318016591845,0.0314340208606,0.0323390971949,0.0306674931114,0.0320663397708,0.0327848186549,0.0334842664009,0.031650894515,0.031044259039,0.032426730159,0.0318835323752,0.031932534153,0.032123778789,0.031383197724,0.0313208234634,0.0328927228934,0.0319576405568,0.0311663378929,0.0317523680796,0.031391973863,0.0309971828016,0.0323414232078,0.0315839127426,0.0324004692026,0.0314150856752,0.0307800163387,0.032834147999,0.031808738222,0.031655069784,0.0323372575461,0.03002487425,0.0316408645269,0.0319456214575,0.0320576490491,0.0324915309134,0.0310442404533,0.0314989764372,0.0311289313323,0.031855686058,0.0313448749221,0.0316085724141,0.0318854131335,0.0329953570563,0.0317759351331,0.0309336870324,0.0326655163441,0.0318016069401,0.0317647839363,0.0311175453967,0.0320308170714,0.032119204769,0.031264618296,0.0320172078262,0.0320723692976,0.0322087189005,0.0316590903441,0.0322845740305,0.0317335423549,0.0310281091071,0.0304268850935,0.0331252581373,0.0308080108274,0.0317667212385,0.0326650019839,0.0312366672035,0.0324600392685,0.0301425063795,0.0305081962146,0.0306387982171,0.0312662513038,0.0300178583765,0.0304862962875,0.0324863640379,0.0335447409856,0.0308724659125,0.0317489484094,0.0308301367763,0.0318638768295,0.0331208227813,0.0313004376747,0.0311332290901,0.0310870703121,0.0311057145924,0.0331623093442,0.0313980020344,0.029995772295,0.0324180209079,0.031055061027,0.030518750923,0.0329702883695,0.0310360502093,0.0328873948018,0.0305873140198,0.0322710005692,0.0309229268826,0.0328371562254,0.0315999428187,0.0322659138972,0.0312670341958,0.0311668524703,0.0326672952385,0.0297563832912,0.0336979069779,0.0315124209716,0.032117704645,0.0302264892837,0.0323117122241,0.0321733819469,0.0320926545123,0.0309395063436,0.0331193552439,0.0309339094277,0.0305028805452,0.0329795725317,0.0318733256954,0.0333498422757,0.0318489477896,0.032861365092,0.0312299493823,0.0312764709868,0.0325225197675,0.0330937604043,0.0306935680727,0.0312378311115,0.0322687370109,0.031857647371,0.0311325778664,0.0321099153684,0.0321593297224,0.0317731416173,0.0320959937696,0.0301597393625,0.032420414026,0.0304356824728,0.0328472759056,0.0313759407128,0.0317236405112,0.0325905593951,0.0310072231131,0.0318237805372,0.0320668938192,0.0320413439128,0.0316171356179,0.0324894629487,0.03286636986,0.0310258885552,0.0327809345445,0.031272363915,0.0325601836509,0.0326020913087,0.0313420807296,0.0316103856774,0.0318864546126,0.0315831993899,0.0323906971195,0.0328880274412,0.0315266328732,0.0320219870382,0.0309247504999,0.033227062701,0.0309841400221,0.0309614505782,0.0303308291027,0.0312634025704,0.0314136225711,0.0302883287319,0.0326226568884,0.0303145772644,0.0329859873399,0.0319066766656,0.0311712542463,0.0309737471274,0.0333330127418,0.0313757270155,0.030933370407,0.0326489853417,0.0333350285315,0.0316133563944,0.0307919537013,0.0326898482914,0.0317186371716,0.0332078927676,0.0310222651778,0.0326850446859,0.0314299624938,0.031412241056,0.0327099745256,0.0310583622241,0.0322798738471,0.0316147893588,0.0312112154822,0.0329953333098,0.0310051159533,0.032236563216,0.0317650427946,0.0308034153633,0.0325879614426,0.0308239041695,0.0305579741665,0.0334965959073,0.0304723714499,0.0317272809071,0.0323531238259,0.0311920205473,0.0323627164706,0.0326259036942,0.0307573090302,0.0318530716458,0.03230015494,0.0312356351217,0.0324697891176,0.0309473562468,0.0305052914482,0.0333881565102,0.0327027978552,0.0304401523955,0.031966884925,0.0325524307364,0.0319887962319,0.0319682287202,0.0306708152369,0.032373562358,0.0312290681946,0.0317476091343,0.0327822735816,0.0319771327094,0.0314941880356,0.0311844250801,0.0327073658651,0.0308447664465,0.0305961093274,0.0309767782876,0.0305810178556,0.0308007887344,0.0304984092436,0.0308613805317,0.0305237462805,0.0305747855136,0.0306106529603,0.0308269037684 }; const double PHI396[NST396] = { 2.31176052497,0.696785381799,1.26730066,1.41299632057,1.52601790063,1.50079731645,0.775639585955,0.435847923935,0.581910041599,0.837524756219,0.697660808152,0.650714932317,0.888189413513,0.812527781427,0.314181108795,0.391954236848,0.396118112416,0.0794623070853,0.202185899367,0.186753495252,0.338428563595,0.161379184414,0.30559673095,0.459391806863,0.517718908522,1.45387779152,1.2990637431,1.50525316265,1.49167317972,1.81030593945,1.04803871295,1.92814462286,1.66858401143,1.76512334192,1.67144971628,1.7909592956,1.48857132891,1.63425644758,2.17352033451,2.12458949333,1.65121572249,1.79754025429,2.34332732387,2.19737877394,2.12713449724,2.0968365024,0.854692620619,1.0124522328,1.15939952474,1.0030725586,0.916133241006,1.15632542176,1.17168419701,1.02711253342,0.948959210375,1.51270808094,1.52062129106,1.26831403289,1.40091050632,0.456965478185,0.32015255276,0.490129245876,0.346494294942,0.574989217298,0.429714156186,0.914059332287,1.14784167592,0.867337286872,0.858076781153,0.551464985608,0.613171705703,0.764042190623,0.54343606281,0.577929553359,0.769388604386,0.683596319248,1.35319666546,1.23906885126,1.35988061229,1.21740663206,1.64639883387,1.65326547226,1.78680610482,1.86253861326,2.02837239074,1.79138734028,1.65326858106,1.68881591235,1.13532036251,1.07443044207,1.17989900745,1.29301455888,2.15789536711,2.04144494827,2.12576615189,1.98020105939,2.37642869741,2.24309328244,2.33625527902,1.34741736534,2.05838246415,1.92267875337,2.19474801031,2.19810634856,1.59388777332,1.62267094885,1.71656412252,1.86400372621,1.77496575107,1.89426882882,2.31928601496,2.46260322377,2.1264833159,1.97150452213,1.94798592265,2.72232881227,2.57354541606,2.99603855532,3.00136900511,2.83796512203,1.75822014365,1.64014222598,1.89456770068,2.16307814052,2.43884813992,2.55653218888,1.98518913089,2.1277584552,1.01477773256,1.00822806796,1.88303141384,1.98576513015,2.05925892802,1.90971327622,1.5202758141,1.6547449955,1.6373892574,1.5167944079,1.78174483646,1.79596176859,2.22172919178,2.07734269049,1.94646351176,1.94145923617,2.73608647634,2.73960850572,2.48295059454,2.59339797312,2.08325095155,2.22227743697,1.26520612642,1.22173063964,1.36026769806,1.12053712269,1.09829258493,1.22190257114,1.37776749941,1.26111725606,1.5712875067,1.0266920436,0.893336439274,1.3712570788,1.12483708553,1.22211089045,1.09306209718,1.2910478717,1.42476870382,1.11631511601,1.06676988672,1.449771098,0.936314060352,0.964648146386,1.07602787105,1.09163836884,0.659414320464,0.526859267083,0.811911689083,0.797927770303,0.704981606838,0.562873589921,0.829198058417,0.78924436294,0.876041791699,0.678644861875,0.632951094183,0.564831814146,0.123017001608,0.269966193751,0.169807589087,0.322465894021,0.389680059315,0.411664384201,0.728096159587,0.586058656447,0.864771919022,0.862014772549,0.732397018757,0.594739937965,0.846916496037,0.870863430152,0.992103011174,1.00062089176,0.425435021745,0.564623769417,0.439190189339,0.593368212513,0.715898571219,0.700351112435,0.72302764987,0.772486533884,1.01710743794,1.3113148681,1.16111297043,1.77144805314,1.91370255831,2.02419348936,2.04675901517,1.61847563217,1.62086056626,1.75689129124,1.87786559618,1.76519790435,1.88378732653,2.0190105833,1.95602062484,2.06905691542,2.21849590339,2.18381440884,1.38813271973,1.59049753297,1.43586247662,1.33497090301,1.64615624215,1.54390315194,1.4951636962,1.5488616194,1.59729132853,1.70338407446,1.75079233708,1.80424877721,2.33167022,2.41070695686,2.30782548391,2.47249915878,2.13177411287,2.27635980261,2.04068949643,2.08062867781,2.24564024092,2.26920588791,2.34907929689,2.49312295534,2.70098271424,2.85549736761,2.56078104076,2.74270059303,2.60280545857,2.49628252718,2.48347462691,2.62615241007,2.7635171918,2.59681628973,2.74937161546,1.73807928124,1.59827006103,1.58606200037,1.71818227886,2.15760627088,2.25560824354,2.2876639813,2.01493330104,1.13077690085,1.38084074082,1.38486134993,1.26490307779,1.12625865823,1.25577733428,1.93829459795,1.89712750559,1.81366226064,2.44165521039,2.29506571102,2.27697516462,2.33785138039,2.40594939038,2.54576442129,2.39082087556,2.3010866836,2.14458049228,1.91734856658,2.05930957492,2.16191845626,2.08503070171,1.9183449732,1.85114038973,2.48477118988,2.34601016357,2.59543757575,2.30787674523,2.53572503191,2.3920042891,0.954414959859,0.824344560586,0.673190988701,0.670602038639,0.988306605106,0.838811125455,1.11300122308,1.09417597452,0.818364169072,0.949826443206,1.84599357322,1.9996108456,2.01828907951,1.72218455552,1.75111256124,1.89308845029,1.3843921634,1.26619702982,1.52488866549,1.34459333957,1.50593400833,1.38588361215,1.5079723174,1.44893068153,1.20419342163,1.71582827889,1.83639514791,1.84883958191,1.69414129196,1.30283348825,1.44304154412,1.30142254085,1.57723027195,1.43214018816,1.56746223346,0.917284988669,1.1776549164,1.02047305606,1.50121846428,1.47917964055,1.32896052958,2.5053054119,2.35503579713,2.27035706687,2.24672756588,2.79547488062,2.95556649655,2.96396829628,2.81193859628,1.85270292566,2.10577150347,1.99284804991,1.84476876448,2.09978361572,1.97922051903,1.7438798564,1.48117556358,1.61891659507,1.7375966849,2.62401045801,2.71288124931,2.56723913424,2.53182872808,1.17255587961,0.980731507507,0.998114056929,1.29588473473,1.10587368579,1.24691718189,0.987199791866,0.926368717584,1.03933387921,1.20013412338,2.42405587056,2.42679633471,2.54892490199,2.69865938298,2.55773310729,2.70484906098,1.62875388525,1.53919788753,1.65858323704,1.38880328479,1.36364811454,1.48478363959,2.76725055687,2.82709730345,2.84275386461,3.00403327366,2.98319561957,1.13191993571,1.23385640099,1.22198071564,1.37673049277,1.38359121376 }; const double THETA396[NST396] = { 0.553414398579,-1.46680480798,3.19185953489,3.10677317961,3.1914837276,3.35686814715,2.98877217408,-1.12363409936,-1.03685227222,-1.15213283879,-1.22323609443,-0.784922264222,-0.956189863155,-0.786192405505,1.42448328374,1.01546851901,0.625931087037,1.5603395751,1.82782980013,-0.778899767247,-0.787527664044,0.151967437922,0.244571413549,1.63630584209,1.90426767204,1.50119676711,1.44614038868,3.83869608563,3.68213941956,-0.688405530599,-0.962261685846,-1.3985132466,-1.48158335601,-1.36774457859,3.11509809976,3.20145408165,1.66094721759,1.72747857406,0.601096228029,0.793747937775,0.0518067800135,-0.023995315774,0.326566922594,0.971106186227,1.30257443391,1.13356266269,-1.53727124322,2.68897157331,2.60231016969,3.16387657158,3.00082598453,3.10373314017,2.92844436547,2.85481736472,3.89876643038,-0.0361175165889,-0.199292669235,-0.263582709924,-0.313640943589,2.23000348396,2.40453454764,2.94252108588,2.88410511533,4.65906104804,-1.50862969316,-0.624328978866,-0.379284602795,0.136376804354,0.478483106896,0.545430844609,0.288013293243,0.297813293728,1.12726316592,1.41083317729,2.07712552284,1.8881072705,3.60932550961,3.36554549869,3.44382667866,3.69681232148,3.9233724526,4.08898861767,4.18461600917,-0.823341875558,-0.840767160841,-0.1686657108,-0.25395300564,-0.410208045204,-0.831207409441,-0.66379863812,-0.546562904832,-0.866031234745,4.50115287374,4.38150490816,4.68134619831,-1.56025542802,-1.44453481533,-1.4263910316,-0.948129849994,-1.02276893737,4.20569145034,4.11144237937,3.93137236624,4.1203233827,4.5516028652,4.40456821546,4.65183387708,4.60612501294,4.34342431258,4.44271297558,3.79838553014,3.86438577859,2.93649127591,2.99368205233,3.14422896414,3.73985387172,3.66561319498,4.403514793,-0.63482506635,-0.570652346497,1.96540432745,1.89300229567,1.86370187554,1.66402297435,1.88864950231,2.07936895242,2.66814277518,2.76752888127,0.22978027942,0.423915081812,0.682069637054,0.812087863168,0.467477359034,0.527251818838,0.280102616627,0.199462083245,0.514456237608,0.442639976718,0.433178848604,0.278857398993,0.209563191116,0.296567157691,0.0470280027431,0.205056844662,-0.190889463105,0.234021374966,0.220874767174,0.390384867859,-0.0541666553725,0.0109349217212,1.29421229937,0.968767285324,0.703499349572,0.529884700702,0.711574335669,0.796938677949,0.533972097744,0.448145691724,1.41232818553,4.27557202393,4.5780605498,3.92212964984,4.13854303376,3.85544725333,3.96063420487,4.45478988144,4.57927220951,4.44165399155,4.57666155712,2.46700475182,3.70611967315,3.33417783727,3.61455334211,3.44576673129,3.71379514823,3.54744827303,3.39290946941,3.60382603869,3.21392463529,3.23983594077,4.03012793321,4.4008242198,4.23358853084,3.95895414116,4.39654836058,4.15233339889,3.52804416946,3.3583250748,4.57855267445,4.46634264953,3.68679125539,4.09226279736,2.29437806227,2.40263137297,2.42136691789,2.61182346885,2.7579361343,2.6942941403,-0.0515576004261,-0.441423159555,-0.143410341807,-0.317789181651,-0.0909872633567,0.0130777875215,-0.465005775075,-0.547734726266,-0.375195568882,-0.148788093063,1.45699095261,1.68032124545,2.3490005665,2.38056839044,2.44645906181,3.8582771236,3.94849591509,3.69505415559,3.85859502752,3.59947056109,3.43780475179,3.68894621092,3.61771507026,3.36045358883,3.44989142829,-1.27465141613,-1.11946920972,-0.992644517625,-1.06290050962,-1.25902851931,-0.745539909745,-0.517708842462,-0.476936513068,-0.591714752689,-0.666926953687,-0.778805134969,-1.05006471464,-1.19716631209,-0.927287748597,-1.22000553298,-0.949186479929,-1.09582479067,4.22659748348,4.59642991522,4.43833062907,4.11595888822,3.5636897925,3.58868181186,3.40741731843,3.25923448804,2.48975625871,2.67483831377,2.32688176607,2.33797582139,2.03030197517,4.49782943037,4.55744195121,4.13849332495,4.27324831799,-1.26981907913,-1.02958796615,-1.44417960967,-1.35308933686,-0.820012678235,-0.909103968521,2.13866510858,2.22979382122,2.39358360541,2.47574703556,1.84788837149,2.15033055432,1.9627035981,1.94041362928,0.158729246705,0.0246872833503,0.195508723414,0.271046067853,-0.030925743913,-0.0864323733494,1.10579132549,0.960982580816,1.22000476067,1.65490840088,1.5564405091,1.35590924202,0.966784189508,0.738822605206,0.69232155951,1.18718019161,-0.729864010367,-0.701157454783,-0.273792064013,-0.234271968516,-0.378206453491,-0.549177468287,-0.555847263842,-0.426606211557,-0.0529160495018,-0.13109764163,-0.259967587619,-0.345798780264,-0.550599923544,-0.547114290947,0.794569446828,0.67108652452,0.738039153187,0.979922320882,1.35386554554,1.29438565282,1.23727018664,1.06640171106,1.08783369873,0.982242842493,1.36854555179,1.42006294332,1.58641163313,1.47088556883,1.62794705717,1.68936573855,4.07165987851,4.17981333022,4.15185609817,4.33175366093,4.31043686019,4.70002858749,-1.46300795453,-1.32555302809,4.70817953218,2.63784589704,2.89230859788,2.73184678687,2.9543395849,2.68795870798,2.6213022856,2.85129965886,2.70795558138,2.94072487906,2.86610758503,1.68676685763,1.56032717634,1.52833448263,1.98973596441,2.15496912228,2.23033779162,3.40447628604,3.40144280014,3.05113015897,3.2290986715,2.38125717074,2.44236412773,3.34760958725,3.38073004416,2.21955299147,2.21745625451,2.12528374601,2.39407330714,2.40778344334,2.48972267473,0.918253772112,0.777605240312,0.681601383135,0.753512919597,0.957832210892,1.64516785318,1.50216296014,1.22305437473,-1.44286561188,-1.2556631844,-1.41227329364,-1.31595026923,-1.13338656686,-1.15904240957,1.86550912598,2.04703799761,2.18285309119,2.134022404,2.76158631682,2.97991358575,2.59698272757,2.68500622191,3.14919709708,3.06219485542,1.00909268071,1.2555633819,1.16736648247,1.19429187601,1.03684533286,0.941636681709,0.956757715176,1.39815897235,0.514195987453,0.436231460551,1.57552687306,1.85308094522,1.98379325327,1.70770498523,1.75204248748,1.91639528377 }; const int NST410 = 410; const double AREA410[NST410] = { 0.0299129824597,0.0307320240289,0.0309153261461,0.0299696286292,0.0319534183687,0.0294691475196,0.030023485182,0.0303026642568,0.0308562736467,0.0298191461686,0.0311331473389,0.030612002736,0.0307907608038,0.0319426978796,0.0309633508536,0.0306973265997,0.0301794958262,0.0305731407362,0.0311035896528,0.0308408536944,0.0309598498266,0.0309392594887,0.0318102128804,0.0309601109884,0.0299417024093,0.0304855959924,0.0313938609109,0.0302074249079,0.0306246022142,0.0318000823921,0.029998410983,0.0297420498881,0.0310306646117,0.0304270638651,0.0320652589326,0.0297625264347,0.0290255316998,0.0316085515414,0.0296115775697,0.0325747085322,0.0295452794979,0.0302729706974,0.0286061602708,0.0310961935849,0.0308494547391,0.0310935787133,0.0312587957644,0.0309131648657,0.0316958038622,0.0303013470206,0.0312245227667,0.030272519866,0.0309710741949,0.0303570951594,0.030893364684,0.0299311903796,0.0309800310946,0.0302318339392,0.0303718081532,0.0297274128963,0.0308124659236,0.0300514293267,0.0317377640383,0.0308039356793,0.0308764943404,0.0300617889642,0.0314358583758,0.029765762832,0.0316050043829,0.0304439199212,0.0301702717785,0.0312268294637,0.0303051984036,0.0307298918567,0.0306690421719,0.0306571926243,0.0304507918055,0.0302169963709,0.0316185008885,0.0314752830163,0.0315320734599,0.030902351624,0.0311638658398,0.0307933033015,0.0304434756777,0.0299480034398,0.0292859714715,0.0308249397375,0.0304907401372,0.0292091807266,0.0295931275008,0.0313919805121,0.0301248316218,0.0305154385749,0.0317658060508,0.0317187173641,0.0301446816851,0.0318398401571,0.0301952898698,0.0303795504453,0.0316384004301,0.0321805731835,0.0294645187812,0.0320609447599,0.0290485445939,0.0317996897304,0.0292303503153,0.02965929487,0.0332441387196,0.0309247859261,0.030816087616,0.0309984490658,0.0308799605778,0.0308306155927,0.0310129302208,0.030939213497,0.0319028673155,0.0291278976722,0.0294659816308,0.0300411609629,0.0315313513416,0.0308916659388,0.0306849685504,0.0315292465398,0.0298874496687,0.0306026312778,0.030470431744,0.030236039873,0.0295412956344,0.0317172390244,0.0292569707308,0.0322127054158,0.0297760026204,0.0316530681698,0.0294459780912,0.0310295751943,0.0306835665842,0.0311185578547,0.030069126698,0.0297826622024,0.0296354513127,0.030052286933,0.0295516536586,0.0316589367617,0.030056586263,0.0312072025853,0.0305813024071,0.0309921633675,0.0301914266726,0.030020424037,0.0316523873737,0.0295361647593,0.0295354979509,0.0299823489676,0.0319934365347,0.0291096087685,0.029923329285,0.031364411003,0.0316809046034,0.0316222272502,0.0301206268156,0.0298315945889,0.0291388312107,0.0299357224509,0.0312065035374,0.0302518564518,0.0301406174903,0.0308157270653,0.0308016705586,0.0306678812575,0.0302485507401,0.030792207603,0.029930570345,0.0311923445463,0.0301768036651,0.0298608399015,0.0295616841075,0.0313346099056,0.0301475700746,0.0312543461898,0.030176680937,0.0314060305622,0.0309896311177,0.0305024650262,0.0292679273851,0.0310759052233,0.0307527669866,0.0316129079446,0.030965034841,0.0313615577728,0.030669334324,0.0316084260038,0.0308816976349,0.0303145889298,0.0313658887989,0.0302449343788,0.0303395279741,0.0312519695258,0.0314380679724,0.0301170433977,0.0306686669286,0.0311095918031,0.0297020132732,0.0304355910579,0.0310651613969,0.0311802663682,0.0312936431483,0.0321310877235,0.0307458684122,0.0307460898388,0.0309950219528,0.0301877309588,0.0302151325138,0.0298547396812,0.0315109254777,0.0295627515854,0.0317062929798,0.0300104451315,0.0306010981062,0.0313361122384,0.0302241548151,0.0294489936194,0.0297907436981,0.0296230594953,0.0296774361447,0.0294817024298,0.0315989105478,0.0304229551128,0.0310896515175,0.0304268939309,0.0294646882226,0.0297483700194,0.0298926457858,0.0298403537265,0.0315778618945,0.0296071357864,0.0305690333738,0.0320621713813,0.0309874780337,0.0300963605887,0.0311910002725,0.0315032172952,0.0301617286562,0.0313181522078,0.0303186449238,0.0304486253852,0.0313165487644,0.0298299854575,0.0314776121318,0.030076500068,0.0300246910773,0.031328761322,0.0304409717027,0.0300274109162,0.0308390895042,0.0319496844781,0.0301255915414,0.0310881160854,0.0290815572054,0.0299847138934,0.0319559816127,0.0295477924393,0.0322169961222,0.0318203226009,0.0298167547018,0.0314530549827,0.0293415855739,0.0323375971545,0.0314010899119,0.0303801069701,0.0312816502259,0.0305253300803,0.0309496656844,0.030987357797,0.0299486991471,0.0311547833035,0.029439104906,0.0333708611358,0.0303004975337,0.03163179902,0.0300136282978,0.0311251878812,0.0309338554975,0.0298105010126,0.0317726110973,0.0298309022899,0.0299813436874,0.0313329131616,0.031225375632,0.0307152065066,0.0299870375341,0.0315669213318,0.0310069265204,0.0309555520175,0.0316736587337,0.0308349894336,0.0310102490455,0.0289813978977,0.0316981825778,0.0309273367437,0.0304082390044,0.0307878414466,0.0315796535706,0.0302561284289,0.0310037229568,0.0294316475516,0.0305244715365,0.0310213598203,0.0317998225601,0.0290569696971,0.0307081204205,0.0298625794615,0.0299585137948,0.0318982180957,0.0315864556666,0.0301196045651,0.0315333371795,0.0298539002282,0.0299331680664,0.0317187209179,0.0300509596342,0.0315098266571,0.0302036543084,0.0289282082694,0.0310956719125,0.030220154128,0.028631660003,0.0362327530196,0.0292309971705,0.030327431934,0.0295290340108,0.030852334661,0.029162731607,0.0309210964491,0.0310809249519,0.0302558775191,0.0308360409944,0.0311435721574,0.0303166325831,0.0306422912407,0.0295869804444,0.0297213858306,0.0317589796641,0.0312282754206,0.0310160578024,0.0310517379724,0.029765275103,0.0315166675688,0.0300934575307,0.0298321656549,0.0294149519979,0.0322128408144,0.0293060949493,0.0309099154567,0.0303071328887,0.0294991792814,0.0315871440393,0.0303780832523,0.0302445763883,0.030846907202,0.0309176055113,0.0311104505302,0.0302080288306,0.031145593049,0.030316578581,0.0314758520407,0.0311292945133,0.0304988808147,0.0309548730729,0.0304143310228,0.0295977924873,0.0315857518118,0.0296928972381,0.0314958394983,0.031716920616,0.0300696857084,0.0303309583233,0.0303121284687,0.0312810114906,0.0315982596429,0.0308405763402,0.0300214065963,0.0318272065916,0.0316762774121,0.0298907050404,0.0297776567928,0.029740321963,0.0314617719273,0.0313560539584,0.0286992805296,0.0313396541203,0.0308761220603,0.0310023500675,0.0303950501978,0.0297332552768,0.031305875983,0.0310950726996,0.0305543074724,0.0308583861412,0.0303963961715,0.0296806831435,0.0296144496653,0.030064767368,0.0298234603482,0.0297687222342,0.0349891118046,0.0291406322241,0.0330612047124,0.032101109251,0.0292492977166 }; const double PHI410[NST410] = { 2.86032076088,2.33372649195,2.39270650727,2.17095880499,2.09986127386,1.02546867271,1.31024657447,2.43342238627,1.79173846398,1.67890464929,1.75969664006,1.79066124912,1.91494110116,0.940336286455,2.71633997831,3.01004070729,2.45121661339,2.17449420354,1.52170772702,1.44658789936,1.43989679015,1.28039580316,1.60664897957,1.52788360362,1.56677129665,1.67129742604,1.61871858361,1.3686354429,1.54549369364,0.159865658595,0.313580782093,1.06012197017,0.901333984109,1.87878751841,1.90522748918,1.78942225291,1.65150105672,1.4468275287,1.47514798151,1.62088384372,1.73274664103,2.04048637281,2.02272377701,2.12668505097,2.15905869536,2.04180505934,2.39886561389,2.05047036351,2.31502816775,2.30842062779,2.17078754355,2.17976891404,2.05159221692,2.18253866454,2.05645186456,1.91929834065,1.92167664196,1.92719541175,1.98682771428,1.30542245346,1.1965294465,0.990888512766,1.02335571649,1.28305430709,1.34361701782,1.04199312027,1.12329549588,1.1075895259,1.24880738526,1.04164891818,1.01047609631,1.11303874269,2.13683172728,2.18119778581,2.24122454453,1.08939577757,1.08442051042,1.21503939567,1.21302939772,0.868688364089,1.78025211423,1.35851471797,1.49560277147,1.65113822451,1.64189595405,0.815755771957,0.775321193943,0.62250022047,0.505908519742,0.591882436589,0.511871970109,2.96908501772,2.86029685699,3.12233937018,2.58524880699,2.82968904342,2.29771051721,2.30970730926,2.57846828059,2.60264656895,2.42183801432,2.04579608098,1.76407021605,1.53051429101,1.61007600946,1.98549794995,1.95106622016,2.20124737343,2.06416156303,2.82424636905,2.87758578499,2.73642511102,2.66202131483,2.58864950348,2.55813856605,2.30405760619,2.44321254244,2.30294925327,2.46938397395,2.33851918771,2.33250364119,2.27371148644,2.30356110305,2.16788779118,1.34725854119,1.48620501891,1.52254367021,1.6840409908,1.69219249659,1.76865422593,1.49125774717,1.35784639397,1.53459223248,1.44833327653,1.05927565021,1.20141289931,1.21528406666,1.28694545706,1.750910695,2.02548566745,0.938702270104,1.51745693156,1.49838904852,1.75574775773,1.67878755971,1.6521757848,1.87996186966,1.74156396616,1.70810159259,1.94252021576,1.85949302424,1.17640623434,1.47052483641,0.692359418911,0.416952937705,0.558595939514,1.07248614926,1.20333748758,0.587623466462,0.438231935823,0.437977567753,0.711778020402,0.344752303086,0.115929713487,0.277764026521,0.352624656664,0.32910431125,0.26732464865,0.171614199479,0.115784841481,0.700331743091,0.853359054507,0.954043719559,0.97701118931,0.573109797194,0.638162615434,0.819487646631,0.689858184402,0.868451285806,0.79870585411,0.187170842199,0.435804837495,0.19287283202,0.338741970375,2.05947195081,2.19567519982,2.08142021113,2.19669779558,1.90736238483,1.89936524079,1.7698278445,1.64429462509,1.52070765204,1.55843375738,1.69814029353,1.81053256344,1.27183824824,1.37124557466,1.11847555078,1.33272717142,1.4436417391,1.51835388626,1.25182248952,1.37232578074,1.24033621456,1.16486146607,1.27271356475,1.45843964241,0.571738791938,0.40757593493,0.415501128845,1.77586403461,1.9056628229,1.62274614611,1.6283154483,1.74752758687,1.8823656108,2.71475360797,2.86886594386,2.97805015447,2.86426663926,2.68685634736,2.57816515396,2.58185138086,2.43835753015,2.43560274084,2.57776380917,2.70821935241,2.64988247059,2.42199369959,2.17494561374,2.33142270802,2.39281631121,2.16984404889,2.13485673842,2.23886007895,2.25789834379,2.61588181369,2.84837345076,2.69682958716,2.90518625826,2.07239273483,2.1183641812,1.81970842796,1.91929346215,1.86006245857,2.00496526063,1.24434125022,1.1053338667,0.99838662459,1.05224344179,1.20574955441,1.29221263235,1.51508007184,1.45274210653,1.42205653022,1.28605069723,1.30071504872,1.22674830347,1.0434215701,0.971027628111,0.819912727133,0.737554522105,0.966851885093,0.815721143614,0.831662049988,1.03608503295,0.913827687826,0.985553506438,1.06877780185,1.20789112877,1.09160233489,1.41027209908,1.36584087325,0.883036264924,0.803075042113,0.843906749739,0.701121062774,0.426625739452,0.335214366591,0.438416497734,0.58539159372,0.643598563992,0.576329712452,1.16537399472,1.12898260656,1.31310233373,1.41109599521,1.37081490686,1.23648894642,1.07085281343,1.18646701952,0.910652799269,0.869993236248,1.41606550702,1.64844716705,1.78191231395,1.52089109507,1.53329872144,1.58140856926,1.62046635907,1.8710972439,1.77008084311,1.3967733419,1.65401137452,1.5222646758,1.88623183657,1.98914959028,1.58909886389,1.73091366924,1.48698678609,1.5462871771,0.557980728209,0.598721761386,0.852512473315,0.753025665938,1.96630264159,2.10354115251,1.90359995656,2.43919181086,2.31774348015,2.32697875859,2.58920210037,2.00976605618,2.15946094387,2.18856206256,2.0551523511,1.88930233392,1.87127353752,2.77209248523,2.64466499815,2.70386153142,2.55246513174,2.45530368961,2.48833698897,0.684572258814,0.580040026572,0.419923108273,0.395615811816,0.893912057552,0.783783426547,0.531938716315,0.658400460486,0.57929318602,0.743935139391,0.823540196158,1.83390183046,1.69443023228,1.67337979615,1.79451062183,1.95724805639,1.93892667581,1.63063917333,1.73934106297,1.68395976576,1.52575120389,1.41571472184,1.46631404084,1.93144906618,2.02083275799,1.94579115163,1.77443313635,1.78623096889,1.70297033884,0.692973286945,0.685539930114,0.953129174065,0.834007320236,0.949800272898,0.824351613896,2.20172683575,2.46103018463,2.34899988027,2.59562178478,2.65512258381,2.71775677311,2.45312997451,2.49591691427,2.41137277295,0.809827908358,0.646774873439,0.586382804607,0.708095373932,1.00828756864,1.16314895266,1.28199249991,1.34663421161,1.29742609087,1.13758170663,1.04461891843,2.14953935689,2.00532184898,1.9211780992,1.98922021007,2.23015294664,2.3858308471,2.16701864746,2.24487050544,2.48845378061,2.40713436997,0.850596996327,0.895690384084,0.992532055449,1.06150034358,1.2687454915,1.12762840857,1.37909861426,1.37803186572,1.25560947976,1.12094523251 }; const double THETA410[NST410] = { 2.9837431682,2.40619034425,2.22899884976,2.42010341856,2.58663159374,0.546173902807,0.459303944287,-1.19926142814,4.64525696982,3.22218314742,3.35305779021,-1.47924550431,-1.37335227363,-1.16364269032,3.16628180938,1.47113485741,1.80737706364,1.59779274007,3.23667428927,3.11894734528,3.38156741894,3.41466447476,1.9775203127,2.97236961748,2.12504050577,2.23972689492,2.38800577825,-0.313903964523,-0.0613687240967,-1.20979759425,-1.37534818035,-0.257667629864,-0.234262057121,0.223223666592,0.0464667477931,-0.0253571411146,0.0525034027599,0.408708052318,0.251725550113,0.201840848801,0.2981795423,1.49382565854,0.770526172409,3.83138885464,4.01737549118,4.14334492753,-0.989347477331,-1.42773274503,-1.56645728587,-1.35098156629,-1.29804197514,4.40225995612,4.32212963588,4.5979970417,4.67724606112,4.41350389169,4.57610792061,3.63191851812,3.7934796215,-0.874486432958,-1.00534131185,-0.843684635847,-0.991982900044,-0.436195981689,-0.58553107827,-0.551467000488,-0.415787464308,-0.711174017051,-0.725138765228,-1.33323413534,-1.5267506627,4.62649777664,-1.11695032666,-0.802933252336,-0.967712082397,4.44825450759,4.09313513269,4.35386783935,4.18987890142,4.70595950785,4.33715603018,4.42574715021,4.34519376357,4.56181022241,4.41412932318,-1.19811506142,-1.41843667112,-1.4409217119,3.03751118982,3.30025202345,3.55530838217,3.49385280963,3.94967078424,4.11284020147,-1.28218775526,4.48663284158,4.07079843171,4.2828233929,2.67104042966,2.97703121514,2.6066668063,-0.0408785400594,-0.188738661302,-0.330484620367,-0.208569590762,0.31295858409,0.485780597538,0.557752786762,0.603360611145,2.46875287155,1.99307981006,1.77978504681,2.43767879992,1.94154791133,2.19771331714,1.26627760785,1.57126676712,1.4921811997,0.529636514932,0.675516037982,0.847251990341,2.0751022269,1.89169324847,1.77310490149,4.12135280356,4.20199639138,3.49370496065,3.47978886769,3.73608980021,3.61474420429,3.90203038447,3.95912420423,3.74822461155,3.64088062052,3.00935967827,3.29410868677,3.01665108375,3.14330243889,1.9366117951,1.83489976472,2.24523534636,1.71333493716,1.86838302354,3.08309368249,2.95089072321,2.66541832444,2.77132245975,2.79821111015,2.51117037093,2.61151713934,2.48424339177,2.46344329912,2.40753120408,-1.03993378389,-1.07380052783,-1.18414254499,0.370454929481,0.332537105597,0.930381105672,1.36484088638,1.00444268735,1.09408375646,3.06125645611,4.02570699056,3.90362657227,3.51911835928,1.63579231562,2.64974253733,1.4802757776,2.48976391893,0.00631890973032,-0.0621313854439,0.241665333323,0.0715307907066,0.434533727164,0.692519882795,0.340149737001,0.25209458791,0.546832003581,0.704541395524,-0.269847296575,0.336281223415,0.609758088592,0.664797667101,1.32246797858,1.20407739687,0.941611890906,0.975090244391,1.55376957215,1.72278039353,1.77464628131,1.66205129429,0.673000437169,0.515266180308,0.455888623009,0.552226272664,0.621699470701,0.72804810764,0.6707670527,0.886911433177,0.990529283631,4.63827621666,4.6763928616,4.57320052346,-1.13417972566,-1.29326944021,-1.43581421169,-0.874630115274,4.60090507231,4.19074055572,4.54105766048,4.18976706276,4.09079395475,3.98574711964,4.12579830656,3.88536730907,3.92400185883,-1.08144023816,-0.290511882345,-0.820827123749,-1.25936770734,4.49180226533,4.25526114653,-1.5481600191,4.61910718462,4.37594720296,3.99595388968,3.79139365232,3.50180177545,3.92089988917,2.72917891691,2.75725059561,0.326836490266,0.061637847864,0.241113156561,0.367719237259,-0.630930341958,0.561325108482,0.240508187947,0.270014844351,0.83323044637,2.29057986339,2.12058634389,2.20814767838,2.32842389524,2.05097937878,2.00376003751,3.85301652415,3.91564952066,3.79515277094,3.61687850876,3.573473061,3.68692532452,2.69400297011,2.84849752905,2.55992787647,2.58566650989,2.8688869731,2.73991197203,3.31130679346,3.1510325754,3.12367006737,3.30873979215,3.4751653386,3.50083746244,2.1066233498,2.53625440167,2.44033623093,2.83761504966,2.71841340211,2.31182510476,2.19542843845,2.14820743173,2.28367382195,-0.562700309747,-0.404974781129,-0.761281514658,-0.826055078013,-0.688424454078,-0.342849972729,-0.0398856530142,-0.149918692181,-0.402056482521,-0.631052468897,-0.131060922325,0.029177567406,-0.165234928549,-0.0353736418988,0.12970143971,0.158367140469,0.836655818508,0.944414062797,0.871238230225,1.03500255277,1.15531628835,1.50112584152,1.44657557236,1.40683892637,1.25430429326,0.934130871011,0.774161214433,0.81308151595,0.714173791146,-1.39369572818,-1.41777913391,-1.49788245662,-1.20964706014,-1.08623975124,-0.470461819171,-0.492603095082,-0.602579754255,-0.743167604197,4.04843620241,3.7727978306,3.85912253365,3.70959373106,2.91636491195,2.89795367643,3.07599725811,0.113013014077,-0.019508304982,-0.227601017478,0.0319228052722,-0.511166801204,-0.485264935045,-0.303035638948,-0.205522373214,-0.27826556799,-0.407280971984,1.06079234054,0.864916590209,1.43570405353,1.3943511884,1.16922809852,0.976403114042,2.15221008327,1.95174820299,1.99047191255,2.34933827555,1.91695489667,2.54376658603,2.52610927858,2.40556807116,2.83236219908,2.91367901679,2.76978973616,0.974456114832,1.03468809016,1.19146959722,1.28776983139,1.06656874791,1.22518423123,-1.26724795699,-1.16716523887,-1.01728743961,-1.00356833879,-1.13046658536,-1.24573257005,-0.93020441913,-0.798053957018,-0.654608654186,-0.90493450921,-0.641110061501,-0.759141559473,4.42083903302,4.18022981895,4.37294003615,4.49584265768,4.17705155655,4.06963370333,3.04705239164,3.10730372207,2.97901981667,-0.259553798775,-0.777883808031,-0.456091642304,-0.365173237141,-0.789733181177,-0.595945756372,1.74538133682,1.72889404508,1.47935483665,1.32201064106,1.15854682783,1.10539210198,1.21074709542,1.89000281801,2.02331941304,2.03993631294,1.90344784004,3.20965884447,3.50017530502,3.35615913998,3.21759067844,3.68799735986,3.71814115311,3.51566298287,3.36291510277,3.52223961718,3.33994765108,1.40522714442,1.59189348192,1.3143232722,1.59242212643,1.73821907671,1.73373541572,1.62661719098,1.47892946459,1.38349580531,1.43165172092 }; const int NST596 = 596; const double AREA596[NST596] = { 0.0207418467233,0.021201950136,0.0218438654825,0.0217732927175,0.0221207973113,0.0201131008696,0.0203860530267,0.0209902556852,0.020508597112,0.0218105913961,0.0204798331283,0.0210479448125,0.02036959506,0.0211322163962,0.0213817298685,0.0212982959931,0.0211217750273,0.0213850109292,0.020441456647,0.0205447429056,0.0219673609047,0.020860910778,0.021640949461,0.0214113338626,0.0211028499496,0.0212318416095,0.0212735269132,0.0207806229143,0.0211703877243,0.0212552478533,0.0214813169977,0.0208663003006,0.0202065805811,0.0206930988773,0.0214787050283,0.0213728115806,0.0218785045406,0.0214461603282,0.020130378224,0.0221161865295,0.0206987692975,0.0215051539397,0.0217491700731,0.0218951799977,0.0202090651616,0.0212423274931,0.0212391153069,0.0210388860234,0.0250662157312,0.0213480891419,0.0209255316251,0.0218232953501,0.0198289127188,0.0211601384457,0.0211627300811,0.021664693345,0.0213748932633,0.0215525188781,0.0211633010486,0.0206516372086,0.0219123000519,0.0208046258256,0.021658860122,0.0207221290126,0.0202920103278,0.020156315849,0.0202087370285,0.0214632032687,0.0213915763145,0.0211147062941,0.0210158042314,0.0216834294434,0.021338371248,0.0201909128189,0.0199554707913,0.0208187807307,0.0211547302151,0.0220061689785,0.0203837657494,0.0219940685475,0.0202900844403,0.0201199840093,0.0208795601221,0.0203938627049,0.021844015416,0.0206600737104,0.021817609096,0.0216010885642,0.0205298903038,0.0206330582633,0.0206093977008,0.021830366254,0.0206959033684,0.0216138154863,0.0206170192284,0.0212564080689,0.0201126658455,0.0200899196234,0.0226014849418,0.0217698984954,0.0205815538055,0.0211516633538,0.0210243457752,0.0214192369633,0.0216518618548,0.0207378311901,0.0209453332386,0.0214574934937,0.0208411742325,0.0207048053762,0.021078135076,0.02133997033,0.0204749535507,0.0201349976221,0.0218844023492,0.0209210009207,0.0208031238994,0.0217649794521,0.0212197605595,0.021199123532,0.0211494931332,0.0211906041195,0.0209108484973,0.0220244088015,0.0205549852569,0.0210821893261,0.0216330502495,0.0211959439981,0.020785633518,0.0212415104961,0.0210603219935,0.0204974688762,0.0217780214715,0.0210977116444,0.0209727440926,0.0206269628012,0.0213499633192,0.0209569096193,0.020883064314,0.021359164437,0.0211564392895,0.0210635684069,0.0214502824725,0.0205188699007,0.0207409241181,0.020862684862,0.0209327555545,0.0214778383725,0.021133414418,0.0215579482905,0.0205679573015,0.0213455797792,0.0210311442513,0.02176870169,0.0212796765678,0.020648454705,0.0212926480985,0.0214391372035,0.0210703172497,0.0212942298901,0.0216945918486,0.0214948855878,0.0215030640078,0.0206321077822,0.020672778477,0.020863357779,0.0205406948095,0.0218141607065,0.0206741354147,0.0215479350273,0.0204634808851,0.0210982262792,0.0218407679983,0.0204241267557,0.0201218967815,0.0209788822376,0.0214824040415,0.0205377664873,0.0210534639703,0.0210424842152,0.0208641443671,0.0209028667192,0.0210234407763,0.021312051589,0.0213605961855,0.0207039405113,0.0206243579197,0.0216704010074,0.0206150023132,0.0218558898549,0.020540428959,0.0202912538541,0.0197941548104,0.0211369718065,0.0210663427603,0.0214144861662,0.021762901545,0.0212048291399,0.020967545314,0.0211800934732,0.021295652311,0.0211299021758,0.0212704070806,0.0208869366673,0.0208667709585,0.020874990895,0.0208121331011,0.0216065995881,0.0205298406802,0.0204564447156,0.0217263149416,0.0212079768379,0.0212815653793,0.0210296140663,0.0207588696376,0.0209189556201,0.0216919732292,0.0207489553815,0.0204067954922,0.0199048115822,0.0222200350448,0.0210116854451,0.0206142499328,0.021480588325,0.0203331983656,0.0211010497958,0.0212957771598,0.0214545984486,0.0205081747172,0.020670705248,0.0218712109857,0.0202615956576,0.0210518589325,0.0215918127593,0.0208831652388,0.0214032432461,0.0204362182033,0.0204195855663,0.0204010500316,0.0203964802398,0.0203040067456,0.0208515000933,0.0216447433341,0.0206809532901,0.0207117940677,0.0217202290861,0.0207456385724,0.0206832131156,0.0211327509732,0.0213444473463,0.0203826996685,0.0207446529033,0.0215719389215,0.0208455729093,0.0214196866494,0.0216189994907,0.0206235925823,0.0210709321712,0.0213027052198,0.0205450346838,0.0217910718146,0.0219793032797,0.0199174139448,0.0206709073495,0.0206684633531,0.0212291318808,0.0209276238288,0.0209354947881,0.021401773734,0.0209562085105,0.0213820518862,0.0198772489766,0.0201865613677,0.0211656011542,0.0205032043417,0.0217070724081,0.0206238555889,0.0202134266703,0.0205688950833,0.0202517515533,0.0218209443672,0.0220253297558,0.0210282218702,0.0206997322882,0.0214847205408,0.0212776280569,0.0205355355379,0.0209160355809,0.0215674019675,0.0217692509908,0.0207424517256,0.020740239109,0.0217252031075,0.0217418184476,0.0207665444631,0.0214117606414,0.02076082615,0.0205668539531,0.0215773968024,0.0209563309619,0.0205222521903,0.0201094680781,0.0218945397651,0.020584560879,0.0215784303212,0.0204219732554,0.0217308761006,0.0210510947189,0.0211640791235,0.0210409537721,0.0211551008733,0.0207725436465,0.0212373659923,0.0207093437287,0.0215964723895,0.0206731039481,0.0212773129352,0.0209609086336,0.0207617080963,0.0215332578891,0.0204779698338,0.0221042642324,0.0203987454758,0.0211364550564,0.0208446299976,0.0214744723703,0.0211509771786,0.0206179633594,0.0206993067091,0.0217122546902,0.0213212831945,0.0213697630531,0.021160343545,0.0210859865135,0.0206737055882,0.0217485837519,0.0206492129257,0.0212086430471,0.0205661733939,0.0215401377881,0.0214003879581,0.0210941656594,0.0208482702189,0.0216781914942,0.0206135596337,0.0216214773855,0.020869202357,0.0216294182743,0.0210187622978,0.0214810750615,0.0202470277924,0.0203811679926,0.0206755235836,0.0200916795275,0.0205826106231,0.020647435137,0.0206270464162,0.0218247330784,0.0217406686409,0.0215379691107,0.020860560772,0.0215121206001,0.0207946391322,0.0210453083964,0.0199256756289,0.0205552689397,0.0207019061094,0.0205886031534,0.0216287631875,0.0218554154658,0.020914289404,0.0216577990755,0.0205827174499,0.0212875586897,0.0206481886434,0.0211711164459,0.0206416626521,0.0212780780056,0.0211721532959,0.0204958396871,0.0213795364774,0.0211044660566,0.0213737313942,0.0207482169846,0.021701924445,0.0218169045909,0.020519433254,0.0210417146416,0.021255816412,0.0207879312156,0.0213590407103,0.0207862458441,0.0211916453854,0.0208614177589,0.0216200644277,0.0209331523072,0.0213862200112,0.0210703024863,0.0208984280014,0.0208539361922,0.02147103059,0.0210185131117,0.0217308340556,0.0204100607272,0.0209035696298,0.0214267373132,0.0209170840114,0.0214929970712,0.0209165052665,0.021489043737,0.0210776649502,0.0206077855555,0.0218748449885,0.021420458558,0.0206790512642,0.0216794836784,0.0204290372996,0.0208208103773,0.0214789786871,0.0201466637669,0.020527888285,0.0241279987666,0.0201251888742,0.0223808542966,0.0203139167625,0.0209070284843,0.0210048080616,0.0198959841946,0.0217151707294,0.0216703558263,0.021132682549,0.0214869327192,0.0209047883715,0.0208992090286,0.0215024570862,0.0213456085762,0.02120245456,0.0211521498078,0.0212664669032,0.0212673630774,0.0211473536224,0.0209310071578,0.0215314716255,0.020753158517,0.0215357423812,0.0209789941711,0.02017676779,0.0214919485027,0.0206327062931,0.0216306666663,0.0206718581538,0.0206151395307,0.0217901117801,0.0213205767553,0.0208663776861,0.021520928087,0.0213464402254,0.0208890226034,0.0210999226799,0.0216172510852,0.0209980682253,0.0207048819924,0.0212552281529,0.021165862964,0.0210737448675,0.0219084479488,0.0222956338005,0.0207931697646,0.0212921134531,0.021574366499,0.0208468067836,0.0211513337799,0.0212569683059,0.0211979854134,0.0210773674546,0.0214227319763,0.0207131737504,0.0211462614827,0.0208396563777,0.0215929241589,0.0216281397662,0.0209438335553,0.0215317096111,0.0208612502321,0.0205627836141,0.0212451178947,0.021280055632,0.0212040622042,0.0207005302963,0.0211010354682,0.0208747133587,0.0213915039848,0.0215225967828,0.0208716893193,0.0209662750115,0.021436759915,0.021616190962,0.0204829080489,0.0206325737659,0.0209525565733,0.0214752511621,0.0215969292876,0.0206669558721,0.0214264086728,0.0210032192543,0.0211784562129,0.0212406854986,0.0210578282687,0.021259471401,0.0212096364106,0.020943567449,0.0214757926981,0.0212620737992,0.0212156499948,0.0212091701733,0.0210762892179,0.0213121779658,0.0213363160825,0.0211912982648,0.021478587737,0.0212518441258,0.0212314183645,0.0207420380776,0.0208971452902,0.0202564170097,0.0219377043065,0.0205765195728,0.0215231820683,0.0215188711339,0.0204393938766,0.0211922412605,0.0211131528247,0.0218709385654,0.0204602810333,0.0214750338543,0.0199850603361,0.0197490609137,0.0214542663378,0.0246783417771,0.0203614225401,0.0207453662452,0.0214009013249,0.0216755866297,0.0210389380799,0.0207319113075,0.0215000425062,0.0209189149183,0.0207654187421,0.0210151048441,0.0212658558966,0.0204502502357,0.0217864672063,0.0200870459681,0.0221297305001,0.0203834747527,0.0212064121188,0.0207772099139,0.0215381842121,0.0207661215139,0.0217436159641,0.0205544653071,0.0208710508032,0.0219432935451,0.0199727946134,0.021250582563,0.0208922263608,0.0212567810996,0.0206732708887,0.0218831289338,0.0205911140836,0.0218271630055,0.0202705368956,0.0216144684835,0.0203731334772,0.0239316064948,0.0201628944461,0.0212399528354,0.0204454294346,0.0217395388934,0.0202848437942,0.0220188291106,0.0205863305868,0.0202972819792,0.0198929738779,0.0222577525772,0.0214443509464,0.0210664386242,0.0210282946161,0.0215184330406,0.0215768636781,0.0209416712853,0.0206067920161,0.0204333384524,0.0203415871417,0.0207553169186,0.0202440030227 }; const double PHI596[NST596] = { 0.927308635196,1.17223773007,0.135468336317,1.05741612615,1.32038937752,1.66465784303,1.70893057935,1.43484509412,1.10079756977,1.22453630263,1.24813462008,1.5040410818,1.84697176124,2.12338680198,2.0959145497,2.12155649852,2.00647264025,1.99410637066,0.0592679544769,0.645809940063,0.546640132369,0.940838509277,0.86640676925,1.3510551601,1.22025803915,0.71876568094,0.664046356302,0.259510715902,0.848612419087,0.737360561062,0.472236816019,0.362100208226,0.180112497766,0.203064714574,0.676824085613,1.03923054871,0.18136951243,1.00725138174,0.590034517691,1.9615370692,1.80993384082,1.93706261575,1.71490381639,1.7859090614,1.69918284462,1.65481719744,1.77369837351,1.87672263031,1.39030098694,1.61458696233,1.64169591944,1.29203276599,1.39711493172,1.52191109952,1.5085672189,2.05913661908,1.91735250152,1.69024135211,2.02831580199,2.10416965819,1.56878344253,1.26015528606,1.07078022662,1.1279816039,1.12319889009,1.25304567614,1.28844466466,1.91723785972,2.44859873794,2.51544060603,2.04528324352,2.2968738542,3.02440464313,2.47625996875,2.41774510566,2.49928626914,1.52749296368,1.54873639593,1.46572178021,1.34557017459,1.76389107753,1.83737409868,2.06925833522,1.87407934867,1.97713324676,1.8302091547,1.90064796121,2.09066605858,2.02837384034,1.69816110091,1.51245708636,1.63937577753,1.61502367188,1.56735324783,1.7458676255,2.08765877503,2.07282830467,2.28278281406,2.17881325602,1.99371099554,1.90621961779,1.99593876559,1.916057961,2.01294117197,2.17567078045,2.21654769162,2.26208969778,2.3739694296,1.33255726362,1.45474805378,1.5484378779,1.5606235702,1.57965121719,1.36872216743,1.46786435639,1.72231032269,1.98220834893,2.62960529741,1.90065428686,1.68451475109,1.78537136755,1.67853617063,2.15030842727,1.94393119961,2.07073953137,2.15481460982,2.10164707067,2.01129772785,1.9976032002,1.90358656384,1.79429693692,1.78018750433,1.87617044682,2.21890609597,2.23307670705,2.67699173078,2.79992603144,2.22824394655,1.29315403939,1.27109025853,1.08889500987,1.20200283323,1.06195451183,1.153678577,1.3416054499,1.58891940604,1.36868451877,1.49092887314,0.0915570524386,0.183685651144,0.314278725683,0.86250102226,0.766886262642,0.635281537212,1.04735371308,1.14997950096,0.828579374829,0.898688928243,1.00977523724,0.887131555667,1.0867516822,1.06885110658,0.309632103689,0.280623246416,0.936894493636,0.708333096157,0.708602141411,0.590882748024,0.577216284341,0.69024249463,0.505799832108,0.55177228335,0.381800803117,0.309300759968,0.334314613661,0.567212414488,0.493703883805,0.379424985415,0.871125400772,0.76097525697,0.969596893893,0.959549972968,0.77055977096,0.833212337179,0.848353525934,0.973500403043,0.963089169481,1.02670386135,0.498660937099,0.396927778779,0.251105325216,0.80319268738,0.724561555135,0.513771658459,0.437733491888,0.638734942099,0.685428993658,0.504696601397,0.623981422711,0.776990047826,0.648024044681,0.71349701883,0.614190864826,0.808226626016,0.893732771338,0.951069140178,0.921063345107,0.863573946135,0.752991618773,0.717574310992,0.798625692952,1.87152712719,1.84057587097,1.72643037545,1.78108929644,1.98490345145,2.06567329338,2.17485670278,2.02197491382,2.22372014866,2.15140202226,1.51450018464,1.43720095925,1.41398636196,1.85890401228,1.73983041751,1.63713219457,1.87893572386,1.50544839222,1.39693946407,1.5278401354,1.57252876163,1.28790976641,1.27202198481,1.16438368818,1.0625299342,1.37107290288,1.51674190521,1.38821643748,1.57653923399,1.48777933343,2.06382267622,2.12027372582,2.24586202725,2.127534978,2.25452285575,2.31747854678,1.93891349473,1.76037222829,1.87277721304,1.69813461545,2.64659497544,2.68921075902,1.48833030877,1.33372225324,1.30761952766,1.14845325913,1.35624818055,1.27827149779,1.18331083378,1.10122085243,1.17900030943,1.18223489488,1.06386544641,1.07993699312,1.96388429039,1.86306528826,1.73314142841,1.74712027079,1.83096343245,1.94540941618,1.59356842917,1.48119361528,2.43681603994,2.25938164518,2.22621998999,2.3087867954,2.61063815049,2.83217224202,2.62441435305,2.70927335394,1.75417728012,1.62452658688,1.63370577942,1.73552241815,1.85946156249,1.86896496533,2.20450397756,2.27731802934,1.62358778232,1.65122072865,1.67887049206,1.59962223143,1.8304803862,1.9572855618,2.04151702545,1.78287623278,1.70919066936,1.80544405322,1.78508350375,1.66260997017,1.58931624217,1.56287101683,2.29298738408,2.20345366651,2.41323358595,2.43616208289,2.39475972512,2.4563135312,2.57335492589,2.46056950691,2.40297387107,2.59043714506,2.65292818691,1.31558836848,1.19406283579,1.41229915935,1.42590822501,1.29395646087,1.18582083611,1.69382081414,1.68097411628,1.56920004898,3.02306558142,2.88875378642,2.29640293316,2.26603818426,2.50483379707,2.30983077504,2.43011800431,2.26949879514,2.33370569881,2.44734398658,1.4187098469,1.40431725281,1.31946264485,1.21409023653,0.998648065889,1.16590426587,1.05279617395,1.66107064409,1.57003104711,1.26943832907,1.28885271189,1.1977819672,1.15263567897,2.0585474887,1.92864987689,1.81832943508,1.83592113691,1.91059272127,1.98583088928,1.7861040286,1.78051859097,1.90313848071,2.45875819903,2.58224185956,2.57868102125,2.45938562487,2.35147937695,2.34810732359,2.21182457675,2.0929817858,2.07617921272,2.50788786657,2.43428761752,2.30817721804,1.41029500107,1.43776097866,1.51118927056,1.56253889767,1.65999726543,1.63582141825,0.895105707717,0.978956034709,0.770253416156,0.748606419684,0.853455881001,0.958335449058,0.42068463239,0.192232486986,0.35289862603,0.245257764633,0.528044001432,0.358330989486,0.409711353116,0.306576926712,0.560789281633,0.680785241521,0.488286779265,0.559429891057,0.739098872622,0.68685450233,0.952798569047,0.96655238022,0.878171852936,0.761383044363,0.738793047334,0.743088023164,0.844061433185,0.842497165714,1.14041413183,1.05402917481,1.07904562028,0.921238014851,0.805393871357,0.800522251408,0.916674088641,1.0262154135,1.0259082706,0.569718570206,0.438401018781,0.375116925638,0.638434251958,0.546103808353,0.444733100574,0.462187790223,0.588943772343,0.682556245357,0.657730781891,0.943211767684,0.859753483586,0.894707631511,1.11221890117,1.00994973787,0.861887313178,0.992981754241,0.924353402862,0.830801834637,1.39213622076,1.162433267,1.21225043124,1.32770289771,1.3498598414,1.23610150381,1.1920716809,1.1278394493,1.21850067255,1.00672223449,0.979335549077,1.07450284114,1.86369982167,1.93628159398,1.87896862188,1.75120777298,2.5875014552,2.37459254074,2.47002458641,2.35278858261,2.98812894527,2.80869673361,3.02261482888,2.90147461501,1.54384195569,1.67678194846,1.73268012225,1.46664458702,2.08920706635,2.00534918278,2.21385017428,2.03682332389,1.84200293396,1.88682979339,1.80340649409,1.68496040635,2.62535542863,2.6850292006,2.67970959725,2.79636516836,2.88611626364,2.82167490488,2.16874242596,2.25325476065,2.38185148281,2.4190760753,1.38809649486,1.46954053667,1.25691203598,1.81167175945,1.86474524605,1.88917127666,1.99581172906,2.07535013989,2.02084211958,2.33029015352,2.32294556125,2.12066990547,2.21962536552,2.11074552484,2.20220723443,2.85666578985,2.79099146919,2.60110334416,2.50328145448,2.18948942708,2.29644183791,2.08807274775,2.3048767833,2.98588711506,2.85286150862,2.78300760919,3.02711897235,2.55239219611,2.54303199278,2.63796799064,2.76380204277,2.76691686901,2.65198793939,1.46431119668,1.24695213502,1.59821314193,1.58700514664,1.49072494038,1.37177926276,1.36144813171,1.46931736771,1.51293764122,1.48595822776,1.57779130712,1.69502860809,1.72341563414,1.6328566329,1.05390777585,0.932667055512,0.993842529601,1.0797271028,0.869979961476,0.833353813385,2.07646794907,2.19687320273,1.97414417676,1.96363899339,2.19991760484,2.08975480348,2.17555821767,2.2882120739,2.24742814291,2.15426784757,2.38790790046,2.40639227873,0.538077008797,0.631225402822,0.422228872601,0.628222082825,0.416209440876,0.528550831863,1.13864813018,1.15161823658,1.35486689724,1.24539169369,1.36818621353,1.27137000654,1.23845806969,1.20402774578,1.29959644404,1.42276056265,1.36229246333,1.4519442854,1.65735288484,1.71380525508,1.63957082912,1.52488266536,1.45170184657,1.51060882605,1.2127048809,1.04443055156,1.08244313242,1.49432777388,1.41897362257,1.29385003972,1.44145787585,2.48881784416,2.60685680106,2.40161133997,2.43821633847,2.57685003169,2.66292409342,2.68404775747,2.81271423494,1.12706303651,1.24584686201,1.31877252054,1.2691968498,1.07235716226,1.14192911622,2.49158242461,2.60141674888,2.40571833322,2.61738875048,2.41269786557,2.51233223378,2.71863379079,2.71099725468,2.81569399097,2.91819854702,2.83164819419 }; const double THETA596[NST596] = { 0.942166650706,3.38270065383,-1.38324398335,0.95126396881,0.924889777421,4.20768646732,4.08253296898,3.36332080138,-0.147165166233,-0.183287958206,-0.305129582509,4.62709647551,-0.682661821125,-0.311362009689,-0.602972544308,-0.161453305656,-0.0835551115401,0.0585071118829,3.66532822379,1.88279984208,2.03282129726,1.21491764993,1.08086842032,3.25943847034,3.26479344633,-0.401699704169,-0.604266455985,4.6631874612,-0.748743757699,-0.782473117505,-1.44708461237,-1.33931209036,-0.661667753935,0.0398201680366,-0.193540568921,3.39249004666,3.4418055836,2.7155949106,2.24042140875,2.38885030346,2.21018271106,2.25221407652,2.29424011849,3.0861253808,3.00408438604,0.108633471278,0.0499597187199,0.121564349669,0.625399919123,0.482806843248,0.233655909523,0.41168224511,0.472673210181,0.286608965454,0.409207651665,1.48074284619,1.73053666346,1.69573482814,1.74696907144,1.62101324052,1.45383811552,1.05256313408,1.19661012197,1.07133678341,0.83658440182,0.828056186922,0.693164970837,0.992859142747,1.22631704653,1.4108147285,0.97347655481,0.925180812847,0.353156641877,0.710735317192,0.894834289538,1.05064747986,4.37277236102,4.24151590502,4.14605255542,4.1810943955,4.28855722984,4.07684782235,4.13176331483,4.20923559538,4.24774537283,3.85579019302,3.97083980735,3.86593046879,3.98527283293,3.86768624601,4.01749689159,3.98801993379,3.23924325853,3.35013886625,3.21386856361,2.601432199,2.44828765381,2.41650772218,2.35231569017,3.1309939598,3.03781274312,2.67791773611,2.89357337115,2.83022504949,4.17231610174,3.87922302005,4.04174297366,4.0850487193,-0.0985988918593,-0.148550524925,0.0417873601359,-0.082425574488,-0.338572477038,-0.348922809732,-0.277950187959,-1.51415959024,4.39718222935,-0.797717723181,-0.14844903619,-0.271778441176,-0.079590853584,-0.143980215312,-1.15511144846,-0.772731071124,-0.741332362732,-0.863469394927,-1.00970208933,-0.368176516371,-0.508431680263,-0.285338543159,-0.34288195808,-0.47421758381,-0.555201038914,-0.558739338552,-0.404533841776,-0.540502672583,-0.416867852903,-0.0892498711617,2.51533710068,2.3860739948,2.5920087106,2.61983956211,2.43966642072,2.33976620406,2.17224028451,2.25438588996,2.29838795862,2.33823888897,1.43579507908,0.617248909072,0.769242425713,1.88263340251,1.96964624733,1.67479561292,2.86736761948,3.14338246202,-0.407179256243,-0.246141195771,-0.264697498435,-0.574619615943,-0.00890028630505,0.274693162423,4.26488042193,3.82390996429,-0.877512031451,4.71034500711,-0.981405554344,-1.05161775702,-1.28724620687,-1.38121936263,-0.879947494733,-0.626290844289,-0.970831010681,-0.701191065661,-0.0133436557362,-0.153313779763,-0.38078166915,-0.362547335015,-0.0746059394592,-0.0307915942779,0.0424641397471,0.193120486923,3.13365233496,3.27790093015,2.98480490999,2.99749883472,3.2682427248,3.13692038268,3.82805169583,3.66172002489,2.9547003915,4.36203421266,4.01346201736,4.09594122771,4.3090981507,4.15202420972,4.3509423384,4.56230129378,4.54556535167,3.44198754955,3.49316835416,3.81932762169,3.7092842598,2.82654211243,2.68953353891,2.39264827747,2.22658479093,2.5169270199,2.46902106701,2.27582156265,2.15837895665,1.98543227109,1.84919293271,1.82663673728,2.08416034649,2.0181480119,1.89923967717,1.92781238402,2.15950551995,2.08338708356,2.19678525244,2.46061541763,2.6707438166,2.54900083387,2.46750602828,2.4166782628,2.49817037254,2.60434325838,2.91778803413,3.1466702388,3.14017114237,3.03184583678,1.90986884607,1.76952936461,1.68245789259,1.74227223403,1.71148331965,1.55706505787,1.57686509425,1.67628871643,1.77046034866,1.22378194836,1.09225714179,1.08169806947,1.35473328817,1.36590720088,1.22400283947,1.46807623342,1.57925898556,1.59103272554,1.45664221266,1.43459033093,1.69069357955,1.34482533777,1.14652712841,1.49260608941,1.304453633,1.36281557837,1.27326116994,1.53817361764,1.44031728909,0.482164634099,0.611451886891,0.414423196331,0.70011060315,0.341108715152,0.25522673031,0.435180587961,0.307539472121,0.523035717125,0.482618890432,0.603794799959,0.681879235106,1.55905710599,1.80324262839,1.64671480641,1.51919421152,0.727253857829,1.08257422191,0.988837180355,1.17635954512,4.40750806623,4.57783902848,4.45686411073,4.6505248455,4.59898007193,4.47567004021,3.60115359216,3.73982693563,3.77294922402,3.44644848509,3.65623057528,3.56060527402,3.30318010658,3.26971434631,3.37097634581,3.42561653785,2.8715962836,2.81117111754,2.67271293814,2.61848713648,2.81768647603,2.7017377705,2.59510816009,2.68341685697,2.66288977063,2.84994310311,4.2797891496,3.92836032411,3.96639207036,3.56875497964,3.74242709182,3.54467551237,3.76040593277,0.0228471244221,0.0745335954451,0.216880328481,0.0959639686318,0.277124805812,0.209491022372,-1.27431341349,-1.14504671959,-1.08460999022,-0.640258235264,-0.689652309689,-1.34543319613,-1.17152782385,-0.817151897286,-0.681809183062,-0.648722092328,-0.85008267055,-1.01294950807,-1.01394599418,4.41336759874,4.54768522907,4.31827980526,4.36357271727,-0.563729085371,-0.418270152025,-0.415355455772,-0.537139635537,-0.473615790368,-1.5510970432,4.59595223251,4.50752772785,-1.49120953492,-1.27123605921,-1.23860192491,-1.32258254716,-1.44037969477,-0.894344055174,-1.00835655397,-0.940925645516,-1.07559025351,-1.12001010458,-0.453789755773,-0.142771455063,-0.376072289818,-0.0637875513013,-0.338521484967,-0.16890205839,0.0708710408952,0.138064248105,0.288380878719,0.28900015955,0.11636050839,0.167052160474,1.96885078624,2.0910876843,1.88904708894,2.13252340758,2.04714174164,1.92496232914,1.36438812952,1.48042203422,1.40613238481,1.58960279508,1.70326731385,1.64121721687,1.9798515592,1.79180431836,2.29667338614,2.39049277286,1.54364741966,1.11059780052,1.67227161401,1.47683806041,0.880642020027,0.906647967026,1.09959407439,1.30458890633,1.08598623416,1.26437056014,0.502169138451,0.661599807837,0.786448369898,0.748253078021,0.557469934084,0.165271893982,0.267695807803,0.441022681213,-1.34872374505,-0.830761496991,-0.689033483327,-1.03705178075,-1.10338292186,-1.27871351265,-1.35647750201,-1.27687186706,-1.12840389923,3.33417089643,3.36514819961,3.07937714478,3.13613446413,2.47352830113,2.56590517522,2.87401638075,2.94684784232,2.79082599578,2.60103767671,3.98817826799,4.08197596277,4.23368053432,4.26004755931,4.31034039129,3.55940699713,3.52247980455,3.82009521199,3.72863127309,2.90680108656,2.88155993157,3.01891006806,3.02747269169,2.77497577767,2.75873641201,1.97579976765,2.1961910909,2.11746358528,2.13099375888,1.97178774801,1.89729010331,1.11422224888,1.22595817899,1.34391690119,1.34449986583,1.855812299,1.86930971872,1.75985493761,2.06198689137,2.56051189306,1.80820764722,1.57570886327,1.47892917614,1.24067761752,1.23785099956,1.12535202715,1.13273915953,0.836708851421,0.72748798996,0.800354631366,0.584334337775,0.88818621058,0.758491273378,0.65692059193,0.689024007194,0.300427875329,0.552141367835,0.0388867663026,-0.0240635887624,0.319663981721,0.648451030262,3.33752434769,3.45434290601,3.420716635,3.23979046904,3.47720454988,3.57767084782,3.49065700566,3.63926720877,3.52230739372,3.74397411389,3.5020215477,3.61404948153,3.73955510939,2.95098937369,3.1265355504,2.92369249423,2.85604659568,3.08300891616,3.18629599942,2.52272344321,2.19421028886,4.21520814231,4.36244826435,4.34022058273,4.40053146308,4.44702840236,4.57963109672,3.34166535287,3.43015122778,3.78247848403,4.35722839269,2.93463194955,3.16038523069,3.30829869922,3.19110274741,2.8330157206,2.76233948274,-1.15322057106,-1.2814220533,-1.46351382519,-1.34027663676,-1.53159649267,-1.47606426926,-1.34720778326,-1.28067310012,-0.748787740104,-0.887188442883,-0.949109280674,-0.875346543428,-0.738242146328,-0.674426211138,-1.57058296085,-1.51018907365,4.46900926057,4.56260023574,4.51001886465,4.66546269891,-1.40339816253,-1.45759983139,4.6696583501,-1.4865551245,4.66793203835,4.59843676426,0.386892690768,0.334059986786,0.648302633044,0.543430988711,0.589700717244,0.426065917068,0.102513973691,0.251092536867,0.209962288395,0.47873117451,0.537985835074,0.63324356258,-1.06588278828,-0.92533355019,-1.08463699436,-1.14494325717,-0.953116848898,-0.874490373056,-0.533783836784,-0.656790995705,-0.746111914193,-0.687103261233,-0.484796149008,-0.548386552536,1.0248379848,0.908619754585,0.811713598516,1.02909876933,0.915929351729,0.814523124011,3.61090137068,3.76462315677,3.63173759794,3.79626877298,3.69698343429,3.71612666425,3.92073623606,2.50227178405,2.50700190269,2.3425366353,2.17151994731,2.09012622756,2.26210097079,-1.0380309576,-1.07601660617,3.87295252589,3.84644419872,3.95140275465,4.08349085645,4.00916822824,4.11501264731,-1.22420686005,-1.26095360885,-1.39316114186,-1.5324408412,4.68332334588,4.5931182881,4.64323635889,4.32257938939,4.12555656594,4.45342550152,-1.44552975174 }; const int NST610 = 610; const double AREA610[NST610] = { 0.0207677809853,0.0210747716537,0.0206091699039,0.0202578252173,0.0205397776616,0.0208527439447,0.0204630724571,0.0202294860657,0.0211561416615,0.0208033913821,0.0203323388747,0.0207810350004,0.0201480008343,0.0207052864878,0.0201120589415,0.0209451480664,0.0210908208621,0.0202013109455,0.0202710790103,0.0198777876135,0.0204812884273,0.0207593996023,0.0200147292643,0.0212932341567,0.021096945645,0.0214408282899,0.0200136973805,0.0210245443352,0.0198200285058,0.0212877706111,0.0200790222703,0.021452264645,0.0199379861363,0.020167979164,0.0205696499718,0.0206985368707,0.0211151411668,0.0205850863504,0.0207789836225,0.0205298880571,0.0208127736778,0.0209681371254,0.0199979928524,0.0209388128051,0.0202202916767,0.0209872541622,0.0208005760986,0.020230019936,0.0215132975506,0.0217323457722,0.0197455743928,0.0212135724651,0.0207577934218,0.0216187682097,0.0206784467359,0.0207860186924,0.0206847693345,0.0205780056078,0.0197579690832,0.0205719089737,0.0202199839176,0.021021302343,0.021120411638,0.0202225190974,0.0211576908584,0.0201075424013,0.0207103506101,0.0201087631136,0.0197949082029,0.0209709982348,0.0209827957181,0.02036733974,0.0209037230934,0.0205685450034,0.0203517263263,0.0207273507237,0.0195916055915,0.0199571313253,0.0203819402201,0.0208645285704,0.0205965025775,0.0202542528056,0.0205370861334,0.0203596738013,0.02094749365,0.0217125525441,0.0213846782792,0.02052319795,0.0211185788681,0.0198649415453,0.0201815815903,0.0199398488516,0.0211138073257,0.0204495676098,0.0211191185607,0.0205033575853,0.0205200332826,0.020833532471,0.020246286595,0.0203979433534,0.0203659189971,0.020606632014,0.0214317616603,0.0201989686938,0.0200817179531,0.0212298675508,0.0201136179691,0.0201317506146,0.0206914254676,0.0208415969594,0.0202063651925,0.020833201621,0.0205263726401,0.0205747221332,0.0206394111703,0.0208350460189,0.0212321643216,0.0202240365946,0.0206545582027,0.020190716284,0.0200094273577,0.0212074245061,0.0197691968293,0.0205565414405,0.0197055424117,0.020711956953,0.0206797087767,0.0206186442765,0.0208007818629,0.0205247106702,0.0207111392458,0.020725284602,0.020480552254,0.0211625893784,0.0195386286093,0.0211519863253,0.0197128047629,0.0202273835674,0.0202047579594,0.0203208795583,0.019739467431,0.0215982191363,0.0196654034222,0.0201485881531,0.0211445386391,0.0200442622492,0.0211734950505,0.0205832043275,0.020836785601,0.0213581327057,0.0204323620222,0.0208987179756,0.0204790674308,0.020130410291,0.0206673443003,0.0207877083504,0.0200989093916,0.0216079560069,0.0214773474932,0.0197501114136,0.0202233666005,0.0202013166838,0.0197383368064,0.0211840570267,0.0205136246519,0.0206972855286,0.0207736490056,0.0204176477329,0.0210434561922,0.0204711977185,0.020114074343,0.0208471539924,0.020978753829,0.0205369020701,0.0207725199346,0.0205444065391,0.0207589815213,0.0202307966568,0.0195419632385,0.0204204345962,0.0206656335852,0.0209527818157,0.0208177003511,0.0199573864588,0.0202978202047,0.0207628403831,0.0202639721097,0.0209540914584,0.0202714140192,0.0210754239368,0.0212469427623,0.0203570200233,0.019857533814,0.0209830145473,0.0207637042707,0.0196728979126,0.0198073962493,0.02006660405,0.0197416120091,0.0195740297756,0.0196261494201,0.020229727592,0.0212181812832,0.0201752239799,0.0211803704674,0.0208838417914,0.0205445549365,0.0207762080046,0.0202533913974,0.0202140646281,0.021265597738,0.0203788595481,0.0205917287887,0.0206907921961,0.0208154282249,0.020945747319,0.0204887060478,0.019871419065,0.0198605125801,0.0217273408472,0.0216211102463,0.0210504837365,0.0210501781573,0.0197270939691,0.0195250695634,0.0200162680775,0.0204510478465,0.0243187525108,0.0209255229038,0.0210403494687,0.0214424283582,0.0206763495356,0.0204510167464,0.020978691857,0.020583768876,0.0206669512471,0.0203851399995,0.0209917316227,0.0207516610839,0.0207834772767,0.0208166730208,0.0205525482725,0.0198088365618,0.0199580969325,0.0210805094521,0.0192013758928,0.0213602017428,0.0210412335808,0.0207105460142,0.0203677967355,0.0210124223874,0.0209302435051,0.0212493077573,0.0203492770895,0.0202396271736,0.021123862135,0.0202305903818,0.021360940537,0.0200575836881,0.0208285591074,0.0208306019255,0.0206716299851,0.0201077964663,0.0198585799525,0.0213834297647,0.0207628160738,0.020743833842,0.0203987724037,0.0199648900088,0.0194389621524,0.0208250415798,0.020316055762,0.0206017642622,0.0206598789725,0.0209051329652,0.0208935023614,0.0205449602764,0.0206467371462,0.0207422468755,0.0208339222749,0.0209085188037,0.0204773037695,0.021306590143,0.0199808186429,0.0200091422145,0.0209172772676,0.0207283057056,0.0207602102717,0.0205278657199,0.0200383700445,0.0212220882174,0.0206905498621,0.0199379671655,0.0207559707219,0.0201280511878,0.0205533097965,0.0209000200442,0.0206762022234,0.0206588402945,0.0210463945502,0.021170589322,0.0209693590827,0.0204521176925,0.0197846162293,0.0216484684536,0.019903595555,0.0212136781588,0.0210708338398,0.0202580551751,0.0202691283126,0.0208748044818,0.0204232801379,0.0211161579187,0.0201373209773,0.020281696002,0.0211509484449,0.0202601497503,0.0208567909441,0.0204836964306,0.0198263322801,0.0204558719385,0.0197410675109,0.0205151695693,0.0202712751334,0.0208597901564,0.0207495297018,0.0205422959797,0.0201979951866,0.0209923246393,0.0202599855663,0.0203830865515,0.0211059848123,0.0200303803447,0.0208695149119,0.0205340823972,0.0198878896049,0.0215134500697,0.0206537543955,0.0205975833692,0.0208799837687,0.0198227119369,0.0207569142564,0.0208393598745,0.0209755078832,0.0209406795577,0.0197347754326,0.0206593556303,0.0200904858568,0.0212562508914,0.0209104137449,0.0205867015422,0.020473204272,0.0204571859174,0.0210939654758,0.0200602341252,0.0214342366515,0.0200757331095,0.0204358112019,0.0210200350047,0.0201748988299,0.0209688577725,0.0204457555492,0.0208974388539,0.0201563592242,0.0207627718587,0.0204538611723,0.0205631100086,0.0208730265267,0.0209614725605,0.0204111679549,0.0209755083781,0.0211594383275,0.0199089196407,0.021084943424,0.0206378682675,0.0208398933831,0.0206776458511,0.0207972426889,0.0202841542237,0.0204068395292,0.0209401485954,0.0202360991787,0.0210297831909,0.0208576762501,0.0203298993587,0.0203563918648,0.0207833075771,0.020548436593,0.0206704279946,0.0205484390304,0.0205880833422,0.0212276435483,0.020059184785,0.0207613323509,0.020031427011,0.0211267695341,0.020603962477,0.0205308698238,0.0203819774943,0.0202053594794,0.0213270609766,0.0214505643033,0.0198948634082,0.0200325145314,0.019829840412,0.0217554219822,0.0195834220421,0.0207659617522,0.0205662601955,0.0203999052423,0.0210043914624,0.0204489909096,0.020480794405,0.0203432777588,0.0209652242638,0.0198875060224,0.0200355383978,0.0209435877185,0.0206432298678,0.0199368834822,0.0204768324409,0.0217483101761,0.0213372062138,0.0209666539851,0.020342554713,0.019701060683,0.0235601257866,0.0192260138993,0.0212639225113,0.0211697715548,0.019478636594,0.0205406138861,0.0202444087725,0.0206478365624,0.0198250249118,0.0204185486423,0.0193123478314,0.0196666072187,0.0207062564945,0.019839372865,0.0204684687973,0.0210628000022,0.0217206918316,0.0199853945992,0.0208940582496,0.019667086008,0.0214693595792,0.0198803469916,0.0218769240936,0.0197369493672,0.021884165128,0.0195495716083,0.0206848062904,0.021133764553,0.0199957320606,0.0206724076389,0.0205042704551,0.0202670421371,0.020767808742,0.0205654833093,0.0204498976664,0.020487701463,0.0206559225101,0.0207699350036,0.0202156621039,0.0206961699766,0.0205359575984,0.01986758743,0.0208874222736,0.0199452352383,0.0210503615528,0.0201479712523,0.0207813477425,0.0198789827323,0.0215166257097,0.021347645334,0.0201265113859,0.0203563446896,0.0203001359391,0.0210678407563,0.0208210535571,0.0202868249086,0.0207593827972,0.0197371019207,0.0235967689255,0.0197761981649,0.0195295395137,0.0211507385832,0.020368764299,0.0208947369053,0.0206677598262,0.0207717397921,0.0205953314611,0.0198766419811,0.0199480440754,0.0198525122671,0.0200256565752,0.0203788271989,0.0213684182668,0.0199075587116,0.0208316081808,0.0200142595241,0.0203203552612,0.0212417459695,0.0206954341639,0.0206292664443,0.0204977186702,0.0208965571213,0.0204902433428,0.0208052573214,0.0204973194858,0.0210297361066,0.0210884626248,0.020258359635,0.0208779052136,0.0205639358696,0.021300896362,0.0202022720987,0.021337731307,0.0214280813621,0.0198553549236,0.0200765741969,0.0204233967932,0.0209063319843,0.0209989902649,0.0208428296366,0.0207910711173,0.0207791107456,0.0208936929356,0.0206430697669,0.0204225917445,0.0209360436975,0.0206412913202,0.0205810864582,0.0200491941537,0.0204246077246,0.0208931457016,0.0206446279579,0.0206979299649,0.0207686197975,0.0199156126268,0.0202003031917,0.0201460395894,0.0212866527455,0.0208687331107,0.0203629400377,0.0197238512867,0.0198248659962,0.0216122032373,0.0196667346172,0.0216351835577,0.0198751176212,0.0236738971628,0.0235865030156,0.0197483021216,0.0212928698826,0.0192627614097,0.0210165027523,0.0199527187486,0.0198792651072,0.0195232541811,0.0210632950245,0.0210985221489,0.0202050852748,0.0212557881969,0.0202189558768,0.0214966055934,0.020056678105,0.0203376598271,0.0200853842472,0.0212835381204,0.0202334733981,0.021226234922,0.0212365558467,0.0202479012644,0.0210561103714,0.0207954644707,0.0203630700312,0.020947033514,0.0203204821206,0.02036514406,0.0211067339343,0.0201329214731,0.0206659972286,0.0202804154226,0.0209609935376,0.0198134447597,0.0210206585773,0.0210325104228,0.0203062909512,0.0203715860388,0.0210913303159,0.0203295814304,0.0211895079005,0.0197921873649,0.0239928221003,0.0211639097295,0.0200065452928,0.0204551572947,0.0204125202809,0.0209083314026,0.0209348966447,0.0205305141602,0.0207815422081,0.0191459534476,0.0202138831417,0.0202082915799,0.0212284811819,0.0207502192498,0.0206348163171 }; const double PHI610[NST610] = { 2.21952532407,3.01343352775,0.897630559855,1.61520420282,1.74522092105,2.00987728528,2.1412421905,1.16778397103,1.09892627514,2.18348606156,2.26959697265,2.34841052678,2.52267386018,2.3978365385,2.96014849684,2.76643039601,2.51414653526,2.45196927347,2.31904263708,2.54038563976,2.41183100409,2.18803441764,2.05669682601,1.98982830951,2.25127582425,1.98689332948,1.86163286982,1.333631015,1.12670860208,1.13421745806,1.24912288031,1.237116683,1.07173207786,1.67315825307,1.535310841,2.06216853637,1.70541531647,1.76269253276,1.58422529833,0.99969922401,0.954700618919,0.684607003294,0.963944176724,1.79917136044,1.92931886261,1.52962185376,1.39316068331,1.30490518751,2.11416633378,2.24509046249,2.29738856006,1.15697005621,0.746797447024,0.894675686221,1.04002837904,1.31111109075,1.39242030643,1.36178164394,1.29416342476,1.52566847469,1.53708541517,1.29198541372,1.47405514638,1.35046557406,0.619015169665,0.548281707905,0.970694009713,0.722269069445,0.930274379874,0.813348608119,1.86604906283,1.83700869954,2.26397354458,2.26515365905,1.92514892447,2.0450042799,2.78639553561,2.66002681956,2.58723035955,2.46946480895,2.41324989154,2.21375589151,2.20625149702,2.32481899214,2.32274396605,2.98369591557,2.85539083338,2.95964325123,2.85400946644,3.08809113343,2.96619450932,3.04155763263,2.87021295344,2.75861862588,2.0526547544,2.15493888218,2.21587990227,2.13439241671,2.0195491859,2.16180625351,1.77762052557,2.584861623,2.63274406668,2.77756910218,2.75306560625,2.84057808096,1.90189348015,2.06299399409,2.25513496116,2.36770118671,2.04604271481,1.96762600055,2.01481499242,2.14426138403,2.23095235261,2.17910923435,1.80313095455,1.86196528819,1.83503684705,1.94586925011,1.82143297313,1.93298957076,1.72324080101,1.72426803643,1.50180010752,1.59973765658,1.78765981452,1.82482532746,1.67898429649,1.69866352423,1.35340015315,1.43113681663,1.61840565328,1.52137145657,1.65071881673,1.17160293048,1.10949242969,1.04046719457,0.937282477855,1.55981063051,1.33985242759,1.45350813828,1.54937232913,1.6787241884,1.66175511431,1.47398023417,1.37196584957,1.60165902645,1.63038718581,0.310707511686,0.56320192588,0.652996937474,0.542709780149,1.39087347169,1.54526054717,1.52125985553,1.13121973764,1.38287443074,1.18082457156,1.3049641751,0.726775223232,0.862991649823,0.911696221279,0.855595166164,0.769249226377,0.781798705614,0.886805326661,0.90350507267,1.01167034781,1.00702847161,0.612329829059,0.958394404278,0.828767988201,0.751459892857,1.10649403105,1.18186547999,1.13332889683,1.00605564839,1.47021528485,0.656247564457,1.57201890194,1.75307213095,1.71091016104,1.66973043128,1.91388374556,2.04477526603,2.05455832832,2.11886373766,1.92293184519,1.85548873426,1.6630813559,1.72629794071,2.2440461889,2.1833249823,2.30952283853,2.33373054585,1.17218771761,1.10288963942,1.09491546547,0.975513075498,0.96887643967,1.28395934001,1.35698907357,1.48708419617,1.54314978721,1.53887548637,1.35494576923,1.47591620625,1.47732487222,1.28892945951,1.34875032787,1.1698073104,1.21611431103,1.3453279259,1.42938528534,1.6588971491,1.53314328107,1.28015533789,1.1538262014,1.14465967779,1.07809011398,0.563067549599,0.609639912712,0.543130089441,0.415775817181,0.411651378782,0.614977577376,0.854336364956,0.52946699754,0.595602828191,0.788657760086,0.791220826608,2.39655289129,2.28132544013,1.91482691302,1.93254110181,2.04956446316,2.15311642083,2.22704409648,2.29522925469,2.11635542719,2.2342963493,1.68782401841,1.75623679648,1.87590477894,1.69891804009,1.81424861058,2.06147169262,2.18783645933,2.1035547222,2.02061511016,2.42887497073,2.59551550273,2.42293759079,2.46853052796,2.39180494735,2.64333740923,2.71379651224,2.84018476156,2.68182013699,2.79827202255,2.89441455582,2.63807547842,2.42811572022,2.51059945936,2.65945680497,2.54906560292,2.44743704221,2.76957172508,2.63690928887,2.33409678415,2.41059040592,2.36254649334,2.47466580177,1.84137847248,2.03304246082,1.97105986261,1.95820366442,1.82440971322,1.76873764156,2.24245456058,2.36577710417,2.65220916985,2.58632206066,2.57177305093,2.44772783929,2.38995590508,2.45241598187,1.55763887655,2.2631804396,2.14310239519,2.31657309377,2.35174130684,2.18678465612,2.10145610297,1.84044507433,1.79048269896,1.63799052709,1.76264149954,1.63374249052,1.85920532744,1.68481380178,1.79957151876,1.46137523684,1.58360941228,1.63846751123,1.39085549194,1.56355792932,1.43866545729,1.12515126247,1.21927007451,0.954954432838,0.880781299832,0.949486009553,1.09018231836,1.15107339984,1.08330505489,1.24488543514,1.14456949292,1.27243639391,1.18585745337,1.04395002587,1.05738820359,0.835720372086,0.902023593689,0.956880694613,0.991834034483,0.939978248373,0.832802805409,0.741023768606,0.788814855301,0.919617768842,0.980895955717,1.8176720056,1.69538726379,1.65406272263,1.73591592493,1.62327825901,1.60039010086,1.51807920159,1.48151583554,1.52446718669,1.44641979286,1.47767781896,1.35354531645,1.79571094037,1.98103232936,1.77272698083,1.8529127317,1.74886321291,1.7703672803,1.97019807832,1.84864608296,2.11151892819,2.00540426264,1.90011723171,1.89154820941,2.10625430623,1.99200527873,0.412227370278,0.629627327279,0.544732677449,0.42783966912,0.197943720333,0.484529082218,0.663247605226,0.821733902716,0.789693097142,0.73397499556,0.60467040689,0.563313322844,1.21745742845,1.34462386812,1.44838373848,1.42881574196,0.751679540216,0.741401790404,0.639284808011,0.532358269131,0.668733428268,0.552791419602,0.739207381778,0.928299112848,0.734376281313,0.804555509082,0.981278150476,0.917620440348,0.79621534409,1.28895466849,1.34850795007,1.16369807121,1.22302021179,1.43744176907,1.32208719263,0.854805263589,0.964478343097,1.0853723733,1.09720355942,1.65934759998,1.72282410334,1.72488732408,1.85297612127,2.03775832413,1.84420591256,1.90910083918,1.02907893259,1.137473864,1.59004461992,1.66520709296,1.21538983682,1.2551563112,1.38503941201,1.46578606924,1.71395394193,1.83926387302,1.88395158569,1.64801004592,1.69901366446,1.80939145739,1.46773340745,1.27801581569,1.33873661696,1.52795284164,1.35001605925,1.47051388846,0.231654642865,0.348834996557,0.442345129032,0.425934500519,0.766124599661,0.731126294658,0.684853656659,0.612574757495,0.774372786005,0.729069416562,0.904304146395,0.957694076649,0.851811071157,0.564829705878,0.66842389588,0.574566857925,0.670860647568,0.35375893517,0.448573133939,0.440416045803,0.0191838562154,0.105171124273,0.151539059523,0.225980790345,0.885897004888,1.00858497506,1.09863866461,0.885168939797,1.0035141187,1.09388100297,2.08391393569,2.20102885455,1.99222437206,2.01647335172,2.2310959758,2.13741994046,2.02903849075,2.10871886194,1.90660470814,1.86555953149,2.05766936044,1.93794517461,2.39843033838,2.27018200903,2.3062619488,2.22604606615,2.61869011616,2.66757037761,2.43546351344,2.48577581516,2.56344266497,2.4705178441,2.54503648121,2.6392495522,2.54176797903,2.65035788522,2.76457332316,2.7733021529,2.92869989187,2.81219546012,2.90288421776,2.69776148655,2.55633833611,2.43501429751,2.34871804385,2.36774328285,2.47896067389,2.58225810628,2.03886646849,2.16249044725,1.97310853225,2.1710144602,2.09651149359,2.00972537077,2.04894731313,2.4683296591,2.37462074724,2.43343338801,2.25983045304,2.30585801808,2.22440630726,1.52103165662,1.60270040944,1.93392974257,1.80944528919,1.72935321058,1.97873817299,0.739132314825,0.559224373235,0.688387692354,0.771189964139,0.525234035571,0.624824605802,1.38379597919,1.17580433451,1.27327104924,1.39774534326,1.1883187146,1.29925545895,1.11426513263,1.24249620892,1.31833042099,1.27179288854,1.14779312828,1.0653713946,0.438923369322,0.426899108782,0.356522948793,0.235041390253,1.18434376603,1.14469299508,1.27822349075,1.29239897447,1.0278569061,1.05406422383,1.29808244756,1.24257883294,1.14555081669,1.18196696898,0.98671361282,1.10641119874,1.64114716106,1.58402672335,1.469392808,1.3932295097,1.37341081467,1.50130725274,1.60573940538,2.13848486065,2.05126179979,1.97965694635,2.10143579593,1.89077696229,1.92697481152,1.22824736418,1.29651614707,1.416706291,0.515658945242,0.35474578614,0.483384283585,0.554518880167,0.349820441174,0.237282395564,0.416765919829,0.198636409592,0.306870215424,0.403234692323,2.78379662078,2.69277489213,2.7228110432,2.60090714106,2.53494232903,2.5721551665,1.77430587952,1.89859299635,1.86335546414,1.94206705517,0.325528678543,0.367695542536,0.124999495654,0.208552508491,0.217216362387,0.323402603372,0.873533354297,0.940486035267,0.994766146661,1.02428011001,0.777312820686,0.815377585252,1.25173447314,1.29519960809,1.45616189105,1.34525948313,1.6944852406,1.48985697151,1.56835421726,1.53932604556,1.66348230551,1.74060456345,1.43663411869,1.68094353437,1.62434584298,1.5041488292,1.61404439502,1.49028188634 }; const double THETA610[NST610] = { 3.00171533486,-1.51117382415,1.93952130626,3.15768192007,3.15351167662,3.13237969827,3.13152494603,4.7104685808,4.61239594785,0.876367372945,0.993357516514,2.99683230823,3.18870117641,3.15449576157,-0.7442240367,-0.276533438966,4.21169381737,4.0365796956,4.02174833729,-0.619629220133,-0.68245386358,-1.21218665501,-1.19602402981,-1.07970035288,4.14086939619,-1.31523021497,-1.31752169683,2.64480633801,1.51685896095,1.77818504783,1.70546762395,1.57703351823,0.910494451192,1.52813456869,0.596949353496,0.914786182609,1.63659091341,1.86040572573,2.23474885148,2.34012723917,2.21446064149,1.41191035076,0.829626589487,3.25594714729,3.24968437187,3.25733822414,3.24724119597,3.34594605907,3.87898766097,3.86864479159,3.74100807729,3.78321796614,3.55702149035,3.83114450832,-0.772513459317,-0.372055737915,-0.474685686676,-0.25976366254,4.68988018701,4.6995882346,4.01691407275,4.01346921962,4.1278901026,4.12973854426,-0.675735703034,-0.516374720434,4.64656489931,4.70587857947,-1.48352865462,-1.4405082396,1.77380920473,1.65745006704,2.3946434288,2.22540091415,1.55288887448,1.56528285518,1.32575099481,1.27078691717,1.48598935664,1.46877209947,1.28632523038,0.4049868702,0.723975283866,0.489241461064,0.660764018837,0.881670449079,1.0303373342,0.0152976699607,0.072552128006,3.60729081984,3.22657781153,1.60665986709,3.55835957598,3.36296680289,2.35965468766,2.45495036602,2.72584339894,2.61014899628,2.65346922385,2.87503511449,2.72398499101,4.65671602601,-0.756689491506,-1.2379559156,-0.638525341651,-0.889909418581,-0.0277595225412,-0.214431634368,-1.09729511138,-0.833132513859,-0.958881574049,-0.848003148966,-0.724555336462,-0.71125380324,-0.83450361475,-0.959220475724,-1.20442498974,-1.08598857869,2.33647337337,2.4132584487,2.59552372666,2.55412145179,2.51591253923,2.3959598921,2.42947334487,2.3447020852,1.97476735318,2.21240004315,2.05179906824,2.16342000941,3.13816341337,2.67755112207,2.59874492082,2.56446127431,2.72867770152,3.33439749463,2.58746159983,1.05993309828,1.3461958142,1.35841365261,1.50049334696,1.55756435389,1.48869046894,0.449972526728,0.562594127918,1.68427661715,1.75443939239,1.72288691696,1.83148547347,3.17337541646,1.45611685347,1.8045768629,1.6886042969,1.874738216,2.01913828449,1.91197380364,2.35474084008,2.40584145088,2.4837250859,2.50792881085,1.23454688046,0.935203317387,1.08713532578,1.22437514184,1.71471192246,1.54353868026,1.79323835878,1.49220444124,1.58369400192,1.71875604029,-0.313349187243,-0.679119333363,-0.735692756837,-0.619636217275,-0.268048293834,-0.382483265679,-0.504898615817,-0.532778319189,-0.0299165475294,0.405604560329,3.3610948911,3.46432032219,3.36346167897,3.57010879234,4.24823139191,4.2519879622,4.0164502476,4.12779306713,4.02498860371,4.13298428423,4.01868157582,4.12909985941,3.58389985785,3.26634007391,3.29189014061,3.45141286739,4.01429078064,3.89959806408,4.13041006014,3.93281487132,4.08908933146,3.56256240708,3.45719731373,3.46161424584,3.57034778916,3.79109500794,3.89762705813,3.902883158,3.6775985065,3.78281157737,3.6743913251,-0.730128226921,-0.607314546949,-0.588261380443,-0.686938272848,4.23776478314,4.23840906368,4.2412867859,4.47795591834,4.24200071409,4.36682433045,0.273714047996,0.0552796822129,-0.122033474476,-0.500504189741,-0.179379898887,4.32861209022,4.14800011911,4.50895847554,-1.55487774855,-1.27124451567,-0.911464368429,1.63578433074,1.60653749043,2.0179621474,2.14560861874,2.21393881041,2.14328751295,1.15045777746,1.29459957609,1.43910750171,1.44639891878,1.31986739607,1.42621593414,1.42942108223,0.0194251263892,0.0588453207619,0.171371379474,0.241332315031,-0.0676073319215,0.0246196402968,0.386010041681,1.0673535572,0.769797032828,1.10222327394,0.954812512747,4.24994855386,4.01942420925,4.00440966816,4.51624285625,4.67789081624,4.43703894054,3.80114464745,3.71868166183,3.85498366662,3.53040433208,3.4092066661,3.52413963817,1.69678389683,1.71580003727,2.68864505489,2.83126905338,2.50876684762,2.44348970425,2.81996498516,2.89660285666,2.79218479495,3.02330103021,3.03884735276,2.93991197523,-1.3646136616,-1.43133000472,-1.20156606955,-0.989101634628,-1.38680715303,-1.31548700916,-1.12966789665,-0.989960403451,-0.670334019421,-0.282922407883,-0.320700806789,-0.553864314213,-0.399331257505,-0.578439175048,-0.463991155056,-0.860184441703,-0.977783520801,-0.769752990772,-0.755638660451,4.7082911958,-1.56188427505,-1.44680594971,-1.44044704518,2.81281362434,2.82920971562,2.94417781954,2.91868470596,3.04711588394,3.03836397564,3.21558594133,3.11912608734,3.43144596607,3.56133102044,3.68161478467,3.43992048527,3.55733099508,3.66973917269,2.76160585678,2.72796204258,2.90125723649,3.00083015156,2.82669557981,2.96196597604,2.98157154954,3.29858107386,3.05190203848,3.1896342093,2.74253852333,2.80168400248,2.67584865726,2.49449834048,2.47206441543,2.58913783688,0.972816390267,0.998900557201,1.11563335907,1.20981680335,0.79407799089,0.911002945484,0.713000337254,0.956909505393,1.15808102135,1.08782730711,1.29130393956,1.36319990211,0.398345916183,0.251215007396,0.268726833632,0.191801694952,0.760633426747,0.644092193681,0.817103260177,0.850525012268,0.476969275195,0.39670936455,0.464598703561,0.599421645247,0.62849289513,0.680838484369,2.96171468902,2.74277017761,2.57397618153,2.64203280938,2.96321777007,1.24229567767,1.99976873949,2.20083451449,2.04774344853,2.34772485602,2.35382453224,2.15197798796,2.25921795209,2.28528193949,2.19993860544,2.0946342793,0.895856304048,0.701337512712,0.621559312739,0.766546946061,1.05413200368,1.01677712846,0.0284616057007,-0.418775392587,-0.300538418926,-0.44794775134,-0.27528801077,-0.139907656337,-0.135483545708,-0.14940286099,-0.0372534923761,-0.146961390149,0.448346831406,0.507592458504,0.537386852704,0.605293218995,0.687505496406,0.625132174663,0.492997981491,3.79682325765,3.91028460542,3.68316528068,3.91266241995,3.78105006429,3.68874477117,3.80445482437,-1.37939165461,-1.43170779425,-0.886141419809,-0.989219444904,-0.947552123386,-0.824288713059,-0.800946285074,-0.900220502674,4.34955851219,4.35576379339,4.4752030814,4.46184060049,4.58519834235,4.59178086517,4.34898345088,4.46312879005,4.35032685579,4.46081179644,4.57612466788,4.57543643674,0.102453386085,0.0784002942238,0.352355925993,0.647225433232,3.86490221431,4.02943818346,3.71056185442,4.10231932241,4.54209798279,4.37703272274,4.52814457627,4.38324839175,4.2819622885,-1.34861317084,-1.20871330065,-0.894848491161,-1.00639087201,-0.759715750829,-0.991961677134,-1.26560631321,-0.246684951344,3.6100213675,-0.457480356592,-0.892449948844,-1.16796891621,-1.23098668266,-1.14778095673,-1.00143648273,-0.922880830847,-1.00115617505,1.70378617349,1.73619628357,1.80634615447,1.93773310205,1.89546904647,1.99222580682,1.05081911089,1.16795409151,1.07409013834,1.19508333273,1.30510990554,1.30819033803,0.205847427992,0.149962841966,-0.12159043913,-0.0133693853433,0.078867164747,-0.181496054958,-0.100812024638,0.0625476517276,-0.379730295577,-0.300744472215,0.463310659293,0.825926390122,0.686260639882,0.311424945398,0.732861665401,0.409579777564,2.10676146896,1.99170163932,2.67507166534,2.22663716715,1.88619070054,1.82657919557,1.95389492615,2.13711935987,2.23405687129,2.12019820183,-1.43538462773,-1.46555450173,-1.55839347032,4.65664948378,4.37134448566,4.48647513287,4.60735698506,4.55165454803,4.66081228761,4.35857839943,4.57448106849,4.30312814405,4.40548030239,-0.45914998693,-0.555615151775,-0.618007022929,-0.63625072661,-0.536147316102,-0.489217218189,3.07121110767,3.33170560978,3.3810272355,3.25674669903,3.09338427197,2.96768689935,0.883620678876,0.857152559021,0.94224082776,0.75557303566,0.712108357188,0.670513831067,1.14764217243,1.08252888961,1.15462530549,1.29763130588,1.37254328074,1.29551622082,2.10095272289,1.80942304823,2.36947077901,2.37790687331,2.13454271678,1.89657580242,1.94264563383,2.05690061808,1.97958521283,2.10516566219,0.0842348594316,0.32792565044,0.232162961375,0.0998182481623,-0.00452951333123,-0.0186502041565,0.244254496494,0.357447288576,0.379746972031,0.177676511589,0.290148084585,0.103385336881,0.127051748803,3.54299066428,3.63709198538,3.36702444761,3.3825727201,3.47334732835,3.58573151777,-1.16523616731,-1.04225512313,-1.01919175167,3.97324152621,3.53481448071,3.53036615293,3.7320217605,-1.51934046717,-1.50155291138,4.45390548105,4.17478022961,3.91353080241,4.11677132664,2.74075733826,2.50583200739,3.03848072104,3.00810532988,2.80517278468,2.59009638662,-0.416179895026,-0.388177510704,-0.162379464262,-0.255827373333,1.60768461694,1.24655004854,1.24529499866,1.79989950977,0.699528347622,0.872182563868,0.446037166971,0.139906594502,0.399535269385,0.25711181834,0.33463617986,0.167608763617,-1.37243281719,-1.25696033176,-1.4632520374,-1.47379226978,-0.320568425102,-0.247166058464,-0.343558322924,-0.129471437774,-0.104149275659,-0.19842373178,-1.23587641147,-1.21269250983,-1.33196882893,-1.33948016771,-1.1058630531,-1.12143197334 }; const int NST796 = 796; const double AREA796[NST796] = { 0.0159234609509,0.0163249587318,0.0160387337561,0.0151771900476,0.0152544541949,0.0157020354637,0.0157384164576,0.015847268734,0.0159226136745,0.0157914819581,0.0159468024879,0.0158947097968,0.0154574034904,0.0155680496508,0.0160995428217,0.0156516968255,0.0160601387404,0.0147568329141,0.0154352856389,0.0161730583588,0.0161618907849,0.0151312711975,0.0160300409708,0.0160563588532,0.0155332993719,0.0150003942028,0.0158189940377,0.015250998753,0.0154608430018,0.0162468207922,0.0154546623078,0.016152897284,0.0154074544035,0.0162560130167,0.016371694212,0.0154510414099,0.0158376525602,0.0159225409796,0.0157152303099,0.0151612342092,0.0154487352597,0.0151403300345,0.0167301961814,0.0150678715112,0.015552329899,0.0162005261775,0.015204850866,0.0154275994658,0.0150043328449,0.0153992293873,0.01598312999,0.015633608828,0.0159751219931,0.0155138837941,0.0162135804799,0.0155940804807,0.0160686924959,0.0154312949822,0.0156151704764,0.0154991326603,0.0153580721352,0.0162726039644,0.0162755104821,0.0157320947351,0.01575576399,0.0180831054267,0.0151194711095,0.016210370554,0.0156324826234,0.0158395248188,0.0163462529353,0.0156015316207,0.0153774351721,0.0161830202039,0.0156239521013,0.0158180233905,0.0162683830997,0.0161576378689,0.0156529362532,0.0157679615108,0.0159406489418,0.0149928658331,0.0148500445133,0.0153744397303,0.0181185880899,0.0156119402426,0.0154723185742,0.0159019238676,0.0157216075415,0.0161296619114,0.0155839402702,0.015247712917,0.0161370493803,0.0154358184859,0.0162759048164,0.0154415584359,0.0156049301862,0.0161247657627,0.0158535601651,0.0158197399483,0.0154745453798,0.0162504818172,0.0161884061265,0.016012035472,0.0155628449635,0.0159974262137,0.0158140548983,0.0157179325214,0.015934291778,0.0158425799752,0.0154704206227,0.0158749783461,0.0155687062804,0.0159921776154,0.0156782441193,0.0158876642939,0.0157752472423,0.0161819468612,0.0163908301643,0.01533768081,0.0156493009414,0.0155720743707,0.0155672254575,0.016012654376,0.0149344138372,0.0165187311131,0.0152687031188,0.0181962035553,0.0152416603898,0.0161790286195,0.0155201824214,0.0155036928113,0.0161858238715,0.0157512724339,0.0159829992807,0.0154817731473,0.0160174542155,0.0155904185503,0.0161161347456,0.0154882773128,0.0156977925575,0.0156833131359,0.0160483677892,0.0151624411724,0.0168420340772,0.0149270647404,0.0155084443012,0.0152289664927,0.0163039116243,0.0149691694011,0.0156095688915,0.0160355802786,0.0158530092058,0.0157295841067,0.015988388595,0.0157408775052,0.0154967518775,0.016144363945,0.0154491308622,0.0158407268798,0.0152337003001,0.0158732852654,0.0156508934928,0.0160867392834,0.0156449699033,0.0160357550591,0.0156794157438,0.0160554543961,0.0157520656802,0.0155385279907,0.0163224085989,0.0156749577741,0.0154788650097,0.0157976585719,0.016169747729,0.0156326164708,0.015681809074,0.0160314471688,0.0158128795637,0.0154483594146,0.0159530895864,0.0158483938194,0.0159328718034,0.015841931074,0.0158847885181,0.0159339302735,0.0157864556676,0.0159030459932,0.0158662047548,0.0160916940911,0.0155636882211,0.0155638040342,0.0162034469142,0.0154903508296,0.0161212489425,0.0155805377459,0.0155399931552,0.016258567265,0.0149213267565,0.0162135698137,0.0154796135392,0.0162432403425,0.015482682062,0.0155322460565,0.0162086655182,0.0150895483331,0.0156972581259,0.0159750748336,0.0160299535167,0.0166361818504,0.0165511458529,0.0156421901596,0.0158986511764,0.0159306863312,0.0155605521762,0.0160766456858,0.0161373657617,0.0156297790631,0.0154047731508,0.0162624669689,0.0158447513277,0.01549659947,0.0162618348173,0.0153599915769,0.0161030565437,0.0149935156132,0.0153451177304,0.0163539561747,0.0160038786282,0.0157452680288,0.0152600369064,0.0154142943105,0.0157358768454,0.0160847782608,0.0158080711931,0.0160901714575,0.015729799299,0.0158025320574,0.0157073260431,0.0157919348343,0.015932102188,0.0159108836242,0.0157732680514,0.0156625127745,0.0155908617279,0.0160813742345,0.0161034353321,0.0148823661726,0.0160375535676,0.0179638468386,0.0148593028342,0.0153038598466,0.0160208131799,0.0159895476149,0.015727187846,0.0154498706614,0.0161923493497,0.0154944463147,0.0156657286216,0.0153749113639,0.0161509526851,0.0155655813532,0.0161150394836,0.0155722227087,0.0155738528899,0.016017834562,0.0157819714045,0.0159186680253,0.0160670979316,0.0148374055255,0.0160344101473,0.0157524347383,0.0161347821173,0.0156410711192,0.0160738363131,0.015275982892,0.01496753902,0.0151610878774,0.0149166960716,0.0156251579002,0.0160146159806,0.015456853748,0.0157590901386,0.0156436643919,0.0160994025892,0.0158000145706,0.0157910790214,0.0161835678409,0.0162979273173,0.0155725486198,0.0154312869132,0.0161956057985,0.0162000370691,0.0157164776597,0.016094466538,0.0156065970461,0.015924713285,0.0154422712524,0.0161489139374,0.0154294501519,0.0160125033988,0.0154405214685,0.0160239756083,0.0155779539843,0.0159510406241,0.0158551635617,0.0158013185976,0.0153716293398,0.015672910499,0.0156343259019,0.0160891125104,0.0157720824188,0.0160100243752,0.0155129961721,0.0159718091092,0.0155424365008,0.0161833306674,0.0157766960841,0.0159354720238,0.0157834899367,0.0159082371419,0.0156834903396,0.0159836756783,0.0158674972567,0.0157927340636,0.0152185578784,0.0154859732311,0.0151909304805,0.0163280871094,0.015418728645,0.0154987969584,0.01611155377,0.0155999446722,0.0165793526732,0.0148896235163,0.0148859423617,0.0167316343106,0.015124411439,0.0151858461193,0.0185958397213,0.0161310540471,0.0154676070339,0.0153676053175,0.0162452519654,0.0159665972994,0.0157110364711,0.0155258673658,0.0158738112769,0.0158610926665,0.0155257706214,0.0160298986466,0.0158019266636,0.0157767593523,0.0155266685238,0.0156984670317,0.0160303831632,0.0153935163476,0.0156637115749,0.0151440658374,0.0162997466167,0.0152238194773,0.0161925979302,0.0161566192096,0.0156084019398,0.0160191980263,0.0157660226256,0.016128649029,0.0155474031664,0.0157693494239,0.0158080356686,0.0159660465423,0.0156076451513,0.015795501245,0.0159427057678,0.0158316270802,0.0158443038426,0.0161291763744,0.0159987820998,0.0159265689126,0.0159147268503,0.0158382804309,0.015930916249,0.0152509346707,0.0161908167117,0.0156385015996,0.0159709944629,0.0160282518761,0.0158996432038,0.0157851136728,0.0159248719266,0.0160563153865,0.0159902206977,0.0157224281721,0.0158224272834,0.0158686343687,0.0157177733359,0.0155639431617,0.0154712530698,0.0160798588183,0.0160742283009,0.0155482781857,0.0150677774367,0.0160630662526,0.0159978566521,0.0157003867471,0.0160272457359,0.015800013197,0.0155417724501,0.0161585112182,0.0151995481331,0.0163303923807,0.015218334413,0.015780556695,0.0154623738099,0.016118140045,0.0152646254978,0.0155350926349,0.0149895997827,0.0152817288925,0.0160141630436,0.0158988029082,0.0149114516276,0.0154758010801,0.0160467472156,0.015445705793,0.0154614479463,0.0161380152288,0.0158390099646,0.015475027209,0.0158761915425,0.0155526659933,0.0160726290914,0.0150972282769,0.0149027098674,0.0165008527779,0.0150311875508,0.0165371755855,0.0148021914416,0.0159949098892,0.0159059999093,0.0155781583551,0.0157656349096,0.0158666365022,0.0155066899423,0.0161865066907,0.0157663920336,0.0156563530335,0.015966345434,0.0159266557573,0.0158830639942,0.0157211528562,0.0153109373096,0.0150056701238,0.0164212039047,0.0157244995588,0.0147313148177,0.0160805666518,0.0151193698,0.0186884092301,0.0150726312946,0.0159083577536,0.0157577298973,0.0155746936307,0.0161467387505,0.0154828606989,0.0153898722844,0.0155344448618,0.0163279758774,0.0154504031049,0.0158623575203,0.015735385887,0.0161708739772,0.0157660610449,0.0156079588299,0.0160182786904,0.0151981156528,0.0153015656212,0.0152553084839,0.0150809623765,0.0156174536146,0.0165296445014,0.0159327027486,0.0172625356852,0.0155910792469,0.0160256244139,0.0160638008913,0.0158896485685,0.0158637167459,0.0158940903861,0.0158178367047,0.0158266167856,0.015899529065,0.0159604582895,0.0155264647067,0.0156001830234,0.0158195235049,0.0154248339942,0.0160953282042,0.0156448154452,0.016148209455,0.0155440058761,0.0162768938457,0.0155769490093,0.0161180591492,0.0154154087998,0.0157795016721,0.0159068299108,0.0155490054581,0.0158271592023,0.0157691686243,0.0159828750001,0.0162180841797,0.0154811177043,0.0154433836814,0.0162180787949,0.0156420629183,0.0161570056979,0.015397486933,0.0151680207687,0.0151993656069,0.015423020733,0.0154836796452,0.0149922489109,0.016225284945,0.0155442723434,0.0161339188724,0.0154238032779,0.0160818878914,0.0157014330583,0.0160643248738,0.0163914216728,0.0158680781785,0.015830764253,0.0154260641137,0.0162016954203,0.0152436353218,0.0164592246214,0.0161331599147,0.0159265508144,0.0156640555255,0.0160288056339,0.0158446852041,0.015417868476,0.0163011313371,0.0153367545766,0.0155110320994,0.016324103687,0.0168114291222,0.015971980298,0.0156799419369,0.0154125802461,0.0161395232567,0.0156160579237,0.0151690787305,0.0162827907235,0.0154875879326,0.0151753083667,0.0163157617063,0.0155816240819,0.0161288151358,0.0161147354718,0.0156448149167,0.0156082132962,0.0160432592684,0.0157180343892,0.0160042263498,0.0157154985408,0.0157141169715,0.0160051340205,0.0157877071657,0.0159727391139,0.0160365029693,0.0156908273401,0.0162691019971,0.0152963602776,0.015438899119,0.0157051194469,0.0160292002126,0.0155118705674,0.0154397685962,0.0161588037508,0.0155752148347,0.0161728003506,0.0160713731898,0.0156095365079,0.0161489847291,0.0155261526922,0.0158890901496,0.0159422289676,0.0156644591313,0.0157471701213,0.0161484951969,0.0155145046706,0.018535965342,0.0152063038987,0.0148952965958,0.0165856343219,0.0158718569985,0.0154423750815,0.0162908237927,0.0154535643305,0.0161707139139,0.0155614758281,0.0158941397884,0.0157263783003,0.0155200916122,0.0161030280946,0.0155715804644,0.0154674172207,0.0150557650158,0.0159375296198,0.015449714876,0.0157652755505,0.0158142737055,0.0158823973233,0.015669158998,0.0162636022646,0.0159086609836,0.0160305449415,0.0157875304593,0.0161802820173,0.0156637587952,0.0157195104588,0.015572153847,0.0160465191964,0.0156689451397,0.015740841241,0.016246236347,0.0151941939696,0.0161556927225,0.0152554338702,0.0157817186918,0.0157723905682,0.0155926664477,0.0161729550683,0.0155232771617,0.0160490575534,0.0152118521637,0.015326436827,0.0153928707374,0.0150934396472,0.0153168006884,0.0155494908057,0.0154594772764,0.016188766086,0.016110846746,0.016023790248,0.0156738847726,0.0154205049175,0.0162718219165,0.0162716964012,0.0155032507167,0.0156360066526,0.0160200952209,0.0148443369078,0.0159881184802,0.0159576368048,0.0156601028763,0.0156549685601,0.0156870420148,0.0156725280009,0.0161265879303,0.0156224378392,0.0155600434109,0.0160953599866,0.0156390732273,0.0160971914491,0.0154557025034,0.016196601127,0.0155530849263,0.0155913778283,0.016037871956,0.015696074668,0.0155292763647,0.0160943606307,0.0157807981773,0.0156509943887,0.0154717114823,0.0155209506264,0.0161960110097,0.0156340504373,0.0161398382939,0.0161020465777,0.0156737509478,0.0157215691184,0.0157206225335,0.015709075163,0.015902663816,0.0160964738285,0.0157262716719,0.0157996865242,0.0160438158695,0.0157811034304,0.0156766902556,0.0156668654672,0.0159750499105,0.01603265127,0.0156729933596,0.0157820906661,0.0160486513328,0.0156955191965,0.0159819573589,0.0157064368791,0.0159685536518,0.0154611678187,0.0162081561493,0.0162824790663,0.0155530184969,0.015627493332,0.0159231944876,0.0148767251278,0.0164642552633,0.0166307976187,0.0185191423006,0.0152498871408,0.0155354374448,0.0158756733163,0.0152292242891,0.0155582328011,0.0154562012856,0.0165043222515,0.015057576819,0.0158611702726,0.0153980191459,0.016150246917,0.0152981994741,0.0164069593285,0.0160154461799,0.0159647165216,0.0158154924606,0.0155866466185,0.0159884663011,0.015561699255,0.0156149721976,0.0159270255695,0.0157425174161,0.016040804639,0.0161162654513,0.0152187972754,0.0149259513664,0.0167424285812,0.0158529300714,0.0154727450508,0.0160587986785,0.0150847463998,0.0151186047041,0.015141970249,0.0149953128318,0.0155230558489,0.0157212890892,0.0158586393992,0.0159938746383,0.0157045519065,0.0163416286033,0.0155341605964,0.0160832179766,0.0154892007259,0.0162188138257,0.0162653853968,0.0155277670196,0.0160475151569,0.0155600626954,0.0154477870093,0.016244687873,0.0161110549667,0.0156171286425,0.015950540949,0.0162793356338,0.0162927269194,0.0155001795436,0.0157970368634,0.0158204600176,0.0158740974098,0.0157630224598,0.0155762234499,0.0161522567281,0.0159252619428,0.0158554546471,0.0154222847744,0.0158344335083,0.0154861174423,0.0162413732075,0.0161386813129,0.0155264133266,0.015823668196,0.0158220980699,0.015535632844,0.0158912933049,0.0155778694649,0.0158634259589,0.0155181108091,0.0161443098924,0.0157425035877,0.016117646071,0.0154494236506,0.0162024786467 }; const double PHI796[NST796] = { 1.50502206474,1.77037834345,1.60855157565,1.24942939558,1.22019678582,2.8611680822,0.561928575835,0.660436796879,0.733722933387,0.830460379455,0.857743324482,1.69105024214,1.64303696248,1.39622816391,1.29646897024,1.193661306,1.19449212828,1.74633285535,1.71805862414,1.87768165073,1.51622980026,1.5959319518,1.98806334681,1.7692503344,1.94714652737,1.83839314157,1.59731770107,1.58303622452,1.68681955003,1.6994873269,1.80859852444,1.99385724471,1.89608336148,2.4178583568,2.07884820436,2.1829785661,0.491502225487,0.416221146137,1.0083672724,1.10491419855,1.15511739327,0.955494195856,0.965504060792,1.06109438698,0.884093830605,0.784068862851,0.697360738052,0.0845002719227,0.0746914349686,0.182750021623,1.19141903646,0.992910158481,0.996619465718,1.37299416276,1.24987410977,1.13725172989,1.11717146962,1.33942919409,2.44691125976,2.47342252155,1.14773089879,1.24520422447,1.27475843668,2.76879424352,2.56285071911,1.83045966226,1.73817394934,0.258177417662,0.359319072724,0.948114556124,0.114716024457,0.310792293216,0.142256090827,0.248267539207,1.09769197862,0.995612252134,1.29149859351,1.26461750805,1.35071598894,1.41034707918,1.33103799311,0.968391956527,1.16601212929,0.985163636046,1.07633608798,1.79543376312,1.4976915053,1.62086518118,1.60504021187,1.88054216572,1.98451937081,1.27630615005,1.39280834173,1.49045484859,1.48869578536,1.39560312312,1.29393159952,1.29847973984,1.61292096053,1.60696809967,0.961342595843,1.06782004325,1.71829756098,1.81611862936,1.72157281934,1.02603563061,0.955811904279,1.09865048852,0.997000674252,0.993122393127,0.899049636422,1.09436509649,1.09757251105,0.910198096652,1.0070646277,1.51114506154,1.41804523794,1.47693234627,1.35086569451,1.3698399445,1.8018247932,1.85756438322,1.91130924774,1.94031064702,1.76901307289,1.86879897568,1.70978961359,1.72999834221,1.82267501522,1.81486200325,1.81795897383,1.71684072079,1.72029144161,2.19046599842,2.29359258119,2.45712212229,2.56529876704,2.39050827696,2.37525196307,2.31005763395,2.09720080586,2.16055952733,2.26342186684,2.05962489633,1.94752421589,1.92335301641,2.13964992054,2.00037935823,2.10370176006,2.82150684291,0.594126077524,0.629758808866,0.465354786421,0.573433477743,0.638373907734,0.609837941422,0.611945461427,0.596299891756,1.06001438551,0.792557871123,0.588407960407,0.481674818201,0.669805407134,0.678646290404,0.71928269884,0.621736209977,0.558232002773,0.615275710272,0.406034596729,0.451304986991,0.597163922185,0.540940836586,0.57162771745,0.474316112511,0.119794149495,0.137709553464,0.232192475317,0.299402273953,0.541302307222,0.392991053448,0.494073186358,0.643341620373,0.696659506377,0.796188322182,0.846444553905,1.00271004626,1.1051732229,1.37782430314,1.29176691898,1.08860396446,1.09200696485,1.18459065461,1.28008132013,1.48160573029,1.47022717541,1.56219405603,1.5863310428,1.67495850036,1.66201977363,1.31816866695,1.40883409297,1.39160985591,1.28749731508,1.20895893353,1.19521852213,1.85767551025,1.77824150399,2.27441117646,2.37658089554,2.12638352091,2.12323874561,2.62349543706,1.93393035212,2.13626194805,2.03838500863,2.04054810075,2.09673807066,2.83636316081,2.45458335792,2.4156846293,2.36482108733,2.43489813506,2.40614029147,2.29835376358,1.60722960099,2.12248042227,1.25432500981,0.922711945659,1.42223691016,1.5212758545,2.02028151298,2.01986221013,1.65932877048,1.56314665551,1.55843051443,2.47817806027,2.49041056185,2.58356512006,2.63871485053,2.74724861776,2.64564203914,2.54181748984,2.55001916004,2.91764373487,3.04286116665,2.95713501392,2.93847446364,1.5951165255,1.49359323848,1.69226642413,1.67759867753,1.56665957856,1.47951868161,0.898769111041,0.912719449136,0.714778576631,0.800635986705,0.797867417223,0.269774458352,0.219879152639,0.297818617571,1.01409960114,1.10700024181,1.01852899961,1.20831353327,1.04084087777,1.22631137837,1.14704352466,1.65946540414,1.63587959667,1.53638655294,1.45000238879,1.73280937263,1.72253800852,1.8113041136,2.19625944528,2.20903414263,2.32306055397,2.37858802133,2.29288617711,1.10439178256,1.15619400361,1.33328204732,1.25928223005,1.34452007618,2.00392200459,1.90895048048,1.68007770002,1.27214858815,1.20000040557,1.15924135349,1.12253622385,2.19294430745,2.19240839711,1.15681736751,1.12467910241,1.51590832935,1.62279009478,1.62594337924,1.53122218314,1.6228364501,1.51965278794,1.64211950064,1.56256820047,1.72371557668,1.66911613944,1.75083659723,1.4333843627,1.58547213321,1.61739821277,1.53774146491,1.40303842733,1.47572597512,1.91532076202,2.10347335205,2.00818094583,1.91508525914,2.00718163041,2.1019838988,2.13055361409,2.17844139455,2.26649612273,2.23965982971,2.07139156091,2.04981843538,2.38702205623,2.29093301632,2.37768971856,2.28901969831,2.55829480561,2.47557112532,2.5866775718,2.63123511299,2.58416783544,2.67903111997,2.48245485975,2.49112218354,2.54818392283,2.70850252354,2.64427636581,2.96558633037,2.86680489587,2.76832677268,2.74526053536,0.970154051297,0.989754647785,0.320795238266,0.424787079492,0.506804097796,0.4981374343,0.794087450254,0.892564642583,0.892226251507,0.692280141754,0.799167831823,0.6971592771,1.05445315648,1.12957669314,1.20681543624,1.10395835655,1.27491296091,1.24632043808,0.955826125097,0.923440081184,0.819007947094,0.744533469572,0.948778847422,0.908336156968,0.802550280298,0.735982021798,0.787545553982,0.893466625605,1.20041588373,1.40214246855,1.05696936885,1.06805472835,1.16060342698,1.18322157936,1.27401623512,1.28567627403,1.06476266851,0.891574656217,0.780883984108,0.776498251917,0.884370570379,0.974499035457,0.500931642276,0.439202943941,0.312952352803,0.408352622809,0.236755641315,0.3945342664,0.296662139934,0.806441544852,0.704376410537,0.91530635714,0.807919837986,0.752823655619,0.720553190589,0.964882331072,0.877665078408,0.860210769915,0.936623235635,1.30616505044,1.40619672652,1.95636700716,2.16667943777,1.51552197967,1.6032454988,1.38460039037,1.46773051747,1.38455389721,1.83396605076,2.0172674415,1.93494810598,2.18261678543,2.27734399464,2.20203683846,2.48036890782,2.67227852403,2.57770181214,2.4699975086,2.37242264861,2.84720164101,2.51617359842,2.53705676206,1.81761961998,1.92853157048,2.23345735057,2.32808767731,2.42874832595,2.43492407033,2.1935802673,2.32886741193,2.23975772748,2.12556679728,2.13983698809,2.65824280896,2.74677824429,2.92809632939,3.01154978145,2.94327860735,2.89976752655,3.03865571908,3.12224153049,2.82994497967,2.6892782514,2.7957596761,2.62229047182,2.73559186195,2.63874709699,2.30658680632,2.1510691381,2.25554874365,1.78828165622,2.3269498111,2.43056333119,2.35365496092,2.29354559167,2.46849252007,2.5128022372,0.809683765517,0.727723574576,0.769755010071,0.87238084176,1.37260724251,1.55942988667,1.72946771152,1.83433631656,1.65015899292,1.65025075999,1.93202948718,1.75041429829,1.83521136834,1.74603417589,1.47153041733,1.29638296386,1.36407014931,1.45981778157,1.37287113125,1.46085286995,1.27503671044,1.35682844473,1.25992320411,2.82709099004,2.6782680261,2.73457318128,2.63691772182,2.58434457496,2.62573163701,2.80724372206,2.74624813284,0.480512340942,0.394266169686,1.82981323983,1.83890618837,2.02306297886,1.93770507336,1.91092735641,1.99935482892,2.09809293171,2.10432852755,2.01371159219,1.91934652643,2.01738179681,1.90756342834,1.83151902845,1.80591030731,1.90196334257,1.78647925125,1.86226644554,1.49775059963,1.60615921674,1.62509928195,1.53365888872,1.46110824489,1.31183195125,1.34790586277,1.31370372616,1.2581202701,1.42554481756,1.33853077104,1.44266172504,1.32261930158,1.30173470693,1.20198192769,1.2107870613,1.41227725389,1.42458291461,2.45621799073,2.37613861305,2.31316518468,2.41666061117,2.27012555516,2.24535354083,0.864033221398,0.860254339757,0.676039172824,0.776870694211,1.3397479058,1.31853010212,1.41807538417,1.52927049721,1.54129294832,1.45103054826,1.17646023925,1.08512436153,1.20724507081,1.00295197102,0.759085375014,0.297595053993,0.403120597107,0.40068993436,0.233084011171,0.33485415004,0.379537931999,0.194303364029,0.280777985278,1.23352541028,1.14129002653,0.946523772397,0.84533401122,1.03867056991,1.03418433085,0.938761170516,0.841745921507,1.13099775904,1.32322423208,1.22750674973,0.946347800693,0.85891963999,0.984366604076,0.879541826178,1.14303194006,1.05116563106,1.23268799848,1.22209071555,1.12158247338,1.04011985475,1.4477031622,1.53343173634,1.63542734217,1.46688201767,1.79296812384,1.70641811592,1.72084755092,1.81960086642,1.75069295978,1.6510665289,1.56811671125,1.75290309114,1.65415906813,1.56900688191,2.37448387184,2.31496861112,2.36562286845,2.46556887992,1.98931748992,2.15599050923,2.04834277091,1.9687101779,2.28016670633,2.18869328584,2.09548509003,2.08771533273,2.27421572873,2.17530093604,1.8068283419,1.70151136648,1.7089279294,2.11906957796,2.01850117434,2.7203565012,2.71454173193,2.78468827215,2.36536118959,2.46958485537,2.56169457522,2.03966288357,2.15120386054,2.24736481041,2.22657561078,2.21591990653,1.93903213414,1.8466139067,1.44926619055,1.47037359908,1.35703280329,1.36898405342,1.70671364778,1.79059919082,1.51737198305,1.52906603963,1.41797832933,1.32842877758,1.33650945188,1.43762861233,1.19335130729,1.08695644741,1.19336359946,1.09019823481,1.02110004627,1.55614764901,1.63538327174,1.64651194512,1.4572857279,1.53249311796,1.44465454407,1.93685709949,1.83927919506,1.93233203499,1.74540364326,1.83508778035,1.74581043193,2.50238913157,2.54490606354,2.5533192765,2.658448107,2.65365875283,2.72075958822,2.77211150061,2.75005633017,2.81601464843,2.93203666383,2.96379001964,2.86388763291,1.53640174254,1.69111007383,1.72260392087,1.64667074688,1.5571263579,1.58238943918,1.50330699754,1.39238670472,0.76476963866,0.585354251025,0.574292376199,0.667015734797,1.15335332808,1.13267864322,1.01909599788,1.06137555886,0.924347401776,0.946593965153,0.748571092072,0.7584191279,0.576634482379,0.675753546605,0.467927838535,0.563230572731,0.653134688992,0.660562828548,0.580471680679,0.478594187468,1.32908640243,1.36476766558,1.43235033011,1.45073446903,1.13707970879,1.17227446995,1.25692106957,1.23937889868,1.06573692114,1.04773164887,2.00257371606,1.90605672599,2.08931596497,1.89361373125,2.07667425789,1.97792857737,1.88960300422,1.98985027029,2.07085373972,1.84351128659,1.82484627911,2.60771472388,2.53588344583,2.01365594546,1.9031619634,2.07908529728,2.10496095524,1.96887315201,1.8835323955,2.0792321828,2.10245145625,1.97131412041,1.88839601542,2.23164604725,2.3461192773,2.34178884147,2.13500385389,1.63019559078,1.7180526439,0.862520228393,0.828172913594,0.417466054597,0.512853068145,0.36446446573,0.769456691584,0.888938952816,0.875318952251,0.68143266283,0.80918466618,0.709786794515,1.94212365619,2.04629376097,2.12180662829,1.95229884081,2.06093670524,2.42877098523,2.3491889028,2.23907645743,2.21011727097,2.22621464034,2.27985349671,2.38709548777,2.60173322982,2.55550648813,2.52032106262,2.44346205827,2.02811270474,2.01084316545,1.90520654704,1.81874557147,2.1436108043,2.04056758248,2.04401721528,2.13679094289,2.24113041732,2.24442667508,1.55126845605,1.640880578,1.56062585109,1.65793861218,0.722956117749,0.705574674071,0.655499614862,0.557432113821,2.26867028097,2.31918602691,2.40977810708,2.3777887448,2.2072219183,2.18762855745,1.94139022237,1.9338181366,1.84566299088,1.74814217066,1.83041263752,1.74037444513,0.609750807144,0.435649417536,0.433756323085,0.526024611525,0.535640057623,0.615673111603 }; const double THETA796[NST796] = { 4.65852185733,-0.604294971823,4.59788888255,3.61618927535,3.72994072729,2.32603002935,-1.27316432755,-1.22748191917,-1.36507547262,-1.32489600502,-1.17186075377,3.35865202136,2.96612457097,4.61480482796,4.67069440085,4.61882290548,4.5047919304,-0.498061550743,0.0250962374492,-0.642095159213,4.12372644524,4.1865301634,3.78111265739,3.83210591301,3.88762475631,3.90848082967,4.50116751541,4.29557370342,4.33983493956,4.43687259487,4.47243631167,4.42518825717,4.3944979486,3.72771097826,4.33699099565,4.3742141197,3.13955456937,2.95784995568,2.37653604791,3.74613621336,3.55237625123,3.45420070425,3.59383346209,3.62986959733,0.250318304553,0.222349675889,1.46087677945,-0.119447049904,4.59030906807,-1.39854956004,1.86264221279,2.0001369363,2.25429134158,1.97053035691,2.54467701114,2.51973367026,2.40882459884,2.4707031571,0.992418810484,1.6100204342,1.29878968426,1.25878551329,0.30064943825,2.13836851992,1.95501821787,1.94627330594,1.91750944659,4.61554720401,-1.45965023256,-0.894698649624,3.49825119423,3.02668107345,2.61450255365,2.68782461716,4.44285418911,4.49979527012,3.80289464004,3.91872640888,3.98955379566,4.17127893793,4.10540017425,4.03140074718,3.95922652285,3.88950506008,3.86065920234,3.31748902843,3.33152737474,3.18522337459,3.29356608214,3.39129392223,3.3552573946,2.64622143492,4.50813403771,4.45604535811,4.3467065004,4.28588858083,4.45103508286,4.33729995062,-0.024810924123,-0.134216875086,0.146929542673,0.188984815478,-1.19885346642,-1.36710101567,-1.31437600104,-1.26666001005,-1.15270489261,-1.0151450638,-1.02023058074,4.62527892846,4.70372482348,4.68077270824,-1.48467954514,-1.43651090771,-1.39928637748,-0.198445842352,-0.154225036553,3.43478538629,3.57769703454,3.46815928142,3.72103306519,3.5027507004,3.69106815522,3.58287274844,4.25716371849,4.2752719855,4.16055915884,4.05899698245,4.0286036629,4.57992015356,-1.48132558391,4.64010146691,-1.53626189886,3.27326667265,3.21847859976,3.567535031,3.51370858668,3.30188146363,3.45337032436,3.74305974216,3.7674285773,3.88112700406,3.87963959677,4.21910218354,4.18909058583,4.08442262091,4.12244286159,3.99267693064,3.99985139864,-1.4364506945,3.07580420146,2.88941162068,2.71700853063,2.71986302022,2.55502212838,2.37292901181,1.79940185141,1.98721407407,2.61682107693,0.922849072746,0.856849121985,0.931384019896,1.13105035816,0.974194459388,0.357250160914,0.676919725208,0.504812894654,0.333216023235,0.773041132594,0.515582214326,1.44481340113,1.63565679645,1.24647529869,1.18082215322,0.820393704926,1.76672835031,0.624905723257,0.903107520203,-0.880171748184,-1.14661668178,-1.09543213663,-0.882939594755,-1.04884099702,-1.0359977488,-0.890622770497,1.86927426393,1.80347273869,1.85525387165,1.79907794589,2.05458825253,2.17636085239,1.98450013311,2.03511780171,2.13075525034,2.02124727806,1.96151302602,2.17638788727,2.11141150194,2.00537529122,2.3668479159,2.30008620603,2.19335805412,2.14929449489,2.33094348518,2.21917652243,2.07655671735,2.15304650988,2.23879492744,2.16126710424,2.79600742354,2.66374921386,0.749740447496,0.112124364938,0.0913927080674,0.277157314125,0.16446051439,-0.706417056373,0.885857048495,1.91225274824,1.75886086748,2.02256233181,1.31411298585,1.47036701633,1.48949480316,1.53571710136,0.684998727936,1.14455705142,0.393632256809,-0.0386432799856,0.025813752148,0.511920464639,0.636420088334,0.863602537641,0.804961993331,0.692856206872,3.03485354025,3.2175472701,3.30589444547,3.65875486297,1.07927209681,0.966336015959,1.26498353228,1.07627186604,1.56866162255,2.5939826234,2.09309428303,1.04824792591,1.6422312043,1.68557163709,1.71929239633,1.81818767571,1.8523431122,1.79758631867,4.42722901088,4.2945130716,-1.53753207647,4.64579454416,4.49139134011,4.14875141265,3.70279838566,3.40872386766,-0.780139900269,4.32191823195,4.24801637179,4.27127596738,4.12105534519,4.15309308548,4.07805448052,3.86716501807,3.97414460319,4.01215867514,3.94437783613,3.02564222283,3.13834747651,3.20480480521,3.00412692726,2.86537365963,2.84002736874,2.98505595752,3.07825238681,3.05536286141,0.117389575014,0.00792503534179,0.177458996617,0.126797777351,-1.35983061013,-1.30347936759,-0.967158198953,-0.919530791761,-0.707932903003,-0.907544949771,-0.797831120275,4.50692298175,-1.49611135778,-1.12554315418,-1.24548068304,-1.52794298216,-1.48263577307,-1.37421594347,-1.32359697879,-0.352578687321,-0.309977238549,-0.462681712604,3.50574852471,3.64846417249,3.46821578307,3.53785404649,3.6508458904,3.79353213144,3.68539559581,3.61288229022,3.7624222795,3.83220702723,4.6264453004,-1.55522512011,-1.48365638908,-1.54062594531,4.55091078127,4.59386693382,3.6487200383,3.40098687368,3.49415908692,3.62643427964,3.43787411617,3.55506537814,4.46667234666,4.55708958839,-1.50733182595,4.70546876207,4.21901418028,3.87248525002,3.86251980604,4.0474386591,4.4283327817,4.50194998021,4.70834529496,4.54318720977,-1.41610586013,-1.52398387769,-1.36008414735,4.32690960434,4.5103619008,4.33011281338,4.06896399164,3.19887996867,3.08000644775,2.3899141101,2.47846158084,2.30821383691,2.08017365726,2.00325266076,2.20732012393,2.07276467056,2.0820972848,2.30155025851,2.25064839523,2.84855937895,2.94998743961,2.73901267169,2.73511756329,2.83475429046,2.93251521523,2.60538740262,2.47464477084,2.44943365649,2.57581158796,2.85113230431,2.97828276938,3.00000240738,2.87112135294,2.72308733276,2.72604059736,3.13392071833,3.26602503786,3.38643802938,3.27411464305,3.4460657362,3.23556926836,3.40127715428,3.30153798037,1.20237410126,1.00938927725,1.34131310761,1.20261803412,1.1372905979,1.23072061793,-0.662543709009,1.64740497818,2.02185848948,1.91838753668,1.69398912633,1.3805113994,1.31003617906,-0.744973583702,-0.724725732671,1.80025547569,1.8590082743,1.60791971415,1.75682535154,1.37927715896,1.42282001277,1.57395495079,1.66264175144,1.68015630447,1.62503501112,2.11075881435,2.18740215433,2.34469636362,2.28429529474,2.6842735485,2.85426747217,2.79824734438,2.61616611761,2.60659957046,2.67297904704,2.45018278396,2.37253148245,2.58736773951,2.24440534276,2.27341637587,2.15830621647,-1.27001522067,-1.34619932867,-1.09927252246,0.39410163342,0.0339974420437,-0.0362385042177,0.0051586902804,0.137674258445,0.0528179058326,0.274512917317,0.121997311046,0.576576699189,0.349732532326,0.284937508103,0.465195099269,0.348513361826,-1.08825154581,-0.944719866205,0.0697777823682,0.543665865964,-0.858862715448,-0.411293204565,-1.29788338855,0.357773912142,0.225350319503,0.556118709195,0.555628073194,0.358781647808,0.0334753818821,0.139520125019,1.75339376247,1.63044113409,1.62433827656,1.68168026062,0.775985328287,0.831718954301,0.507689720006,0.608626710322,0.551762460681,0.709286216591,0.78793392478,0.663887146184,0.515313547878,0.522652817806,0.36408952956,0.470772961753,0.12869076866,0.173293171156,0.522653884686,0.63658951315,0.696743802329,0.809282963769,0.635722833871,0.693704383157,0.855814605441,0.906946942427,0.811020609123,0.644311902433,0.483127249327,0.535483971555,0.54411213897,0.710794571767,0.663867642461,2.69847206758,3.17297371044,1.35571309236,1.8007100111,1.60442274872,1.4102725026,1.59186532639,1.84685421916,3.38438023743,3.54477736133,2.97304762438,2.85490273653,2.85932217568,2.79587546377,3.15946692647,3.23514262093,3.19163272137,3.06058650191,2.98547739151,3.03957376931,-0.795735397728,-0.759654691417,-0.829990832381,-1.13312782882,-1.18424376552,-1.01504832858,-0.947020573296,-0.984951682532,-1.03392138514,-1.1482439434,-1.21247659968,-0.872057758498,-0.734008637635,-0.83647108376,-1.01849875014,-1.11712788405,-1.04824991123,-1.20509690587,-1.1617988057,-1.3024966677,-1.50619006123,-1.4416092993,-1.33343937748,-1.46638729996,-1.36968291638,4.19026502978,4.31563255099,4.01728742628,4.02532753115,4.2765856771,4.14083306193,3.24837893563,3.39465136934,3.2077799175,3.15460652138,3.00728725357,3.10432834392,3.16938776029,3.12729010723,3.02018179546,2.9659239166,1.04758948659,1.06419369682,0.915451374799,0.966236079854,0.0596562843657,0.245788922353,0.277798031544,-0.610544452523,-0.881028221641,-0.878138293096,-0.314985329832,-0.387484543443,-0.140432523039,-0.0577476846185,0.000253719315485,0.0156655167047,-0.0406926720208,-0.0577709211259,-0.184260693638,-0.255615647781,-0.188113580682,-0.240645263328,-0.222674860579,-0.173623753683,-0.39146956393,-0.483287196705,-0.655556551542,-0.625608815608,1.42329919765,1.47376468217,1.49633389548,1.61763095937,1.6764617759,1.60604465691,2.51309323228,2.45448298045,2.50696275835,2.62555684829,2.26663617116,2.33223210267,2.44574434124,2.4980900918,2.67798391841,2.62167861047,2.68108858008,2.79508530998,2.85310207698,2.79613620232,2.72556577076,2.6090035362,2.46497421365,2.42005812542,-1.111866902,-0.94653601781,-0.911322247141,-0.991790510754,-1.27606759212,-1.35418362697,-1.29078992103,-1.16080799417,-1.12716264207,-1.07753262783,-0.136553473843,-0.183909171043,-0.291301160065,-0.0400752695815,-0.072196775868,-0.67869395815,-0.231097490001,-0.444023235109,-1.03502840088,-1.10395026271,-0.995768108966,2.02858660619,2.06631970868,1.98229988102,1.8636724589,1.38464909831,0.817202662722,0.870931293499,1.18257068223,0.965974044649,1.1110419819,1.00481849724,1.49205000761,1.5603664663,1.46600549177,1.35781283306,1.51135343517,1.44574893326,1.33173991197,1.2898875375,0.48171863901,0.517712732585,0.357273403017,0.306121978949,0.40617307446,0.359708111585,0.189602821219,0.297768821925,0.305843587647,0.137343358519,0.190983937351,0.334753090293,0.284354730559,0.453891663142,0.347106982299,0.51705558553,0.461623386377,2.72348361152,2.55673078397,2.89242276268,2.92943085636,2.50857743277,2.71121047167,3.28337481553,3.5853162101,3.80747946161,3.77740039406,3.23061617788,3.05762094776,-0.809837175542,-0.678201045255,-0.786931846938,-0.855511677738,-0.526652022655,-0.63638551661,-0.698969829148,-0.659117291224,3.47275784205,3.69469685494,3.48435573564,3.38428087689,0.709095181036,0.817110623608,0.850251241038,0.625539651464,0.761157967787,0.643075707462,-0.26970285152,-0.432302871237,-0.496770047274,-0.551002864739,-0.171040619331,-0.284891258267,-0.183457522004,0.00407927372258,0.13815021269,0.0770782351199,-0.335017756223,-0.553835424834,-0.377306357407,-0.484527775386,-0.361211767286,-0.596172907368,-0.517776085387,-0.405321929716,-0.562605743294,-0.438803168717,2.48142378533,2.43025265651,2.40155518772,2.31158460105,2.27062798491,2.23298984359,-0.216979952542,-0.195199945614,-0.282810337082,-0.41367215662,-0.316226775441,-0.645986871541,-0.802272345959,1.91796992768,1.87019377326,1.7342624527,1.83885975616,1.69327896297,1.75006711041,1.53012042299,1.4180182483,1.57275164596,1.5082116461,1.26020624943,1.0713769062,1.21228049968,1.18116045848,1.31365434826,1.37754343368,4.05777079424,4.19510450405,3.83922113514,3.87517786236,4.12333001813,3.62494577967,3.81306581532,3.68385414825,3.73968589996,3.92468598076,3.91406158721,-0.444842974895,-0.390840602395,-0.487676198977,-0.567476851026,-0.59563397601,-0.769982126717,-0.887921114092,-0.852010726145,-0.726106175538,-0.482924750605,-0.61075810554,-0.616611301845,-0.28334723133,-0.466249798955,-0.143693354442,-0.472062819479,1.22657045375,1.34078470718,1.38786471569,1.32622173236,1.05715490739,0.875818968496,0.992212027304,0.804812168458,0.859776492319,0.998277513721,1.1397197748,1.20221455344,1.02872033081,0.977805123628,4.22966299561,4.39762135834,4.08245891199,4.09277125955,-0.352433198414,-0.0846147285005,-0.186537238722,-0.336043169525,-0.128860416255,-0.250009937834,1.04768170841,1.15967875088,0.986164652347,1.0379421828,1.21140656107,1.15202678121,4.46860598195,4.66968464951,4.37954330778,4.31816890486,-1.4926458601,4.66928211856 }; const int NST810 = 810; const double AREA810[NST810] = { 0.0155399449398,0.0161688300168,0.0152359394744,0.015635052276,0.0153558882534,0.0159236110923,0.0154529053544,0.0153777231596,0.0158747930543,0.0174902452703,0.0163646282334,0.0157136301376,0.0156947663925,0.0145642782173,0.0157282224595,0.0154152162751,0.015779657788,0.0159386383424,0.0152711411302,0.0153143450106,0.0159087696578,0.0155769700931,0.015613521867,0.0156582629643,0.0186824678569,0.0156193418111,0.0156050348831,0.0156960244849,0.0153404024449,0.0154906822447,0.0154632406866,0.0152584092614,0.015599537725,0.0155817342077,0.0158350555085,0.0153990220042,0.0156023182605,0.0158195731828,0.0156548519196,0.0146961693208,0.0155412355947,0.0155752599902,0.0150223780388,0.015313336346,0.0158349272788,0.0160724348125,0.0155368260347,0.0149373140279,0.0157730889448,0.0157028213385,0.015159446115,0.0154160767054,0.0153732314094,0.0156760858905,0.0157690076316,0.0155355294589,0.0156848525259,0.015460908645,0.0152319716482,0.0158303383026,0.0154092622719,0.0155088656775,0.0150326993552,0.0147998287839,0.0156010446847,0.0155443426125,0.0154889660265,0.0154580631902,0.0156977203383,0.0149563878115,0.0152884062191,0.0156386129204,0.0154984108545,0.0156925427389,0.0157854031038,0.0154469109323,0.015500800021,0.0154345776176,0.0153468597298,0.0152057365421,0.0157084125364,0.0154844579875,0.0145010125618,0.0153402715544,0.014976082705,0.0162568861633,0.0152803898975,0.0154015794122,0.017710361432,0.0160664318192,0.0146953871472,0.0161405834856,0.014902931141,0.0155670857324,0.0147319773892,0.0161980065045,0.016155481072,0.0148801007133,0.0149737524107,0.0149600137977,0.0159481144975,0.0154579258458,0.0151676044853,0.0149665356148,0.0146198102419,0.0180849835452,0.0144245195022,0.0160017031572,0.0154600143893,0.0157503270276,0.0153229506396,0.0154319022186,0.0157477237024,0.0157672725891,0.0155156095423,0.0153749381926,0.0156847813367,0.0157283502291,0.0154099653366,0.0148154835412,0.0164561590436,0.014841434964,0.0151020895547,0.0152537318006,0.0153632410112,0.0157432915211,0.0156431268058,0.0154477718599,0.0154290916632,0.0155501416761,0.0156861945732,0.0153664452299,0.0157170657907,0.0154759251235,0.01554689155,0.015522451902,0.0157212733489,0.0153171612847,0.0152876405088,0.015872643788,0.0153631474043,0.0157305583241,0.0162098987446,0.0152735357551,0.0156391329427,0.0155053972569,0.0152576065813,0.0157120977976,0.0157281904876,0.0154568986031,0.0155336319987,0.016047960057,0.0151064878971,0.0159589669405,0.0151741779739,0.015869857075,0.0153159508664,0.0158481199992,0.0152373510461,0.0159498165727,0.0152287094446,0.0161735119254,0.0150975071303,0.0155146149029,0.015815491883,0.0153824439585,0.0151242477404,0.0158710078242,0.0157886224041,0.0152794757919,0.0158226018691,0.0152143719559,0.0156739183651,0.0154831545336,0.0156813246914,0.0157554029423,0.0154131377166,0.0156452036988,0.0153045024865,0.014590539258,0.0161237805596,0.0163084272534,0.0145803135472,0.0163599773157,0.0158004623144,0.0154566950715,0.0154390507417,0.015769724491,0.0155141702916,0.015565748242,0.0156235024824,0.0145857930979,0.0148226055962,0.0187275797572,0.0152589204403,0.0154136514979,0.0188383697097,0.0162366870957,0.0159652812986,0.014604989175,0.0154299624986,0.0156195182983,0.0156205300061,0.0154968188677,0.0161028502029,0.0164354677854,0.0147009664917,0.0151136630909,0.0149786485471,0.0159951008312,0.0152642358339,0.0151457476976,0.0158332118753,0.0157245038702,0.0154457120771,0.0156729414993,0.0155431843474,0.0155637134586,0.0155135342162,0.0152519980458,0.0158033566085,0.0156029898167,0.0155093862206,0.0154472085807,0.0154486843824,0.0155858795215,0.0154236925269,0.0156844148136,0.0156703679453,0.0154246791842,0.0145281989467,0.0155531540567,0.0154667115486,0.0156770726485,0.0154395269551,0.0154665333667,0.0156705935873,0.016051801765,0.01525396156,0.0152897022652,0.0159027962616,0.0152124824979,0.0154658000877,0.0152622666542,0.0145668436324,0.0154259147017,0.015520003151,0.0153165109989,0.0157497234302,0.0154607412251,0.0157411526229,0.0151472026079,0.0158822798847,0.0157607498885,0.0154272978643,0.0152921971868,0.0158973490236,0.0153633521162,0.0154233367756,0.0147483700824,0.0153360435566,0.0155460555431,0.0155255976301,0.0157103848373,0.0156514828116,0.0154394537501,0.0152042485027,0.0150729621588,0.0158180729598,0.0155989613565,0.0156461586305,0.0154417401625,0.0150778509989,0.0152248086163,0.015059077409,0.0151894285875,0.0161083824718,0.0148238857638,0.0151609341507,0.0155418903944,0.0158175559437,0.0153657364129,0.0155454385132,0.0156120338461,0.0152148534702,0.015257262332,0.0158558949509,0.0156911396872,0.0156151835111,0.0155743994118,0.015160463759,0.0155182329696,0.0152040897519,0.0161731387997,0.0150166689044,0.0152783457005,0.0160057585954,0.0152909294022,0.0157363616502,0.0153376531741,0.0145669274091,0.0158161050679,0.0157834094686,0.0152522023849,0.0159467115873,0.0151489750456,0.0156110820062,0.0155171814289,0.0156417373362,0.0155410581671,0.0154291996009,0.015773852633,0.0157910853035,0.015360019029,0.0157471759147,0.0160225602049,0.0148506229406,0.015219881556,0.0147717471355,0.0151886607936,0.014774510378,0.0148257652767,0.0159150775923,0.015927558412,0.0158348795006,0.0152443180483,0.0144689559696,0.0160226385721,0.0156921580201,0.015507155179,0.014465359073,0.0181352761708,0.0151438021758,0.0151042732684,0.0160379451752,0.0160440063384,0.0151393784557,0.0156796699989,0.0158287632208,0.0147558460765,0.0162405112836,0.015125478759,0.015012727976,0.0150398112594,0.0148479485204,0.0150714218599,0.0149083671623,0.0155065774988,0.0151670032767,0.0158508224094,0.0149888400162,0.015777268001,0.0152869741177,0.0156554866071,0.0151728953281,0.0160379019337,0.0149479824402,0.0160392668355,0.0149681767776,0.0160231265194,0.0150402066735,0.0164241380732,0.0164394988868,0.0155087685326,0.0157426094769,0.0153531417364,0.0157856486038,0.0148897693126,0.0147463525739,0.0153597406237,0.0157431931311,0.0152944977655,0.0146302836822,0.0158444189001,0.0155046754714,0.015932673263,0.0154131977854,0.0145394933565,0.0162226798271,0.0152154809821,0.0152180732821,0.0158329878039,0.015232071224,0.0157874687918,0.0158045735371,0.0153777232787,0.0154292479589,0.0155751729109,0.0157230412015,0.0155033389394,0.0155813074162,0.0150214165745,0.015539165494,0.0156178908509,0.0144291833142,0.0162306071262,0.0154755448052,0.0153252114028,0.0152683257684,0.015875441194,0.0160672129996,0.0154734774257,0.0157165834775,0.0154474046194,0.0155215422069,0.0155830115374,0.0153475455913,0.0156296083195,0.0155015351418,0.0156140231664,0.0156018769504,0.0152743415252,0.0157989211998,0.0160613858664,0.0150870166583,0.015251950858,0.015981171476,0.0155502121309,0.0156533693019,0.0156069314817,0.0155283120956,0.0158202720738,0.0153550589678,0.0156177789714,0.0154955910007,0.0155548720626,0.0155184971987,0.0154461587371,0.0152973209231,0.0156626694744,0.0156926264625,0.015419938785,0.0146024801815,0.0157737590324,0.015532485276,0.0156417485879,0.0155003576053,0.0156169670064,0.0153153142485,0.0158030221745,0.0153434264132,0.0152168452157,0.0148578214715,0.01524747918,0.0147067375346,0.0151846769821,0.0145585410226,0.0156589439081,0.0155005132633,0.0156277422476,0.0155614743451,0.0154851197868,0.0156314026664,0.0148666311924,0.0149779309099,0.0147105087631,0.0153149747398,0.0145277010658,0.0147016535814,0.0161676647174,0.0164110350719,0.0147140883999,0.0155060204557,0.0156761507655,0.0151326604914,0.0152104587388,0.0159606734803,0.01579631224,0.0153949285732,0.0157879427039,0.015094875273,0.014787246892,0.0159363552828,0.015030572553,0.0151760048777,0.0158777790783,0.0158724844994,0.0150246130998,0.0147812832773,0.0162737603629,0.0153238141489,0.0158640020727,0.0157085229603,0.0154874754355,0.015733368645,0.0153545034547,0.0156021732374,0.0156494388971,0.0152603609219,0.0159662233062,0.0158689543631,0.0150107902162,0.0153851719763,0.015205227914,0.0162222053406,0.0146980856372,0.0189891577647,0.01482031712,0.0160435649705,0.0145577564127,0.0147920019171,0.0185750216189,0.014674775146,0.014516162197,0.0156290382337,0.0148649263663,0.0158350026962,0.0154987637488,0.0156386766585,0.0159727808907,0.0147210156805,0.0163367469573,0.0148072941544,0.014478141671,0.0162702205567,0.0148523604368,0.0186473978612,0.0153755181868,0.0146412082976,0.015881494549,0.0152173313823,0.0157808665253,0.0152586903818,0.0155487480958,0.0156965835095,0.0152870395786,0.0152761824983,0.01603938378,0.0144313455141,0.0155620676932,0.0156977038632,0.0155175646661,0.0154812265644,0.0154605325685,0.0154351390741,0.0156512633931,0.0151361973453,0.0159373811297,0.0156289129506,0.0153115425739,0.0157331767809,0.0152253982681,0.0155492495123,0.0145984557019,0.0147893916555,0.0151494823247,0.0175015000777,0.0165454665136,0.0150333006837,0.0162039970294,0.0148161232967,0.0149909813969,0.0153097558434,0.0153792477188,0.0157481760648,0.0158105251486,0.0153547722764,0.0153760713784,0.0158545528697,0.0156327036004,0.0154104165734,0.015554327854,0.0153671554,0.0156436776286,0.0154808236972,0.0159742467573,0.0152835902576,0.0144585578932,0.0155636303186,0.0147634787954,0.015091166156,0.0181420583019,0.0162755711076,0.0144693423654,0.0165211687598,0.01486044244,0.015021245315,0.0153755611214,0.0165815228193,0.0147439629769,0.0159792998114,0.0149589472055,0.0153100797616,0.0156420815553,0.0155361702902,0.0152444469392,0.0155739061481,0.0154995100714,0.0147442790055,0.0151735693801,0.0151472669633,0.0157616779427,0.015115592321,0.0147793239021,0.0148002092789,0.0154573456078,0.0153286350668,0.0154619035739,0.0154791879461,0.0152394611225,0.0154341450801,0.0158924793705,0.0148451364993,0.0153777690168,0.0152807197667,0.0159861602165,0.0150351328122,0.0158959638723,0.0150768299248,0.0151599585485,0.0159246199323,0.0155063427108,0.0155947200148,0.015148146497,0.0148419864635,0.0145433300534,0.0158051780706,0.0153246050351,0.0157877084822,0.0153858280826,0.0156888379358,0.0155032095526,0.0152028634685,0.015761802524,0.0154634674429,0.015157404781,0.0155159839232,0.0151496535391,0.0158557952489,0.0159899411052,0.0152054480183,0.0156526252257,0.0154882125311,0.0153513384175,0.0157674884118,0.015448180335,0.0156811980801,0.0156524497701,0.0153074230961,0.0152235677661,0.0159324439868,0.0157025302662,0.0152220591218,0.0158861731822,0.0152179419289,0.0158215695303,0.0153239582366,0.0158602805066,0.0152877963309,0.0154997509467,0.014514280969,0.0157678232221,0.0154349864531,0.0156563688998,0.0154720540475,0.0155140131297,0.0155912356862,0.0156539204443,0.0153893596498,0.0152429968179,0.0151473023816,0.0149507176569,0.0160486792047,0.0162984128772,0.0147684498732,0.0152771777726,0.0159584345444,0.0157487304349,0.0154704670357,0.0157880643931,0.0153116047098,0.0146351247135,0.0154598881482,0.0145867790988,0.0161231304247,0.0156631372775,0.0155061899621,0.0152304235393,0.0152241853971,0.0158712373182,0.0150811701488,0.015033900187,0.0155220647055,0.0156203161384,0.01531504288,0.0156895835308,0.0159741609657,0.0157913424458,0.0156471173995,0.0155994659912,0.0155860925976,0.0155340850339,0.0155244732276,0.0155466199557,0.0156468877236,0.0153846629968,0.0159032237097,0.015402504729,0.0158473579641,0.0153948476701,0.0159461459629,0.0152408607568,0.0157715693305,0.0155167702081,0.0154616350936,0.0157017946822,0.0154363983174,0.0156816947393,0.0158375971598,0.0153393600483,0.0153738696339,0.0157989845461,0.0157353206739,0.0153182296937,0.0158874865229,0.0156524358726,0.0156278613191,0.0154993633034,0.0153769862723,0.0158722536773,0.0152432185031,0.01427368713,0.0192511719647,0.0148282019053,0.0159861577235,0.015441016981,0.0147719061745,0.0160086273712,0.0156653806232,0.0155421538643,0.0153878935102,0.0153151297628,0.0155935486758,0.0153476082771,0.0158123476985,0.0154552740884,0.0156002047103,0.0160236714549,0.0150662692568,0.0159734331235,0.0146978229999,0.0153001202366,0.0153695540603,0.0157371084867,0.0150849376796,0.0154910764744,0.0153877926528,0.0156387335706,0.0158990378835,0.0157865553146,0.0152814912493,0.015581374229,0.0153704244969,0.0150380829671,0.015687118104,0.0152981040938,0.0155938424177,0.0155894088768,0.0155861630986,0.0154956967967,0.0156323092487,0.0154122507495,0.0157820702192,0.0153705593272,0.0162488762348,0.0144549978701,0.0150556490171,0.0155289710384,0.0157284997044,0.0153678789915,0.0151495734602,0.018051197456,0.0145395729207,0.0161551594732,0.0145433355263,0.0163338450793,0.015671684427,0.0153780403049,0.0158321635723,0.0151945976907,0.0157700458657,0.0154111662754,0.015717265893,0.0155275674272,0.0155812621153,0.0153875806968,0.0158126608221,0.0153645862231,0.0153681289065,0.0157403394458,0.0152658092655,0.0158480596713,0.0154204706004,0.0155676078012,0.0159183974371,0.015280121391,0.0153067924223,0.0157698679913,0.0153938736211,0.0153395926754,0.0150860390945,0.0159344494194,0.0157041634983,0.0153745109373,0.0154497487242,0.0156910669375,0.0155871013938,0.0153820275619,0.0155434819478,0.0154167577349 }; const double PHI810[NST810] = { 0.761235344749,1.9907799862,1.74308537818,1.13285973652,0.744807762039,0.811390672278,0.573663673569,0.569665610298,0.640925058905,0.9957509979,1.11270146186,0.630470744584,0.589255334008,0.920113481925,0.805195233172,0.74391745672,0.810484495401,0.971499566487,0.922290070985,1.08675169932,0.984215227207,0.0870089156405,0.0958438678254,0.207026230325,1.04078533853,1.24830456458,0.601952840767,1.04269914654,1.10794614876,1.61937281881,1.58810902227,1.79957224546,1.8905438517,1.75062234696,1.71321038578,1.78322606962,1.88855495981,2.50271096916,2.04562810142,2.17867676852,2.03103836227,1.72194297069,1.768993322,1.9428548956,1.88227813805,1.62426805604,1.65753917056,2.64362387222,2.22579491025,1.78549664562,1.89282020333,1.19173221259,1.91221837231,1.96031686134,1.85306352834,1.92997716653,2.0429054046,2.0776893509,2.13929090427,2.08831215823,2.14026955009,2.24916060599,2.18601947379,1.21671903564,1.06340108596,1.14665166373,1.5503286032,1.68342590504,1.57443477542,1.51212888609,1.45503166399,1.57635198489,1.40623883952,1.46388995556,1.53212710438,0.579320648763,0.638964151663,0.64130386856,0.959686713583,0.914218077724,1.07134559116,0.961338189494,0.499135509519,0.606622708643,0.45534991895,0.41619839458,0.937915784805,0.832324015254,1.29800295306,1.08724009648,1.24072568412,1.1407130129,1.38519269718,1.54142317499,1.43805992803,1.19529714845,1.37566316099,0.963732479879,1.01905306723,0.94501242548,0.869173489878,0.779849646216,0.85100401437,0.797078357418,0.752927925321,0.76840566515,0.860920476383,0.841102424689,0.266213938853,0.116283372765,0.130140992182,0.501054229489,0.606039994718,0.311572400161,0.422922843712,0.243852870199,0.315500241749,0.468557058092,0.422356879861,1.1125086502,0.958748913594,0.913799713065,0.941044597428,0.924999397948,1.00270926956,0.912709009241,1.02722050137,1.09404968668,0.78357326541,0.711991117078,0.536955208067,0.426898283816,0.451272569239,0.375473271083,1.10921998997,1.00908091061,0.927656043726,0.956555063956,1.13726573271,1.06536991884,0.827624058967,0.818616383403,2.15539957762,2.1403741015,1.86012246577,1.9283034318,1.14854140389,1.60383098679,1.79552867592,1.19664753957,1.11885711677,1.00756830744,0.981687573214,1.48478633662,1.41666153694,1.73587400916,1.62588905099,1.56190790224,1.7792105407,1.70832765324,1.60129221719,1.6613854048,1.58944176445,1.63407881306,1.74698125396,1.88415264793,2.0213429251,1.99549976797,2.43699812943,2.51916283657,2.59309681952,2.54613388987,2.6809298597,2.58493516932,2.32760015267,2.22008432684,2.37182127517,2.40931294402,2.34807882283,2.25901156872,2.25485222679,2.30703169493,2.12304978353,2.20585158199,2.10548920302,2.03909189616,2.0793906011,2.21636658833,2.26020272486,2.18904743545,1.95830579974,2.063928047,2.09554119589,2.13842824883,1.83935987014,2.05233891192,2.08809017173,1.87176685935,1.91242094697,2.01472364361,1.92861784421,1.90615738372,1.72317685214,1.80104203654,1.61211596431,1.70390379549,1.74431141196,1.85193293142,2.02975158073,1.92518412209,1.88180696856,2.06110277897,1.98604643907,1.55404275661,1.52987019677,1.42789966929,1.34940356161,1.87575529744,1.90772921527,2.09841150585,2.18647389927,1.99841202159,1.98296057586,2.17129976075,2.06807946683,1.85465226337,1.72161476483,1.7449411259,1.73504620377,1.65586165643,1.691485677,1.67776767111,1.59112108022,1.78605145703,1.80271466271,1.7147579086,1.61157348209,2.55196279129,2.53747164325,2.2814816511,2.36941198838,2.46212150949,2.46262957702,1.80398427186,1.76278250033,1.74090911529,1.8011195722,1.64657482782,1.75063373083,1.90544833727,1.96632133075,2.0556773744,1.95304003835,2.11819749327,2.07603952148,1.98040776707,1.81012264443,1.9211660422,1.32054317013,1.29168309148,1.432122476,2.11648572723,2.07279619927,2.13597358068,2.24984061811,2.3084602767,2.61900257942,2.74190477644,2.43142977934,2.68341846674,2.13881140785,1.98525512936,2.76491113589,2.071182341,2.05876376738,2.1442111516,2.14870372926,2.23696643608,1.31400899627,1.50990642761,1.48320492746,1.38895645961,1.0106585044,1.0877175052,1.24998252947,1.43509702019,1.33343450404,1.64651627031,1.76914753576,1.67349462766,1.7175096093,1.57324290943,1.61022874877,1.53839023139,1.43906811211,1.42540636833,1.2949766947,1.40378509114,1.4663397518,1.94166673214,1.98022678848,1.91611481127,1.35045673255,1.27782577676,1.31692267162,1.24878589762,1.1655776961,1.13581414134,1.09125239974,0.798500581598,0.752925465842,0.909315995352,0.826883330142,0.977309848855,0.93941936385,0.988683017589,1.23583012017,1.125710774,1.08764097972,0.298027375329,0.394450857336,0.397706548678,0.577632827417,0.482653128545,0.601359100092,0.498023556822,1.0455630863,0.964902713256,1.03669385481,0.94831156513,0.588360757581,0.495362315118,0.530219673813,0.48173169098,0.404882241764,0.294465231641,0.286235171523,0.472771369844,0.387859214398,1.46408682957,1.4675255329,1.55955809957,1.09750493429,1.18819119665,1.13823193672,1.2491920515,1.28007049181,0.666576992307,0.842814659306,0.773226288802,0.85070686781,0.757796962509,0.659018652583,0.814460303351,0.929120828633,0.969519077838,0.90482517778,0.58837531789,0.670107165548,0.478438162865,0.462232674571,0.6614035053,0.564950728973,0.189676826278,0.268492634117,0.365792941815,0.255358789581,0.670556342233,0.573130451746,1.42945424501,1.39146601864,1.28676191153,1.21693065272,1.08277468093,1.15410767869,1.3075253357,1.26643048847,1.12556913585,1.06910960119,1.12898987205,1.2408594782,1.29270067265,1.23652582317,0.990035269927,0.963857954751,1.04717651041,1.24774783706,1.04320198271,1.16911699065,1.06555613937,1.10990175907,1.2128931931,1.18607268548,1.09730020896,1.28482221611,1.29881705528,1.37288771837,1.04201843387,0.891984278131,0.93291989753,0.968820826365,0.745814955874,0.641194617662,0.558884389265,0.59651914183,0.930133874494,0.871596371957,0.885789234657,0.775868891543,0.760024452906,0.707415568795,2.03476729468,2.00447654229,1.95123697549,1.84544633866,1.89642025794,1.82074328912,1.76988172319,1.66101235127,1.69601665493,1.62407778358,1.73358272121,1.65993722498,1.55172483682,1.51370923836,1.47713591028,1.33701354061,1.30210594544,1.51379355431,1.44595976224,1.37652230524,1.47897628293,3.08526437873,3.05408264657,3.00565537548,2.8549592743,2.75364843275,2.90659222468,2.7001533501,2.72750520894,2.82437692601,2.35162324132,2.23625296492,2.38074452727,2.27308387779,2.41004043507,2.31647991215,1.98619390466,2.02653854458,1.95309279767,1.84313335998,1.87589919196,1.80589611739,2.04484614355,1.97171810104,2.07022771324,1.8924522865,1.93237683552,2.11195033611,2.05914681992,2.10391407489,2.2040554211,1.29083019783,1.22179921781,1.56598714765,1.58736130143,1.63156170933,1.47532873838,1.40590781075,1.45271176912,1.54852866531,1.53037371794,1.5935291728,1.42294305436,1.79895063997,1.9253740348,1.6108688359,1.58608319819,1.48253511331,1.40099156115,2.40125995986,2.43415687932,2.29344258196,2.22269544053,2.25225234578,2.3547493948,2.28446346793,2.37276766669,2.35769560787,2.2557620089,1.97259890286,1.91640936054,2.08315775274,2.12544003192,2.04864293497,1.9509141289,1.81933065372,1.85349274589,1.59090309326,1.48876373957,1.49298742076,1.3974627667,1.39908938876,2.22191153784,2.29097902194,2.22077440235,2.5831435419,2.46999631477,2.42029630967,2.638849835,2.74196473723,2.73246072674,2.81409891073,2.90779480634,2.80526447542,2.9691530062,2.90934560297,2.60905803108,2.73486036523,2.71941324691,2.53320826245,2.55055473455,2.64190826269,2.29355793346,2.39631509724,2.24494482977,2.73244205791,2.7919587046,2.8974895648,2.76620731607,2.94825901964,2.86738859263,2.28694367534,2.17444814987,2.11743948516,2.09388214032,2.94479004375,2.8587492184,2.83820661455,3.04408446235,2.51074342233,2.61718878556,2.73812156979,2.52953141545,2.35986453892,2.34906947584,2.40941531455,2.17428386871,2.25044289154,2.16845459997,2.23757200147,2.41323281544,2.33283803505,1.00391583579,1.11135709714,0.968476644987,1.04235118587,1.1944875694,1.27365381004,1.74387335272,1.8073677623,1.63714322217,1.49536986464,1.67018750759,1.56648846637,0.990144320077,1.0170529947,1.06819108967,1.12864332525,1.17945725188,1.2355712295,1.16012662607,1.40189452203,1.3457533592,1.3644884234,1.27013577134,0.230063242881,0.116262370347,0.309185889405,0.302219934738,0.120703439101,0.221625251809,0.669819346728,0.764594763208,0.853591450139,0.861973205963,0.782418546985,0.679604330175,0.647109750253,0.862586213066,0.686538743328,0.791438660236,1.88925207248,1.54905702432,1.44959067588,0.309093225626,0.399534039715,0.228250271607,0.28685497975,0.632649201945,0.728345847975,0.738589017001,0.659996935113,0.352230912132,0.438661275709,0.394446340949,0.494336369633,0.537902827199,0.556572590688,0.624654197049,0.732545527544,0.790462720359,0.739589485765,0.796619204958,0.948382545873,0.90774863209,1.38927591559,1.35752264302,1.24974928326,1.31514915863,1.17196430715,1.20591039905,1.09722464253,1.22397068332,1.12322502373,1.07486886444,1.27514115808,1.21205910083,1.10755632246,1.24013242785,1.14448967648,1.51716303867,1.40875448423,1.37927057382,1.45736328392,1.47833565549,1.44055331589,1.40594831086,1.32971409787,1.296109366,1.25722566086,2.81099906808,2.89009478558,2.99447575482,2.98019230368,2.44877069806,2.63880293467,2.54022370944,2.45008289496,2.32383239919,2.2169793479,2.163773899,2.21047596438,1.3729997844,1.27034319395,1.3857424194,1.43580110674,1.20721946998,1.26028054111,1.8202957762,1.76380501949,1.65913234488,1.76094375528,1.64896565235,1.60324350092,1.93593611503,1.90321943664,2.04182866576,2.11602120461,2.07713267666,1.97057229076,1.88213022882,1.91800152333,1.83328108752,2.67494095714,2.56460510314,2.66453206801,2.39475184508,2.56945217445,2.46680955043,2.58440194391,2.39543967723,2.49864602871,2.58269480186,2.22776094829,2.29394673264,2.26319971782,2.37066740051,2.31356191797,2.33704481507,2.23639666772,2.22406384835,2.42234621325,2.43368631447,2.63167481287,2.53195676762,2.51127221208,2.68460196319,2.5809871131,2.7119075955,2.62416044741,2.52873928658,1.29307375131,1.22518784904,1.36770575145,1.33358156531,1.18389997706,1.14976049194,1.49356487572,1.59813785007,1.45747792119,1.52849789996,0.718433712502,0.775952287542,0.690629843936,0.877765494861,0.903161706065,0.828326457353,1.68628841604,1.58134983402,1.57427610689,1.70840413925,1.62902757045,1.79833552516,1.80141785661,1.69625662185,1.61403889589,1.43047112503,1.51529838346,1.31940454059,1.30545512289,1.39375697661,1.49245036604,0.409932373008,0.493930849548,0.589521826324,0.449091056687,0.560887884041,0.620232193893,0.882826446728,0.868041144499,0.796584483885,0.688394137383,0.67858477506,0.771591896229,1.40475525356,1.30273083534,1.48645786417,1.17444392354,1.23340471854,1.15033311206,1.27899951503,1.5894330749,1.76286777861,1.69733489352,1.55889450333,1.63068276775,1.72656436322,2.38621119334,2.49576879219,2.55039456196,2.48061364337,2.3667691305,2.32493802467,2.07420113085,1.99826738195,2.18045453148,2.19482242807,2.10394758701,2.01422209726,2.28899090371,2.29778623755,2.38563603342,2.47895365085,2.40291093684,2.48928853688,2.62423674844,2.55488277319,2.56890666542,2.4590923728,2.40414553891,2.44659576737,2.8749718521,2.81131650088,2.70836686266,2.80425424646,2.69963614368,2.66012124701,1.6326602455,1.83897308665,1.76871413131,1.66646580482,1.80725906044,1.70346804382,1.65786168276,1.66913992992,1.74368185905,1.84382279091,1.35797251007,1.46319845393,1.41813994799,1.33626993224,1.5478210017,1.52423723584,1.77890798871,1.76874196628,1.96575752744,1.87663638334,1.95692703893,1.85767738414 }; const double THETA810[NST810] = { 2.99361173966,3.75753618789,0.67105552789,2.01998695478,1.4115179321,1.53767283164,3.88917819302,3.1560996294,2.99406156847,3.4522951692,3.69913111233,3.29575799163,3.48273765675,3.33822263466,3.11431629146,3.25532805691,3.36397547356,3.22276252773,3.10987254112,2.99595633004,2.99555587343,-0.802577954985,4.13305607898,4.18883486531,0.592494997397,4.64452327901,4.08041154755,4.36777363345,4.46582359049,3.05254239333,2.94644705102,0.296399504609,0.497772335423,1.57506601931,1.46833626979,1.38193942571,1.40346167765,1.11796302101,3.3190218868,2.32873178285,3.19779018756,4.33131669075,4.23422643967,4.31071286456,4.22297537478,-0.120429699948,-0.799340981247,-0.575814653769,0.0444949819274,4.42569737802,4.41651103992,-1.41758847407,0.304975908016,0.40324214009,0.68757300987,0.599023849456,0.613267499417,0.723436033678,-1.44738505129,-1.33930739731,-1.2222793992,-1.21143438025,0.758212782068,1.95508047972,2.21375566248,2.14287751534,1.83462074949,1.65820909356,1.63997521883,1.72670732067,0.424127325784,0.256930057682,0.319617505761,0.236344686572,0.636439498029,1.2626353063,1.42790687535,1.11178019669,1.38276874033,1.51053374485,1.37339464516,2.15692982089,2.77079678403,2.84257447549,3.16058108153,2.90957740524,2.87147708102,2.86588972935,3.21905779756,3.21921097976,3.10048811181,3.10761986762,3.21661453493,3.12956844797,3.10744935847,3.61196726786,3.46708448297,3.56544508823,3.68212716265,3.79024139388,-0.297681882747,-0.202973503334,-0.425240929855,-0.654283629936,-0.506659629438,-0.785752600213,-0.900151070979,-1.03999490845,4.55425622381,0.346622495736,1.20073216359,0.853658262687,0.933171624353,1.51785887367,1.00929760615,1.19914659719,0.913535254464,1.24888893125,1.4671116433,0.522961085042,0.302785730934,-0.638921532609,-0.509187952445,-1.12180324606,-1.32246082927,-1.26166390992,-1.05651062777,4.26066367888,3.99384998601,4.11283444314,4.23927739361,4.22422170497,4.66123830742,4.4694735498,-1.49782686398,-1.45501868211,-1.54498349192,4.6050916995,4.66726917753,4.57869199333,-1.50042547909,-1.34652186524,2.02998738815,1.89319008704,1.59810453183,1.51316927909,2.88807623428,2.06508980349,2.10448691468,-0.207488132281,-0.117208896291,-0.141169688851,-0.260693952724,0.0479401642538,0.132098880014,0.380526630024,0.360413828704,0.444263839163,0.483677456348,0.568046747962,0.549029299402,-0.0156576814803,0.0696903773634,0.174610453047,0.193839536469,0.789902746741,0.918985063301,0.810656206224,1.4695508101,1.78681974353,1.63749471331,1.45855318806,1.20101832044,1.26155071409,1.85959554357,1.81397411204,1.6077731727,1.74913169726,2.00114348056,2.22227445615,2.0905010088,0.954253964962,0.968525065176,0.897600506747,1.43510880868,1.5336584825,1.64696208668,1.45236342681,1.58465817072,1.67934769891,1.31269819425,1.32395230418,1.09883581254,1.19928616283,2.52338625393,2.56300087243,2.32638557455,2.32458655413,2.43357716613,2.44971978356,3.15720335224,3.04293049926,3.08474387085,3.00849228187,4.3407038502,4.14093250551,4.04604331616,4.03154677317,4.08560129403,4.11436036094,3.92048801957,3.96402220897,3.88241441405,-0.329698806599,-0.437649884754,-0.464106088728,-0.381021199358,-0.743026892308,-0.525487061729,-0.53885171373,-0.610465191956,-0.593187769358,-0.708150836661,-0.745644771451,-0.787110716877,-0.848138630989,-0.975038380711,-0.874099834742,-0.382710264467,-0.302887911741,-0.199631502613,-0.698322141877,-0.622909829313,-0.668731123595,-0.565027240883,-0.49030936418,-0.517915160759,-0.665854176986,-0.862744952285,-0.54518877841,-0.631730517533,-0.555648615973,-0.372073822178,0.109512809623,0.00495404137551,4.52470455275,4.62398933103,-1.56230892902,-1.55903194948,4.62440917219,-1.55551120596,4.50652542807,4.51569169687,4.6132629811,-1.55689147553,-1.34842952025,-1.45828028811,-1.45488248027,-1.55303050464,-1.44870949578,-1.56279928692,0.516232415461,0.406918943347,0.297574558345,-1.45209054631,-1.33351356442,-1.00862679507,-1.43913930965,-0.0155910567153,0.94138294182,2.79319332128,2.96427930828,4.55103827409,3.70291633069,3.57097993804,3.37063670623,3.50469130416,3.57434755789,1.99896122746,2.04685365829,1.93066522061,1.91157186265,2.41919659864,2.33784583432,2.18630181376,2.1368113569,2.10851015001,1.85428402341,1.98860449603,1.96889679527,1.76490191522,1.33954621127,1.44635908659,1.53452928996,1.51380698725,1.21310207087,1.38518512145,1.40476173934,1.31885682417,1.00580816307,1.11396897398,1.20328884689,1.00295170628,1.08809363481,1.19304035692,1.27896286339,1.07234640376,1.26889788197,1.16707239582,1.26912890512,1.13403576807,1.2687467565,1.01564639085,1.15793577614,1.03901394755,1.6158920927,1.47332368221,1.47106932792,1.58721240537,1.86616995205,2.01548016894,2.31360052706,2.00783170172,1.89076769845,1.60718443621,1.65439098839,1.82850297797,1.7472492803,1.9552145698,2.01956157781,2.20096784233,2.3650838536,2.55134731759,3.56167422543,3.38291626812,3.4622430421,3.85411872985,3.79797773398,3.96029605757,3.30036371734,3.39892602629,3.23757608522,3.43404211365,3.50687087584,3.31591631673,3.32311438973,3.43513778271,3.58934907964,3.74660880605,3.51573939448,3.59955499128,3.83960160339,3.77376495759,-0.070642435343,-0.0476657595302,0.0746122736847,0.178515505843,-0.149869345202,-0.258967183586,-0.213009656173,-0.435437534541,-0.442623603997,-0.545321311967,-0.85924588124,-0.480417561276,-0.593026967011,-1.2830242631,-0.824932938928,-0.728617461815,0.619889972251,0.512102249993,0.495355044675,0.580501708835,0.0869903023192,-0.0100159427132,0.111545481033,0.00657256309772,0.396108434398,0.301062875044,0.190158927638,0.198070659385,0.302100587872,0.389983621965,-0.721598033182,-0.852943502475,-0.926473716563,-0.407944970501,-0.471140693245,-0.32043840114,-0.34836834103,-1.11837913242,-1.06309143932,-1.2967639082,-1.2462969923,-1.24111010814,-1.13374269019,3.97367771804,4.15175024356,4.01980994717,4.14360048935,3.91297176944,4.67645173245,-1.5548719427,4.59732820201,4.4130688711,4.37685948919,4.26151425985,4.50230415041,4.52644786686,4.25873298276,4.39899890904,1.84889971504,1.73537249515,1.92989548642,1.90028149552,1.70754923887,1.79067821359,2.89932927169,2.8699995385,2.68762806429,2.76560575987,2.50141690915,2.58348622779,2.56013869712,2.74175630377,2.64005947811,-0.0778466887883,-0.185304156544,-0.140024549741,-0.0573757732911,-0.270690780929,-0.246322116968,-0.539176118195,0.990700789532,1.94907517525,1.37361273922,1.41766478606,1.77420705079,1.66391995379,1.92284036774,2.04957617965,2.3009051504,1.20032060567,1.33876005397,1.34297634439,1.17752156648,1.09355121871,2.65541471788,2.76756874913,2.85136766307,2.82155306833,2.63195015687,2.71381142162,2.22041432492,2.03988474006,2.09340859275,2.12548521414,2.23491450009,4.39494977868,4.29781746055,4.18025519429,4.15133633445,4.54399307096,4.454677352,4.4393133955,4.62487860502,4.52876118868,4.6272208598,4.53699078454,4.44497209632,4.25488246903,4.06872385808,4.15212014965,4.0783460565,-1.05947338184,-1.24922383621,-1.00019610287,-1.09850899768,-1.14192363828,-1.08480748067,-1.06201985057,-0.905239329422,-1.08095893904,-0.972208886092,-0.83636045581,-0.790807584447,-0.392918136404,-0.299487880721,-0.13597295552,-0.0948080036662,0.202774468065,0.110305724173,0.191620195835,0.0694728488215,-0.0297469398502,-0.00124000916624,-0.166505358704,-0.0655265580741,-1.46372596434,-1.46674092325,-1.25495627046,-1.30449872855,-1.39296370137,4.59198893994,4.6984198017,4.44189482062,-1.19455775765,-1.20011353542,-1.34191870048,-1.39167208443,-0.692593282545,-0.946111977085,-0.43973525767,-1.17188082798,-1.1775427085,-0.684616122367,-0.317028976832,0.0973893530471,-0.209268633339,0.0450863577826,-0.0549441472477,-0.254234896002,-0.340540501533,0.163135046168,0.146191269068,0.294965273218,0.51469525919,0.268843104851,0.231942372301,0.79810631634,0.679753426886,0.966345527172,2.94360408496,2.91309068629,3.11981319411,2.9994074008,4.61414788365,4.37273564964,3.98070669477,4.25863067968,3.01845904892,3.0847156557,3.95068122159,3.91221821535,3.76597106842,4.01152297647,3.89542671709,3.78483626259,3.72245948295,3.9244242743,4.01680941063,3.61921457439,3.509477641,2.76197366764,2.77772939091,2.63806708373,2.54342970486,2.37600229552,2.29661464223,1.2742783804,1.186767652,1.25415983199,0.830715881022,0.757941810972,0.742723238854,0.820925663304,0.94481020423,0.73728348762,0.967779786031,1.66008840219,1.83065268654,1.77077738556,1.71591965098,1.80480635181,1.60796157873,1.58696819356,3.15414599124,3.12514637425,2.82128902893,2.49489555646,2.14502185143,2.18306618048,1.91439093222,2.00818919477,1.93962041636,1.79075506513,1.68841356157,1.73821890668,2.54701587354,2.61035205101,2.70784533941,2.72777231035,3.69075378494,3.95617185354,3.8943129449,0.55648086331,-0.0251070423429,0.261211300187,-0.0823072905391,-1.3756096214,-1.27914869573,-1.10841660093,-1.01099603203,-1.18260618367,-1.37319929703,-0.884657540809,-0.891003036148,-1.27368064185,-1.0735673735,0.0309850952934,0.315603189885,0.174902485947,0.0479543950222,0.426724616314,0.545258219939,0.412956069629,0.812469088022,0.707509521703,0.685263690424,0.89784628743,0.770719987331,0.878904795177,-0.679277674329,-0.523653249963,-0.55803602264,3.93167137945,3.96031539259,4.06055948309,4.04760555987,3.84202697076,3.82697047152,2.4572227105,2.43294887249,2.32670212181,2.24536515533,2.92297130616,2.82230479361,3.00661700809,2.80547038242,2.99711849126,2.89635100071,3.34301771934,3.60558472201,3.45447711106,2.71621976477,2.24265010984,2.06733794478,1.9717965657,2.06904856213,2.45098844101,2.46559576764,2.57686751494,2.69531071693,4.17001914122,4.35712936624,4.35475685259,4.26314452608,4.26152451515,4.16594527402,-1.26270336039,-1.36532274666,-1.18128257118,-1.16787735887,-1.36758591069,-1.27843116909,-0.931679374167,-1.04272399149,-0.90666550157,-0.999387204103,-1.11977902412,-1.13732434185,-0.232772230027,-0.412715988169,-0.345528413884,4.40411535176,4.0952589923,4.1580473885,4.65853079167,-1.5547420517,-1.50361541387,4.51557380121,0.854839054645,0.927388370588,0.826159759267,0.53333926445,0.422205271921,0.667136392201,0.705117183216,3.07658222511,3.36266419473,3.29592235886,3.16449296894,3.12737928349,3.28628443137,2.29690225957,2.36401764179,3.57965509197,3.70930748498,3.73912446706,3.45640064045,3.30565307017,3.38729491941,2.70279166246,2.48747162223,2.61832242913,2.5136849385,2.68382993815,2.5725562744,1.12759509782,1.14771892159,1.02202059376,0.935566594692,2.42802677853,2.16912749373,2.26317536776,2.23486229181,2.37493915325,2.47039010272,3.58956424478,3.54493364846,3.44416533905,3.93302491723,3.89295161947,3.85356483482,3.74678306326,3.69403180116,3.76015151407,3.79536427084,3.72492319681,3.75700300688,3.65401431848,3.58168816394,3.61358423043,0.452905159008,0.616293258061,0.534691777338,0.198615534252,0.187408415857,0.346000568758,0.78140875387,0.650011777398,0.880149503209,0.825358977613,0.65137889567,0.581024399166,-0.572742849387,-0.604731427839,-0.650728526473,-0.758719290635,-0.949571638609,-0.876118209241,-0.719066241042,2.3762730918,2.31020384372,2.39671282898,2.27020241745,2.18031999265,2.19965861595,2.56997712558,2.54669884392,2.701783647,2.85380969565,2.83413448547,2.7048096981,-0.152221966788,-0.23109024948,-0.191340915016,-0.329625835781,-0.408146163484,-0.351214560039,4.24357670456,4.38815738795,4.16632682466,4.22623202131,4.49274701806,4.41062960211,0.472106486431,0.624920884476,0.282281087614,0.28788849695,0.433135450426,0.583827388672,2.71115645835,2.40281099926,2.47242546108,3.00540858874,2.92927115798,2.70186611984,0.952896338947,0.986973104497,1.07855673891,1.05980343539,0.878568559639,0.863638857781,3.27036022388,3.37915312595,3.19512941394,3.23238553269,-0.791225330541,-0.755497874959,-0.969107126176,-0.905038563471,-0.828092465703,-0.928633963529,3.52678161895,3.41635028061,3.50997748414,3.57448913861,3.39053496512,3.34554796509 }; const int NST996 = 996; const double AREA996[NST996] = { 0.0124857992829,0.0126828741137,0.0125184014875,0.0128358140002,0.0127090064398,0.0127975238237,0.0132433411671,0.0121885428733,0.0128358379244,0.0126213160783,0.0125536759372,0.0127893036403,0.0124257214309,0.0128533592399,0.0127217921705,0.0121363617427,0.012921979963,0.0126049019802,0.013857314232,0.0124487879018,0.0124816577559,0.0128317495644,0.0127367625669,0.0128679748734,0.0128333284615,0.012522238749,0.0130710565716,0.0124718988375,0.0134878024292,0.0121363226402,0.0126838839511,0.011966449436,0.012409483946,0.0124414705065,0.0126177073084,0.0127339921714,0.0125914028789,0.0126433520902,0.0128259326019,0.0124397021536,0.0126155278322,0.0127535867899,0.0125231719999,0.012665352027,0.0127757075984,0.0128307876078,0.0124209678906,0.012391998649,0.0128746083884,0.0127113638998,0.0119768789116,0.0123996772788,0.0123159574129,0.0129278842807,0.0124407148589,0.0125975461957,0.0126988734242,0.0126975935252,0.012580349257,0.0126203041624,0.0127429182115,0.0125221683108,0.012664785813,0.0130360637122,0.0132615597256,0.0128233890657,0.0123873298295,0.0127862971971,0.0132209749638,0.0123613590925,0.0124256761597,0.0129130171622,0.0129105287607,0.0124184193849,0.0121154297228,0.011968798085,0.0125504982556,0.0127264949097,0.0126420007134,0.0126929807898,0.0124765955152,0.0128612666665,0.0120711530249,0.0124865086923,0.0125518953282,0.0119379637873,0.0121466263996,0.0128806071415,0.0124079533032,0.0130013446701,0.0128537866369,0.0124191060087,0.0148178026425,0.0126041862962,0.0126019799706,0.0119471432606,0.011982641158,0.0125271676943,0.0120796155069,0.0118903493955,0.0120665508054,0.0124901005007,0.0128150973684,0.0125836195165,0.0126798514631,0.0128410020404,0.0124924164871,0.0125814946069,0.0124506189978,0.0121940312524,0.0127611894941,0.0124934071654,0.0128632860177,0.0123456845315,0.0119755982065,0.0126813726794,0.0124208174308,0.0127545902796,0.0125479248296,0.0122289369237,0.0122935805423,0.0126878122916,0.0125581116411,0.0126657482011,0.0126574068209,0.0126446415109,0.0126782643612,0.0127412093188,0.0124044027641,0.0117725376756,0.0125633911094,0.0127279115861,0.0130088328469,0.0124491566243,0.012540253171,0.0127671129094,0.0128459470403,0.0126265081445,0.0124950744629,0.0128459303594,0.0117526888362,0.0129915567285,0.014465168067,0.0125298306099,0.0143901943074,0.0125770738208,0.0127551756953,0.0127097201044,0.0126823064165,0.012480205004,0.0128988425916,0.0126295836759,0.01278501293,0.0124878292944,0.0126440332597,0.0126896177415,0.0125360853397,0.0127144339734,0.0128164814681,0.0125700489342,0.0126057507443,0.0121591429909,0.0123834120202,0.012622010642,0.0122954858709,0.0125841187748,0.01277743071,0.0128778511575,0.0124970338298,0.0127662066433,0.0126079681503,0.012290413344,0.0127142952978,0.0128555765923,0.0124249313224,0.0121192378651,0.0125529170624,0.0120261639353,0.0126919942123,0.0128460887347,0.0123603205638,0.0125918221716,0.012213462916,0.0132513206317,0.012175017712,0.0127451462065,0.0125156039562,0.0124346548174,0.0128502943217,0.012228192612,0.0126717337268,0.0126756185495,0.0126732438997,0.0124787248071,0.0126289243991,0.0123039861245,0.0123069192866,0.0123270181744,0.0120664338177,0.0124652207295,0.0120449289403,0.0131644821766,0.0124327796472,0.0129243425754,0.0126441512534,0.0126198741816,0.0132983257553,0.0128073304436,0.0129182872209,0.0127593909282,0.0123915547712,0.0127919587563,0.0123865792783,0.0132599081482,0.0121357313499,0.0120454216041,0.0126979008449,0.0125819497361,0.0125935019696,0.0127484360559,0.0125588877955,0.0125183633926,0.0125155577295,0.0127043824169,0.0127235433058,0.0126038003191,0.0128531506365,0.0124145441654,0.0128567285389,0.0126332709322,0.0131039179265,0.012091182226,0.0123817564693,0.012628124647,0.0129396178823,0.0127449036751,0.0125211429286,0.0121260405654,0.0126071569386,0.0118855637035,0.0125915481048,0.0129325565945,0.0121298800437,0.0131388503193,0.012799878241,0.0118607573697,0.012595676972,0.0120129672017,0.0142739658104,0.0141216534323,0.0119572362544,0.0127618304764,0.0125494302399,0.0125070121142,0.0127776542642,0.0119891913549,0.0127053634416,0.012528253551,0.0129016443855,0.012738753138,0.0124756964325,0.0124449489225,0.0124047034593,0.0128656341485,0.0126067606959,0.0128672424188,0.0126679978271,0.0126782887677,0.0131209770734,0.0121470365957,0.0135358279308,0.012627687001,0.0123924064067,0.0123777833641,0.0130296352464,0.0120748426963,0.0125272883613,0.0126562207575,0.0126819215779,0.0126280921901,0.0124854752583,0.0128285395366,0.0128903703256,0.0124734158803,0.0128365374397,0.01243385708,0.0124949337329,0.0126799783922,0.0126034380067,0.0120901757888,0.012741977664,0.0126324566366,0.0124685555344,0.0121899160993,0.012355796953,0.011986755724,0.0125925296022,0.0124638423508,0.0146853964355,0.0119654889542,0.011959901357,0.0123944928168,0.0127180606733,0.011837811526,0.0129063091034,0.0132022703509,0.012356311284,0.0123340695691,0.0122272343084,0.0140857806373,0.0120636468856,0.0127646080853,0.014775683477,0.0119898678286,0.0120374153477,0.0122442286373,0.0122335083517,0.014181121009,0.012981116996,0.0127038939412,0.0131319838658,0.0127991772127,0.012282829005,0.0121210036518,0.0122577086705,0.0118908215519,0.0127006559838,0.0129213605254,0.0122320117428,0.013218490397,0.0148451839638,0.011998659417,0.01254974413,0.012855339859,0.0127469835089,0.0125064247792,0.0124887595223,0.0128433881281,0.0124351075298,0.0127713553417,0.012533144686,0.012739938128,0.0128100324578,0.0125149797048,0.0124550547267,0.0125501355661,0.0124831930223,0.0127500989859,0.0119525742295,0.0128834469721,0.0131178367446,0.0134943951767,0.011891158022,0.0117707154966,0.0122071184968,0.0127071997314,0.0127454255023,0.0126199658858,0.0124677752592,0.0128418373809,0.012476850432,0.0123918665642,0.0128004825893,0.0125779949911,0.0126736159987,0.0117870319319,0.0129576472303,0.0129352616138,0.0120187089773,0.0118886991416,0.0117608256555,0.0120676529593,0.0122237141959,0.014878547645,0.0129365238867,0.012280147539,0.0123410519984,0.0125916152175,0.01353311567,0.0131314043585,0.0120269954504,0.0130757840584,0.0122899297022,0.0128051731983,0.0128202299846,0.0124897012882,0.0127512540746,0.0128370951205,0.0129254178887,0.0130814236812,0.0129563147787,0.0122503311355,0.0123446656089,0.0123769771857,0.0127913474306,0.0125006351486,0.0122721063256,0.0120310409469,0.0118636832468,0.0124099338377,0.0123655807169,0.0128995248845,0.0127663948088,0.0126597662084,0.0121331252064,0.0118954226393,0.0121671540886,0.0145111469272,0.0119677330993,0.0127868130781,0.0128420316674,0.0125422883726,0.0127317711831,0.012799092127,0.0125812117126,0.0125989106627,0.0125652288721,0.0126173126848,0.0127053311673,0.0125206527618,0.0123645077473,0.0123328110448,0.0127664722084,0.0126176465074,0.01265899367,0.0127116480092,0.0126137701482,0.012743008355,0.0126253409403,0.0126857697065,0.0130097562983,0.0124600799529,0.012886440848,0.0125007918489,0.0123600054291,0.0130091758871,0.0121968761656,0.012010325191,0.0118873761006,0.0121289370395,0.0123001925663,0.0126630226217,0.0126685512341,0.0127605118413,0.012534441681,0.0124954281218,0.0125168975282,0.0130099706759,0.0118676521151,0.0126231690723,0.012689448416,0.0128809852426,0.0125061442078,0.0124348764046,0.0128249582877,0.0126524222388,0.0126843544378,0.012624756224,0.0127451389434,0.0127204739317,0.0126540213951,0.0126785079173,0.0126481641865,0.0124068146308,0.0128434638909,0.012678552854,0.0124409297722,0.0124690119742,0.0130331316413,0.0129291515412,0.0124055742865,0.0128839114835,0.0124503360502,0.0123597893651,0.013061399134,0.0127804844383,0.0123529540803,0.0129489413241,0.0123956214994,0.0124114462368,0.0128915383882,0.0125066329722,0.0127898362485,0.0127697218575,0.0126358963623,0.0125231599482,0.012880728446,0.0128392707494,0.0123954152524,0.0129302292165,0.0128361470086,0.0124688721365,0.0126153829516,0.0124746704901,0.0119292034799,0.0121861944152,0.0145343926444,0.0129522345961,0.0123571941252,0.0126401180365,0.0124005902814,0.013109587836,0.01298859999,0.0123122813251,0.0129749487395,0.0122959044909,0.0123615736274,0.0124780181617,0.0123121482717,0.0128743343538,0.0122920220921,0.0127949595021,0.0124243790901,0.0131028495257,0.0127707215379,0.0124188789528,0.0126790233728,0.0123360718868,0.0128045776881,0.0118711797482,0.0120033585869,0.0130310175605,0.0119938320771,0.0149539044999,0.0124143852176,0.0126705475543,0.0124875153697,0.0128644570028,0.0125765257479,0.0127993422823,0.0127128711379,0.0126792880398,0.0127035872167,0.0126392475958,0.0125347068039,0.012703232103,0.0126251016913,0.0126647809182,0.0126706307332,0.0126675854245,0.012165455524,0.0120830337335,0.0127803062311,0.0128120713634,0.0126725221264,0.0127232472887,0.012596246379,0.0124337405928,0.012772750549,0.0125505301552,0.0125850965398,0.0127700856904,0.0127622271209,0.0124111922999,0.0125878346268,0.0127925260921,0.0127851780785,0.012618424055,0.0120222843576,0.0129281962261,0.0124904802431,0.0131200100462,0.0123204135959,0.0127704358476,0.0125266606631,0.0126922932743,0.0125888940639,0.0130112273712,0.0122720361323,0.0129136420004,0.0132176480217,0.0125449568858,0.0126457081839,0.0128390421724,0.0121107018419,0.0126474220898,0.0124973157661,0.012515420358,0.0125734808522,0.0127434705951,0.0125571416764,0.0127317445294,0.0124847364886,0.0127883617719,0.0124682592417,0.0128814305213,0.012460691912,0.0128641101444,0.0125860194645,0.0126889512186,0.0128164238025,0.0125424513571,0.0127359719075,0.0127390962545,0.012606449445,0.0126393268669,0.012621975712,0.0126255492968,0.0127667086849,0.0124661097762,0.012567579029,0.0126039157328,0.0124054684267,0.0129723226315,0.012439749702,0.0123917339758,0.0129204981515,0.0127715364028,0.0123794622557,0.0126380621059,0.0124152339535,0.0129302755576,0.0123901063863,0.0123783274279,0.0130870480259,0.0120123307523,0.0127320178647,0.0126717945587,0.0127426923249,0.0120851713183,0.0130531552297,0.0127785599511,0.0124270738612,0.0136454947154,0.0131005342615,0.012835838022,0.0125080305889,0.0128625442008,0.012458408805,0.0125541154092,0.0127716930733,0.0120848487048,0.0120418621458,0.0124232138066,0.0120404070268,0.0119494861281,0.0126796692371,0.0125530819096,0.0125703497022,0.0118255999544,0.0124683797894,0.012898777381,0.0125813294776,0.012363904344,0.012929178722,0.0123694043428,0.0121976052696,0.0119837709002,0.013367489156,0.0116463899708,0.0126435157245,0.012260926638,0.0127882459124,0.0123996827555,0.0127223497077,0.0126213734082,0.0129088860252,0.0124196006329,0.0124862915381,0.0130701937185,0.0123127732967,0.0128390638192,0.0128972400375,0.01233670534,0.0124539974489,0.0143424071803,0.0121448909955,0.0129805520917,0.0130137281205,0.0120448320375,0.0122720089151,0.0129012145008,0.0123487079934,0.0126871569983,0.0128604851169,0.0124855373398,0.0127985907084,0.0124929180343,0.0125444486887,0.0123640439201,0.012435595513,0.0123185406443,0.0126440466877,0.0127056485273,0.0128508406545,0.0124349826095,0.0129568479605,0.0123605185733,0.0129464123302,0.0124436214017,0.0125024364373,0.0127636838856,0.0125164160645,0.01251993149,0.0128609787988,0.013030322279,0.013017984764,0.0123569608778,0.0120922172965,0.012966244036,0.0125395163355,0.0123410503777,0.0130788333699,0.0122707811812,0.0128299937256,0.0127678651021,0.0125326384449,0.0126738220497,0.0126250420468,0.0126646631415,0.0125131043065,0.0127860521591,0.0126877445213,0.0125818710958,0.0125816527848,0.0128663030376,0.0124004330813,0.0124810109464,0.0126396656789,0.0126594924345,0.0125701447586,0.012609877616,0.0126584709085,0.0126380709267,0.0126267764445,0.0125862563318,0.0126927941391,0.0125423328503,0.0124172258234,0.0124382697011,0.0129180072494,0.0127918902044,0.0128297757421,0.0125707422115,0.0127663599249,0.0127181365023,0.0125801850596,0.0124838273307,0.0148076041579,0.0128801620204,0.0126064347925,0.0117700792984,0.0123553989411,0.0129227740058,0.0123835223336,0.0127901828219,0.0126915309396,0.0126095189364,0.0129075738348,0.0124070143541,0.0123018645472,0.0131187142099,0.0129808163491,0.0124466342668,0.0125033188846,0.0128888254265,0.0124504403669,0.0128909466248,0.0124673948286,0.0128756521068,0.0125589999598,0.0128727949656,0.0124678284506,0.0122812010117,0.0119582632013,0.0130539505685,0.012398581649,0.0123211710361,0.013344121513,0.01299479672,0.0126158412896,0.0126940300323,0.0124972362685,0.0129967199018,0.0124075169437,0.0126931787347,0.0125230828775,0.0124649926002,0.0120028001058,0.0128386635137,0.0126581379893,0.012728251531,0.0127108235137,0.0124094856826,0.0128809444929,0.0124113864391,0.0128830804909,0.0124489648014,0.0128483304035,0.0133562052337,0.013355148935,0.0121567845541,0.0129955877311,0.0124067808012,0.0125792905626,0.012158383082,0.0129931096716,0.0125063474615,0.0128452281657,0.0119330567988,0.0121544213793,0.012099937656,0.0125568808574,0.0118115510699,0.0125252981165,0.0127599858465,0.012463089843,0.0128805643612,0.0128072770944,0.0125205193593,0.012492594123,0.012634131596,0.0125680492155,0.0127646051531,0.0120085192925,0.0130476371235,0.0120854327337,0.0143927240463,0.0118661786062,0.0128717944894,0.0122692058853,0.0119856650354,0.0121710876854,0.0120893509322,0.0121750335975,0.0128619759386,0.012626018845,0.0127468346231,0.0125425703265,0.0128539698915,0.0126932473277,0.0120966030033,0.0129861388585,0.0123745313345,0.0125330128136,0.0129700998591,0.0124250731587,0.0128862949058,0.0123658981596,0.0128560329257,0.0124132999072,0.0127777304203,0.0125055731394,0.0125176988929,0.0128072350393,0.0143173924909,0.0120651705496,0.0128479203001,0.0120409986779,0.0129016436655,0.0121125204904,0.0125773793139,0.0123929860785,0.012698279964,0.0125090280854,0.0122605854778,0.0128617210506,0.0125121071092,0.0127887973643,0.0125312551594,0.0127842769473,0.0127752691125,0.0126381621245,0.0125755956994,0.0125694884018,0.0124503436842,0.012790748263,0.0129172603382,0.0125057162291,0.0124487289861,0.0128779771968,0.0125893880561,0.0129172564718,0.0125302867948,0.0127041193743,0.0128825579457,0.0124097496046,0.0126672910568,0.0127451340685,0.0120784515293,0.0128683556673,0.0124393953838,0.0124163726209,0.0130001007112,0.0120441764457,0.0126688429993,0.0126643448847,0.012447273403,0.0122763435413,0.0124955802584,0.0124194335981,0.0127691298327,0.0123704150372,0.0126180201542,0.0127070519214,0.0119715311562,0.0130245272419,0.0125877499015,0.0123585558986,0.0127987196507,0.013273149749,0.0120660443979,0.0125435298028,0.0126141522633,0.0128458706445,0.0127221870265,0.0125758806986,0.0126503185551,0.0125418649374,0.0127765391583,0.0126043906039,0.0127148660996,0.0124469922882,0.0128667293205,0.0124573047694,0.0128883106769,0.0124503531067,0.0128994345256,0.0127199936803,0.0123922855635,0.0129111931893,0.0125107481607,0.0119830729726,0.0121635775684,0.0121042420934,0.0119903497711,0.0123515101363,0.0121071799564,0.0133413090733,0.0133919715661,0.0123190811163,0.0129052451097,0.0124789743359,0.0127729292764,0.0126182676477,0.0126206549614,0.0122000163167,0.012689674501,0.0125964433228,0.012356281663,0.0119557282667,0.0131566326727,0.0124185632187,0.0123049751107,0.0128942998775,0.0122833352189,0.0131447823261,0.0120202006898,0.0124626779112,0.0128596110745,0.0129473796084,0.0128667165891,0.0124369356513,0.0130046823296,0.0151332531606,0.0123763213729,0.0130207137639,0.0117554724943,0.0126802078375,0.0125721176356,0.0127620211478,0.0121760513852,0.0119419701842,0.0120526139655,0.0123741408867,0.0118988277054,0.0125533743014,0.0127806231785,0.0124834065076,0.0128276019265,0.0125442168663,0.0127815096108,0.0129447438271,0.0131261035541,0.0122830733049,0.0130091041058,0.0125870049171,0.0123520675069,0.0128849338986,0.0124314473281,0.0126836909967,0.0127674190069,0.0123619387528,0.0129489745298,0.0124818639461,0.0128058453711,0.0126685811839,0.0121973602749,0.0132624119996,0.0117773277224,0.0124184895861,0.0123862567483,0.0122319951227,0.0130251263011,0.0123860606083,0.0129325526644 }; const double PHI996[NST996] = { 2.54757754322,2.68876540457,1.53700968414,1.52551185934,1.50434374498,1.48623705749,1.31600045188,1.39592325428,1.38531106044,1.29886680567,1.81035649949,1.81744985068,2.39201242164,2.32577850405,3.1046406245,2.26728661193,2.35895721656,2.21032763438,2.24921201437,1.98955877927,2.15052882721,2.24641652111,1.12173988184,1.03706698392,1.55061188563,1.55511465975,2.21462762607,2.2403141289,1.38594814879,1.29607012154,0.571830943849,0.0330578500801,1.71843979671,2.02927130495,1.80393714852,1.62522071758,1.6329142785,1.72039319161,0.823733508093,0.694554690086,1.10873066182,1.00883380121,1.66589907947,1.42770834479,1.32982986905,1.52071138005,1.39652414695,1.2741146881,1.18386783811,1.3624353496,1.46253071948,1.4590839644,1.25544325903,1.33797693513,1.41712700141,1.51103132744,1.40230053652,1.30833668556,1.29752468766,1.794748648,1.7840072902,1.73909811281,1.58677297392,1.85423506543,1.84703306963,1.67857703209,1.75247273844,1.89397830293,2.4878810829,2.59140454855,2.50240199758,2.48383125645,2.59185156555,2.5015451842,2.22350020982,2.30540837341,2.54893369168,2.64597976146,1.89150324225,1.88426204485,1.96599590676,2.05882007831,1.93411118236,2.03022602746,2.10876561879,2.1907049874,1.85941975408,1.89206764621,2.06002222669,2.13266606386,2.01588397792,2.1111171708,2.47222028866,2.73996215665,2.65644744079,2.47741094693,2.38840706487,2.74503607339,2.54590343426,2.63235014007,2.55568571617,2.44231264236,2.52311548868,2.58796600613,2.54224774358,2.388268651,2.29011885953,1.86886991714,1.82145121062,2.39338260647,2.46903034785,2.47635299981,2.31389688074,2.39532718727,2.55617749003,1.12979661341,1.05092539601,1.24160989506,1.22666084564,0.989991765631,1.0571364008,1.46950044753,0.960288304065,1.11681584125,1.01988538006,1.20301350071,1.19466903023,0.538850511779,0.0649398976252,0.222367335206,0.528272592966,0.437105251468,0.895853965054,0.178354786154,0.226960153737,0.141200364292,1.66311000578,1.73863105262,1.59188642717,1.62448605776,1.26880601079,1.17060276056,1.49217642573,1.27151369218,1.31920788665,1.96006494711,1.86303395294,1.70633306341,1.79753687288,1.97885425171,2.07016641805,2.08203434472,2.04981230997,0.410133882062,0.558854768249,0.640810365559,0.54282753104,0.697093416188,0.503933770969,0.572678195222,0.666136151604,0.137127060815,0.497767151022,1.00064438694,1.00455472453,1.09322650918,1.0950268255,1.45759832397,1.46356617054,1.19855535941,1.19294489632,1.29263744842,1.28564997027,1.37963954019,1.37823328017,1.43855136513,1.41548827755,1.25574670932,1.31769339348,1.18951610223,1.19137986787,1.28406645263,1.37065649665,1.36296254309,1.27808580063,0.740341042862,0.833464527304,0.906745917173,0.91269627091,1.16314703111,1.11242536417,1.57270316772,1.49867127973,1.55028758803,1.45225506031,2.15700741631,1.37149372284,1.46154423205,1.44840031508,1.1803469901,1.55392856995,1.47158595547,1.4107373886,1.50722399325,1.36994153593,1.42440848451,1.08271721165,1.27044900852,1.28426531261,1.31234268974,1.1558845648,1.24042877332,1.341013724,1.44403629712,1.49936655164,1.46829618143,2.1582771202,2.23850881384,1.96455452785,1.88626568694,2.05461784935,2.06599039869,1.79727370422,1.78086041927,1.6870224737,1.61571555066,1.5486276047,1.63056383631,1.71817820245,2.23565854475,2.16207650626,2.24287543711,1.54995945607,1.36242295598,1.3669943123,1.27057441512,1.27225530357,1.54751359459,1.56415285045,1.23127565521,1.22459747794,1.13765687217,1.06626627782,1.28119352356,1.38001214094,1.40424078773,1.15464092068,0.96835442632,0.929002528704,1.14384377431,1.06578994297,1.61631543432,1.6940627349,1.52793399781,1.51523654378,1.3515928879,1.3814654705,1.89596529047,2.06908796259,2.16497473408,2.16311212566,2.07414568955,1.98152174253,1.98490080373,2.25518386826,2.42434930515,2.33971015477,2.42354941686,2.39184712377,2.18520255983,2.28893475372,2.91994932577,2.7039466051,2.76930794898,2.67447824991,2.65148305517,2.83564780339,2.93027631269,3.00239872031,2.93903240148,2.67190651062,2.64581428184,2.76692497285,2.70187925056,2.80041284163,2.84247662531,2.75944611636,2.67104921031,2.55152370567,2.35724014007,2.41120557934,2.50841065549,2.08278982361,2.05980710061,2.12917263495,2.07928920676,1.97982819253,2.0653553969,2.02240716698,2.08779937895,1.91860904787,1.90235355085,1.98360092759,2.06519231176,1.38445602017,1.3850944018,1.29577608453,1.29333867493,1.76131765904,1.69894254681,1.61255768076,1.71961689591,1.60504615751,1.56024688202,1.85935013337,1.77170214934,1.76109759438,1.70049653863,1.56865398699,2.58648122245,2.6333342137,2.68609607789,2.71392363466,2.39844318557,2.26459350685,2.36250455232,2.82761215766,2.97318276496,2.57179677083,2.48466340913,2.48029239221,2.53889878652,2.80538548563,2.79314999785,2.93235561751,2.84144075853,2.29208895153,2.38913770212,2.42538830228,2.23588410986,2.14296320224,1.95985175316,2.10285681626,2.00986321598,2.42497400563,2.52211232963,2.37861214501,2.35656429341,2.46700892811,2.54249232346,2.33500192518,2.33579703416,2.40998154028,2.4060662431,2.51223122293,2.20076399362,2.21892364951,2.30392756995,2.37782453457,2.3582369998,2.26626929438,2.81299260711,2.64209654171,2.64132783772,2.71897982292,1.17100809286,1.07750772172,1.00841251643,1.04283463094,1.15135400092,1.33555057037,1.14185075698,1.28510346989,1.2009712786,1.68623336265,1.76728934853,1.48623477834,1.47319733737,1.22540241969,1.31554031101,1.2155671843,1.29678079189,1.39636434475,1.38752017078,0.879260028507,1.05165818999,1.12938718386,1.21890658726,1.06725446251,1.21513186976,1.21328274295,1.13107392622,1.12624108098,0.525967515926,0.542336172356,0.634438566488,0.551275730203,0.356283391151,0.817858403511,0.764507081513,0.619968645492,0.668626030153,0.766560438568,0.693014964237,0.2716911297,0.325230442966,0.120558768948,0.189595328514,0.163259070379,0.194093900912,0.111580291561,0.166343832876,0.254804004603,0.439810656711,0.360636523763,0.450003866235,0.275911977093,0.388900105118,0.296940248148,0.906959842601,0.846236914281,0.860015647069,0.919416354832,0.934948556299,0.575986626078,0.764506576663,0.484239455869,0.307161783301,0.392139909992,0.47342743327,1.42797813257,1.29663603653,1.32833694977,1.36134211587,1.49349417381,1.45836814318,1.46109970211,1.48634011811,1.41169533489,1.57755288584,1.55895675194,2.096640777,1.99961272285,1.70521140958,1.80445428107,1.69704672914,1.77578707932,1.60452364407,1.59408335674,1.76286858918,1.67380363231,1.96987235214,1.87862880586,1.9402762212,1.86606374007,1.9949110873,1.92383090144,1.83680397068,1.82316322446,1.89471067933,1.97932354658,1.19651827992,1.16587350362,1.12975374459,1.02737489614,1.06502103246,0.893241483947,0.992966068678,0.219433898755,0.349951348112,0.255963292177,0.497369449917,0.402196254507,0.893488049002,0.667189475359,0.836734613764,0.755477783105,0.586404359029,0.666298928929,0.605703536762,0.699624106768,0.794147515435,0.857093738491,1.88915947843,1.98848479665,1.60160239225,1.62318588349,1.73909958489,1.71862904921,1.79203382411,1.94627417902,2.01575724262,1.85169691867,1.83089731519,1.29388304054,1.34423614771,1.32168434781,1.00871699469,1.09476927439,0.925187353724,1.20284622724,1.38194670667,1.28157049002,1.37082448717,1.21996048738,1.30976982748,1.56617071512,1.66532657441,1.5785609551,1.52391877333,1.67849480328,1.72330270029,1.21691582759,1.11428284531,1.73166578637,1.72535927455,1.90412838967,2.07379534687,2.13397568397,2.22518602045,2.18072030031,2.11318223756,2.28405380883,2.30941192797,1.55133886289,1.55025523699,1.64226185978,1.64042828842,1.45985035587,1.45690536493,2.04691313679,2.11419566435,1.9966647708,2.08647497059,1.98286351303,1.98712359529,2.07172427782,2.15275307962,2.14563394012,2.06056368486,1.64499916685,1.72134752103,1.81320582756,1.54912212025,1.54874782724,1.4554139827,1.45639704128,1.73273739638,1.64184107125,1.64123734526,1.81921636882,1.89548302533,1.81478248347,1.7277649449,0.954041720749,1.04234163805,1.04536726984,0.977101967064,0.91227866066,0.820921961286,0.962564491484,0.987000835503,0.931836535261,1.08338301404,0.983346532023,0.715461412187,0.80673038968,0.64801554693,0.67954731108,0.840408726147,0.780007780991,1.82329478278,1.68528855689,1.66263934423,1.73027411311,1.61499109669,1.73197175769,1.58899427303,1.56875719505,1.63843212521,1.75279634253,1.67934536098,1.94501253937,1.85024257421,1.77963075675,1.96799332791,1.89638650504,1.80308008088,1.37410479721,1.28189515294,1.44896788319,1.45722168055,1.54627554685,1.72330472528,1.62647468476,1.71489817725,1.48343723511,1.473331345,1.65237982576,1.57387146705,1.6436083845,1.55506961794,1.89343823683,2.19599623793,2.04842284861,2.10208205941,2.03131741133,2.33301664052,2.31533104039,2.24840307131,2.15424569848,2.14148721345,2.2183801152,2.05794547364,2.15819684151,2.80720938973,2.39022137071,2.48553100712,2.47730459768,2.8224386872,2.75540400989,2.66397307727,2.63203103047,2.77468391063,2.67851137228,2.01199856997,1.8617607028,1.95420351546,2.03189202632,1.91783375264,1.84516843602,1.6122400927,1.54798645132,1.45797623944,1.55922686765,1.46099765897,2.1522679865,2.24084310927,2.13549029809,2.31542193633,2.20904892459,2.30079220324,2.81257112984,2.87346887189,2.80889484905,2.71574513491,2.23709399985,2.32174954332,2.40224264832,2.61341065154,2.6070070096,2.51011241117,2.88235451855,2.98719423668,3.04736898931,2.96906555383,2.88971545989,2.84703117993,1.38801544874,1.19841127155,1.23215761143,1.32730540291,1.35208299889,1.25796650665,2.50290681001,2.55720045187,2.55041506218,2.64053073251,2.70979116866,2.6718369428,1.44012694869,1.52060064452,1.60393957657,1.59361090317,1.50138941461,1.43117809013,0.590768023236,0.680666404725,0.576457157842,0.755429224948,0.899124201007,0.995324464285,0.8673334919,0.872987300482,0.705719778663,0.795578221375,0.607155185743,0.61163878207,0.704433742639,0.694629414429,0.784976541024,0.779078891469,0.475331386222,0.380425115727,0.318438946316,0.378392749754,0.520234951479,0.481510783706,0.438097466403,0.529103463395,0.604301484445,0.589530572546,0.498931331691,0.422340846817,0.271635434834,0.418081007458,0.324490702902,0.49139020048,0.327640370265,0.412901604451,0.335131861664,0.750639123956,0.608266316085,0.703932065403,0.711505525817,0.816690764725,0.821264345776,0.729365761788,0.641758481152,0.64882914224,0.740488971955,2.06885042922,2.19033019213,2.09636220903,2.13289398745,2.26027055765,2.22994891107,1.64411315684,1.52130263639,1.54554380474,1.48474123164,1.68178449287,1.655237831,1.6195250983,1.84156303094,1.97271314053,1.93933957017,1.77971614692,0.89214737253,0.872733531951,0.783700875527,0.788597505898,1.15102137457,1.0576489558,0.990640222311,1.02775773605,1.12777718476,1.18434666147,0.829364374526,0.732043425713,0.680913142624,0.714722728846,0.739702593088,1.01066978934,1.10021052346,1.11174000447,1.03538077655,0.866271868855,0.770985262404,0.755614306227,0.838151269134,0.928309037706,0.941754661075,0.951554072803,1.11022285597,1.02008855822,0.995480491698,1.15185848456,1.10498938893,0.948059604625,0.962881042613,1.00747439153,0.859500087851,0.797435839165,0.842172146418,2.01214784164,1.93782059645,1.77092836201,1.72645389216,1.65666335549,1.67614109879,1.81836685269,1.84357044921,1.88544732982,2.06798419042,1.99417586977,1.90406669768,2.05100673479,1.95886230352,1.13122466124,1.20677860042,1.18942891292,1.10227512354,0.931485562851,0.853837190897,1.03414863066,1.02257841751,0.960490016994,0.871943711158,1.06337942669,1.1065526349,0.961762582068,1.03930667788,0.946973536123,1.81887710142,1.98584257574,1.89624608633,1.81440828442,1.99002278457,1.90490627083,1.88602604578,1.96005342284,1.93708483567,1.84495329571,1.63213901936,1.71778343817,1.60181917261,1.6691684298,1.77689656197,1.79541417237,1.07410666187,1.14550002724,1.23261704693,1.21627313327,1.11976997224,1.81091104612,1.64163104774,1.7246452697,1.81021595832,1.75409732021,1.66275475139,1.97046442758,1.89133392748,1.81013934427,1.82217440015,1.91520354325,1.982443312,1.56582692268,1.65004023864,1.72944443695,1.56152213558,1.64437463533,1.72805151827,2.0571032581,2.15464496746,2.66004303756,2.74679326866,2.72505576562,2.78455189082,2.9755518561,2.90370509531,3.06834291511,3.00726035901,2.9150864505,2.88183604332,2.22799295601,2.31846312155,2.33139414143,2.2446581274,2.15570931408,2.15160945363,2.4188657753,2.49656581592,2.4165361065,2.50158880848,2.58808626702,2.59123993653,2.32232450982,2.23790449861,2.14248420073,2.1273007496,2.18464189047,2.22549342233,2.12826653665,2.11032702967,2.31286772605,2.21475091611,2.17144538507,2.21918033065,2.5068993213,2.46409006457,2.36449389091,2.31355700458,2.35725411039,2.45053176595,2.3500314034,2.28129693421,2.30452493448,2.39669959597,1.42632327458,1.36095874811,1.35092057266,1.26271833776,1.27699120903,1.18674141668,1.18264439345,0.824762835867,0.66327016889,0.725239880369,0.711231131337,1.0189056228,1.1054371079,0.660679735918,0.667228076255,0.748720812113,0.835928561694,0.461813049729,0.557719488794,0.498051901967,0.426341091732,0.58945920296,0.615719263632,1.75184767657,1.93858212646,1.90926221066,1.81433434547,1.87419445842,1.78269351678,0.705860766293,0.560728421891,0.657773201823,0.725952409969,0.832425536482,0.872321391719,0.912473178775,0.99951719782,0.972628994523,0.418415675314,0.251776363353,0.320839855002,0.623719100888,0.541235683933,0.619099948734,2.02279398253,2.07599711667,1.92210087281,1.87681616189,1.92341303278,2.02128832963,2.30342164924,2.34722390586,2.37905396821,2.2042965791,2.24780504271,2.17950363871,2.44462004544,2.50840777313,2.60080636587,2.63041749486,2.56047841125,2.46870351221,1.47452229351,1.40572426772,0.84989252214,1.02806047467,0.923081848359,0.930461913574,1.01718332375,1.01297499794,1.10161857681,1.09859242991,0.855905572481,0.953155189874,0.959607834442,0.802522672545,0.867968516917,0.841677372616,0.878734065382,0.779956271287,0.760825524991,0.935628723251,0.95398605432,0.552917922199,0.444837049557,0.542244706416,0.586580548243,1.40215386995,1.49622971366,1.52005170302,1.44910992357,1.35361289162,1.33034655112,1.23605340974,1.16204818234,1.24252691527,1.31024116058,1.2833965147,1.18653606036,1.11523384518,1.14499144262,0.464738304275,0.457002725791,0.309619920135,0.397989693874,0.296923700398,0.378988880703 }; const double THETA996[NST996] = { 1.41384085293,1.69354523046,3.06396839898,2.96282828373,-0.0546440347069,-0.148197759291,-0.125992071944,-0.185857101175,-0.290302945755,-0.337954976391,4.44771928958,4.3432272422,3.69239903319,3.57581389347,3.80593651371,3.84352938298,3.83086000845,3.95590432662,4.06040927512,-0.837799104276,1.8666274081,1.86453099607,3.54589031269,3.6151544602,3.26341777849,3.36205018641,3.73008183871,3.59945239121,-0.49965343315,-0.44434137628,-1.16793806528,-0.195337767145,2.47882170223,2.362182902,3.18895960121,3.10483172497,3.20423023904,3.24535403982,2.35997054255,2.57343059503,3.44672649169,3.40877424172,0.269506217816,0.00889126361683,-0.0240965156078,0.388862933271,1.62570836182,1.00713859096,0.96131354609,0.955109964002,-0.450862982076,-0.34725235831,0.0369186273459,4.09941634455,4.16147457188,4.12042943211,4.2569327655,4.293797265,4.39139299594,4.65172370043,-1.53033371215,4.28500734232,4.17382700477,4.02968483168,4.13414168093,4.12712652269,4.1819359812,3.23478207404,2.99106173458,3.26232487039,3.16687468286,3.66481264635,3.44629888577,3.50401668757,-1.10071326531,-1.02115588024,3.80042216465,4.14498020927,4.50695493769,4.61033982276,4.67006766759,4.62334511176,3.97887703444,4.02008737488,3.94459705934,4.15010484173,-0.391404159596,-0.819385602352,-1.15399024907,-1.07159409486,-0.93925456139,-0.960049853102,2.6128872068,0.112991448787,0.214876871369,0.358548835494,-1.10490006136,1.88576510245,2.7102382988,2.61024676272,2.89556628576,1.86307160064,1.57512089886,1.71501908616,1.86837899435,1.98798744936,1.9791957693,1.68337350505,1.77901049276,0.451123452166,1.30484770236,1.14850767398,1.10752379662,1.05535276004,1.05921475861,4.26572522342,4.19186632787,4.1322966147,4.23183862345,3.80402721881,3.71490625884,3.41910511058,-0.781785707264,4.36587128863,4.40472605857,4.42884658533,4.52768591204,-0.984846857487,2.84025087921,-0.135343269721,-1.34957942814,-1.37943112358,3.79812968502,4.03877340409,3.15659536827,3.44362146845,2.65405889806,2.58115286983,2.36259926366,2.45633975425,2.50329433228,2.49580497386,2.76484923673,2.68166735537,2.60422530934,1.86911431836,1.86853623095,3.0475026461,3.08998555285,3.17945153836,3.23024654762,2.70982762625,2.4755142806,2.94774347993,3.22205789652,2.70727854865,2.71346766084,2.83807793245,2.89763580528,3.03673628908,2.98746921945,2.10129195399,1.07490617234,3.30513972174,3.08907849982,3.15076771556,3.24898735367,3.12404637005,3.22455020424,3.38759198019,3.292275742,3.42994201125,3.23885491343,3.3770912747,3.28065766597,2.91962971253,2.81558402252,2.84584318948,2.77799072312,3.10108836465,3.00610215828,3.14493688238,3.08675030718,2.9830453996,2.94674670493,3.0911060191,3.04697357097,3.24964584019,3.12983752227,2.67048789631,2.58579818261,0.230914125477,0.290702041807,0.133599625863,0.101508267805,0.177708096563,0.586217266307,0.541823698005,0.445268200164,0.857892296474,1.58183428609,1.55111496275,1.89886962251,1.9201482603,1.80089604575,1.72757831068,1.72815986065,1.77768081119,1.48971067566,1.59454960335,1.64185629041,1.67256634967,1.4206977909,1.45091600971,1.38444744051,1.28632293888,0.710381416247,0.641798732842,0.498533864183,0.558508749238,0.546097993593,0.657960240576,0.51348622897,0.410944436495,0.369575986532,0.428756988504,0.585126994568,0.528828911323,0.571679755247,1.02035019084,0.827271418054,0.891434377281,1.23057431953,0.861845612244,0.676691079213,0.811312968139,0.715280889692,-0.308779912602,-0.213708006203,-0.16770252089,-0.275540957191,-0.325201570175,-0.260401956586,0.138110541686,0.169109320826,0.261278640444,0.00696437039988,-0.108643924856,-0.0179756217633,-0.0968739229597,-0.139786846294,-1.55361156382,-1.49175803311,-1.51564911561,-1.4147615116,4.00529855202,4.45021858064,3.33571504017,3.5510811881,3.39910033357,3.51036473312,3.33862927164,3.4902185921,3.38778338797,3.34760354374,3.23298845552,3.43279177769,3.39184009943,2.93781334681,-0.875018802957,-0.905156508651,-1.45028450366,2.76372483694,3.23730178564,3.15160253319,2.9559516355,4.26366865842,4.39070388777,3.96814737772,3.55958996768,3.5771563279,3.77755133664,3.49742797038,3.96358794458,3.97260981565,3.69274347632,4.44814523212,4.35627375337,4.11513886576,4.07462572084,3.95682148915,3.95591644764,-1.2648739838,3.6537634712,3.74230090172,3.84524156913,4.46059407135,4.51641488924,4.12804476448,4.17733377745,4.1895169979,4.29571932286,4.35324133749,4.29610652124,-0.806946830434,-0.600328181652,-0.757317063481,-0.653002877876,-0.425243988264,-0.359360862192,-0.386222448121,-0.530538941761,-0.554676608826,-0.476539081818,-0.726303591922,-0.585440577375,-0.69120609887,-0.753591177382,-0.892852966192,2.03435226529,2.41738104476,2.07343190278,2.29000533562,2.67134548637,2.78828098877,2.81328075296,0.256577748829,0.868852041028,0.11177220188,0.205151069256,-1.09749967607,-1.26598197701,2.42103255344,2.72786018987,3.05735568422,3.01431797997,1.74735358848,1.73702811996,1.60117331563,1.63896480759,1.65262119042,1.67403664962,1.76351125996,1.77014434295,2.12222768743,2.1601193165,2.36388494333,2.22926280385,2.42614394903,2.33498683628,0.692857108176,0.828937111245,0.904991228325,0.60492496898,0.888546701182,1.41242601466,1.28348807743,1.24905145665,1.35024053718,1.48900417945,1.51499035566,1.37249021234,1.13645476973,1.34424058502,1.47373560536,4.06068391306,4.08572542055,4.0007223867,3.90095200374,3.75546749516,3.82882231267,3.86704229862,3.9201890318,3.9419606422,4.02448458708,3.97563746178,3.70964372871,3.51441404174,3.69663090058,3.73485390154,3.58656403978,3.53039311745,3.66741934612,3.57222486604,-0.854437798809,-0.832359518247,-0.770893486477,-0.818134353808,-0.947833142936,-0.494858810977,-0.603285797504,-0.43904943187,-0.659332753727,-0.585784476709,-0.388762276525,-0.331607876607,0.276367447255,0.380513188182,-0.0209546369525,-0.144985197176,-0.0367662798399,-0.170626162277,0.626644142917,0.52490450538,0.577862175692,0.865784955369,0.747992436052,0.393134898458,1.42186913171,-0.592897987676,-1.00643407689,4.64485265713,-1.49433344132,-0.708268350258,-0.597974989072,-0.947344097732,-0.790965420325,-1.15753437607,-1.14220755357,4.01866677427,3.91302391752,3.67983821854,3.47830482304,3.58680933739,3.59567862087,3.66130342139,3.54384736051,3.3546240255,3.20373628709,3.32523147824,2.43133809136,2.32871448409,2.42220357437,2.24900679519,2.34996362096,2.26075500357,2.51681012802,2.67713234359,2.60825962917,2.62473819237,2.52893349178,1.96913053492,1.96497764973,1.94866040962,1.9557455229,2.9503607929,2.89022729714,2.90699255958,2.81271122829,2.78860030275,2.75494244149,3.07392225469,3.03104392005,2.86030203681,2.9278427104,2.67490539827,2.75184261593,2.71822000466,2.6112403546,2.53190556439,2.56151401197,2.3176143101,2.22440742604,2.40347005465,2.39729274348,2.21068636876,2.27169628002,2.29702527951,2.3334760057,2.72991282122,2.74769523443,2.53330775125,2.49723012782,1.35377013815,0.847275773739,0.847148431031,0.77350244059,1.12475845627,1.00950554687,1.29605386841,1.31452977511,2.81657396097,2.91926926948,-0.298765093516,-0.278267283529,-0.0226038955829,0.0734342779967,0.207815660075,0.108659303692,0.0433369387011,0.391094110791,0.324965222211,0.349253607548,0.245834075876,0.515986470473,0.425476832368,0.339196769203,0.849182866606,0.799155071686,0.784895329708,1.17157070015,1.25024358027,1.10866637476,1.14789414558,1.27880378475,1.31764110505,1.8466265298,1.86090636572,1.68114221836,1.75192542936,1.69345417907,1.77857561546,1.85497415731,1.83723323337,0.866773369779,0.671644411075,0.977725681687,0.882484527354,0.481050426876,0.523639041686,0.293772758912,0.366181557966,0.305968766252,0.422197436339,0.681917062547,0.866406221111,0.820307274156,0.725076979584,0.728557085604,0.818398665887,1.34335698989,1.4357762055,1.56742144123,1.5529905993,1.15130532074,1.04202374704,0.996000740542,1.06874550567,1.19206631543,1.22748558737,1.53397511351,1.60540616636,1.5950689784,1.13888066526,0.95629623416,1.00090752226,1.09287482311,0.962725829751,1.00554742402,1.0967605912,1.01920676851,1.18930645419,1.12222573254,1.15628199412,-0.664659759592,-0.604989037281,-0.492489373078,-0.307655346944,-0.221862061893,-0.253990601138,-0.42697078234,0.298643926553,0.192511220988,0.08694670351,0.081080138049,0.370876454112,0.341375357901,0.249364403554,0.10495690791,0.207931515531,0.094967205435,-0.894430921453,-1.02891999972,-0.927911137206,-0.863789542223,-1.09067748616,-1.22809491027,-1.35288813018,-1.25210291555,-1.19082507633,-1.32836376596,-1.3915096261,-1.01879963183,-0.992856357329,-1.06292970977,-1.12276158225,-1.19571245486,-1.16230757727,4.54681775427,4.5861543753,4.70557569554,4.60624322627,4.56906187882,4.49002155041,4.6299796557,4.59119553393,4.31569016966,4.41194108696,4.33007671607,4.27407438872,4.43106915865,4.47085330918,3.54147731692,2.8682206024,3.0106135932,2.82636310891,2.89943814803,3.15877984103,3.03372026914,3.22839683354,3.1730888349,3.05784175923,2.98962608703,-0.752978021965,-0.76848876189,-0.831882900728,4.20490803714,4.24410241219,-1.39124116651,-1.36535848954,-1.55873516905,-1.48437071939,-1.28632890722,-1.07706794219,-1.08714234895,-1.33689521158,-1.46809391849,-1.50882998733,-1.44476573451,-1.2994345908,-1.36586510448,-0.722696918111,-0.797440949703,-0.755438338933,-0.631461891516,-0.652438720539,2.62585888145,2.66203138047,2.5043769979,2.57989810184,2.41530827156,2.45370293179,0.544986653055,0.821019225987,1.06906886889,0.98901310815,0.104868786153,0.178171908881,0.121540162542,-0.940563809932,-0.745348931579,-0.965486896591,2.2602861726,1.47386740423,2.17470612285,2.53902011936,1.59587055034,1.90843050978,2.07353624917,2.03945800196,2.14016937094,2.15332640794,1.97585359191,1.95515329509,0.628430292071,0.768319976131,0.470335405426,0.42924082207,0.592472440705,0.781610293168,3.96660995453,4.01934660411,3.97058458468,3.86618414277,3.81257986708,3.86394663483,-1.50124752927,-1.46280824772,4.59964778651,-1.56667280448,-0.973636690148,-1.01538992264,-0.603742927655,-0.476981123264,-0.440614650318,-0.39170555414,-0.676912250442,-0.849036702052,-0.898310797204,-0.595338655773,-0.806162953923,-0.669952694087,-0.248204721307,-0.317977007982,-0.106108129157,0.140455114539,-0.0521219326512,0.119701150895,0.528245569907,0.459071919754,0.581414032812,0.760578192033,0.8637574923,0.761046956701,3.97667507416,3.71851671444,3.67687849633,4.51703905326,4.54937451654,4.65841301,4.23189064099,3.91549653861,3.76674600174,3.78121702735,4.0512554972,3.307481338,3.43508967325,3.23478891822,3.31033034813,3.47512447294,3.5223926034,2.1668144332,2.29691770005,2.27376177889,2.0736086364,2.20274613413,2.08535870118,2.02790418194,2.18181452065,2.01383506949,2.09003474541,2.11793850781,2.28725382517,2.19544409337,2.04690723072,2.15315679547,2.05534443785,2.12964102737,1.88348857605,2.14597013647,2.08770007628,1.94811735321,1.34862420393,1.30873008441,1.38421946685,1.49926191636,1.53148556848,1.45715094678,1.45650312337,1.45201784337,1.59225752056,1.86186665558,1.71428147206,0.966388807941,1.01848084912,1.12808109176,1.19456612148,1.2340797823,1.20082701397,1.0627006262,0.978365716669,1.03137200915,1.15126370569,2.88946540222,2.94287854623,2.97481278782,2.77792636539,2.83997778488,2.76171904884,2.68838878744,2.49116271169,2.58768697459,2.4809699816,2.58433615805,2.69622959501,-0.179218511936,-0.101777881827,-0.0545945244831,-0.250711491821,-0.182892181965,-0.0848964771083,-0.224095802491,-0.125610331044,0.0747519656796,0.140769354568,0.215536385743,0.178570694177,0.0295419560299,0.00117073091985,0.466984937901,0.540132345369,0.649841029897,0.686036721064,0.663241867714,0.580906592388,0.505423646007,0.615612582909,0.421049097801,0.447241681534,1.92111956078,2.02278585715,1.94535228282,2.10908043258,2.07198077823,0.81788648606,0.714141374045,0.663007698614,0.717372711425,0.823172797847,0.871673256882,1.2928953049,1.36992071738,1.47748817018,1.49551694769,1.28899297026,1.25738549522,1.38608734393,1.44975845908,1.42207232179,1.32634528305,0.28508351308,0.368101683991,0.314536645988,0.205278594575,0.184031164203,3.49399656583,3.40311651695,3.34610223282,3.39004868759,3.86934213924,3.81429986571,3.70094265272,3.65000711683,3.70690078988,3.81576942455,3.87056089057,3.81247975857,3.65826113123,3.70894318092,3.65529864848,3.55775017099,3.50400817416,3.55042707435,-0.362914961155,-0.350217191615,-0.588361726252,-0.598013782703,-0.141767858789,-0.331714959684,-1.00640441691,-0.72050281964,-0.596262526575,0.256756511143,0.0481536272832,-0.317409769698,4.26576388194,4.30393258647,4.43938161119,4.51293959699,4.45897059578,4.34490276473,4.49614502877,-1.55166078688,4.64478173525,4.40378103164,4.66354623991,4.47800026878,4.70327831803,4.6318049581,4.68312106738,-1.48822159036,-0.240091287759,-0.0107432223996,-0.0479194195557,-0.154589612008,-0.441384171289,-0.449573372462,-0.558811681605,-0.669502735269,-0.697515737418,-0.558783671585,-0.55777174324,-0.67645760192,-0.806334826129,-0.825257523341,-0.315999515167,-0.215325320792,-0.0910739135566,-0.0363607740721,-1.37536026919,-1.53984866426,-1.43808954479,-1.39690908441,4.68388685985,-1.55277329745,-1.45169013269,-1.06349883736,-1.16895758898,-1.03910556892,-1.30990287272,-1.13613680442,-1.37109489671,4.50434099046,4.34867325012,4.57721089472,4.50813220756,3.93105056513,3.92281299413,4.30365605386,4.15217047278,4.23991303504,4.0724750429,2.30398963784,2.34156725021,2.2388581593,2.22413709288,2.42458743546,2.40212250493,2.17202541571,2.38599452208,2.42955708306,2.32176875657,1.68762848507,1.56880141213,1.76887634902,1.69929500348,1.58136055719,1.23188898451,1.42332893164,1.14944517998,1.91898727429,2.19522579899,2.09556026902,-0.65455767999,-0.559562297407,-0.64678864358,-0.559453192383,-0.470889717014,-0.46329648031,-1.45745182714,-1.23926833711,-1.35994982183,-1.41867128036,-1.22072153203,-1.30219242193,-0.285478905684,-0.409715979773,-0.389691493406,-0.202990287936,-0.0668122129897,-0.126728623876,-1.21283855107,-1.27392201038,-1.51564357487,-1.40847478082,4.56889542162,4.69153863227,-1.54397975949,4.51227803214,4.57111285206,4.67703509201,-1.17940102683,-1.21023677174,-1.33590594833,-1.29579723488,-1.395203426,4.37819729837,4.13254984458,4.16140062669,4.29537938223,4.33375347546,4.21969775771,1.79505293583,1.44622635374,1.45168858399,1.61175311586,-0.912457354268,-0.955843764426,-1.05302423097,-1.11355608028,-1.070354459,-0.96593267285,-0.921723861987,-0.988873714004,-1.29159808273,-1.2315662861,-1.12681446757,-1.08986793474,-1.16829413167,-1.26528316361,1.85743659075,2.09184730323,1.73956439916,1.67545712513,2.08866480895,2.23175237338 }; const int NST1010= 1010; const double AREA1010[NST1010] = { 0.0124299296763,0.0125351810871,0.0120562856962,0.012375946706,0.0125941480088,0.0127945223199,0.0123495231232,0.012683752365,0.0118924571799,0.0123784183386,0.0126082093541,0.0123259763507,0.0126774174972,0.0125641155111,0.0125181129023,0.0124813613113,0.0126311091378,0.0125064245984,0.0125180115164,0.0124010360858,0.0126934006505,0.0122641033471,0.0122608327765,0.012287042425,0.0126050590514,0.0122942279071,0.0124566879501,0.0125056155249,0.0121910561936,0.0127460124488,0.0127676141388,0.0124788007833,0.0125333433979,0.012261769768,0.0120537417533,0.0117212622177,0.0118754187773,0.0116809995964,0.012306268984,0.012433943302,0.012604219621,0.0122148210652,0.0131504593833,0.0128066070005,0.0122759108436,0.0127883576715,0.0123919875785,0.0118448396031,0.0128052208767,0.012209549724,0.0126229039352,0.0127365023111,0.0122961256711,0.0116854580792,0.0122461079312,0.0123162955312,0.0148520441431,0.0119075599984,0.0115935811041,0.0128832603034,0.0118153980238,0.0118080078058,0.011823930501,0.0122057046292,0.0122074480664,0.0144344693889,0.0125427825633,0.0125194952293,0.0123660849415,0.0122320402518,0.0122585979143,0.0122928733423,0.0121550900372,0.012331404555,0.0122604157905,0.0126989702943,0.0124219735533,0.0123254685575,0.012698214708,0.0122437111951,0.012284794452,0.0126213309971,0.012326210442,0.0123607062984,0.012483317499,0.0128695057445,0.0119701931493,0.0125328798671,0.0127084566048,0.01220579679,0.0125119305054,0.0121237854928,0.0123099396207,0.0130339169031,0.0124599877103,0.0117868738617,0.012214159278,0.0116334490086,0.0128695228118,0.0126273337427,0.0123348956764,0.0125841505877,0.0127066223678,0.0122704581373,0.0126152382591,0.0123115395157,0.0121456977266,0.0123284123627,0.01208598949,0.0127080066477,0.0120296087782,0.0129074399965,0.011938046968,0.0123211373904,0.0116806293432,0.0126135703844,0.0123001557254,0.012431965604,0.0123284814306,0.0126722066063,0.0120640572833,0.0128147330018,0.0124209808245,0.0127914831285,0.0122309909393,0.0126523001656,0.0128296924494,0.012741246726,0.0127261310686,0.0126452330912,0.0122710857891,0.0122724581266,0.0125069843027,0.0123420094274,0.0123346440298,0.0123206185482,0.0125651400377,0.0127620687508,0.0122098125055,0.0130717107235,0.0127224033202,0.0121157858421,0.0126925987192,0.0126806288836,0.0123770979915,0.0124339684986,0.0125439204709,0.0118542463264,0.012498444723,0.0119955405934,0.012031825529,0.0121980450429,0.0125063138499,0.0120765751929,0.0127921151006,0.0121989796224,0.012696980681,0.0122694391412,0.0126200239892,0.0125064848701,0.0124071319928,0.0126348878018,0.0122145313309,0.0122929424916,0.0122940749765,0.0127261601851,0.0121660457344,0.012730457051,0.0127733589438,0.0122558120422,0.0123276617994,0.0123027429771,0.012761742278,0.0123621831097,0.0125851236599,0.0125891664888,0.0123781876932,0.012386484152,0.0125365755006,0.0123415494781,0.012657689798,0.0126171639845,0.0123502002319,0.012255696691,0.0137894509536,0.0121932260107,0.0121379847322,0.0117901580675,0.0127038969203,0.0121743572213,0.0122020096599,0.0120930034688,0.012077609742,0.0129371819965,0.0149812108795,0.0116187856541,0.0123839245375,0.0125322033086,0.0124727076447,0.012441829285,0.0125376486075,0.0125234197054,0.0124996267073,0.0122393053272,0.0124971637563,0.0123488097593,0.0125966019809,0.0124402694885,0.0124786875251,0.0125419428982,0.0122908854477,0.0122442992348,0.0126582465425,0.0125688108554,0.0124289953845,0.0123642447917,0.0125694336307,0.0125321439743,0.0123873267315,0.0120781225301,0.0123896657393,0.0119119819063,0.0119572350701,0.0120274786019,0.0124661043354,0.011989749628,0.012678807141,0.0123927930944,0.0120523087013,0.0127838817383,0.0122802607626,0.0121507950555,0.0121187209227,0.0127262215171,0.0122648711238,0.012695004371,0.0121827074681,0.0122866978262,0.0125525705007,0.0123572189504,0.0124551707958,0.0125240654046,0.0127268745697,0.0121952620293,0.0122881959254,0.0120626148221,0.0120956823003,0.0128720805318,0.0118694418325,0.011937237375,0.0128016779121,0.0124119054631,0.0127800302406,0.0118695274309,0.0126363831874,0.0124783383506,0.0130200846724,0.0127925452952,0.0127101696931,0.0126562386375,0.0125820803334,0.0116364151515,0.0142258833357,0.0119044810759,0.0122933412071,0.0118144673888,0.0132921457402,0.0119390489914,0.0143622704449,0.0124324608983,0.0125846984756,0.0126073159886,0.0122713566842,0.0122460277394,0.0123786840784,0.0117763720008,0.0129929059604,0.0120344869074,0.0124698387146,0.0114772076788,0.0129961070054,0.0128247872028,0.011720489384,0.0125142274463,0.0117504584064,0.0118095162155,0.0149872336949,0.012583446908,0.012200035066,0.0127592295689,0.0121844934289,0.0126805546913,0.0127109337902,0.0124113091243,0.0123391354644,0.0123184974238,0.0116621802507,0.0128776423391,0.0127895926562,0.0119637358563,0.0124268149713,0.0122292999059,0.0117816755543,0.0125705829427,0.0126236190606,0.0123530740324,0.0126736882274,0.012340687405,0.0124266921223,0.0126834204108,0.0125039977164,0.0124063376089,0.0127011460992,0.0122280097939,0.0124768018499,0.0124195774212,0.0123677723572,0.0126717949645,0.0123065053271,0.0126702708559,0.0126619860661,0.0123025411131,0.0127365668248,0.0116317010423,0.0122750574568,0.0144847924886,0.0124496535659,0.0120621005186,0.0127149670783,0.0123494407435,0.0131883746212,0.0120052196159,0.0127816278612,0.0124541521541,0.0123344458521,0.0121845771906,0.012527868708,0.0126914642644,0.0126051719267,0.0124332475319,0.0126664469502,0.0122512736829,0.0122325430104,0.0124268715075,0.012384427318,0.0126048965088,0.0126894876326,0.01257962104,0.0123442662568,0.0125020831183,0.0124240057425,0.012630692978,0.0123838571358,0.0130469913484,0.0116695935777,0.012282100625,0.0127330812374,0.0122067831704,0.0123994227249,0.0125789597609,0.0126883923699,0.0125315893099,0.0124140518856,0.0130467044775,0.0131053153376,0.0127211901378,0.0122009559358,0.0121687974282,0.0128240837497,0.0120797922624,0.0122154510082,0.0128201600007,0.0120396104998,0.0121698223702,0.0124480616812,0.0126173485924,0.0125590636072,0.0124097342307,0.0124063304842,0.0124795583814,0.0124423674108,0.0125098588764,0.0125236114007,0.0123652474451,0.0124261740759,0.0125297911457,0.0125284040039,0.0123656434474,0.0121568931653,0.0123429860799,0.0126443082567,0.0122442949883,0.0120797179135,0.0121787963026,0.0124220592906,0.0122010889977,0.0127618113554,0.0122229684742,0.0122998291099,0.0120273698136,0.0128342740559,0.0121469846195,0.0119404153827,0.0128696541245,0.0123647101413,0.0126633574548,0.0125618538249,0.0123876538426,0.0122448684723,0.0127277744898,0.012551172478,0.0125573519341,0.0135289966862,0.0126718379761,0.0126194963332,0.0120027872155,0.0128038972791,0.011651521033,0.0118217571739,0.012191756435,0.0143987142442,0.0119256163252,0.0124276393787,0.0126247150284,0.0122613077204,0.0122141674468,0.0121839579928,0.0127742699564,0.01236373452,0.0125371254609,0.0126205237844,0.0126654976266,0.0122476990219,0.0122374807595,0.0127202655064,0.0124558298082,0.0126533445152,0.0123437406883,0.0127096113658,0.01233100102,0.0125541842644,0.0126496179861,0.0125702098623,0.0122977490413,0.0123709623324,0.0125762588094,0.0124314150534,0.0125229093713,0.0123737221012,0.0128772610189,0.0123936612189,0.0123590152841,0.0126662141556,0.0122073182587,0.0123298527375,0.0127706035304,0.0123628140816,0.0122079662888,0.0121395940995,0.0126224663261,0.0123217033264,0.0126389543457,0.0125631579961,0.0124468885104,0.0125115786728,0.0123032059831,0.0122693400003,0.012187619147,0.0126197850887,0.0127144595248,0.0121932276603,0.0125472961826,0.0125032875498,0.0125432029837,0.0124364925275,0.0129455219802,0.0120322801156,0.012241296397,0.0116776281423,0.0126973305766,0.0123221440245,0.0122575372812,0.0128205535602,0.0122795745425,0.0127230952789,0.0126629127902,0.0123171791525,0.0125679093733,0.0122117070987,0.0127268823997,0.0127116251416,0.0127068484516,0.0131829232178,0.0116343982356,0.0119009085587,0.0148738132404,0.0119335352026,0.0124402002954,0.012793740657,0.0119525986577,0.0126491290195,0.0124323718798,0.0125383953663,0.0122478550403,0.012337331047,0.0126730613712,0.0125508670007,0.0125005809633,0.0124740591552,0.0124391405045,0.0125714183694,0.0123876848827,0.0125405232166,0.0123287056608,0.0127008371208,0.0122840049111,0.0121302081575,0.0127367771017,0.0128270951968,0.0122295721779,0.0120733611624,0.0132275026353,0.0117371902992,0.0123848125306,0.0126880712855,0.012077081038,0.0124998444063,0.0124251233157,0.0127261707283,0.0122319176239,0.0127667966475,0.0127430965039,0.0122303553886,0.0124840028021,0.0125421916307,0.0124570333051,0.0124855935482,0.0127595439471,0.0129465360293,0.0126098602596,0.0120952020016,0.012436462547,0.0121295051408,0.0126287537466,0.0128298719413,0.0125440125566,0.012311215285,0.0120885080467,0.0128518437225,0.0121818182636,0.0126161159368,0.0123289685529,0.0128007973145,0.0122170320268,0.0127597930048,0.0121802535424,0.0127998793399,0.012186249266,0.0126491648293,0.012274766206,0.0125553532883,0.0123008730591,0.0124308791212,0.0125412526606,0.0124529289509,0.0125646085751,0.0125119504896,0.0124301684525,0.0124313450881,0.0125885720034,0.0125774455277,0.0123919130671,0.0128653441558,0.0122342836126,0.0123700721731,0.0125526986509,0.0124115738748,0.0122110588622,0.0122475566505,0.0125249359082,0.0127131842815,0.0122532068033,0.0124190690839,0.0124289432664,0.0126898940298,0.0128439915327,0.01266066969,0.0120664166737,0.0123939586795,0.0122003096501,0.0127005118682,0.0122769090671,0.012107640831,0.0118916915053,0.0120767629847,0.0120453997255,0.0117580883706,0.0123800413564,0.0123704497921,0.0125415131343,0.0124153763654,0.0126203421043,0.0121940893378,0.0124888564861,0.0128744911933,0.0118193562651,0.0125650386728,0.0124623187789,0.0122681163729,0.0125442125737,0.0120451443947,0.0120849619705,0.0119600989598,0.011959301522,0.0120787481143,0.0123340536522,0.0126659825241,0.0123469222493,0.0126519187933,0.0125609903486,0.0123582157788,0.012481355075,0.0125114860381,0.0124750690496,0.0125580238636,0.0125065600772,0.0124791858336,0.0125848419825,0.0123441059058,0.0126777474619,0.0123374472888,0.0125441060443,0.0124592829911,0.0125743081583,0.0124144355809,0.0122988397822,0.0122831991963,0.0125361806162,0.0124066647714,0.0126916163567,0.0125325579189,0.0123227094823,0.012457609979,0.0121270824971,0.0126903445369,0.0122607653414,0.0126620954348,0.0123423296229,0.0126243265515,0.011560954012,0.0127191927586,0.0127074521339,0.012512617123,0.0123631844733,0.0126289654299,0.012365332595,0.0125066040466,0.0123549584557,0.0125904005912,0.0125151997322,0.0123477718385,0.0125415165501,0.0123386158908,0.0126520333999,0.0127301585655,0.0121616973368,0.0143138579592,0.0119255907583,0.0116583965814,0.0122556506259,0.0118220662647,0.0126108576496,0.0123041561248,0.0124251040245,0.0122739940365,0.0127686063225,0.0125095197844,0.0124744949258,0.0125788677527,0.0126274148355,0.0124643919902,0.0125555075804,0.0124804817539,0.0123776345758,0.0124335963843,0.0122043562551,0.0122097519966,0.0127112272082,0.0126722819165,0.0123163286829,0.0123690650316,0.0126483143304,0.0124312635118,0.0127882840035,0.0128144524142,0.0122012924316,0.0122566122287,0.0125581430897,0.0124354972272,0.0124749323759,0.012583073747,0.0123991957151,0.0124042884182,0.0118806416871,0.0120902956891,0.0121116135157,0.0119592678867,0.0119534439935,0.01272561697,0.0126595090737,0.0122711234622,0.0123566730017,0.012594140873,0.0122405843332,0.0123894992485,0.012325031262,0.0126739593776,0.0122678920864,0.0125013799905,0.012432817958,0.0122558631481,0.0127110835158,0.0119237025952,0.0124633672058,0.0120992285164,0.0131645071464,0.0117587284379,0.0125583568525,0.0121453965195,0.0121361728667,0.0128341131815,0.0123612413327,0.0124722731897,0.0122353544991,0.0127108242957,0.0127188943177,0.0125247678069,0.0121258510111,0.0116900913944,0.0130446639279,0.0122296274848,0.0121289220781,0.0127676896686,0.0125766975735,0.0123688791782,0.0124460145165,0.0123711914155,0.0123063074813,0.0126547879705,0.0127426488791,0.0122941938523,0.0127741085353,0.0122325733826,0.0122796758968,0.0126919928068,0.0118986989436,0.0123855133352,0.0125730774306,0.0125777480588,0.0124059991161,0.0123507644305,0.0122768753548,0.0126655065501,0.0126874781443,0.0122036358585,0.0126207191928,0.0126408660602,0.0124056971713,0.0123710947531,0.0122614191294,0.0127813384959,0.0126416525829,0.0122874918443,0.0124439609306,0.0123395315941,0.012683245169,0.0122784918212,0.0124121829241,0.0125392290159,0.0126357587301,0.0124181961676,0.0129203387611,0.0123980159811,0.0126469075366,0.0123530763513,0.0126437770275,0.0124028776567,0.012251730246,0.0126458987258,0.0127361912145,0.0124851648964,0.0123567718288,0.0125740530359,0.0122782838126,0.0125040148762,0.0122312944297,0.0127185698125,0.0121848711922,0.0125635177617,0.0125915076795,0.0124694566761,0.0123800898978,0.0122360450246,0.0126973448608,0.012157400485,0.0129128837739,0.0118609381356,0.0121438906403,0.0131661592072,0.0119665060682,0.0122910867633,0.0122971652376,0.0126436665307,0.012505798594,0.0126125316095,0.0123350406478,0.0121592187982,0.0123048598649,0.0127097069341,0.0124668698989,0.0125460599162,0.0124406339121,0.0125274216441,0.0125038449905,0.0125040302119,0.012172835787,0.0126769784212,0.0123022454737,0.0127053976629,0.0121449785505,0.0123096811886,0.0123810852334,0.0125126686662,0.0124399073057,0.012460276853,0.0125061269312,0.012244619889,0.0126099193934,0.0129632911161,0.0120238240773,0.0122273821915,0.0126516954561,0.0122216481391,0.0122893609117,0.0117245876919,0.0127708987687,0.0123140087304,0.0124675477043,0.0125103272789,0.0122842557887,0.0123349790289,0.0125390640141,0.012420440108,0.0121755947006,0.0126004988328,0.0124158553549,0.0124539612383,0.0125466829491,0.0124356074302,0.0122251916663,0.0126365323178,0.0123286107631,0.0125000763159,0.0122782049996,0.0125756194184,0.0124564637228,0.0126268176837,0.0123567732577,0.0123976460331,0.0125386187862,0.0126707179921,0.0125029702538,0.012316051311,0.0125574544951,0.0124083387655,0.0125407422307,0.0127536603538,0.0122554432337,0.0124841006309,0.0125858447533,0.0123943951061,0.0125169830808,0.0119331175736,0.011989683157,0.0120367914554,0.0119423757488,0.0119937391587,0.0125378746132,0.012536054412,0.012451980795,0.0125313731507,0.0124994497464,0.0124666970133,0.0130692753449,0.0117095344832,0.0120898726869,0.0123938100851,0.0127750902806,0.0117025244305,0.0125201467877,0.0124598383908,0.0121966574761,0.0120143667676,0.0119212077542,0.0118765954256,0.0128038960922,0.0121733326368,0.0127252977358,0.0123247018807,0.0126876079178,0.0122126900398,0.0125940942676,0.012447037476,0.0125487249727,0.012534979937,0.0125289698458,0.0124939976829,0.0123306079107,0.0126387461187,0.0124267883949,0.0127624196478,0.01234622446,0.0126718844216,0.0123080521303,0.0126369158622,0.0124385925386,0.0122323947547,0.0127775732018,0.0121334234139,0.0125090863056,0.012448670393,0.0124938772876,0.0125293135149,0.0122995287038,0.0122604782136,0.0127105296513,0.0126373364218,0.0124414987209,0.0124906919779,0.0127271040849,0.0123062440441,0.0125665778379,0.0124112917545,0.0123087259952,0.0126581463398,0.0122374015989,0.0127256617407,0.0122467786969,0.0127344812446,0.0122916677397,0.0125825766748,0.0122993077247,0.0126886912449,0.0124630656639,0.0124788516517,0.012227350574,0.0127187548641,0.0121159147386,0.0124414343261,0.0125493416264,0.0122828932387,0.0123101026057,0.0124822301773,0.0124806144297,0.0122564284748,0.0121250958956,0.0127813178778,0.0119561708134,0.0127682278839,0.0120222835841,0.0126921089297,0.0123618244872,0.0124782863196,0.0122837041637,0.0125420300917,0.0125708102432,0.0122570827289,0.0122925693353,0.0127001072529,0.0127170634496,0.012257698978,0.0127226362189,0.0126618463233,0.0127864922105,0.0121998151679,0.0126601422175,0.0123214067671,0.0122910170423,0.0126414513444,0.012614358638,0.0123784109108,0.0123020219957,0.0126231600276,0.0124003500735,0.0126000719804,0.0123373570532,0.0123307468593,0.0122083713105,0.0126323774535,0.012344171522,0.0124813538645,0.0124845601901,0.0124069956196,0.0125436937953,0.0125289885877,0.0123425393249,0.0123747345447,0.0124868152604,0.0123877795807,0.012590208592 }; const double PHI1010[NST1010] = { 2.24639082309,2.21849567011,1.30195843331,1.84407574052,1.92209035602,2.32564078358,2.17326274065,2.08860420888,2.13671805105,2.11509715295,2.20792305752,3.11064047693,3.02468014701,3.02320506322,2.94095211194,1.89012118829,1.81130793762,1.73310489855,1.43126516321,1.44937794061,1.76831134201,1.6794232202,1.60642741149,1.57681969114,1.66212001362,1.49976128037,1.51215406198,1.333319254,1.1533155387,1.42787434794,1.64403276003,1.69729290714,1.59970755765,1.57288597517,1.61635822242,1.67460881724,1.60721751183,1.5095665445,1.51978424623,1.69283590848,1.61805746671,1.63722539876,1.44104603867,1.56507014695,1.27569597778,1.37712757937,1.46617980435,1.21823828469,1.56194354002,1.4780058009,1.43072946151,1.09858267466,1.09886974962,1.37051765888,2.01299591624,2.09779811144,2.22003364982,2.25718476956,2.2747160507,2.36899905666,2.21966647033,2.34534224694,2.25875952672,2.27822650196,2.25102580583,2.32628528601,2.04366082203,1.95247816232,1.88049536866,1.89063132511,2.22427686078,2.31674083697,2.61379138461,2.56081280986,2.66427116507,2.69199306575,2.91594252831,2.94724073213,2.85988073777,2.78161763293,2.79897968352,2.86031735443,2.95985547158,2.96952885963,2.85070817946,2.28322927297,2.29513365148,2.71253309157,2.17581069432,2.1980438639,1.85481847151,1.86590567862,1.88411325687,1.78312801126,1.79122649812,2.60267883895,1.75483357442,2.06365447401,1.61384948969,1.71783453747,1.63205204334,1.62321722179,1.56563362902,1.54690935485,1.36993206884,1.21665100112,1.4907976919,1.39283212709,1.34413366121,1.31685766753,1.60089534055,1.51099481099,1.44002774715,1.60296343244,2.0909904519,2.11873624581,1.83666966022,1.81871208317,1.99680937539,1.92759505203,1.98063738676,1.89351697008,1.32052734437,1.30544034841,1.39930046804,1.40617577169,1.13259222521,1.06079240533,1.19744396859,1.26284136086,1.34495256491,1.18263647363,1.1953691103,1.93112978174,1.86506507117,1.7423831219,1.76903310465,2.17013746921,2.09647970698,1.76504859586,1.95946291843,1.80539561363,1.89782708216,1.35149336551,1.52777127654,1.75165349396,1.73085250614,1.52605961845,1.67897260249,1.58613936247,1.40308971393,1.49972224888,1.51691448751,1.4438878269,0.741091791397,0.313547603813,1.01712097127,0.930299195795,0.769937726427,0.844607781742,0.852192261067,0.947985433838,1.02742868954,0.933374477997,0.803072624984,0.83632567515,0.704300913836,0.797516863863,0.9371265327,1.03263980927,0.191352987476,1.26582663723,1.0984453812,1.11155993471,1.19519706472,1.37356096917,1.34920627308,1.18581881143,1.25493527119,1.48500511931,1.41164177347,1.51294569075,1.42507471256,0.87001934654,1.36905740541,2.22281420841,2.24208612958,2.33599808933,2.13946151573,2.36190895013,1.49447431506,1.52846063362,1.38026009725,1.46261034936,1.61181549174,1.51694680949,1.34927241097,1.18429678944,1.26433082747,1.35995996762,1.12520948766,1.09773323563,1.1597107119,1.26981605458,1.2453562239,1.11461325156,1.20226969386,1.55065925832,1.52687686253,1.47761570519,1.38338013222,1.43151462841,1.36087680681,1.4496103859,1.31161174736,1.35653647141,1.28708227726,1.40651638666,1.4752397167,1.31404705306,1.25347097768,1.38073374136,1.33709005445,1.69751710375,1.43527443134,1.52887110202,1.01867639591,0.921333767944,1.23651317489,1.17689589225,1.07785081067,1.05475673015,1.2188813836,0.970095344136,0.895446679685,0.553793927617,0.467837194473,1.62901697644,1.77335026396,1.67501650662,1.74487492707,0.989069295727,1.05421340435,1.06560019728,0.967199973071,1.30690554369,1.13609138169,1.13363619879,1.21604842986,1.38675764959,1.29410765762,1.13366142132,1.23608817295,1.27609533836,2.07972023828,2.52354821761,2.36515678122,2.19529019958,2.02356973863,2.05880900866,2.18660298751,2.17093381574,2.25390603204,2.34126718313,1.44360908178,1.5305789621,1.60977351421,1.4306783511,1.3906358458,1.72219733523,1.64821988687,1.78858747913,1.71615188777,1.76784851652,1.67181811013,1.44572705231,1.41329283739,1.53975477348,1.70934577896,1.5400372696,1.61352046883,1.80661684189,1.72410302582,1.80491206279,1.71703324125,1.62628973017,1.6209707617,2.49200699091,2.39109330512,2.34889991762,2.3986838792,2.70193123673,2.49944423231,2.65511680183,2.55140903454,2.78362844004,2.42409850498,2.49205574609,2.39775141775,2.37469572094,2.49422740309,2.3898689198,2.21682539622,2.02411091887,2.14781777217,2.05307268895,2.18711713653,2.05760965423,2.08913667754,2.32387485099,2.22896011333,2.2345224019,1.97477363059,2.05589128951,2.06051826534,1.97594308911,2.14694540117,2.14353343967,2.66807358556,2.72411529597,2.70067303773,2.82646946916,2.65707355015,2.5627500496,2.55803606986,2.51693404866,2.82250782901,2.80308405943,2.87193360173,2.72146782097,2.704211616,2.6668197071,2.12355140541,2.05548121878,2.13640981453,2.03253110203,1.96495536932,1.95482583607,1.8293819002,1.81520854315,2.01630622832,1.92758560339,2.08519670266,1.91357466077,2.06812138358,1.98528270117,2.6655832191,2.81690109213,2.76442629014,1.96564787228,1.91024001399,2.04315468758,1.94725873206,1.68850579946,1.46125290388,2.07191294737,2.167234327,2.18762038502,2.00461975014,1.91453248637,1.844985574,1.79253899864,1.88573791609,2.13501642518,2.05774620219,2.02752527896,2.11517753096,1.88322580978,1.79322932915,1.78201559368,1.86119132078,1.95331622559,1.96417321732,1.95149015007,2.04805362066,1.19206777042,1.25098688352,1.26968424661,1.99586385892,2.07204027789,2.18728336843,2.17016706254,2.02992499412,1.94146376325,1.93330012947,2.01262383019,2.11498178261,2.10568547511,1.12685001982,1.21614051316,1.22435788983,0.59206176905,0.627422670975,1.05919738942,1.09455123711,1.02407124409,0.92773623507,0.896008291211,1.22071471226,1.34854925946,1.32462497392,1.15399468956,1.28600642975,1.19588027359,1.81887503372,1.84111093867,1.89021981391,1.98496644303,1.93364722751,2.00642929627,1.21299355198,1.25344768514,1.68312199965,1.85893698011,1.85659950713,1.77082402355,1.774579652,1.68967349871,1.68438348753,1.77447662816,1.58714698224,1.59235786746,0.521031822426,0.488786343813,0.563528153365,0.62470065738,0.660229462727,0.689770247542,0.761372993532,0.754672806272,0.679982213699,0.871610508616,1.0192607799,0.853325261904,0.932553014185,1.12620433145,1.0341825248,0.96568683018,0.994502091106,1.08847511154,1.15187063291,0.505665055404,0.397464949266,0.409483838531,0.583388429526,0.470955953991,0.28506213523,0.335534946631,0.42887960488,0.76940336783,0.59510410302,0.562800236199,0.616752643971,0.705856963768,0.619079816811,1.05302628843,0.678840736282,0.773215724082,0.757415816455,0.672852188645,0.846257314235,0.855852548832,0.510041580707,0.438040698267,0.349843697385,1.30620799552,1.32557147854,1.14870303134,1.21289935843,1.25317018418,1.16970596582,1.57349209469,1.75388813125,1.677613464,1.58810819549,1.02744876052,1.08707545885,1.19540287331,1.30203925998,1.34738341908,1.29856035559,0.75804582982,0.719273560423,0.908609220405,0.8527561047,0.994720321826,0.897682899421,0.863514891436,0.90433951557,0.850692851905,2.23703626148,2.35533848679,2.29092708484,2.30240060545,2.49885646684,2.46576026659,2.37843592055,2.12330088137,2.1726594054,2.19456669567,2.5156014027,2.56543264492,2.50314745913,2.4123053399,1.45153168297,1.52710329806,1.28551974185,1.23182465483,1.30406564038,1.13808157807,1.11950772767,1.19490719061,0.996422997149,0.93272586711,0.831230912614,0.793204711578,0.960486531736,1.04759844148,0.892487591907,1.07008556288,1.43599671365,1.47257732956,1.56117568829,1.50100148925,1.59747922864,1.62122700232,1.22648737888,1.31628893543,1.16104995988,1.1882186,1.28288698725,1.3457316628,0.566445940732,0.660615348844,0.464538277309,0.524109243737,0.491052009727,0.481394632324,1.47004712358,1.59139614986,1.49942611556,1.65370000378,1.5282862326,1.61976956002,1.60207942444,1.76609231814,1.69151170085,1.58771088954,1.66570166131,1.75453841899,1.35488695809,1.30838257825,1.15968966858,1.04609155904,1.14733863496,1.20439419118,1.00189934914,1.05902250912,0.8085535074,0.637448433391,1.67601098483,1.76813765028,1.86187837664,2.03650530524,1.9695805143,1.88391049829,0.824232082145,0.897212431399,0.732814002613,0.886440878621,0.721478550665,0.802477790825,1.27693658644,1.22207637803,2.00547439411,1.91516075537,1.8428050074,1.85505144851,1.94495561337,2.0310759366,1.94102051675,2.01917294702,2.11669075554,2.10861239168,2.72197688641,2.55003910141,2.45883264749,2.37531956261,2.44911253668,2.3525861555,2.27255779901,2.28543103856,2.1979694778,2.12855457413,2.11134209208,2.23133268395,2.27862366907,1.80184609255,1.78289636724,1.89488731565,1.96450009603,1.85796633901,1.94641296537,2.28440337085,2.2784855409,2.35040705171,2.64384039203,2.47777049598,2.44457342378,2.46617215897,2.63728769922,2.54019398499,2.48356151033,2.63590319087,2.53631394171,2.81126059089,2.83174873005,2.90931878408,2.88003465687,2.99673120214,2.9142645705,3.07520752915,2.9993311551,2.11602320743,2.07324264183,2.20907509357,2.11759974806,2.79459025895,2.96645850433,2.86974300017,2.79533644281,2.95886250681,2.86293416118,2.56831807173,2.66827107578,2.70357649628,2.62488364771,2.53171238211,2.4568638145,2.62861172299,1.72788706454,1.61726448457,1.70784665141,1.65303792872,1.5576804674,1.54178496977,2.3649073789,2.29248297019,2.31095464992,2.52170341837,2.61732959188,2.46216441801,1.96950284438,1.92093281267,1.82269954436,1.77581181064,1.76774580648,1.82181804965,1.91690456922,1.80389281747,2.10461962889,2.06376995676,1.59834747348,1.65495993224,1.45028154566,1.49734596296,1.56645982517,1.54969886524,1.67493362055,1.75241758746,1.63444693144,1.72848994605,1.90189879632,1.71686330668,1.7890865373,1.88128004016,1.15279753701,1.13882471788,1.07384013259,1.04175976131,0.955899631132,0.972180468263,1.15474623031,1.13877861392,1.29808388659,1.47272719067,1.4086154843,1.32246175443,1.45445950227,1.36620067419,0.34881874316,0.404883166008,0.398081556916,0.560508313604,0.636388317595,0.536232411535,0.491623955621,0.574766469401,0.673156187393,0.665215864768,0.593479025709,0.497767345949,0.486314667695,0.992799184525,0.894203922861,1.01721272126,0.935458156198,0.855695278581,0.853226929957,0.717768867303,0.752569213838,0.790123521544,1.08960886189,1.02078727708,1.06476262755,0.967123175016,0.890930735425,0.920320522132,0.348267760053,0.422653104111,0.731028005372,0.772351141415,1.22858427356,1.33481321495,1.24613526226,1.18803121463,1.34637697798,1.39479189922,0.777808532747,0.931089396606,0.871449333664,1.04717070808,1.14598573541,1.06510047684,1.00522660061,1.16472429104,1.20417221136,2.32861457067,2.45009595556,2.36144847928,2.3912331892,2.5187347413,2.49250705809,2.10665482544,2.20017015011,2.06443433428,2.11437795219,2.25620308765,2.21224780857,2.36051059455,2.26017086737,2.33575302192,2.402421836,2.23685462018,2.20268829782,1.69264181985,1.39733196695,1.47047377169,1.41951354048,0.965687056863,1.03267820726,0.841515149034,0.864511513496,1.00425559878,0.914317872176,0.180208645074,0.320334335483,0.276004466949,0.0103118360256,0.112545019408,0.494970178565,0.104665905392,0.164379969024,0.689635685506,0.775270197356,0.673011125182,0.627225027554,0.37759123694,0.388958471721,0.286216662103,0.188241813187,0.571419744158,1.16408219291,1.49254576725,1.47504651225,1.37262999055,1.41315576576,1.32230472203,1.36747069285,1.38119049522,1.47182523071,1.48295872974,1.52866557668,0.736509383756,0.766127879344,0.576220149988,0.646364646366,1.24057539301,1.18553244705,1.31232500099,1.28909665834,1.01262652854,1.11031582977,1.1424431482,2.62809919648,2.59349659581,2.50183228326,2.54789248206,2.44609297397,2.43217556388,2.73494713271,2.80108441953,2.82191540233,2.69784534223,2.62358063121,2.64144255191,2.28903986397,2.20457710348,2.20524782072,2.29252475809,2.38611357788,2.38176934467,2.46775309751,2.34686843452,2.36825683953,2.4141830842,2.51249938175,2.54583753554,2.72878653126,2.63532668449,2.74690488457,2.65969882922,2.57095254398,2.56315228468,2.2087758321,2.24894660995,2.34941855593,2.25803172538,2.39395819738,2.34177664339,2.38174325983,2.4642589381,2.54260323271,2.51561471099,2.35887777393,2.41574082089,2.65515249871,2.76570106949,2.75227098803,2.67562100907,2.48397648333,2.41216698905,2.40458464831,2.49943443753,2.58811475799,2.57976395459,1.89488107906,1.92463533277,2.0133508397,2.07814196287,2.04844069045,1.9540376988,1.51757237948,1.60968724519,1.45944722337,1.50630112611,1.66668536588,1.62113474349,1.8419019987,1.82707839106,1.67448349552,1.76425392159,1.65930600271,1.73436141947,1.09365357286,1.07278281425,1.04195702688,1.04573090619,0.258567867427,0.0787725599242,0.150712957154,0.229786196632,0.677783545524,0.643737968713,0.777534107933,0.806798431268,0.72860389276,0.473402291137,0.603879393621,0.512765600257,0.439757785691,0.632283574553,0.573338358331,1.82345239532,1.78834281866,1.92525142233,1.98120532204,1.61990361061,1.69053203406,1.53617708754,1.51372026172,0.467600840888,0.438680301874,0.338714043557,0.481034849242,0.295884025156,0.195969052718,0.185954152475,0.285450408752,0.368521738986,0.372853429143,0.207575183808,0.158325887828,0.23533067065,0.323340268617,0.359842398443,0.313807438993,1.23234376714,1.24901290972,1.35380202917,1.32062867512,1.42386307811,1.44046797215,0.562760328252,0.612363060357,0.711274201606,0.755782342516,0.706965261375,0.613832897999,0.946136101426,0.850073500312,0.786943577745,0.827624612573,1.08086689794,1.07549737828,1.12441515926,0.976381217754,0.926612034453,0.98262858517,1.06115758157,1.02555734095,0.932549236464,0.873668780173,1.01022076927,0.9161849355,0.959563386799,0.97105258994,0.902109857959,0.874343409215,0.875369955677,0.796650122804,0.977464891462,0.96412897376,0.90476826139,0.813302261932,1.78386957924,1.93404066263,1.84351786345,1.58574524923,1.56454076121,1.63850844573,1.62958217561,1.7389869025,1.64819813256,0.311643224822,0.413709322278,0.257070938853,0.323134832419,0.460581676979,0.42017138893,0.544468224131,0.710075772618,0.745989405454,0.723476544838,0.779209896671,0.624296261686,0.795388327733,0.632524441411,0.709433159572,0.65340255563,0.746480709458,0.811710428205,2.15394363363,2.19377391092,2.22661726128,1.81079372602,1.73580676335,1.68170365039,1.70325284156,1.75798671849,0.652799758584,0.544503209718,0.632741559209,0.585919821341,0.486370539308,0.464098396535,1.90851219416,2.09820114528,2.06370539078,1.97254843071,1.85749638152,1.9333108424,2.05473878692,2.03144487755,1.81571291739,1.79844845693,1.90850631407,1.87657280498,1.99017303578,1.97541508973 }; const double THETA1010[NST1010] = { 3.49412297161,3.38185430939,3.01184372088,-1.45249496318,-1.38352336827,-1.01175831029,-1.17880039335,-1.24862026344,3.15026286033,0.284627166574,0.328927843406,1.21938729691,2.02914391835,0.393946778077,0.749791391831,0.687045239757,2.3258398904,3.13413240755,3.41161231818,3.50150531862,3.34032170376,3.31084685632,3.37815224184,3.18505325903,3.20908420864,3.25663228625,3.348390433,3.38361570356,3.79652836111,-0.480873930541,-0.225010363515,-0.0436714432891,-0.0646604267266,-0.154601900375,-0.313081325867,-0.393016140154,-0.471015091695,-0.43681379096,-0.340046324418,4.69536912894,4.62696524833,4.53134457715,4.29811163882,4.46165070205,4.24263060342,4.21972549015,-1.23223354117,2.96168847686,3.08301258293,3.0631097309,-0.581925596438,-0.472733109178,-0.585620399048,1.00433623242,-1.41624414369,-1.35038989609,3.15010483073,3.04390188475,3.28009107652,3.28209100496,2.92241167105,0.0517798508984,0.124468716778,0.248860734034,-0.772450823336,-0.0676233465669,0.353856017664,0.310142827926,0.373765266075,0.479161659325,0.450407150876,0.497833830903,1.6965748563,2.03625044635,2.01592935686,1.80797400453,1.18711045308,1.65006520023,1.85559341871,1.68814500284,-0.547857765499,-0.781789134549,-0.730981303014,-0.164289411768,0.558909226464,2.71817499664,2.83872279151,3.44545026914,1.16594732202,1.04532800089,1.09181467335,0.989749207473,0.788741895318,0.92664922123,0.829799191722,1.50902857349,2.40711828874,3.06694978812,2.90116367246,3.03072706551,3.00400562526,3.47285124593,3.62729937262,3.53252133233,3.56573377959,3.70902392329,3.68487998655,3.65474414665,3.81286292083,3.72448327966,3.82381941853,3.78295430028,3.84094719132,3.92735861611,3.26026500338,3.36210608981,3.26984178867,3.16511148437,3.23470962607,3.30456143081,3.12822380855,3.09355386239,3.29135946205,3.10430913002,3.13622829694,3.22817774296,3.00556077366,3.9967282628,4.17037810277,-0.475757312823,-0.426490275004,-0.418467857116,-0.308705923314,-0.176269989909,-0.0967101741045,-0.208264600607,-0.116506992827,0.089928107502,0.169604751445,-0.385574508966,-0.3609894183,-0.288643345079,-0.276834109269,4.70580465497,4.65426206139,4.40010353065,4.49951251533,4.28712167808,4.33916142175,4.3684352228,4.13119673894,4.09124781144,3.98777695658,3.94248408863,0.374692959312,-0.737142065448,-0.6489412029,-0.599105536491,-0.877560003498,-0.669562236466,-0.792826905786,-0.833828547427,-0.762183448238,-0.0273583401125,-0.205971524994,-0.0719367999755,-0.248704569798,4.24367930282,4.63296878416,4.5901066123,-1.35455693106,-1.55150758214,-1.49726086979,4.66906575708,4.64709513727,-1.19828926508,-1.09792278917,-1.12533527052,-1.06020663212,-1.33178708062,-1.40115399355,-1.53088627056,-1.50257690641,4.00371098061,2.59804178282,1.37620239725,1.25005501112,1.2262207489,1.40907547944,2.63357171301,2.77836862396,2.8761696558,2.93990802574,2.95878471215,-0.557548647425,-0.623713348594,-0.633561515095,-0.637120504344,-0.582370396688,-0.736260885417,0.463288917594,0.654155755029,0.565841564866,0.0115986365891,-0.0934465593555,0.0519387519324,0.0853865525745,0.0953532110779,0.00429598100368,0.165719616346,0.142161643873,-0.0232047048847,0.0438689898342,-0.280527122301,-0.158333277034,-0.322287220633,-0.262621332351,-0.120704917771,-0.182768371182,0.49388321223,0.575428864502,1.76016407317,1.85106700143,0.964918481898,1.07798847114,1.0456331901,1.95286211113,1.91775418333,1.83763104185,1.90776174741,1.8751442905,1.76101317362,2.00612438664,1.7133979291,1.79055805637,1.49976795652,1.58644460836,1.99218574587,1.61034908446,1.90142066348,1.70954948293,1.35328483768,1.53045585881,1.42025800077,1.59049695159,1.68773044134,1.58252293386,1.6916009294,1.73415143757,0.67987926501,0.672175186323,0.748683479335,0.756744738156,0.843191116506,4.42833270149,-1.10299134276,-1.55025689097,-1.39621259252,-1.52329526725,4.54097662479,4.27271862235,4.38717030987,4.47719195376,4.4430919407,0.766530862933,0.945589903267,0.90471197115,0.918638224906,0.844977906197,0.0475092847348,0.117193214274,0.333518931116,0.394665724924,0.234973193864,0.207361880822,0.603046795304,0.513611638406,0.645658478554,0.771325368482,0.748433977747,0.807505840022,0.535888588399,0.492416755368,0.636589935749,0.679037635606,0.52619422157,0.612832597407,-0.943542863814,-0.911335516461,-0.784232296121,-0.667746414453,-0.628274759372,-0.674305413233,-0.831474277803,-0.824517271486,4.38688728571,0.147033774659,0.451966291111,0.406139789513,0.277293755339,-0.12144184236,-0.154442130004,-0.108101777063,-0.157805960993,-0.0260493243043,-0.0512831550244,-0.218862448094,-0.345727951422,-0.242599529155,0.624025585468,0.807993290964,0.689868163895,0.526850111191,0.466136723858,0.688090953794,0.634734080747,0.63216665478,0.517045816449,2.3665296053,2.18798032549,2.57425940461,2.17378376632,0.393042828594,0.339872297085,0.0299246175458,0.158390500489,0.25425992455,-0.251946773873,-0.0401637078798,0.227404713399,-0.153656903595,0.0445230038764,0.973196782236,0.798188406957,0.858971933283,1.01623757744,0.845562442333,0.950363865334,1.3008487003,1.4059241347,1.12652607313,1.16200081666,1.20317433747,1.27023608799,1.32031547325,1.35155113617,1.36932138682,1.18555769332,1.41353604071,2.24665780458,2.33366021886,2.44403020843,2.42960726795,2.83132447528,2.58449699739,2.54816410189,2.5705003361,2.68280699951,2.63458717783,2.61564699362,2.69547830876,2.49988161656,2.51421024135,2.88925023312,2.96419082442,2.74402638969,2.76895943895,2.99097125234,2.95956575067,2.86261504643,2.79384435341,2.82280602016,2.92364752899,3.40965648105,3.44162434067,3.61522280328,3.44938419672,3.54219816658,3.61489185304,3.54463838069,3.68649736821,3.576424758,3.93030718086,3.88524269914,3.78265831512,3.71870892956,3.86751540988,3.75745862031,3.11582472463,3.16326898712,3.25909996758,2.81993088254,2.64795722057,2.93713274099,4.1877979709,4.1005665343,4.10937453765,4.22182139455,4.08049162123,3.97925539553,4.06471075583,3.99448941532,3.89699205622,3.89628181219,0.071976703007,0.169797911343,0.0010617693902,0.0275032992297,0.204188165091,0.133470324172,4.53711471759,4.3347867236,3.96617036604,4.04499508037,3.94368451857,3.9027460258,4.19819701517,4.24201633193,4.06058350136,4.09786353394,4.12480113831,4.20668991105,0.694727023251,0.495121101724,0.399408699509,0.726972309876,0.469407558848,0.606917480886,-0.475200166396,-0.61021680664,-0.388682382322,-0.282481153669,-0.414336514085,-0.413735396469,-0.475966574513,-0.24513182885,-0.295261315923,-0.227479631224,-0.105111289094,-0.06225135,-0.133577963347,-0.311047863756,-0.594086077019,-0.354587231493,-0.440447528529,-1.27751666661,-1.32471246433,-1.04004124625,-1.07183529136,-1.49538323639,4.69550320098,-1.25992861767,-1.40946593894,-1.37803677053,-1.10194415009,-1.2701182481,4.42682815363,4.37099114095,4.64286831381,4.58652975752,4.56949899298,4.45238372954,4.62868023735,-1.50118392024,4.70997380211,-1.26535351563,-1.36892235921,-1.30238399778,-1.23054952942,-1.44401151316,-1.41237176186,-1.36290683554,-1.42167072292,-1.49021777548,-1.46098581819,2.74688373218,2.82379007852,2.34741782843,2.51302015259,2.42521816451,2.34407939931,2.47477314397,2.61518863029,2.56864487154,2.46407461257,2.34921856757,2.34885694543,2.00709353416,2.12933568021,2.23247821077,1.82670594228,2.04422862987,1.57694968864,1.45518421423,1.49692880159,1.36431873032,1.36109977726,1.52979764381,1.7305422856,1.61706537192,2.1726303062,2.32845203298,2.44315960166,2.16316157137,-0.778685033538,-0.718366244995,-0.792459422574,-0.956266864582,-0.895986272025,-0.914152820534,-0.806001358144,-0.745232565866,0.644530553105,0.741460601881,0.739289608714,0.624330922646,0.0966866166454,0.133006176005,0.188776842424,0.247571389314,0.33567216047,0.435175574679,0.446478021649,0.258012630224,0.277425329914,0.366684458246,0.193230615013,0.217253281823,0.273741921333,0.377706912846,0.398374783768,0.318859057619,1.3197508554,1.27091384714,0.839169936714,1.01409099163,1.18604845383,1.79951159766,1.74782731063,1.64103185344,1.65279499168,1.7227367857,1.8312256371,1.81811340163,1.10457675781,1.12841402357,1.06514327367,1.20239362455,1.26374761465,1.22961081287,2.25907233108,2.17889675347,2.0822925705,2.25251638372,2.25883846694,2.17557316888,2.14872792233,2.06213306207,1.73703291797,1.59600755102,2.07258440007,2.23825598942,1.59291607599,1.55286975311,1.4642382303,1.48740974603,1.31895947917,1.39958537195,1.37000880132,1.5284123261,1.52057551705,1.59541160042,1.01612167561,0.928663465241,4.36579028568,4.41481962124,4.35666870746,4.25124535937,4.09241398532,4.03694770064,4.19906171257,4.25471664944,4.09133835739,4.20343146554,4.60369505838,-1.43120565151,-1.34752446307,-1.40568969231,-1.19214050001,-1.13735954293,-1.21730255133,-1.33483509681,-1.50394400996,4.6073459215,-1.56413372217,4.58557404467,4.69947296437,4.56218719401,4.6628082239,4.52150490382,4.58434730129,-1.55407798485,4.69168312782,3.72613176331,4.22239484622,4.30136836858,3.60893217243,3.82595875573,4.25936676146,4.11841258729,-0.491846282822,-0.535646381786,-0.394809389332,-0.282578755007,-0.247619480398,3.48072147392,3.7861171243,-1.52315145278,4.38242664217,-1.28476446364,3.98940474861,4.35297316046,3.72357320642,-0.439595184189,-0.545299491109,-0.657123419474,-0.651248255361,2.96329710389,2.59501354287,2.47023099692,2.67540444579,3.1460392308,3.20198579826,3.26861643974,3.25384270002,3.04143563381,2.69399616762,2.60853944317,2.69302704706,2.89632668994,1.42999563183,1.54653506035,1.52935388871,1.35957128645,1.38629908117,1.47438287199,1.10235823811,1.00590372784,0.88140902213,1.19885116531,1.18714492189,1.07351728843,2.06031905109,2.1537896607,2.15334351336,2.06787599588,1.89139289057,1.97737073665,1.96942671659,1.79470502138,2.35441476176,2.25260470225,2.48202473145,2.40136355956,2.41467063077,2.48885230709,2.71274907391,2.63382518526,2.74043108936,2.67394795191,2.56752709071,2.5793465235,3.57935074895,3.50717916998,3.44237229334,3.47658973947,3.42154597194,3.32270417812,4.28473691626,4.48673300989,4.41439590314,4.30902817341,4.35869642557,4.45651170656,4.52009027403,4.48351005215,4.40158363304,4.41496396085,4.58087674982,4.60368086826,-0.12925540416,0.103289805489,0.369056631318,0.207461807297,-0.129588399075,-0.135548763741,0.0542907951153,-0.608907277734,-0.834400573563,-0.6865658509,-0.945716131427,-0.90199447208,-0.704587125148,-1.3507617201,-1.34084287689,-1.46758718934,-1.54070130734,-1.46245233642,-1.23650229887,-1.11313298448,-1.2385471066,-1.00367041446,-1.08802607526,-1.16049257242,-0.980161099666,-0.944515067207,-1.02761352623,-1.13624955123,4.41161581739,3.9011808778,4.13781325659,4.00914075127,2.69221007273,2.68217437303,2.85770092065,2.78942160423,2.84450921084,2.76547547089,2.72582286184,2.78150981661,2.69095955013,2.44652403337,2.43842200601,2.638113266,2.55105117192,2.61820633755,2.52268702199,1.80891344648,1.64159683437,1.67128093326,1.91991190092,1.76035013071,1.90331070551,1.95303386348,1.94446731876,2.05709853631,2.1564812701,2.0498156444,2.1581614431,2.27869842752,2.2679921515,2.50652128466,2.40559894439,2.48068467913,2.36785079364,-0.591555669427,-0.936438912131,-0.875873829289,-1.03495027539,0.541601333376,0.449370889204,0.409486397203,0.524550821748,0.337024935176,0.315537321868,4.39909644281,3.91346879948,4.22423371398,3.14619556995,3.94482736598,2.88234904609,1.94131748744,2.43975280873,1.11992011622,0.854601117542,0.860822323981,1.00074660085,1.46594106651,1.23034468466,1.61686530683,1.46226038037,2.50381182855,1.38495356042,1.23368952992,1.32225952383,1.34381006471,1.16862260423,2.01536904907,2.09536148695,1.93116164633,2.08863446263,1.923509769,2.00115219383,1.82554719136,1.97106219741,1.87083790714,1.76372325471,1.10906097726,1.29285639575,1.18767708089,1.2747520086,1.24008022764,1.2163603876,1.11906800491,4.57011373889,4.38928926972,4.38944893533,4.69593681243,4.6394398016,4.50953648662,-1.44470227258,-1.04093960807,-1.32445425101,-1.00732265737,-1.15840068755,-1.33709484563,4.09244155866,3.91401543693,4.03259932851,3.84529681109,3.90149222137,4.03237768744,3.68252911423,3.5188926329,3.64267459667,3.4089555646,3.41743525972,3.57019567438,4.16973674844,4.20640426005,3.92118395283,3.80573764644,3.90129180366,4.0688128715,-0.431626512857,-0.313573537211,-0.542412972946,-0.543205868099,-0.406749784512,-0.289976291731,2.90967626834,2.85350088254,2.96303500525,3.13176886658,3.04668650617,3.1533793023,1.0053729775,0.710805832652,0.962155195725,0.597442487492,0.923167374745,0.688398587905,0.830705680976,0.612743751466,0.696476573561,0.870336316793,1.78312245365,1.68018972102,1.66386108765,1.75331013354,1.8586727712,1.87159190402,2.16426563518,2.31906943458,2.25100940083,2.32559670623,2.23741330415,2.15711385381,3.74269456495,3.64254223069,3.76396510503,3.80362100705,3.66510638704,3.6050965899,3.59618156314,3.49451886229,3.16941040089,3.28178240267,-0.123096364882,-0.125693979992,-0.782932949528,-0.53574293722,0.00262373186949,0.155993640792,0.0183142510909,0.154566493937,0.244335908137,4.0774810197,4.33501243162,4.41887754511,4.2967557623,4.16841497781,4.04188053065,-0.46754565797,-0.553857305152,-0.45507784495,-0.545359006559,-0.755934231491,-0.695582455351,-1.16750163504,-1.07021659011,3.09598847731,2.73073113883,2.73206582607,2.52369862362,2.98533316338,3.01028474204,3.49253708166,3.63008855806,3.44310578092,3.19237657085,1.02539095259,0.515386171422,0.289407239508,0.502794662317,0.79373144299,1.01953613773,1.53951096732,1.45069261453,1.42839919437,1.60085871345,1.57877532201,1.49440976905,2.17877104007,2.04366388497,2.07795346218,2.21759393137,2.34466842809,2.33976393009,1.15705772475,1.1878974509,1.09049678192,0.963834582819,1.03135388492,0.840071076027,0.933618816573,0.842683500805,0.949914154411,1.04463657666,3.79184332454,3.68481728628,3.67104568194,3.77554464547,3.89379468815,3.89178894442,3.10868119628,2.98526375128,2.90788728939,3.17111120451,3.30114065345,3.38534232777,3.46448470855,3.34917626831,3.55121528687,3.52223122224,-0.722207175994,-0.642533519781,-0.638589877682,-1.00863028549,-0.912397055945,-0.853185088139,-1.19853631098,-1.32385425692,-1.29474268735,1.90461442705,1.94453584417,2.22322264596,2.424114037,2.15705542259,2.34248700183,3.19645344029,3.33554881491,3.62945529,3.88567064901,3.76436964299,3.88593435802,3.10274952833,3.10125104304,3.17953937897,2.93029231625,2.87069013848,2.96065251749,-1.07154067638,-0.8731319149,-0.986294860772,-0.812869937883,-0.883212327806,-1.03900834146,-1.1320122608,-0.973192672838,3.60352866494,3.38910406659,3.44311889338,3.73683950913,3.71733044613,3.52256154976,-0.829963340814,-0.858829554727,-0.752100554956,-0.743495674764,-0.997751889681,-0.925345666341,-1.04559169623,-0.945236544395,-1.25491737739,-1.15882748892,-1.28320966551,-1.09089726049,-1.21505856038,-1.11815161832 }; const int NST1196 = 1196; const double AREA1196[NST1196] = { 0.0105413280503,0.0104684519079,0.0106691150452,0.0103394603654,0.0103664994121,0.0105256950535,0.0105122734251,0.0106738694517,0.0100294481215,0.0107387747231,0.0103714552469,0.0102553599552,0.0108393971118,0.0100254841885,0.0106813192593,0.0108000767359,0.00996876674383,0.0116690910713,0.0104894586529,0.0100870699359,0.0103024258835,0.0102543865634,0.0104841027585,0.010370849411,0.0105334564756,0.0105733679033,0.0105395048446,0.0111017191903,0.00982437570698,0.0104734639299,0.01058292671,0.010761337823,0.0100814243555,0.0102489960059,0.0100766263298,0.0100708166792,0.0109961564616,0.0101003056023,0.0102030450105,0.00999864780198,0.0106810620315,0.00989274892885,0.0102105016332,0.0103985820081,0.0103397354438,0.0107401556934,0.0110557964424,0.0104527915134,0.0105768727994,0.0107396469992,0.0102084948769,0.010400693081,0.0106007057951,0.0104944960259,0.0105845336627,0.0104131811371,0.0106054613707,0.0104764313124,0.0106024853212,0.0103473693542,0.0106511463271,0.0107398702769,0.0104174349402,0.0105692941786,0.0104133143245,0.0106676889015,0.0106739545143,0.0105578510927,0.0104540566879,0.0103487721351,0.0107639906508,0.0102549418747,0.010221418405,0.0107226846025,0.0101819883419,0.0106037370125,0.0104032094461,0.0105631930731,0.0106373054183,0.0103275797804,0.0108041690475,0.0102778224321,0.0107507869777,0.0102028794199,0.0100683229828,0.0103393960485,0.0103319454066,0.0105326927412,0.0107138536692,0.0102771441278,0.010397955464,0.0103885572623,0.0104558967874,0.0103578584587,0.0108559790899,0.0107349105976,0.0105563043499,0.00996571182433,0.0104489201232,0.010450217357,0.00985655555083,0.0100949377995,0.0106590914123,0.0105325707841,0.0106435995496,0.010428294729,0.0106167297473,0.0104901182397,0.0104559364111,0.0103438008893,0.0106557354763,0.0104097313614,0.0104741261666,0.0107473613022,0.0104235775329,0.0104859044507,0.0106835082259,0.0100245402692,0.0102322530641,0.0104577375395,0.0104465599201,0.0106543315422,0.0106106531093,0.0106193985011,0.0108439513215,0.0103997046333,0.0104710557648,0.0102720391437,0.0102888217542,0.0106873263584,0.00987433435392,0.0107463142361,0.0103814359287,0.0103601233673,0.0106930550552,0.0105205752269,0.0105460779841,0.0105710474284,0.0105490914623,0.0100186299285,0.0100223136968,0.0106977558575,0.0105149625334,0.0105473287249,0.0110518157187,0.00993869851403,0.0105164054639,0.0105260357096,0.0105634334051,0.0105676410737,0.0103681048245,0.0105438919582,0.0105392784988,0.0106394395784,0.010442023957,0.0121027854162,0.0102942780059,0.0105125387183,0.0106771865372,0.0105553392779,0.0106890632829,0.0104110504342,0.0106597983192,0.0103859192589,0.0106835248333,0.010441230153,0.0106544599268,0.0103605174719,0.0107235192019,0.0127631379934,0.0105671148665,0.00998227870515,0.00990562774348,0.00997504259897,0.0113405288869,0.0105821372483,0.00993909399229,0.0104894151544,0.0104164648344,0.010046550741,0.010488139058,0.0123317484939,0.01027833154,0.0122146886712,0.0102847272445,0.0107121221424,0.0105800618209,0.0124849653291,0.0106877930344,0.00975210980363,0.0106028714768,0.0104556333156,0.0103280693403,0.010555217428,0.010546479007,0.0103500870003,0.0105118409917,0.010756676416,0.0103527546049,0.0104932588313,0.0105552903787,0.0107843175455,0.0105513405432,0.010534363238,0.0104051757541,0.0108427652908,0.0102992011662,0.0102607420711,0.0103572048254,0.0106929960984,0.0104728811771,0.0102008475302,0.0101586476057,0.0107638510766,0.010341407631,0.0103819534185,0.0106776875671,0.010109141918,0.0109197310208,0.0111719366537,0.0102386791147,0.0103383778244,0.0106354331252,0.0104506213037,0.0106225881791,0.0106805304194,0.0105871442197,0.0104886717073,0.0106561286035,0.0106966541817,0.010482341442,0.0104386145726,0.010524072449,0.0105889832514,0.0100612010769,0.0105679105271,0.0106337267556,0.0103427682942,0.010482371405,0.0104812768048,0.0105540427753,0.0105326670512,0.0104119944991,0.0104968887546,0.0106000180295,0.0103847916202,0.0106625262926,0.0104322779155,0.0106536375604,0.01044497673,0.0110863139093,0.0104827856633,0.0106537377067,0.0104844572201,0.0105846131926,0.0102513765916,0.0104360229361,0.0106668066431,0.0106662599567,0.0103706016138,0.010483471806,0.0103604901782,0.0105261507867,0.0104922550924,0.010293515267,0.0106955907242,0.0121120747249,0.0107338050864,0.00990238136536,0.0104414002977,0.0105858478239,0.01036782393,0.0102529016619,0.0106648348898,0.0101810414926,0.0111502829087,0.0100633742783,0.0105987636134,0.0104280217727,0.0106480946281,0.0104894007919,0.0106619817633,0.0103828923064,0.0106920999957,0.0105562383272,0.010539079371,0.0106802953612,0.00986251518471,0.0106528646955,0.0104567304616,0.0104606990552,0.0103891834661,0.0107519664916,0.0104078396337,0.00986313007667,0.0105740454622,0.0104551815171,0.0104360528675,0.0104387098591,0.0106226615774,0.010494138006,0.0108076122362,0.0106336326959,0.0104211189729,0.00985909965503,0.010608742492,0.0106911476268,0.0102849762304,0.0101055598053,0.0104590759743,0.0107180344541,0.0107546567125,0.0102068741647,0.010352527791,0.010380357519,0.0121054256764,0.00993308839347,0.0103922123126,0.0104305471478,0.0106130578993,0.0106605225408,0.0104977140962,0.0107859349291,0.0105438370297,0.0107235701783,0.010400334144,0.0103978062185,0.0106750453436,0.0105879257424,0.0106383827594,0.0104668613804,0.010560879488,0.0104734969267,0.0105373391541,0.0105359322904,0.0107159571864,0.0106498590824,0.0107171758118,0.0103637349556,0.0106405747756,0.0103920179636,0.0102317456005,0.0102782711837,0.0102306424099,0.0104925772525,0.0105689227756,0.010483926767,0.0103753463295,0.0104160478235,0.0106840200621,0.0105343735995,0.0104591402475,0.0104285832236,0.0106291700945,0.0104209598998,0.0104844134777,0.0106096329812,0.0106238544157,0.0104482784385,0.0106186984166,0.0105152819691,0.0104696085581,0.0102165891398,0.0102265650681,0.0107111687503,0.010087790885,0.010055950184,0.0121859908696,0.00998887234291,0.0105847225571,0.0101845511517,0.010583818276,0.0106811472654,0.0103639164126,0.0102744809835,0.0105115085688,0.0104117514942,0.0104666543103,0.0105074083194,0.0107661629497,0.0106374597796,0.0103557751506,0.010838539556,0.012386203499,0.0098519961931,0.0108972997812,0.0105958406578,0.0103903427101,0.0105241813142,0.0105873507891,0.0105367535199,0.0105189028298,0.0103146454346,0.0107712040742,0.0106564603437,0.0104933648065,0.0105700804161,0.0105763980587,0.0106563920065,0.0104275972131,0.0108160031241,0.0103439504127,0.0107154427803,0.0105565308685,0.010630198451,0.0103731885801,0.0102653399914,0.0105003705735,0.0101308778079,0.0124036941446,0.00975012651035,0.0103608210502,0.0107562363389,0.010693388333,0.0105854055275,0.0104969328756,0.0107924617008,0.010487660126,0.0106483649869,0.0103361250072,0.010654020103,0.0103599343624,0.0104883030676,0.0102665137571,0.0101475821916,0.010678471239,0.0102130844556,0.0107305485524,0.0104864495754,0.0105253482066,0.0107052948703,0.0103916704198,0.0106536732303,0.0104230936495,0.0105316072465,0.0109520995472,0.0102741930634,0.0105725723158,0.0106714585309,0.0104765120086,0.0105682311644,0.0104909062794,0.0106088252434,0.0105430159499,0.0104855544749,0.0106082866387,0.0105732104379,0.0104971696456,0.010592038429,0.0103026755736,0.0106745377365,0.0107150514854,0.0105873230032,0.010424777474,0.0106550744342,0.0105415407532,0.0105117230158,0.0103800199665,0.0107175429258,0.0103859532634,0.0105379458503,0.0105270426654,0.0105515263399,0.010500333118,0.0106005440768,0.0103660576237,0.00980802571455,0.0113620920927,0.0106245643842,0.0104334035436,0.010329598081,0.010567320789,0.0108346452189,0.0103148955751,0.0104855509645,0.0103785059337,0.0103266793725,0.0107380333985,0.010684391394,0.010266088025,0.0108093373051,0.0105311288536,0.0106304099111,0.0104187531695,0.0109838707036,0.0109664653421,0.0102840128021,0.0107281428861,0.0104718412632,0.0100015547297,0.0101973852734,0.0106324823304,0.01030295682,0.0108257076284,0.0105818305079,0.0102422798949,0.0100156633482,0.0108529049915,0.0099186811474,0.011947755285,0.0103423799619,0.00975086178623,0.0099553625274,0.0103414997157,0.0104056584558,0.00988426643209,0.010839983236,0.0100973017971,0.0102744712831,0.010380528511,0.0107154208747,0.0102591498878,0.0103985101817,0.0107294002277,0.0099949789525,0.0105330067426,0.00994189742896,0.0100584644443,0.0120889247999,0.0104425624018,0.0106102445785,0.0104527409861,0.010567725271,0.0102648031635,0.0106153154444,0.0104836659766,0.0107387854974,0.0112039326982,0.0105278821051,0.0109046730295,0.0101053723756,0.0104250883762,0.0107611682881,0.00979927174551,0.0121046056762,0.00996610307903,0.0105558808275,0.0106437361603,0.0104486129188,0.0106185638146,0.0106464961465,0.0104299736777,0.0103614234779,0.0105630325274,0.0105373487319,0.010462021972,0.010585351089,0.0100830704425,0.0107206252568,0.0101410580733,0.0103905773728,0.0103477030796,0.0100003550479,0.0106710619174,0.010209934545,0.0107084345097,0.010417606439,0.0105304329252,0.010597984253,0.0106693760868,0.0106513151948,0.0104279499837,0.0104168183051,0.0106705304217,0.0104190772693,0.0104394605767,0.0104158069902,0.0104235291419,0.0106498050882,0.0106774434822,0.0104113523676,0.0104423571729,0.0104250364797,0.0106812778436,0.00990627952874,0.0105831162717,0.00968756922421,0.0110253938862,0.0100831132524,0.0104241656085,0.00992374366765,0.0112444602851,0.010185106792,0.0107664366133,0.0103870273504,0.0107241463036,0.0103288277731,0.0103765355861,0.0105109537345,0.0106148181256,0.0104335257378,0.0101040845752,0.0102095681338,0.0105408871352,0.0103548399625,0.0103560881543,0.010713066672,0.0104478248407,0.0105571148082,0.0106499277693,0.0104206672871,0.0105716798689,0.0105113049448,0.0103487552328,0.0107325370461,0.0105038892254,0.0105008956066,0.0104700406048,0.0106607999616,0.0104229252321,0.010448662818,0.0104671488292,0.010609876302,0.0103277702961,0.0106426133629,0.0104132535637,0.0106454293402,0.0104252797638,0.0102252846112,0.0100452891149,0.0108877323263,0.0103731377656,0.0107702572502,0.0103078405523,0.0107796520019,0.0105602083783,0.0104185209142,0.00996993476542,0.0107684101339,0.0105925272523,0.0105947263945,0.0103901124666,0.0104010734091,0.0106506960627,0.0104072781116,0.0105040722234,0.0104496275521,0.0105978870986,0.0104523241581,0.0101359314312,0.010382134515,0.0100961237461,0.011028047347,0.0102111179231,0.0104575438696,0.00989210264954,0.0121884169609,0.0108409569567,0.01008101151,0.0108211418058,0.00983811937558,0.0105049661349,0.0105481527556,0.0103742814291,0.0103290190904,0.0101674150994,0.0107159643187,0.0102845002715,0.0108108566825,0.0101311660911,0.0104019052027,0.0105515664498,0.0103901433962,0.0106668470989,0.0104942342364,0.01055761588,0.0107187080098,0.0103056891575,0.0104837293244,0.0105448898193,0.0106462796862,0.0108835963517,0.010164877824,0.0106201050646,0.0105131476348,0.0102683583027,0.0104715701143,0.0103950700898,0.010653863042,0.0103334941363,0.0106147942465,0.010520770888,0.0105355621432,0.0105660663749,0.01047343553,0.0103521805225,0.0107227920353,0.010636203717,0.010368233075,0.0104736826421,0.00992933927643,0.00998247662066,0.0107164993204,0.0119350668724,0.0101341494313,0.0104565542623,0.010614703803,0.0104744019878,0.0106246008299,0.0104576065787,0.0104308294043,0.0103576571522,0.0107020135743,0.0103025696882,0.0107885969657,0.0105985589875,0.0108470249904,0.0107302905359,0.0102952921546,0.0108442348443,0.0104022214346,0.0105059743883,0.010636563418,0.0104085790967,0.0106989270208,0.0104625678035,0.0106490966891,0.0104779166956,0.00991922454857,0.00989127327126,0.0100250054226,0.0100130552231,0.00989710390356,0.00990478906271,0.0107212419638,0.0106103839471,0.0105881343174,0.0104649682234,0.0105864854082,0.0107089204725,0.010678033688,0.0106627881132,0.0103171822978,0.0104849625947,0.0103454061017,0.0106434175356,0.0104113424232,0.0106240277513,0.0104098906882,0.0104000787281,0.0106567581777,0.0105646859665,0.0105996419194,0.0104712134939,0.0104234096708,0.0106540559454,0.0103311974067,0.0105336043315,0.0105515972872,0.0105807496846,0.0102906901698,0.0107878749055,0.010549665599,0.0104908508138,0.0103972171676,0.0106226870701,0.0103898215253,0.0107092594412,0.0104848609032,0.0105882121625,0.010372898023,0.0101907743406,0.0107873833992,0.0103323753953,0.0107506867555,0.0102117466316,0.00993134469103,0.0118288474602,0.00986165372906,0.0106730003727,0.0102131130267,0.0106859171585,0.0107051384643,0.0104091973814,0.0103147466621,0.0105613589243,0.0105255823908,0.0105547492197,0.0105257302438,0.0104037127495,0.0106917279181,0.0103842368866,0.0103746935207,0.010429331209,0.0107146086584,0.0106862486665,0.01048207846,0.0107082975786,0.0103189214095,0.0104783336899,0.0105548042522,0.0105379364863,0.0106249722437,0.010567030543,0.0105008654284,0.0104665714022,0.0105303471105,0.0102075487131,0.010163179351,0.0109879481843,0.0104590777437,0.0108326882656,0.0099927628168,0.0107214930949,0.0103765908392,0.0107963313957,0.0103859529987,0.010366240048,0.0107280495156,0.0106081984128,0.010450240417,0.010909569138,0.0102338304927,0.0108521811689,0.0104374983246,0.0106522421913,0.0105748162297,0.0105196941536,0.0104787622014,0.0106587431614,0.0102418028122,0.0107417448794,0.0103183904545,0.0104754975504,0.0105203257397,0.0107758616695,0.0103545784599,0.011001551931,0.0106234067554,0.0101458865395,0.0104906426879,0.0100790112266,0.00997541396784,0.0105717740092,0.0101916180047,0.011061627555,0.0105204010191,0.0104525903401,0.0103533758628,0.0105850637925,0.0105143514807,0.0105239734866,0.0101339928103,0.0108239134994,0.0102471852393,0.0100071046877,0.0102607695621,0.0103784375921,0.0104146508648,0.0100757633503,0.0107903489411,0.0106532348968,0.0109935612077,0.009929218254,0.0101499644422,0.011066623662,0.0104166265839,0.0104385259966,0.0105178053048,0.0106262175263,0.010418927001,0.0107139964448,0.00994313880125,0.010643044951,0.0103043192597,0.00987408520473,0.0104152249917,0.0100420258721,0.0105428657625,0.0102908029576,0.0102372203453,0.0108287397893,0.00996229435401,0.0104084234093,0.0106466521393,0.0105716621788,0.0105585106762,0.0105449045226,0.0105052022736,0.0104402866901,0.0104496878729,0.01064033243,0.0105394867609,0.0105932841602,0.0104665679119,0.0105396801485,0.0105133278243,0.0106843527232,0.0105324531161,0.010345531399,0.010784182541,0.0103275819064,0.0106541212123,0.0107289797921,0.0103822794666,0.0103091198923,0.0107208323627,0.0106693211005,0.0103638255549,0.0103821838656,0.0107363554369,0.0104175182518,0.010689078604,0.0104047653132,0.0103560552053,0.0106975838551,0.010417187991,0.0103549818581,0.0107821722519,0.010543153753,0.0105397163908,0.00997695301573,0.0102562423637,0.0104647284513,0.0101783600522,0.01046999537,0.0106095318701,0.0106519469543,0.0104418344933,0.0104278686863,0.0106428618114,0.0106381646342,0.0104215073793,0.0107055385399,0.0105036468338,0.0103657071103,0.0106985755366,0.0104601719759,0.0103178922649,0.0107378698701,0.0105759791294,0.0105915666036,0.0104664040791,0.0105960907137,0.0100688387961,0.0101420689437,0.00995721916397,0.0126502040572,0.00986303026052,0.0103900083935,0.0101631909766,0.0107870962719,0.0107220117559,0.010362194416,0.0103656409005,0.0107171695681,0.0107942424079,0.0109114381706,0.0103217584572,0.0106394632545,0.0108275571859,0.0102993603503,0.0101031258984,0.01029644255,0.010194137422,0.0110847895735,0.0106056448133,0.0104447371265,0.0103108042388,0.0106835698109,0.0105484902106,0.0106420309846,0.0105739698147,0.0104450314481,0.0105665651767,0.0105267569441,0.0108582233585,0.0100157484839,0.0103287825216,0.0103580097878,0.0107676594033,0.0102350183492,0.0104200613453,0.0107943005828,0.01061001635,0.0104432231174,0.0102620458187,0.01074074281,0.0103557392302,0.0102267023788,0.0109437258763,0.00998568820048,0.0105123278531,0.0104989176643,0.010492289828,0.0106016397796,0.0107174018357,0.0104430735479,0.0105689421919,0.0105378739185,0.0104425018359,0.0103828649677,0.0104119645856,0.0106714432754,0.0104412019371,0.0106699189407,0.0104147937356,0.010437277164,0.0105880700834,0.0105217491498,0.0110562257497,0.0105563399039,0.0106241491893,0.0104876163215,0.0103810054003,0.0106984524735,0.0104021187195,0.0105692420448,0.0105019155161,0.0105418172561,0.010699466536,0.0100423266327,0.0103761360446,0.00985667890422,0.00999199598108,0.0105316282455,0.0105739456971,0.0105929522968,0.010510312118,0.0105861478761,0.0105515537672,0.0105475195892,0.0105296505571,0.0103952432968,0.0106852822386,0.0105460073128,0.0112915970621,0.0103139288665,0.010706741432,0.0103127903612,0.010715614148,0.0103470180004,0.0103877115346,0.0107079185885,0.0104348854557,0.0105735676763,0.0103480768755,0.0106606847913,0.0104756773659,0.0105942651619,0.0102539697446,0.0103924589355,0.0104840815671,0.0106563792819,0.00977996205358,0.010856977039,0.0104821689963,0.0110848608707,0.00990288979203,0.0111748762927,0.0100734300484,0.0103199973845,0.010661143181,0.0107719809971,0.0100106249864,0.0103783372224,0.0103948463042,0.0104641648236,0.0105968260736,0.0105622355168,0.0104597360585,0.0106738594487,0.0103125707824,0.0102550813313,0.0107548419136,0.0106234847672,0.0104440004807,0.010507127359,0.0105965477158,0.00986195320277,0.0105202956167,0.0105257387212,0.0116282204944,0.0103918430359,0.0123132813577,0.00989134829845,0.0104834586074,0.0107037756302,0.010118839989,0.0101238686413,0.0113031732712,0.0101294334197,0.0104912948816,0.0103622547448,0.0105276236603,0.0105470527167,0.0106348190959,0.0104596236973,0.0108818476776,0.0112111607113,0.0106873069131,0.0102588250845,0.010880432215,0.010089655822,0.0103914698952,0.0105813561989,0.0104050871835,0.0106776944698,0.0105560616852,0.0105139988658,0.0106706404518,0.0103578271632,0.0107213616644,0.0102640044167,0.0104930892839,0.0106622240966,0.010543224538,0.0102885480743,0.0105893256349,0.0104159556197,0.010828008363,0.0101687861367,0.0101203134104,0.0110675828415,0.00979829244324,0.0105211376691,0.0103741103697,0.0106648211362,0.0107029997572,0.0102861554528,0.0102883788416,0.0105147138665,0.012528715277,0.0100680295644,0.00999416623141,0.0105380554314,0.0107178789057,0.0105820525677,0.0104117149345,0.0105268474132,0.00979281685892,0.00976628410851,0.0111711657112,0.0100905885315,0.0126440839844,0.00992647126683,0.0103867776955,0.0103927894556,0.0106740220206,0.0105234269965,0.0104405808871,0.0105989080067,0.0105772285568,0.0103555507923,0.0105403800597,0.0100160601848,0.0103243282654,0.010780805974,0.0105939044194,0.0105804121349,0.0104924452737,0.0104147704275,0.0103981276532,0.0106935697245,0.0103982082259,0.0103188948232,0.0107848548425,0.0104042969134,0.0107585688659,0.0097388702479,0.0102478837781,0.0109027155225,0.010592031862,0.0104394689929,0.0106714874087,0.0104119132158,0.0103089989265,0.0108178938453,0.0102122142193,0.0107553221452,0.00982443275802,0.0107491341003,0.0099184707404,0.0122984453185,0.01023304204,0.0104431923249,0.0104513020286,0.0105386075706,0.0103492179854,0.0104942258253,0.0106246589642,0.010502577223,0.0105799625312,0.0105293990786,0.0105452535444,0.0101612150281,0.0100121148462,0.00995625993227,0.00999261975487,0.0101974763915,0.0105943331114,0.0105317119961,0.0105416015927,0.0104297027931,0.0106445010797,0.0104011583358 }; const double PHI1196[NST1196] = { 0.89204871472,1.38192306396,1.43247529268,1.563492401,2.04782291969,2.11776648671,0.974820136238,0.11237124964,0.594177476608,1.57996329799,1.51287251665,1.5511566219,1.64242740237,1.6838822821,1.03995222965,1.06883830204,1.0150605779,0.917494924864,1.53665481134,1.45631225868,1.40843810868,1.69195777423,1.75632561941,1.84633899223,1.71013936613,1.75436946427,1.40312941772,1.52133864084,1.49633753737,2.58608525153,2.19093535966,2.11009697546,1.51449958315,1.58259945233,1.55706536467,1.54972430316,1.59920511182,1.43420716675,1.45573928719,2.19263778905,2.02288916332,2.28477872295,2.31485071029,2.10730032615,2.06458140413,2.05694659781,0.540777248952,0.395860650232,0.35652532197,0.542307300806,0.489546480311,0.263490709557,0.0868930388114,1.04279021549,1.03484051476,1.19162803453,1.12447480754,0.633720937392,0.993513837379,1.42042598046,1.37734734045,1.50906952939,0.592217724484,0.673201576525,0.200650753299,0.355718391441,0.595905410314,0.699755132124,0.680563424336,0.352406410772,0.43587001194,0.507073887284,0.512868538784,0.579134332851,0.645562590126,0.887628794774,1.15344182237,1.20910486381,1.23914164317,1.18073677998,1.52572605414,1.61106577806,0.963759245213,0.883069485222,0.885485547635,0.975929214429,1.01188902334,0.807846810069,1.21848867618,1.69245499491,2.17436126369,2.26270480631,1.40415205463,1.66724246513,1.76147558171,1.64570303922,1.938225318,2.1124418095,1.11101624361,1.28998564185,0.773877664562,0.866812267859,1.04934945181,1.5592055687,1.60893353073,1.51730436252,1.49306702366,0.884973892934,0.9598404179,1.25339447678,1.18230540374,1.10731287323,1.36800470489,1.34504687792,1.26084759076,2.08622655342,2.09417976866,2.16911728481,2.24254943236,1.68121674452,1.72395554503,1.66389792108,1.60934845508,1.70856304365,1.09297892406,1.02023721103,0.761323993397,0.934722869605,1.06638180427,1.43864065652,1.48061396901,1.56857733447,1.61829876246,1.64973473857,1.6753898016,2.13665146834,2.15992210291,2.04457209766,1.97748908179,1.67378211701,1.76462736001,2.44717382201,2.51455224555,2.43260520584,1.6081702623,1.66973722465,2.0283429899,2.4358836418,2.46670641707,2.49585156565,2.49083054414,2.48712428316,2.5644905568,2.67032939838,2.01401243071,2.09547174696,1.78552719999,2.24206706645,2.19799511947,2.09870750313,2.05883638348,1.79677614079,1.70577742594,1.93271521212,1.97630775546,1.79679820961,1.84253644572,2.0665166787,1.97778962069,2.54602717603,2.71146335437,2.37808895553,2.46393122928,2.46757617013,1.36323141801,1.2149220683,1.1578724704,1.1421393798,1.21597354957,1.29067133839,1.40815141394,1.2547804841,1.31404841068,1.42424104926,1.46023482313,0.835197194441,1.06229121565,2.12784791017,1.96416775901,2.03304225296,2.00873469366,1.94494886325,1.78998025511,1.93864528826,1.86099561563,1.72631000152,1.883095955,1.79687853265,1.87413393279,2.45653623651,2.53556278983,2.39158086185,2.54489284891,1.84058699837,1.92964754647,1.91656692139,1.96971384678,1.98219259629,1.89837903402,2.23037505052,1.73259347432,1.66128235046,1.82807671911,1.81999435436,1.59663572546,1.96212972986,1.88738051379,2.42541312433,2.47075212048,2.33155690471,2.56035927542,2.73385260429,2.59578221385,2.67647537185,2.09703771108,0.249956549095,0.214827905962,0.175075855753,1.4477848821,1.27432919826,1.38026451587,1.2928172236,0.822854629633,0.692269170501,0.630136399685,0.671322954013,0.761205230474,0.673674921794,0.813767295566,0.930915283343,0.843274404681,0.781676443179,0.938272040478,0.903446108156,0.959449690049,1.55671734159,1.6486498321,1.69796456362,1.38231027304,1.42875623897,0.880604726642,0.957254671585,0.557584742789,0.644614814505,0.724581142179,0.597958802559,0.557980541483,0.268722817454,0.20869168586,0.267519255626,0.117946602011,0.126539355684,0.673316284544,0.638835025821,0.496873956203,0.428577790202,0.751250756113,0.885231030111,0.798462741492,0.60474374995,0.698395282586,0.852754080554,0.732093030538,0.7597033576,0.90732500122,0.872723248164,0.790706327708,1.02044791036,0.979790543245,1.53491583221,1.51431773757,1.11744088783,1.02993499905,0.992098078563,1.04409626521,1.29340863226,1.32190834385,1.4953921721,1.43477510397,1.3494291285,1.32338768871,1.38497506707,1.47143266088,1.27719186574,1.19898993958,1.35484427664,1.42922783307,1.1394015466,1.06056364221,0.984061276686,1.11468686664,1.1966864626,1.28674462017,1.27863958019,0.711346025799,0.657019834884,0.442690362698,0.50352439,0.924691039799,1.01068554094,1.06648502855,1.03469683327,0.974078167652,1.12013229613,1.13872756366,0.761271390998,0.844660471687,0.881180908338,1.21564633627,1.07811028753,1.1318819642,1.06107921364,0.85681949994,0.816661749378,0.766785974662,0.745482331175,0.923149859583,0.903894919019,1.18252388879,1.23004599007,1.16319665326,2.32619404325,2.41431995924,2.47537039255,2.43997765926,2.14719958571,1.46060890024,1.59377448018,1.15587950568,1.32272096359,1.77900759137,1.86503113927,1.72159712018,1.6324379202,0.669145439666,0.738555807914,0.505331451332,0.333316009045,0.972361056873,1.01957891068,1.1173426943,1.15695560092,1.28934560364,1.24506676858,1.13457557984,1.2695442139,1.18729917647,1.30055399046,1.25083472482,1.16721799455,0.885368166335,0.826467429616,0.887867229451,0.956516483853,0.934477974059,0.851850126548,0.649955375744,0.727530664327,0.602687775293,0.79275768763,0.778972035157,0.593424470509,1.2101245725,1.2946202027,1.55402702295,0.97166692134,0.995730253159,0.967586385167,0.7883979582,0.963077642522,0.816186207593,0.903069228976,0.925616919037,0.748597310017,0.795361697734,0.881272830465,1.56869615255,1.48189646979,1.61767517209,1.57339767441,1.70503461782,1.6120332218,1.20234377225,1.15474703021,1.42712639729,1.33559141972,1.29321328007,1.34222895902,1.43373409268,1.47646139973,1.34729045907,1.29887415303,1.88942600199,1.98050664678,2.1634689412,2.11901313674,1.94590449983,2.01621286404,1.54183547585,1.61963264891,1.6490450864,1.60551315779,1.5863709595,1.7976747544,1.92254824023,1.89161974106,1.73605311347,3.01611720696,2.62946119549,2.67129439219,2.28036177276,2.36165784957,2.3603150918,2.20854831186,2.20566591496,2.27596550415,1.84106444876,1.75123118683,1.71436367425,1.68749505634,1.90486686058,1.99567439903,2.02664782739,2.05828378811,1.92289637152,1.86969937547,1.83218077175,1.80646908911,1.74188584518,1.84188205675,1.7508937541,1.70120825708,1.89063240514,1.98386690156,1.84717945696,1.89321594664,2.02876948068,1.9812972381,1.80584287014,2.15846445644,2.14985595232,2.24016695443,3.07874177329,3.11313549532,3.03772855838,2.40215087031,2.41578777582,2.34227985054,2.26174699793,2.24809625847,2.31530361665,2.57787826971,2.62115547497,3.03039474433,2.87555241579,2.95616756681,2.17026051477,2.15174601332,2.25793906977,2.32461548315,2.07256929204,2.00977596638,1.83440711473,1.79041275856,2.10848703058,2.06466296103,2.19764274703,2.11019925653,2.10091484103,2.04952305699,1.96482787782,2.06263637034,1.97241545218,1.92562027278,2.38286627145,2.33976470663,2.24425600661,2.20040540122,2.18623822536,2.21421410738,2.3264941249,2.24031603095,2.35807859579,2.29963125226,3.00046853907,1.88432749861,1.9076181686,1.98327628723,1.61303575882,1.59263958759,1.79887971392,2.46756920143,2.54432390483,2.50087019367,2.59211212475,2.62861762395,2.24118940349,2.32606230579,2.19680056269,2.24227548909,2.33483283004,2.37447279764,0.870349525787,0.617580934523,0.645986980342,0.685812392913,0.768133984764,0.736746870545,0.790927302519,0.750071671381,0.753568208636,0.829326151494,0.905304573129,1.58179480618,1.5073192397,1.81476670307,1.82455171919,1.74761923898,1.73533239576,1.66263590728,1.66522188947,2.61783613471,2.69034272611,1.8301878764,1.76877227763,1.68887317044,1.79409975543,1.38481539081,1.29483742451,1.38978207565,1.52239432446,1.43157140691,2.13571674531,1.79838114066,1.72194732281,1.63422054781,1.62160564904,2.13641375138,2.16018294836,2.12988220175,1.4277076233,1.34181532732,1.48240831034,1.49754005332,1.40090852118,1.33007927268,1.33988690004,1.70227453015,1.65375313178,1.51355249637,1.37971377543,1.42302905675,1.42638748031,1.51741167358,1.56146687474,0.344463875379,0.478377622973,0.39261988279,0.317760748589,0.246813147153,0.233297761597,0.0488739132157,0.0744171337336,0.161514740028,1.04317003702,0.965301554003,0.916163705412,0.895302658864,0.80745409276,0.726595912167,0.74644051422,0.813576526708,0.661083396286,0.646852306948,0.276036330071,0.216686384239,0.270304787652,0.353073387988,0.429600201849,0.513991843465,0.527394924858,0.509032329993,0.419279662766,0.549235047238,0.46140996081,0.456956676699,0.407050498194,1.29210787254,1.24624134771,1.24833935004,1.15908950108,1.15560676723,1.1119861065,1.28385975913,1.36588514984,1.43188141972,1.26637171988,1.12985102202,1.18355342576,1.26761965374,1.30200655285,1.16573526496,1.25358703787,1.42138418427,1.39806393077,1.45052015558,1.46193423152,1.38695873528,1.30196923166,1.36840546387,1.29474828728,1.54662131301,1.71079738935,1.70288196401,1.62061151488,1.58856028774,0.990810721036,0.930368084891,0.917896283873,1.11438876586,1.03938070364,1.03512350289,1.12212707977,1.19780006982,1.19437098891,1.44102337802,1.53547786952,1.52427980761,1.36906315868,0.628390077306,0.726590319822,0.654094308245,0.594089600917,0.745919305132,0.784828594761,0.915912866873,0.936064081018,1.07222295832,0.993052124835,1.0938108622,1.03525161819,2.34894266918,2.29547087811,2.2052055693,1.61007135983,1.71317346955,1.7009837719,1.54260712598,1.56667016087,1.64629027618,0.574529578614,0.494701346118,0.513918988039,0.582872797,0.423973099358,0.41263648092,0.354785105183,0.442850600746,0.361496723962,0.30522843272,0.450057070942,0.484628092527,0.911560905679,0.996470280579,1.03206063345,0.980041111855,0.738409929059,0.83399132313,0.878420090898,0.77041165448,0.901068356673,0.85883197221,0.92132677487,0.808498639473,0.731235579825,0.817125010788,0.74835276222,0.653472234949,0.662434653613,0.618170986031,0.569980745861,0.738632834092,0.708311053549,0.625279158666,0.702348993271,1.10053830184,1.18343615113,1.24468865305,1.07804781807,1.32911229535,1.39537424401,1.43697233939,1.35253240169,1.50279472542,1.48445315866,1.3751791712,1.5713002032,1.48210064324,1.59692639876,1.53195537398,1.41796603843,1.44232465014,1.30458349922,1.32886262045,1.19720107942,1.11478132828,1.0499737801,1.21813266185,0.799609330514,0.797700256312,0.886855831833,1.30696213644,1.2715155414,1.34201598555,1.02273413172,1.06452594044,1.15800927157,1.20575280451,1.02626674928,1.06622609917,1.15262291424,1.28686599317,1.19719035854,2.38404399913,2.25994012297,2.33988489824,2.40862134734,2.43935841065,2.39231060239,2.2552564486,2.30103312827,2.30149949488,2.39635296939,2.44193565782,1.88484820077,1.85803133149,1.76567913681,1.81411343695,1.71946537276,1.69765430234,2.72089018911,2.74498585163,2.76930539001,2.85418581697,2.56683820907,2.43051441495,2.51382625169,2.58650379189,2.47709866783,2.41267139522,1.87924694517,1.75822968476,1.78603297402,1.93875277649,1.90146462308,1.81447538295,2.06201365417,1.98293422895,1.95494212591,2.01733678807,2.12358255965,2.10679685813,2.16526868114,2.11912730746,2.25501209185,2.16244637625,2.25362355259,2.30049899843,1.99888149243,2.06766367971,2.05296998317,1.9699658445,2.11790296049,2.22166524139,2.20434054849,2.98702816393,2.96885114126,2.82198687545,2.87574821117,2.55347498978,2.6145619979,2.70292408037,2.56951371009,2.75870974712,2.84887159387,2.74044428553,2.71137910896,1.91450906722,1.77493613605,1.8267871278,1.9367737758,1.86765109395,1.79385834132,1.97590182209,1.92922967813,1.83873551757,1.93233743275,1.79456383636,1.84180106115,2.33531292551,2.38425361481,2.51897367049,2.47798746471,2.52264887695,2.6736790032,2.81906749011,2.60209577155,2.6929729292,2.72801885615,2.66315029404,2.05503053398,2.13283532153,2.20162153237,2.1766672346,2.04546292965,2.08434067795,2.03125489833,1.9364125602,1.95263713519,1.89632793929,1.65162675328,1.61767652389,1.79046514792,1.74488254721,1.7579693506,1.67852751444,0.852403661425,0.836386937031,1.00452775469,0.939881462078,0.989265172519,0.908856221057,2.61661420818,2.57406916371,2.76288823326,2.90765989379,2.83792273869,1.43742097139,1.40373797419,1.54159737571,1.46071419085,2.28148854247,2.29027347652,2.20642360589,2.15953138012,2.19167349402,2.24957939751,1.75348482602,1.78447760073,1.68167931162,1.69552765892,1.94670832972,2.01184810913,1.85814551036,1.84083891243,1.74547598699,1.6625128973,1.74354316312,1.66373701036,2.06775097858,1.90234924455,1.97378780683,2.05168562972,1.4549578649,1.36763591796,1.25251832195,1.2281564831,1.14268500633,1.07953861275,1.56496316559,1.56726597968,1.52017754283,1.65733823092,1.70484488681,1.65935217793,0.481177577023,0.437538675143,0.498556615656,0.574521385707,0.589357910828,0.623177316558,0.483268982946,0.397772468152,0.510733701113,0.334836211109,0.466311925604,0.37847600763,0.136315609087,0.314987932992,0.199165352976,0.28244542239,0.205007640035,0.295743595317,0.353739563851,0.345800418932,0.278334801859,0.194034891438,0.524428089674,0.548685724074,0.436575392136,0.366552236661,0.632442942404,0.67463431471,0.637817636458,0.561798009506,1.41428705633,1.33091013403,1.48034404489,1.31380106713,1.46486635247,1.38177913006,1.4928938829,1.48288664257,1.64705827677,1.57517631247,1.63835129276,1.55652085997,1.35575123883,1.2760024563,1.27390690537,1.58554996982,1.58623020495,1.50915549082,1.43195755191,1.01069201487,1.00321368567,1.13402582982,1.06030054332,1.17940542608,1.32388176996,1.26742105106,1.337250015,2.03440079008,2.07412404147,2.07810132382,2.16745413556,0.688788622113,0.616750858778,0.554453585133,0.594431203231,0.887948276902,0.833231672059,0.855056927427,0.739859112183,0.767160081381,0.706345685437,1.22313424993,1.13960814127,1.28754082312,1.26544640784,1.03160519258,1.15542157867,1.11700283987,1.17864223684,1.00746667437,1.06987911937,0.929370567717,0.889372588486,1.02187708529,1.06674027443,1.02251505675,0.937702638112,1.63318118645,1.72577151639,1.56191961795,1.46945493107,1.21779028585,1.1647597333,1.07563989357,1.04725572117,1.11267567391,1.19379692157,1.08013133917,1.19287459676,1.04781827549,1.10555084573,1.34382908045,1.3102206805,1.22299098511,1.16775740778,1.19820797879,1.29308761725,1.15647547472,1.20444489243,1.32926442659,1.42008905724,1.46216519449,1.41820430448,1.33194774218,1.28485522678,1.87226953096,2.25313691896,2.29338038829,2.2376151546,2.02310917894,1.97383068173,2.11509589507,2.15895211449,1.9995501756,2.08966304703,2.55812548301,2.52997490686,2.43872769345,2.53098204325,2.43848584419,2.39244058502,1.92036932435,1.76141364022,1.82610813587,1.90611923142,1.77363912125,1.85246647452,2.11313130775,2.14973382555,2.09269596094,2.02267758261,2.53738719232,2.51608543341,2.38704101047,2.42260591532,2.35919514064,2.26905434804,2.29439710442,2.23944002503,2.89213706194,2.98220343066,2.83047013236,2.82721643232,2.98173567993,2.89678630467,2.46916046477,2.34886882508,2.32235683062,2.37668578425,2.63413878432,2.60976717005,2.71731634624,2.69159534446,2.76524457209,2.66844553857,2.85193089978,1.57306643574,1.52569556445,1.70491266996,1.66098596063,1.66016615325,1.56907848284,2.59504334431,2.58415283182,2.49853468768,2.43165277246,2.42394572946,2.33793834995,2.28531161532,2.31353260835,2.20988527754,2.28680088148,2.20083898924,2.26976502207,1.8991595289,2.00596138152,2.03649844128,1.9814959975,1.91862453499,1.83856292311,1.83514971613,0.402338096019,0.359510588113,0.420879546073,0.494668006717,0.544875561485,0.512287792647,1.50968298223,1.35315783074,1.5078846094,1.43136756831,1.35443458636,1.43446570202,1.07950708401,1.16267020192,1.14399752561,1.07180108752,1.22670552957,1.23768577565,2.21435519354,2.30509218795,2.19894799904,2.16440304057,2.28903386499,2.34572415588,1.46671450717,1.4310496941,1.48491696075,1.57136522566,1.60450437495,1.55390918406,1.74835663423,1.84051595536,1.69773457368,1.74043919689,1.88255798706,1.83283247499,2.01501950927,1.96296329776,1.99923671955,2.10794665576,2.0900518088,2.146799689,2.18961511276,2.11076765641,2.18890713575,2.10518851142,1.89548878958,1.96668720846,2.03541209876,2.0306208397,2.64157841273,2.8012839054,2.64821809693,2.7214945068,2.71228363424,2.53406148836,2.58087120223,2.66562470963,2.58061072898,2.53287173382,2.00590101983,1.86396473212,1.94797361411,1.9722026882,1.83179720205,1.88233265695,2.37908769895,2.31587903091,2.30606924266,2.46272031019,2.39541605778,2.46942360386,2.78687774042,2.93563958267,2.86796554832,2.40285218851,2.57656186624,2.54919623992,2.46157427256,1.55186695963,1.60279880012,1.595286733,1.68839450496,1.87658811113,1.76552806291,1.79186703368,1.83465752989,1.92725807668,1.94295029154,2.78898316324,2.70360279015,2.66941521255,2.71059576702,2.93415288041,2.96285200134,2.84492318716,2.79742646367,2.87224958647,2.80133031856,2.7559651972,2.64886084663,2.61543676357,2.66312451643,2.35412010975,2.42376927294,2.50902976804,2.51733312456,2.43996290588,2.36224798418,1.72914729743,1.83258664685,1.82034617796,1.74806397498,1.68684409052,2.79984148512,2.91611774047,2.89338203961,2.83427625944,2.75290813602,2.73788079242 }; const double THETA1196[NST1196] = { 4.55339487549,3.19224121155,3.27183836,1.60011099376,1.51924025983,1.45735399508,4.60009281588,0.405614948206,3.25757204547,1.69018556775,3.25787539977,3.17091967417,3.165263682,3.23862627781,3.53275217518,3.43101049725,3.35231706336,3.37371128743,4.63797394167,4.08210908963,4.25805597365,-0.0718549388784,-0.453543726579,-0.604692087838,-0.535929651574,-0.609028891735,-1.51956397556,4.14799155934,4.22904978765,3.89172088547,2.14163837345,2.53245735229,0.122058796919,0.0636064470473,-0.168137667491,-0.0225591135476,-0.0881865152205,0.0746590734801,-0.0171408661776,0.689446911535,0.597727733145,0.706104825405,0.588620892331,2.34820511109,2.44665547832,1.62058317587,-1.12337804319,-1.29387134132,-1.50136435152,-1.42055808464,-1.28558901368,-1.554865998,4.3418666184,4.53535742501,4.42647764147,4.51642138004,4.57706303221,-1.3860884088,4.70913135515,3.10322498941,3.02601539849,3.09595252584,0.211022922437,0.274888918699,0.541869166008,-1.07120719892,0.0520425712868,-0.146091914489,-0.00950132691857,3.31041208223,3.20819552221,3.31677502791,3.49852952127,2.4269913486,2.33976998361,2.60806227276,2.17626150979,2.09931828571,1.93000972499,2.00413896028,0.206734017475,0.240177774208,1.25876625081,1.21181985635,1.73052562742,1.36522914728,1.57105226309,1.27922583873,1.83337310154,3.08835120707,3.92827509137,3.90834076336,3.36476632002,3.63225738089,3.60624572925,3.71327860496,3.52634825463,3.57856926831,2.87714688084,2.8683104568,3.28035178377,3.29190101466,3.25344737586,-1.56145525308,-1.39734794622,-1.41514491317,-1.49820143503,4.43529193677,4.37444307841,4.35930495409,4.41492992202,4.36754963453,4.11392056487,4.20927475187,4.2583419147,0.423701853913,0.532286488262,0.575609044788,0.514791411316,0.179273034616,0.0173720513806,0.0870318770493,-0.236598657676,-0.380801624756,-0.0954236019942,-0.629818778838,-0.402005733115,-0.434001053979,-0.721213435711,-0.400017216993,-0.321724693786,-0.317971150752,-0.391069169651,-1.54435345209,-1.4630283398,4.58148979582,4.68018592101,4.56365101481,4.6358616264,4.26889990277,4.29768891516,3.19610433724,3.78805389055,3.83883385036,4.12109852232,4.1752728017,-0.601839350195,4.4455247135,4.5798446059,-1.40898354987,-1.25857217069,4.33049728781,4.0527782603,3.82742802615,3.46370676762,3.48869502003,3.09902405512,2.22074314747,2.32827909769,2.17037950502,2.26965596639,2.6321760699,2.47795661611,2.54851045319,2.4595337802,2.47382232234,2.55251589362,2.62804879141,2.6311284107,2.72771890458,2.91070288396,2.71847551512,2.52350839463,2.67302416959,0.116248568263,0.213447838694,-0.0341820605302,0.0624054678524,0.116192536496,0.0659807404649,-0.0766208311784,-0.0815866958051,-0.035887330266,-0.234465842832,-0.162118725711,0.388653533305,0.10705936221,0.74573625516,0.755793051075,0.697267362758,0.389696275584,0.557980759221,0.486991596367,0.45794092789,0.424631140743,0.639212070202,0.718367079464,0.582607003499,0.619870899114,0.64638725567,0.600806216065,0.545992059963,0.432063293317,2.3909830928,2.38083179828,2.21463955492,2.28926470334,1.67072395932,1.62803886459,2.03102604879,1.65213890263,1.71426415122,1.76743488513,1.68214637394,1.28245322521,1.48222443419,1.5399898949,0.784336620043,0.899072518249,0.798288842065,0.893630766961,0.861325033557,0.729965149156,0.690094149978,1.35307251309,4.39093683261,3.7220499233,4.12283488624,4.61549315856,4.55525415511,4.67757048027,4.64915642166,4.6240509266,-1.49052159939,-1.12172224623,-1.24852117633,-1.23487234941,-0.976821880205,-1.33505196523,-1.50168387441,-1.53873270857,-1.45436500152,-1.20353984538,-1.31120635698,-1.39261885801,3.01530077501,3.01331735245,2.93744987505,2.70666883993,2.62919468757,1.08977410253,1.03690617763,1.24151872732,1.30327596884,1.22520539094,0.779177766873,1.08525477373,0.275126155801,-1.23872740875,-0.971974958642,-1.12572573128,-0.353580347236,-0.387686420766,-0.250731977602,2.34759353154,2.4688949213,-0.988274309745,-1.1120670958,-1.11968270333,2.58840398024,2.60772238146,2.50549195094,2.38426850934,2.49683219479,2.41061232414,2.29470323656,2.27781657682,2.70451849467,2.61253308017,1.84537048477,1.75475645115,2.52961723646,2.52293040011,2.42296291342,2.33575138614,2.11647446226,2.20958397354,1.99335787694,2.05875314181,2.04203096136,1.95049035996,1.88225933997,1.9081358619,0.768514634601,0.814639199353,0.807641873223,0.75309883388,0.262423900787,0.210607839892,0.263490006229,0.94953809133,0.905336302201,1.32398080849,1.23013772101,1.70842673832,1.4415342876,2.02946664026,2.15510497239,2.20592918545,2.234151816,2.15533110184,1.67463934251,1.74817168112,1.7054101741,1.80673275568,1.84194886985,1.84121336326,2.09138499163,1.38132678423,1.50427664945,1.34235743856,1.40267479493,1.62756066119,1.39938192153,1.60604049545,1.48080759251,1.54169878186,1.43676411305,1.6371640293,1.47705763662,1.53908629073,3.99711546361,3.97205712196,4.07814225458,4.2065359598,4.02606455671,3.44095182214,3.5742958351,3.41347138197,3.38007658552,3.52391596838,3.48294073664,4.00233660757,4.02739803851,4.6531747385,4.57129246691,4.15173908635,4.27244888059,2.79601774829,2.8836884997,3.05432155156,2.96051332028,3.0337198738,2.95376359282,3.23530767274,3.30071368823,3.31650385139,3.20565413136,3.12449408169,3.13815726782,3.89175625985,3.80720059342,3.47580807379,3.55488245963,3.66495697499,3.69047680797,3.38690419109,3.38863566355,3.52930047564,3.50305623185,3.60868467133,4.11132512623,3.49082155452,3.47337820004,3.73862040687,3.85619827655,3.74603350533,4.25953333893,-0.181456082459,-0.241798977446,-0.301547904025,-0.325659754203,-0.628502479267,-0.656274805631,-0.520223299628,-0.527833824585,-0.625338852408,-0.4778026962,-0.54468529723,-0.472585455201,-0.689468343559,-0.697058971836,-0.6403642782,-0.723328418596,-0.712269555069,-0.718246571322,-0.641023675776,-0.559614015789,-0.556612761161,-0.632096974594,-0.401852544195,-0.482630793142,-0.685685958006,-0.687426232164,-0.698938636847,-0.603681919909,4.30404437639,4.47537282028,4.31004822794,4.32994788622,4.42947072973,4.57676417831,4.49265792352,4.37567823846,4.46598505882,4.38431073157,4.44640214121,2.77373911184,3.26837721575,3.63239997053,3.79395427478,3.75187026931,3.6205015741,3.72064201685,3.61064407177,3.55548938598,3.901597166,3.91909039354,3.77245255398,3.85543461747,3.97189486974,3.95692356143,4.12774080033,4.03551042883,3.62392542782,3.81275624692,3.66198071721,3.7475424704,-0.141044428309,-0.284678589213,-0.296967161279,-0.22594215535,-0.359590347648,-0.518160017872,-0.444654665517,-0.522757132383,-0.429248805021,-0.348830514493,0.0393556718304,0.355395838167,0.249180438274,0.402282631763,2.11809333384,-0.977446140902,-0.146977214071,4.67429772925,-1.47533425594,-1.40198940542,-1.45540747509,-1.57005706089,4.63531496703,4.34015941657,4.18942659894,4.53352797225,4.71083841853,-1.38824964482,3.40605764684,3.30228492939,3.43899978117,3.36772609253,3.27505680576,3.35377594375,3.03178592185,2.94505070552,2.90303785289,2.80907086073,2.72181853112,2.71936989048,3.08597702801,3.16730883637,3.14430685429,2.98636641317,2.97308835641,3.04937620137,2.93662010916,2.82284470318,2.8208910623,2.91263867925,3.10696523671,3.21608252897,3.03849154762,3.01748851342,3.15999641091,3.24725461509,1.54555350861,1.90793447561,1.81270106556,1.77094928104,2.10212260491,2.02184004646,2.06552504108,2.95343480646,2.85966957605,3.09171969154,3.11059171089,2.95338507085,2.6193547017,2.6150614172,2.52136142021,2.41577849078,2.4017567424,2.50384043993,0.638945613451,0.516066019083,0.650783502162,0.416087056434,0.464228948632,0.694653240194,0.608649417672,0.201160245053,0.071272021383,0.264415656211,0.20672501552,0.740567341358,0.791630914974,0.775545640852,0.872815819108,0.919112697674,0.733945732234,0.783702824113,0.872061233934,0.353165653088,0.474128588969,2.2278663907,2.14459851508,2.15580725522,2.31291994114,2.54846234993,2.54283744699,2.38901805024,2.47817235704,2.47267547595,1.67185922358,1.51026848737,1.56778864413,1.54019279994,1.45536546807,0.841533393174,1.2814045208,1.18257857808,4.53028415003,4.49893824775,4.38564018799,4.46899227701,4.35240941464,4.40388353434,-1.45419783682,2.78536854925,2.8613673551,2.93974640058,2.86546888485,2.9431944263,2.78569512148,2.78537024778,2.86171722246,1.65994127711,1.34385184387,1.25910047521,1.40370233877,0.893752448519,1.26836174426,2.94964730924,1.31580693736,1.55652366042,0.888190214363,0.925006893443,0.740419651271,0.846198385057,1.03070294967,1.09698675219,0.83187677366,0.897002184677,0.891037619639,1.02375899832,-0.0512393687728,-0.337739340242,-0.62500211203,0.373934297714,0.230483404581,0.308235096771,0.477324497395,-0.971526004077,-0.922192561584,2.70385746493,3.01035688556,2.67084160168,2.84347697326,2.70571163403,2.7875736973,2.62258820289,2.61956713519,2.78958362673,2.70464887,1.7634495875,1.79142543355,1.72698560124,1.66830994216,2.35222425595,2.27184579998,2.28779406012,2.378531525,2.44636662459,2.45647471613,0.66109176203,0.481654032713,0.257176187049,0.344428658364,0.393729385911,0.353529090643,0.214578967399,0.261147113575,0.381158825667,0.452150320772,0.360746178225,0.327722357895,1.19287838149,0.370688263333,0.544871955145,0.436515351838,1.04790465442,1.19879734083,1.09738629627,1.24405105675,1.18979698248,1.09429385711,1.30349968171,1.42517785413,1.33751099439,1.35956790281,1.94780849094,1.94824390514,2.18642621926,2.091336586,2.16182937584,2.06219307926,1.91899549918,2.02258964998,1.88265455219,1.85491810069,1.9841286264,2.05809048001,4.21048037437,4.10861469711,4.11650349066,3.49373274515,3.38872147926,3.46982846484,3.42655964308,3.33623599592,3.32263533136,4.42840056589,4.32998727874,4.69177300951,4.59124609767,4.62409812997,4.41492030678,4.01948098271,3.99933638259,3.57163616912,3.77563418025,3.63068211572,3.81862754274,3.18573094175,3.16823427122,3.06603676486,2.97911824285,2.71385261676,2.70538130561,2.80152548516,4.04456723151,4.19728346048,4.00825014304,4.08081816651,4.37348856039,4.43642950541,4.24865188571,4.16966205854,4.36011632576,4.21502943132,3.96469352269,3.82655071192,3.82494587081,3.94587657746,3.67394341119,3.69046635747,3.61132491049,3.58746589847,3.6596728796,3.71499964578,3.63755011506,3.70396082117,3.53059439743,3.54751905709,3.59644857667,3.68010632187,3.78964298143,3.97038092216,3.99798013731,3.88146945333,3.82411341257,3.93617750567,3.85098464111,4.0618092934,3.96777241499,4.20762803772,4.26029103249,4.20553937299,4.10601494771,-0.88851166691,-0.757607110153,-0.723608254172,-0.324718763628,-0.170737923068,-0.235613800024,-0.450423433778,-0.545967185144,-0.554529296894,-0.478384270756,-1.18489294725,-1.0867044832,-0.897948180691,-0.802196379677,-0.808082747898,-1.06464706439,-1.21555268904,-1.273013485,-1.19948207222,-0.974280922147,-0.625797953364,-0.71280266738,-0.618224297717,-0.822129430795,-0.846067987704,-0.74389557135,4.62106056097,4.53897115442,4.52826237087,4.68862787599,4.67382169392,4.59519113118,3.2957226091,3.50544513541,3.08925831335,3.04501568229,3.38884193173,3.55775289204,3.63417792473,3.55134989987,3.33673210566,3.41916027718,4.05610876882,4.14811048847,4.06875095472,4.13301551752,4.21975901927,4.22203953703,3.66716457733,3.68838314624,3.79208449968,3.86550524997,3.7518711505,3.84680583222,-0.512908534028,-0.422032544666,-0.513558710805,-0.325974340706,-0.31434638111,-0.411138892091,0.286328564596,0.214814053507,0.113099796917,0.086201166331,0.0392789761071,0.178385281799,0.069204518091,0.47054346314,1.04142854745,0.820057310514,1.07021075831,4.6224258209,4.500496184,4.54391815056,-1.49545253739,4.36985031548,4.39494202362,3.96451273443,4.17340538718,3.21770639537,3.25248581087,3.19015008925,3.32018119842,3.38595765246,3.34652896517,2.80265623029,2.88336857593,2.87290921357,2.71602341314,2.78918460942,2.71301270484,2.19358606176,2.28709090521,2.41819933583,2.28062044167,2.15494978715,1.58641494206,1.30744103024,1.04172348127,1.05356932497,1.24965238526,1.39167051437,1.83038116008,1.78244463568,1.84547774767,1.95982194314,2.09935079697,1.99896662776,1.93411830267,1.96870460723,2.12373842887,2.05825548206,1.96529532157,1.8738944297,1.91757844205,1.98626549387,1.83044020352,1.80761350012,-0.098055390008,0.0205279848299,-0.0618110005423,-0.133407383566,0.0452090907072,0.0906855168524,0.163942983955,-0.171999935637,0.379912939145,0.327741356756,0.534744740032,2.31370842773,2.2248071496,2.1631565753,2.14859955898,1.79139789083,0.908457405909,0.916064589656,1.01168825753,1.10487866042,1.31347702117,1.25529028883,1.42610050764,1.31359182614,1.3991973846,1.38993605609,1.32350388005,1.36412239299,1.27857674882,1.00344368134,1.04690390769,1.16820919449,1.13721386347,0.991257176046,0.915555912661,0.856205799378,0.892276687518,-1.34829790069,-1.36570201069,-1.47809577047,4.71087257864,4.67817994532,-1.53850861296,2.70894854684,2.5565774631,2.63178168134,2.7092733493,2.63231189043,2.55677735854,1.84011860971,1.67448119195,1.51971837853,1.82714411905,1.54955962042,1.69294102521,0.972280452208,1.02949787794,0.79354525147,0.843904391549,0.624888554137,0.61157651957,2.87707224307,2.8487430162,3.27751001236,3.13611002678,1.97839213003,1.90705876404,2.10523977951,2.37360018216,2.56470848352,2.44127150594,-0.0439643726805,-0.215212216031,0.0277274065428,-0.120820198281,-0.518231724491,-0.668244057982,-0.823723262846,-0.819538375141,1.63524860541,1.60482792275,1.57322731834,1.51124798587,1.48276883279,1.45155650489,0.609771380561,0.520551685348,0.599136196942,0.650405114534,0.507342735632,0.469733232263,0.901511683809,0.952769658946,1.04403708051,1.01128477505,0.920362039176,0.883440937236,0.938437312248,0.585664232203,0.697741141482,0.738413871036,0.766514866778,0.648044188705,0.53160382114,0.674874752038,0.622216643236,4.30436323869,4.39420026211,4.21470092969,4.21318083525,2.84057355341,3.11863928112,2.98948401253,2.85382131236,2.99390054479,2.9044280002,3.09910021655,2.9334411287,3.14760008999,3.0747567798,3.75515526765,3.78619300257,3.81830508958,3.91161502302,3.92681684514,4.05085005908,3.88816000525,3.9500865416,4.03550977012,4.09712768499,-1.0092971789,-0.915760288243,-1.00290395991,-0.906909801991,-0.81494577602,-0.817983269956,-1.31674636018,-1.29694660347,-0.77765296979,-0.786158415745,-0.316550531688,-0.388941792707,-0.369877590556,-0.268967581651,-0.194678078554,-0.222471579068,-1.26439911837,-1.41040608525,-1.36479366196,-1.43761561951,-1.20572466586,-1.2954645034,-1.31594175268,-1.24309915586,-0.980173745286,-1.13271323792,-1.0727609491,-1.14936126138,-0.878470326618,-0.868364735809,-0.9412828715,-1.02737747817,-1.04252018657,-0.966586502905,-1.01118700375,-0.906306155313,-1.02157225221,-1.09653330496,-0.772445970084,-0.855400761006,-0.781818271319,-0.880040735159,-1.55875419522,-1.53311360896,-1.15611754477,-1.0040642154,-0.291348123395,-0.298743440441,-0.51758431193,-0.407542922833,0.257923494676,0.204529595667,0.134584988231,0.158931241306,0.298841275136,0.327472837178,-0.241566691017,-0.141625934354,-0.062662028623,-0.257150780257,0.102796555404,-0.0421245196986,-0.187801574324,-0.0663057514158,0.0229768445663,-0.009426691336,-0.207088995546,-0.119174048894,4.10171066679,3.98847382492,3.59261534996,3.88093820393,3.40815784331,3.35100966308,2.03924382238,1.86183383779,1.98915205148,2.07203284993,2.61090951445,2.44550904276,2.68724519429,0.0380909713756,0.124837449767,-0.163827812607,0.0226692551703,2.24865196102,2.32284069072,2.32108949768,2.24733628767,2.40330220169,2.40370678252,1.67567683827,1.84741554784,1.89915336175,1.80678672531,1.02361237383,1.01940634546,1.12027483498,1.2310197547,1.61263600058,1.66753710932,1.49826534029,1.42722073212,1.20226721655,1.05402954397,1.1519038825,1.22072952387,1.01421584832,1.05532028674,1.13025788609,-0.330604559711,-0.546702879974,-0.701725520717,-0.347194141631,-0.515097492063,-0.662958207168,1.15826624767,1.08500818579,1.06663051066,1.0310776624,1.17615806291,1.21346148141,0.524547714207,0.559732205947,0.362934363196,0.417502526023,0.405697133905,0.496314011418,4.31002005149,4.31551148152,4.50082644637,4.40123267105,4.52035847713,4.42691776481,-1.10153025764,-1.18977050847,-1.26189509033,-1.24839736624,-0.849137710406,-0.930513518806,-0.763123003034,-0.763527959862,-0.842139413948,-0.915641278787,-0.848189840365,-0.921051574706,-0.940351550463,-1.02343444904,-1.10676179712,-0.955068553404,-1.12469050216,-1.05717486628,-1.27905848591,-1.22939507045,-1.39207588854,-1.43531883613,-1.23212940841,-1.2028055799,-1.27892482775,-1.37346280343,-1.21531692637,-1.40779995835,-1.41220980017,-1.52477674258,-0.328303604483,-0.734769718253,-0.864949184075,-0.511679571449,-0.471218166209,-0.569512428705,-0.0855943317026,-0.033239921773,-0.0111480907719,-0.180559567931,-0.124687211779,-0.197188976635,0.145913939523,0.339920920764,0.220837658429,0.197976902107,0.40725769675,0.34295048358,2.55871641126,2.49347637476,2.70513265496,1.26011311745,1.33601237432,1.17701599597,1.15445332267,-1.08699135045,-1.16161386668,-1.00205070313,-0.994105983556,-1.34050324085,-1.44794109311,-1.36217027008,-1.51408877532,-1.49368505851,-1.40534252002,-1.14271081402,-1.07970004554,-0.874502516409,-0.701392224969,-0.931067113542,-0.496376091583,-0.914910135456,-0.679913755962,-0.25818031439,-0.396694352828,2.31501161198,1.96905590529,2.14081751238,2.29362893911,1.47304190714,1.39025955354,1.44034935168,1.59305171514,1.66713562462,1.60084953551,-1.06648913466,-1.17325522189,-1.07775379539,-1.21570028702,-1.14899196242,2.11330436717,1.76816050621,2.11088763729,1.58462403444,1.70020162385,1.92227235776 }; const int NST1210 = 1210; const double AREA1210[NST1210] = { 0.0105815883748,0.0102644697028,0.0104742230477,0.0101228244027,0.0102778786277,0.0105767279545,0.0102115947054,0.0104148922907,0.0104393595463,0.0103726242421,0.0102692103925,0.0103217424558,0.0105131183484,0.0120667339444,0.01022560461,0.0104616103637,0.0103126447991,0.0107995393712,0.0115537350518,0.0103980021895,0.0104701261581,0.0104202677378,0.0104032617992,0.0103175669261,0.0104961212921,0.0105548146995,0.0104372123936,0.0106007132435,0.0105827946548,0.0102469637394,0.0101932987443,0.0105293486584,0.0106285571503,0.0104933508411,0.0103611740815,0.0103961454428,0.0104170163534,0.0105174286489,0.0099753028681,0.0102834549034,0.0104068022485,0.0104420427935,0.0103811507109,0.0104252593459,0.0103063172844,0.0100554913097,0.0109846527399,0.010321035523,0.0105077330421,0.0103035458075,0.0104128387912,0.0103882853077,0.0105752463397,0.0105611618263,0.0103449475104,0.0103132287976,0.0102283922993,0.0102343914771,0.0105934950677,0.0103998604332,0.0103044361257,0.00987679968378,0.0105876851044,0.0104631508568,0.0102559503428,0.0104037420954,0.0102516577104,0.0105767282596,0.0104523685296,0.0103347920941,0.0106589337092,0.00996380546814,0.010108243519,0.0103099151758,0.0102914590053,0.0109198980792,0.009964430837,0.0102963650385,0.0104925752787,0.0103666477341,0.0100911068216,0.0120841664683,0.0102857274078,0.0109600175455,0.0102958181392,0.0104432663056,0.0103189035617,0.0102832458158,0.0103560590655,0.0104748686079,0.0105863982892,0.0104943774439,0.0102965851622,0.01054290173,0.0102691459518,0.0103406991862,0.0103406962665,0.0104727307703,0.0106172361432,0.0105470190165,0.0102622973396,0.0102160239831,0.0103796467278,0.0106947182487,0.010714446147,0.0106740638035,0.010690951782,0.0106880805801,0.0105630808166,0.0104898188451,0.0103757060715,0.0102289095535,0.0104200361736,0.0102781971857,0.0105440703406,0.0101065645837,0.0104037406759,0.0104520907029,0.0097627893333,0.0100988158698,0.00988555472511,0.0099786861237,0.00965370089592,0.0125030532463,0.00988210906848,0.010299173925,0.0105361639788,0.0103899148201,0.00971535743967,0.0105957302075,0.00982670796505,0.0101792440939,0.0102284088233,0.010539932162,0.00991278333349,0.0105110118218,0.0102540782241,0.00986942374763,0.0102491043966,0.0100552612772,0.0105577024759,0.0102641956867,0.0104540626571,0.0102125829929,0.00983627521059,0.0104080262433,0.0104193734776,0.0105448821806,0.0103666311533,0.0102947016475,0.0102661842223,0.0105621394289,0.0096992980693,0.0107708638655,0.0098979620282,0.00965283760768,0.0128903307138,0.0101955664823,0.0103132466465,0.0104420204548,0.010277925134,0.0102488695992,0.0106181619889,0.0103044496208,0.0105367002053,0.0102527160946,0.0103015799929,0.0105684044325,0.0103607349557,0.0104381654239,0.0104243973608,0.010344058014,0.0105035426792,0.0104471079359,0.0103854048374,0.0103043647427,0.00980962843679,0.0112293928536,0.0101798815941,0.0105441072953,0.010540281906,0.0103908639322,0.0105214042198,0.0103117794916,0.010296991709,0.0103164857432,0.0104867610257,0.0103228916973,0.010349554102,0.0102588182716,0.0105896802269,0.0102398876233,0.0105011514741,0.010371464687,0.0108026478126,0.00984867498031,0.0100598352636,0.0103403446021,0.0101329989664,0.0101964363164,0.0108329295962,0.00981355697703,0.00993604973807,0.0116705197684,0.0101131236941,0.0102661011738,0.00993891527786,0.0105484632863,0.0100357804769,0.0103336120241,0.0103833340105,0.0100996097185,0.0107883755675,0.00976243221501,0.0103726823229,0.0102970231156,0.0103873972098,0.0101840275449,0.0105141745996,0.0103306257918,0.0105384625792,0.0102934852398,0.0104748143175,0.0105852990553,0.0102324895736,0.0104991879776,0.0103477484654,0.0103363527839,0.0100908358678,0.0121087768377,0.0100011366004,0.00990217522895,0.0105757765571,0.0104523321884,0.0105176875887,0.0101361445671,0.0104233794565,0.0104199584909,0.0103533837002,0.0104369976822,0.0101144032396,0.0100306965546,0.00979897295644,0.0109607159854,0.0103759182024,0.0102144418933,0.00995550156391,0.00983018115058,0.0105038438099,0.0102826134614,0.0107485448589,0.010133050021,0.0106006782045,0.0103215580486,0.0106308432735,0.0096580254756,0.0106480095225,0.0105660108159,0.0102722516355,0.0105645102348,0.0102211605036,0.0102680951458,0.0105453789053,0.0104209609716,0.0102708224938,0.0104504505926,0.0103722572591,0.0104885925456,0.0104430093234,0.0104373786661,0.0103979297728,0.0104552322245,0.0103678905248,0.010492343908,0.0104883486149,0.0103630832353,0.0104215618951,0.0103773136011,0.0102754466101,0.0104600754232,0.0105403200067,0.01037977422,0.0103190193238,0.0104464777031,0.0104887116206,0.0103765017187,0.0104511273858,0.0104599323375,0.0101823087867,0.00976869496094,0.0106456612029,0.0104006365873,0.0103526006817,0.0105185015193,0.0105259659,0.0102554934394,0.0105948047764,0.0102222578007,0.0106259104843,0.0104516634894,0.0104405860361,0.010714987457,0.00997604858463,0.0101797681823,0.0102044898556,0.0105375652157,0.00998694889754,0.010377928368,0.0104752946476,0.0103520998581,0.0105082117879,0.010123226609,0.010371494188,0.0110566280807,0.0107854086365,0.0097351474627,0.0099177606816,0.0103707970393,0.0111709658623,0.0101153574577,0.0109304830237,0.0100413972892,0.0107084536386,0.00994436342312,0.0116648305149,0.0101673957081,0.0106939633208,0.010246675378,0.0106309181049,0.0102429916609,0.0105265753454,0.0102237883044,0.0102364469523,0.0103177593795,0.0105450458958,0.0102732871496,0.010344889535,0.0103502652066,0.0103109245757,0.0105564070314,0.0100498063725,0.0104754564724,0.0102842411303,0.0103210760168,0.0103545576256,0.010501144871,0.0106328668672,0.0104123707862,0.0106614200486,0.0111008433349,0.0104313563875,0.0103978316838,0.0104618367233,0.0104408121196,0.0102311975159,0.010594569657,0.0102881011466,0.010559197041,0.0102567301601,0.0105673265405,0.00974606282466,0.0104994380077,0.0103227268988,0.0103697330172,0.0121312324189,0.0106864063125,0.00973803790808,0.0105064244364,0.0100211239544,0.0101799682672,0.00981168327983,0.0109772043798,0.00985221830469,0.00987825414446,0.0101786377768,0.0101988756394,0.0104998006673,0.0102714177581,0.0105025906866,0.0104179948491,0.010350010057,0.0099761496408,0.0111800002736,0.00990237662541,0.0101783625425,0.0105835565999,0.0102607369946,0.0103587689816,0.0101995613179,0.0105088604475,0.010276215539,0.00976015322181,0.010157089374,0.00992336738837,0.00978368033997,0.0100400996165,0.0103065759828,0.0103322346085,0.0102116935777,0.0105886327323,0.0102265766534,0.0105137641093,0.0104586680318,0.0103992889891,0.0104224949383,0.0104052776472,0.0104135169212,0.0105040931062,0.0103174431438,0.0104784252388,0.0103955571563,0.00976044954318,0.0102161475475,0.0104416022899,0.0102807797964,0.0099711563704,0.0108580353313,0.0101127765342,0.0107203636702,0.0103777927311,0.0105737624686,0.0103962647065,0.0104717187303,0.0103514443933,0.0102881329807,0.0102738480376,0.010253545398,0.0106725430595,0.00986967055622,0.0100276029023,0.0106337483152,0.01028522635,0.0106000728296,0.0105023718281,0.0103404556766,0.00986616305163,0.0106254665048,0.0103323435399,0.0106065518053,0.0102441324305,0.0120746548805,0.0100768772784,0.0104214376709,0.0100179159025,0.0106883866933,0.00994988512799,0.0105245391924,0.0103424815193,0.0102966939178,0.00970730995485,0.0103640554517,0.0105388022069,0.0103750207516,0.0101670944617,0.01039859654,0.0103961864732,0.0103781137374,0.0104431829672,0.0104959505355,0.0105217337709,0.0101837999163,0.01056186595,0.0102448866489,0.0105921397472,0.0105748173116,0.0103727424581,0.0104246067804,0.0104176194571,0.0103231563426,0.0105060963878,0.0102863151705,0.00971114447492,0.0104324598658,0.0103600132474,0.0104277608279,0.0103706605739,0.0104076970299,0.0102814063818,0.0104987502958,0.0102835874794,0.0106081078822,0.010592017503,0.0102428887562,0.0102629752859,0.0105203971328,0.0102480187265,0.0102882362998,0.010451180679,0.0104282753384,0.0106186662983,0.0105292860999,0.0104733444611,0.0103392348471,0.0105121636793,0.0102615788879,0.0101327483935,0.010811384018,0.0097438733712,0.0102979879123,0.0101285092329,0.0106079271394,0.0105460555148,0.00990747766312,0.0104767843465,0.0104226647448,0.0105021414433,0.0105334951333,0.0102397353546,0.0103961729941,0.0104556824194,0.0103616595735,0.0103683398521,0.0103632326143,0.0104391452807,0.0104228507832,0.0103839368704,0.0105115724107,0.00996461734536,0.0104395111131,0.0104316337979,0.0103486712669,0.0104076884758,0.010459831501,0.00989571973841,0.0110128923641,0.00952232344722,0.0102138822643,0.0103943332182,0.0105906234915,0.0105292108757,0.0101533166746,0.00982591793702,0.0106649976806,0.0102849112605,0.0117732305632,0.0105512684382,0.010312173806,0.0100421366445,0.0102501031924,0.0107649790586,0.010084691178,0.0103755522019,0.0104905464696,0.0103478594685,0.010484199422,0.0105086707979,0.0105295115049,0.010291798551,0.0103647570713,0.0104416496222,0.01047308938,0.0103733645614,0.0103743628836,0.0105073792251,0.010330108746,0.0102596752631,0.0103069057915,0.0105347325764,0.0104536405338,0.010472229937,0.0102366610954,0.0101560019673,0.0105896844936,0.0105366013466,0.0103099364011,0.01041532927,0.0106462361553,0.0108243210215,0.0105910475128,0.0101272638051,0.0104804720872,0.0104055947958,0.0100466106325,0.0100381711442,0.0103550962451,0.0104915161771,0.0102806457072,0.0102593903976,0.0105538803987,0.0103996407634,0.0104567773444,0.0101618930094,0.0106028949502,0.0104786758055,0.0104330327898,0.0104136683698,0.0103893725113,0.0104259929469,0.0103545296735,0.0102306004294,0.0104238556532,0.010389990338,0.0104969973671,0.0103071219815,0.0101780761597,0.0105312462354,0.0106284845886,0.0105883380851,0.00990116183061,0.0102376848555,0.0101161807539,0.0100690912966,0.0106607269657,0.010406263158,0.0102272190085,0.0104894198139,0.0103177864842,0.0104275494447,0.0104233062869,0.010476373758,0.0102466143619,0.0104983529903,0.0103154571044,0.010026907239,0.0108085622162,0.0101478157693,0.0106957722818,0.0100169152971,0.010455390772,0.0103024991747,0.0101326038192,0.0104763716269,0.0103716727811,0.0104512056108,0.0103352545601,0.0105057537535,0.0103066071368,0.0103777107978,0.0103351472571,0.0104729284094,0.0105304279431,0.0102784138383,0.0104472084587,0.0104105646332,0.0104046390967,0.0103735291194,0.0105213028297,0.0102955191536,0.0103199719611,0.0104353926598,0.0103801909395,0.0103816307822,0.0105494398901,0.0100165544272,0.0103996804008,0.0106374620613,0.0104824765169,0.0103194283971,0.0100577910466,0.0112101625943,0.00996356775442,0.0100947478687,0.00989814650082,0.010439548638,0.0102679761422,0.0112385359254,0.010421211493,0.0100379463691,0.0103950151787,0.010726230978,0.0104432167631,0.0104336127093,0.0103559008815,0.0104157627818,0.0102148823818,0.0104090095288,0.0104257625263,0.0107357904547,0.00999945313973,0.0109118094665,0.0100409723257,0.0117604297485,0.0102814527367,0.0105849948808,0.0104823360426,0.0103737661143,0.010520602389,0.0106408431912,0.0102315426789,0.0108889680865,0.0102208515909,0.0106068762633,0.0105064446017,0.0102439741615,0.0106259091726,0.0102377147531,0.01038566821,0.010636013675,0.0102191499325,0.0105922974907,0.0103018993821,0.0105325554545,0.0104663030199,0.0103335734599,0.0102861435747,0.0105332779112,0.0102964311894,0.010457252943,0.0103915147182,0.0105177784279,0.010286436175,0.0105712252127,0.00973953315413,0.00976272593107,0.0104286388705,0.0107000130994,0.0108024844564,0.0107783961604,0.0101580358099,0.0100672300583,0.0108181672204,0.0102174766005,0.0104603372505,0.0105154613828,0.0103020738729,0.0104224027739,0.0102564961927,0.0102326989554,0.0105952849481,0.0104793243408,0.0103844203258,0.0104232799925,0.0103145748686,0.0102726369438,0.0105533022088,0.0101479557541,0.0107301513358,0.0100486045995,0.010360789415,0.0102545180342,0.0105005056614,0.0102609970001,0.0106145460361,0.00994765073092,0.00981465065597,0.00982489664599,0.00976559610814,0.0109414473467,0.0106201235939,0.0101092808495,0.0105736946518,0.0103694327304,0.0103192313396,0.0105177136969,0.0104718653874,0.0104270017035,0.0103250640859,0.0100817221137,0.0109109738748,0.00994814793658,0.0104254161388,0.0103180800543,0.0103030789878,0.010524625347,0.0103350740716,0.0103944217331,0.0102442632863,0.0105244301898,0.0103439904592,0.0104573647864,0.0104722468957,0.01028267819,0.0103674787171,0.0103502957597,0.0102667621535,0.0105681576668,0.0104663708965,0.0104769532039,0.0103457698529,0.0103574577707,0.0104382733318,0.0103197006878,0.0100538388717,0.00995075402731,0.0101206060627,0.00995331507407,0.0100578207457,0.0104158303816,0.0104301169891,0.0104386145452,0.0104064498619,0.0103399351751,0.0105209214779,0.0103452285742,0.0104419732953,0.0107071224213,0.0106752611645,0.0102406310456,0.0104923136905,0.0103097721844,0.0104393903775,0.0102898168233,0.0105393525089,0.0101767462282,0.0102841450902,0.00998942151685,0.0101800367877,0.01084721793,0.009734897682,0.0109260257052,0.0102456676399,0.0105789024109,0.0104599864875,0.0104822281837,0.0103820741704,0.0104285369685,0.0103455148101,0.0104303997288,0.0106010102233,0.0102591025994,0.0102517169704,0.0106078654894,0.0108245977589,0.0103558918938,0.0101363038169,0.0105674304632,0.0104333354227,0.0102716723924,0.0103054485242,0.0105362431125,0.0104126955424,0.0103473132946,0.0104267742674,0.0105557182469,0.0103527299755,0.0104703279724,0.0103228305301,0.0103221024539,0.0104720191505,0.0103837305983,0.0104902052888,0.0103264793627,0.0105685604239,0.0102930359814,0.0105793136321,0.0102713441523,0.0103212061712,0.0105033942738,0.0105440901264,0.0105701321081,0.0104635661701,0.0103323114209,0.0105792881274,0.0102786768001,0.0104765528355,0.0103877353952,0.0104298319571,0.0104368954615,0.0104860066706,0.010181002528,0.0103764408875,0.0104649322915,0.0105715309563,0.0102029533268,0.0104765573466,0.0102962145868,0.010377042657,0.0104474353656,0.0105120052172,0.010446452957,0.0104517699589,0.0103801454764,0.0126117052418,0.010514356636,0.0103360202172,0.0104086295161,0.010379064172,0.0104386936899,0.0103268469775,0.0104984825647,0.0103061638974,0.0102802037239,0.0105264753332,0.0103544616703,0.0104735849024,0.0100856485609,0.0108943217064,0.00981062591665,0.0101495740381,0.0101051903435,0.0106256969358,0.00985767338481,0.0105083919744,0.00977400037058,0.010466987402,0.0099711860491,0.0122879598083,0.010109674594,0.00999176835826,0.012313514403,0.0101107492776,0.0105366457437,0.0105861923899,0.00973484714554,0.0106009464116,0.0102165289935,0.0102025663645,0.0105801859246,0.0105723333349,0.0102275651765,0.010248460351,0.010189044006,0.0102292453826,0.0106316436328,0.00977009858869,0.0113309269221,0.0111063695494,0.0107866946227,0.0107264625043,0.00998991010352,0.0106636013034,0.0100952071429,0.0102984111942,0.0106433956275,0.0105718056954,0.0102402217631,0.0105381434608,0.0103984183882,0.0105132563727,0.0103803649239,0.0108026400336,0.00984326758333,0.0100265135398,0.0107042515987,0.01028666347,0.0105122349979,0.00971816063564,0.0102200356363,0.00978196840318,0.0105213138109,0.0103704634776,0.0105033392396,0.0103426082918,0.0105118603761,0.0103541931863,0.0101001745445,0.0102947291216,0.00978377143856,0.0108766034506,0.0101029910007,0.0106194911627,0.0103369900269,0.0103152565103,0.0103162823072,0.0105034481012,0.010454645163,0.0103455305102,0.0104551342674,0.0103522697453,0.0104513079097,0.0103719067083,0.010429672737,0.0103945441147,0.0104315955703,0.0104178289827,0.0103764778845,0.0105277505475,0.0103108660918,0.0104980631862,0.0101878997834,0.0111708221392,0.0098292427362,0.0103846361875,0.0104640541941,0.0103774099447,0.0104573617106,0.010518849425,0.0102449887704,0.0105328661897,0.0103937715743,0.0104028140343,0.0104708661801,0.0101974823052,0.0102041634612,0.0105451045129,0.0103657840394,0.0103179733448,0.0105348791332,0.0101971217943,0.0102799432237,0.0105376923549,0.0104837583315,0.0103273773779,0.0104039900379,0.0102459878554,0.010564352648,0.0105360951252,0.0102148302114,0.0103499442861,0.0104167938561,0.0102720268997,0.00995263560462,0.0107659051632,0.0104442333927,0.0102988444499,0.0104479433355,0.0101298691408,0.0104807213927,0.0103470643527,0.0104688806579,0.0103789354974,0.0104460541162,0.0103832977757,0.0103401179088,0.0104873969886,0.0102896653105,0.0104552630651,0.010330784568,0.0104379573025,0.0103707004801,0.0102870585058,0.0104459602852,0.0105361969029,0.0103221388172,0.0102516440799,0.0102826247961,0.0105801969368,0.0104693530802,0.00996696624034,0.0101232138894,0.0102851108575,0.00996453096387,0.010269631969,0.0102653695654,0.0105875722514,0.0103842156691,0.0103915801797,0.0104537872253,0.0101144597229,0.0102781139795,0.0102416553707,0.0105798788237,0.0105974583607,0.0102990443397,0.0104979684585,0.0105996268063,0.010458716422,0.0103251244274,0.00971443551925,0.0108631965795,0.0101171462212,0.0102389939703,0.0101441783305,0.0106264602867,0.0105919050444,0.010264506373,0.0105826002222,0.0102265318749,0.0106365873095,0.0102239071152,0.0118452417,0.010006523078,0.0100807716581,0.00997590707994,0.00986124087442,0.0106741410185,0.0100314476527,0.0101869763477,0.0102823024125,0.0105386690093,0.0101303840856,0.0104915255053,0.0103320531191,0.0103474528655,0.0102308842903,0.0106424402995,0.010031145399,0.0105391378433,0.0103266564548,0.0105670987977,0.0102270911374,0.00983690986944,0.0103572666865,0.00993030324082,0.0116984823348,0.00996989611834,0.010564560988,0.0103372883495,0.0102901266503,0.0104959796218,0.0101513240611,0.0107953890218,0.00968670248461,0.0103414739227,0.0102819233958,0.0102712761527,0.010516094657,0.0102196488809,0.0105661896321,0.0104210540684,0.010323668271,0.0103915174444,0.0103083852474,0.0102627345415,0.0104522171906,0.0104622067846,0.010344578738,0.0102724997522,0.0101165026992,0.0108071142406,0.00964052880432,0.00981228132036,0.010261497294,0.00989648386037,0.0113490892888,0.0105308281335,0.00998533726909,0.0105736954246,0.010206639795,0.0102930963238,0.0105325937631,0.010321284861,0.0102425013678,0.0104996214576,0.0103055240111,0.00978564784786,0.0101568514701,0.0106011502919,0.0101748377971,0.0104312961324,0.0104085802323,0.0104457125616,0.0102159738571,0.0102893855808,0.0102600730987,0.0105990581274,0.0101831061674,0.0106041619118,0.0101820775503,0.00974975534291,0.0103430455291,0.0103875397665,0.0104206789484,0.0103525996707,0.0104207724676,0.00998163268985,0.0104182517095,0.0104206474616,0.0104709458888,0.0111103689831,0.00988777538662,0.0102812259436,0.0107277842339,0.00993074780976,0.0102493219154,0.0106170291905,0.0102456302664,0.00979602911541,0.0106451664731,0.0107113932713,0.0109760838109,0.0109145214197,0.0100012761805,0.0109007596452,0.0101841337823,0.0105582099846,0.0102192285419,0.0100742900767,0.00998596401348,0.0107054116917,0.00988152376167,0.0110425862967,0.0108760446164,0.00989191724094,0.0101217233438,0.010134878759,0.00999259715767,0.0107150694152,0.0098593512599,0.00991954904544,0.00980840686291,0.0104569314988,0.0104606792545,0.0103252079822,0.0105616768184,0.0103524704496,0.0104822869481,0.0105447886297,0.00992501071612,0.00988965271451,0.0101754608903,0.0105235017559,0.0105265699774,0.0102490824411,0.0103076669891,0.0107131780819,0.00979060339584,0.010029194837,0.0100999177045,0.0109459494847,0.010962588777,0.0103099856973,0.0104116346993,0.0103351316633,0.010529481017,0.0104618972089,0.0103706264382,0.00984331493696,0.0119909456688,0.0102202016912,0.010362622068,0.00976856865114,0.0103040954981,0.0120205113236,0.0105562986467,0.0107819527423,0.0101087123915,0.0106769178624,0.01039411808,0.0103464138827 }; const double PHI1210[NST1210] = { 1.51621748696,1.42546447445,0.109058343346,1.56445379233,1.55798683491,0.520980156459,0.469899633873,0.87373173256,0.954501863164,1.03511866581,0.393425208283,0.510671615249,0.591789667674,1.47112653296,0.752864111266,0.843304679863,1.56498865885,1.51865874951,2.83456368525,2.86991016082,1.65072729668,1.55291854816,1.50920324608,1.50991498292,1.42171950984,1.0207988842,1.63981274311,1.78972890118,1.63841200247,1.7117897205,1.57046937264,1.56567311076,1.6498045011,1.41752518702,1.50592781646,1.49807896573,2.15882685451,2.23660332996,1.27915839414,1.52166066125,2.061721988,1.81808439621,2.14476664434,1.28386869155,1.36638352668,1.14751335141,1.17295588267,1.82264821059,1.75451684981,1.65887477765,1.70304843556,1.79312812917,0.200057567547,0.381278832452,0.445883474125,0.256513761537,0.346048782375,0.619218716796,1.28946687519,0.960429121203,0.888589437371,0.989360451037,0.907229217026,0.718407180851,0.646655605475,0.637233688422,0.606283109897,0.664252151439,0.510007642709,0.592312319773,0.66202481531,0.663677505974,0.757638447601,0.969912780932,1.45998092358,1.38309007407,0.94125192599,1.01976903239,1.2740644261,1.18824717469,1.13953306308,1.19904326906,0.991349896651,1.01301779024,1.04706137615,0.994551729828,0.927890808349,1.00876443541,0.86220882135,0.901030579275,0.726705431498,0.935438293162,0.856987601762,0.782260933653,0.793873721134,0.903446914126,0.946686669536,0.879487615093,0.694753182722,0.402298193234,0.337428296842,0.245926004518,0.0753444502176,1.00056918283,1.06642130372,1.08069139571,1.12045267983,1.07560481409,1.44724190656,1.46842180743,1.50085320051,1.13382602304,1.23631397355,1.27284682049,1.22096651596,1.1392902951,1.01754547767,1.0495131794,1.35876735159,1.44976805515,1.56408302728,1.54398573104,0.995246030941,0.941802903674,0.865988348564,1.09618704417,1.1470078176,1.28790338176,1.40270384287,1.38542159045,1.4305816398,2.11019468331,2.28095869006,2.36387190523,2.67324507032,2.11686689782,2.07360110188,2.75501996197,2.61770380514,2.7026767109,2.71139849403,2.68574973495,2.37355631626,2.16783347667,2.24575042977,1.37676447051,1.41893306669,1.28638175188,1.37425991061,1.38322514765,1.40237174935,1.43542131751,2.0660843809,2.14474543623,1.9948969773,1.9175977813,1.98608104252,2.21557782354,2.19267019536,1.58838533313,1.65991413722,1.71949567449,1.79081667336,1.71428020128,2.54577867832,2.46534458112,2.1538026667,2.12948321251,2.15586001525,1.92794133358,2.08117430588,1.92556268542,2.00102552088,2.00477395763,2.08253681563,1.84907341052,1.61739446592,1.61931622624,1.6973574852,1.77521418768,1.92823281521,2.08730703273,2.01127209031,1.9323349165,2.15421182913,2.00134262949,2.08147381255,2.16554050611,2.24205212794,2.32119093523,2.31490808102,1.70626483554,1.77977538072,1.31712966935,1.33727179584,1.34134232814,1.41540170915,1.49113733373,1.17479227678,1.12558717781,1.17506127358,1.26077963103,1.3222351575,1.27720848287,1.31410229819,1.54647554488,1.40320407797,1.46544769758,1.40215714737,1.76947014894,1.80610528942,1.99574767591,1.85706787095,1.94023246978,2.34212132719,2.16330169743,1.9038583572,2.07521589081,2.02735219681,1.94461207487,2.14217329809,2.29826044789,2.21053579703,2.16320260033,2.19851608795,1.44148849256,1.52246922475,1.25480845733,1.12805198472,1.29432137145,1.21868125777,1.21346841489,1.27480751613,1.61878658926,1.52854651741,1.60718249163,1.124634882,1.20880916689,1.22066117625,1.05073945676,1.07853534877,1.02085560505,1.134943739,1.11211021177,1.12226538172,1.04968433011,1.3057402632,1.25306720784,1.20680601886,1.21556417046,1.43317781257,1.44382660597,1.36908900928,1.28398188141,1.45491304368,1.37468443343,1.36035535067,1.91799623027,1.99964589637,1.97542875051,1.90556797852,2.06049642712,2.07251254336,1.76525248273,1.84564258119,1.7733920621,1.85056106318,1.80547472892,1.72119743093,1.76577638084,1.70162140908,1.75394937577,1.83052141039,1.7046661718,1.65635815812,1.70106439141,1.84286015619,1.79833773814,1.82658935581,1.9114940973,1.76715954499,1.93553131855,1.78797661948,1.8712804856,2.36655159941,0.480611488298,0.569981750219,0.245979658071,1.22574472538,0.873004343111,0.844734426653,0.716191030292,0.796283068156,0.805408543896,0.639676714409,0.559497534439,0.411106024682,0.495948625414,0.564206108719,0.754334342969,0.718007521774,0.937307865486,1.01324106495,1.17357745353,1.2458886128,1.29639879695,1.26007464778,0.972206068648,1.01477817641,0.700123556798,0.881820475048,1.4127740756,1.75057202843,0.77657090957,0.869064219957,0.884341502677,0.708802378054,0.826931740893,0.744822268548,0.966448482132,1.03043456344,0.95976169299,1.11581441294,1.13837599718,1.01373041691,1.0909685482,1.43276183986,1.34051078414,1.08798057271,1.17144376064,1.08497543019,1.15664737865,0.321760010476,0.506819466206,0.436534026658,0.587993559024,0.609738299562,0.162529415947,0.317373368073,0.233200502628,0.920629240865,0.751293899718,0.641076692096,0.489348684258,0.606018851568,0.517347699528,0.723357949878,0.723602455217,1.08755645306,1.27691571419,0.75127565442,0.813155212937,0.793305595835,0.663589077967,1.01485260341,0.946717676798,0.966041099499,1.10069671692,0.640269752675,0.473347013309,1.18559552978,1.0316913021,1.09946891195,0.602023243749,0.218279419074,0.191385124784,0.1148180178,0.101028080254,0.269600879529,0.340659461224,0.254715009671,0.420727314368,1.16306272756,1.06946757815,1.04321291353,0.953182115511,0.87468832841,0.80275876655,0.96252770523,0.895885868154,0.814724284857,1.11625630152,1.26317453868,1.19154265442,1.8211545125,1.19580790929,1.36285560159,1.34014121063,1.16695987653,1.30934676049,1.22594157233,1.07461204656,1.11320880095,0.982582952745,0.967550223917,1.05206826706,1.3838074738,1.3479395398,1.2482494423,1.3316841505,1.21150773602,1.2591966438,1.51662414796,1.42815130134,1.37629781033,1.48685174111,1.39789956561,1.36081274481,1.41287006953,1.20080419798,1.29268319762,0.828572708653,0.733204656174,0.689118976497,0.742491636257,2.17141482351,2.13141750076,1.95600296371,2.02215969881,1.86925409128,1.84902933874,2.26526177373,2.32992381535,2.30803465357,2.74765021823,2.41160819502,2.43005160247,2.51566451626,2.5800920616,2.96389953208,3.01337152006,3.10217365136,3.08159200375,2.77525594451,2.79190638933,2.86611188244,2.94353249107,2.92381062593,2.78079040411,2.832285651,2.68966235731,2.76378892706,2.807416985,2.82423779997,2.6758623166,2.75235042698,2.52733669605,2.45119394635,2.4499729615,2.60564100422,2.52346851599,2.60339896034,2.29920903436,2.14529152973,2.50903566048,2.42360502333,2.45595056069,2.29876206851,2.25777760214,2.39096663195,2.43591916852,2.37172090159,2.35924291393,2.2745421722,2.20940175931,2.22121656685,2.29852960606,1.97354235465,2.06624399309,2.10364225423,2.04762717024,1.9073529231,1.95743913154,1.92044251652,1.8206646673,1.23945446826,1.10566980448,1.15029841005,1.285377037,1.13363567848,1.19409806413,1.31417530776,1.28382146245,1.52242400145,1.55858635392,1.64546722934,1.47804589605,1.42427655996,1.45625783033,2.30706209879,2.2960085323,2.4444309568,2.36216672625,2.45676200477,2.38524997385,2.23674892497,2.15502211807,2.08575437609,2.23220494627,2.08358086332,2.14828270669,2.76712151989,2.50523742639,1.52630423263,1.59821135725,1.74190700732,2.46632586911,2.54811759785,2.62783683967,2.61782531807,2.39030850366,2.30996438205,2.31286371551,2.39162721559,2.23710099637,2.23548172245,2.29826488674,1.70292650367,1.70206758043,1.7789294834,1.85782048516,1.8569091702,1.77892739242,2.28322058945,2.14321490598,2.11264825762,2.01129249008,1.9333645814,2.55584574488,2.40084602811,2.42694454061,2.36815802848,2.38743609112,1.44695502062,1.52615175082,1.33399286132,1.35941559683,1.40874051353,1.56389775747,1.49074685877,1.41893113306,1.66370473724,1.60891271899,1.78605970057,1.75252174124,1.87589711531,2.03297652876,1.94455914855,2.07412670221,2.02190013353,1.89520833479,1.93165843809,2.11925099314,2.17448107779,2.08292436574,2.10384921598,2.22146374272,2.14258612661,2.01058442775,2.03866790716,2.20928681373,2.24593626836,2.18787008773,1.99124013472,2.05936399154,2.0422918762,2.28817272254,2.46713379306,2.34118059935,2.4278270104,1.59388718,1.27747857533,1.4431702802,1.37120089402,1.67276264547,1.32023350252,1.45633006977,1.30441473947,1.37518754299,0.63666580982,0.717382527554,0.957215970136,0.968337620955,0.876419077333,0.804679557991,0.958028072496,0.96664254161,0.875790188666,0.80054989109,0.74717858288,0.812109086118,0.895725155146,0.770476976517,1.06390386231,1.16802601226,1.14946496969,1.10224314373,1.4656223874,1.39645739602,1.37916238453,1.39925181719,1.31506164745,1.30268407209,1.55429442502,1.42538247254,1.40514915028,1.47055773444,1.65786921443,1.5739098148,1.51026508567,1.52563360952,1.60542068673,1.67409825377,1.55718985175,1.62973517701,1.71884165587,1.7321353406,1.61434380654,1.51478556439,1.6519495976,1.68279165972,1.84361079657,1.83805426454,1.79442365599,1.93154729157,1.98133163103,1.9367467107,1.9682804287,1.93284810839,1.98176295555,2.11924277388,2.07158814229,0.441716998491,0.35254743424,0.330274693655,0.501109928311,0.48460368558,0.404782138027,0.651088171066,0.736355832355,0.757386239602,0.586280876028,0.617751211939,0.702532237927,0.835278745497,0.998052896503,0.880462771506,0.962430977657,0.804822987963,0.872220882686,0.89812575617,0.84774356933,0.742866722367,0.759679457863,1.11888543509,0.978847870055,1.03028197992,1.01914793791,1.15500576574,1.10602259928,0.737826748999,0.876899819366,0.830969486968,1.8244206642,1.81646147262,1.88663398332,1.96816270934,1.33315662658,1.23882781766,1.25020877709,1.30165751193,1.38303627085,0.35640762745,0.288568466038,0.362819034626,0.30510921371,0.552464333335,0.411312361612,0.461746540897,0.900901910056,0.579652836474,0.502696956338,0.209779923224,0.353951341788,0.287141419934,0.203975431884,0.902764866892,0.865490314477,0.77805002145,0.726743659708,0.904345899967,0.869176887066,0.855738290259,0.767936846218,0.780970433069,0.727527839718,0.703525260488,0.709341375487,0.641037389095,0.556276070248,0.5491919685,0.628082669577,1.15957736915,1.25133651127,1.16655724786,1.20837065414,1.29886664347,1.32145960818,1.25836131412,1.11284051893,1.17278450403,1.14529006913,1.02406243583,0.993370607029,1.05480371127,0.554291917949,0.487908561455,0.604325150637,0.574810776932,0.33891566895,0.427471930387,0.466324070812,0.294196412419,0.435574566968,0.355408212834,0.654343450213,0.572671353839,0.50752701173,0.67059831732,0.640737193886,0.610336478529,0.529328151065,0.59429240779,0.268183741057,0.360612861194,0.249432490657,0.362313678113,0.421345380927,0.47467634668,0.394828759869,1.11271966972,1.11646098735,1.03062841096,1.0328710576,1.27809094087,1.19517664278,1.19372186868,1.35261609623,1.34467670084,1.26868659907,1.58577859045,1.64075134935,1.75927872434,1.72892064332,1.62836204629,1.53892875783,1.64318497604,1.68073143005,1.55392370514,1.50184928539,1.17429838528,1.12286061237,1.21433709989,1.24096514557,1.08113731475,1.0561063067,0.867121294524,0.957703521102,1.00583421193,0.967587335607,0.87719380758,0.824379608794,2.05018243755,1.99794949382,1.91197653135,1.90719352459,1.99315625415,2.01863878546,2.1836631177,2.11743442033,2.03607542766,2.20854185233,2.24741235717,2.33600040045,2.3886304165,2.80489933839,2.89703163809,2.65688029857,2.59410332213,2.50842532449,2.47809997023,2.45167144781,2.47542049723,2.55806187411,3.01088667697,2.93127632427,2.89512818356,2.97157423919,2.84679825964,2.85620030374,2.8021692739,2.72353962806,2.96209993431,3.04642519262,2.87343252588,2.88632625766,3.00714243604,2.92274593079,2.14404330657,2.22040048186,2.13004235291,2.21186405002,2.5287817085,2.71640472174,2.65609342062,2.57053671326,2.37658886665,2.21369265236,2.30693269709,2.2263201143,2.41778902564,2.30035904457,2.38580484576,2.25012142441,2.27730302162,2.35903056916,1.77696374983,1.6432245697,1.68727542108,1.69244010785,1.78619507892,1.82684245168,1.16750806591,1.24374589509,1.29431600725,1.25816068548,1.11314034494,1.15343145825,1.56385548927,1.73648973307,1.61813145971,1.70333251756,1.68185730638,1.59459208502,1.57386165855,1.54061092591,2.29353226854,2.20291229762,2.89677369517,2.927271491,3.01377680727,2.99060373274,2.85085601582,2.8373281509,2.74708135941,2.71027862553,2.37962497945,2.44465444907,2.2968960005,2.41890577989,2.3298822336,2.27244117665,2.59057015505,1.80055318486,1.81290772888,1.68050447035,1.75272735508,1.68889963424,1.76959756093,1.84441416454,1.83585551385,2.45498366463,2.36751604158,2.50399929633,2.52708785353,2.25710447468,2.23141949984,2.2883464753,2.34514800042,2.37850325408,2.41028484988,1.49356781955,1.93529698461,1.86492284492,1.86055924787,2.01047108568,1.95460929027,2.02547395575,2.08429576479,2.22337325538,2.14988226603,2.08728142904,2.16546630404,2.23575768772,2.51411314638,2.56081195031,2.69096530017,2.65023411215,2.48120308273,2.47381396957,2.56201339306,2.542957103,2.6413819743,2.62905294332,1.35981421936,1.39021908125,1.47047721061,1.47345467871,1.62241851765,1.55046283134,1.62576923811,1.55675184001,1.90859742327,1.96919917116,1.84896237231,1.87777441706,1.89754688588,1.92932847575,2.00315666403,1.98193994166,2.51253586681,2.47737312032,2.3878118346,2.33285140557,1.91093592961,1.84183647676,2.55061351845,2.60425602692,2.6101259984,2.56875618637,2.47418646435,2.43310841312,2.47648659315,2.56512014717,2.61736102115,2.31653981324,2.25654522923,2.4269166859,2.40786607817,2.35996513051,2.2805554838,1.59565737671,1.67585714512,1.59963896319,1.67701991537,1.43430926728,1.43719910919,1.51504910589,1.51399468646,1.35575218562,1.35391307859,1.19511156641,1.11725756057,1.03336259397,1.03486832727,1.43537862053,1.44141423597,1.51966117046,1.51682219939,1.23008598392,1.29689477646,1.15010285769,1.67306812284,1.59839441167,1.59524461154,1.75369552744,1.75374517465,1.7523955656,1.8315158638,0.851535288127,0.770147399351,0.749067112067,0.815594349145,0.913993190497,0.898419674762,0.85056269056,0.959979942694,0.879660648178,1.01535054509,0.91140542175,0.995175889825,1.61573079759,1.54658863444,1.69509116223,1.69836837523,1.47144789064,1.62203608033,1.5496256502,1.61632898677,1.53607970655,1.46357466364,1.50825350128,1.57602514033,1.59826315906,1.52000615091,1.6723019196,1.66174531183,2.22416085083,2.19510735473,2.10884739428,2.05407611199,2.08065291427,2.16408357545,2.33489907429,2.24787758497,2.20876716055,2.25527809093,2.38718182308,2.34613359647,0.689526489685,0.595693145996,1.90438162471,1.9862044515,1.90710414691,2.06392183866,1.97805498182,2.05849683398,1.49276753735,1.40342830402,1.42513252075,1.51867766041,1.56167390153,0.207588223672,0.0618928276701,0.147392788638,0.0871973350548,0.174952203737,0.218773410563,0.920149731696,0.982535207083,1.0101966909,1.04124604734,0.767579889225,0.705047672248,0.741131879996,0.858185761523,0.834672726521,0.889839438047,0.805557771052,0.816361665072,0.744481406289,0.658274976046,0.72623517854,0.651332301031,0.589015228886,0.613085605533,0.5542690033,0.462928239515,0.43656846243,0.505367003926,1.26383513314,1.24986764043,1.3463860039,1.42903972423,1.3055321989,0.472868453724,0.391949041072,0.509236570011,0.46611917278,0.375061807393,0.33544767458,0.609006447029,0.529714259147,0.669546477586,0.654518627508,0.572803559422,0.508094889711,2.6196779205,2.52765814665,2.47839485977,2.5117286553,2.56327545965,2.50214870943,2.68291534924,2.66363854114,2.60418116174,2.52339960222,1.65830471799,1.77925218707,1.69390299571,1.71243913985,1.80275345206,1.83399260944,2.14965429921,2.05813796169,2.12347051976,2.18330476963,2.03232622368,2.00039515476,2.52826774177,2.59413347446,2.60857732283,2.53480397333,2.68944232341,2.68135542417,2.78208316492,2.74385943499,2.7144229312,2.62660544906,2.60243544975,2.65399602106,1.86541582902,1.86999641229,1.95360753504,2.19778240276,2.14858331011,2.21665409849,1.90970965467,1.89743280431,1.99362133641,2.06655880692,1.81684007347,1.64995163822,1.69194740715,1.7778928562,1.62150351211,1.68567467492,1.76639770586,1.94040117115,1.95881156068,1.81302350034,1.89547415915,1.64512446347,2.39476707334,2.30981488668,2.46901895625,2.44915026847,2.29446737227,2.36013672687,2.70591665033,2.84642118334,2.75460203025,2.69538353875,2.85882848053,2.77717700854,1.28741554504,1.35675400706,1.35998430691,1.75581881278,1.83526941655,1.83697099464,1.6783267637,1.68107538847,1.75674831501,1.90732801321,2.06445360196,1.98535455268,1.83215182333,1.83123495708,1.90847672126,1.38474360316,1.44638560831,1.41341482495,1.49419200888,1.53803791873,1.55740068927,2.66382688565,2.75542791541,2.62672968579,2.60401392271,2.7076930235,2.77736753446,2.08994323787,2.01194302555,2.11838514913,2.05517453718,1.95485230866,1.97019737529,1.51856905098,1.52923932319,1.46811710867,1.90042302761,1.87565430499,1.79360374983,1.2077258229,1.04323679267,1.05383010808,1.13713191263,1.98227037229,2.12947901779,2.06003322282,1.66429982117,1.60080661164,1.74902948937,1.76248742667,1.69186794384,1.61498064894,1.73075292915,1.6025632435,1.57538454729,1.63959372321,1.19858160404,1.19279065809,1.11342786988,1.11745587875,1.27332897427,1.27513911845,2.09116874565,2.14297477749,2.10890453347,2.01248787998,1.99831469606,1.92787926352,1.92534907494,1.68667241687,1.75079293997,1.83814155669,1.85719611602,1.79303248366,1.70999352128 }; const double THETA1210[NST1210] = { 3.11837166216,3.11932414714,-1.22963658636,3.19412399388,3.04317603454,-1.41134560043,-1.26275007292,4.43556506202,4.38441765386,0.341892793979,1.15728500376,-1.08255320677,-1.07893654314,1.42538814013,1.49480570074,1.51856668002,3.34510391288,3.27175332363,-1.02814170562,-1.30245110029,3.04776369139,2.89072324328,2.96574198838,2.81054402584,2.80585910181,2.70993139419,-0.0563353781581,0.0445747224544,0.0373263334072,0.0880206445911,-0.202449977954,-0.109546829708,-0.242583708083,-0.211451337836,-0.342129809157,-0.253465672965,-0.799469028517,0.644813677546,0.0840530427988,2.00035622248,1.51097219769,1.70377208021,1.503766553,4.66775871893,4.70784426497,-0.724740910668,-0.824202867523,-1.06874404746,-1.02255643391,3.3469418467,3.4281442663,3.44326214087,-1.29999416217,-1.28938303689,3.59116229367,4.6674735045,-1.52958396516,3.67033187683,3.81525718569,4.27818853466,4.20773825767,4.06346686287,4.0944693894,4.56263433465,4.64608051552,-1.22200126314,-1.37495681289,-1.48932329842,3.45957572499,3.51962535768,3.29081390308,3.43059861126,3.46514258788,2.79801295711,3.7617053599,3.83565021177,3.52575011201,3.58727976664,3.71471118928,3.67714724639,0.172609153455,0.0810911906712,0.251338248249,0.0740099666707,0.166749346555,0.434383348028,0.634534656684,1.08803517947,0.971496370244,0.74217778796,1.3709960997,1.1455042016,1.09096312852,1.15907014709,1.28419157129,1.43800127615,1.25730408357,1.32606886665,1.60126803508,0.927189417082,0.776289650834,0.854194557097,1.4069017414,-0.781449671497,-0.703870362461,1.93938144249,2.03067476472,2.36949568234,2.23754231268,2.0746491912,2.16049019563,1.85826645861,1.70914474266,1.80014475136,1.87361318383,0.504453341667,0.612267304817,0.517233665488,1.32703686476,1.34091537716,1.53812872272,1.44292689264,1.93121477759,2.04209268759,2.04624335931,1.76478156878,1.68914603845,1.63940751783,1.50339321376,3.2002148721,3.27681764946,-1.2171998106,3.87948422521,3.92906162731,3.83538602594,3.05219580623,3.14340368351,-1.03022351193,-0.882124461722,-0.830875032161,-0.634147064147,-0.237708911364,4.06027001913,-1.30237137128,4.59040164403,3.04207431433,2.96361699981,3.04370956624,2.88390508472,2.72432927891,2.56469656464,2.64692931875,2.70531832224,2.66937932202,2.5304223086,2.644844393,2.62261303318,2.74017873607,2.85104093092,-0.382827619333,-0.334639797984,-0.192267565004,-0.048829402661,-0.098652606996,-0.777932674139,-0.838260326878,-0.906787242771,-1.11672705693,-0.583515707017,-0.739329093951,-0.639118256828,-0.644198132044,-0.592287379586,-0.789882809723,-0.742351611599,0.65042834881,0.579599465993,0.496449764927,0.626289405519,0.593093557002,0.612467537412,0.526855389052,0.472648188549,0.51670785938,0.691528838564,0.671065350218,0.630222920544,0.476758290183,0.532299178236,0.472595135281,0.3521081073,0.180655733761,0.22780671715,0.473209139724,-0.0737597320978,0.0151050527403,-0.121835955549,-0.0712933998157,0.250387654561,0.334720670884,0.414282641178,0.402075540817,0.173877354151,0.248513825904,0.320388859131,0.451134144587,0.346140182675,0.494259780919,0.442126122204,1.78491022453,1.86657927541,2.37182149394,2.43880178348,2.4479761964,1.91205817196,1.88309760379,1.70275498463,1.6971530215,1.60775568594,1.61293691155,0.797800145728,1.79916728222,1.79175953726,1.6941995772,1.59726073897,4.65957778409,4.70116003304,-1.2842521954,-1.15610095051,-0.999201353016,-1.02933563976,-1.13027358567,-1.18895190039,-1.35553200813,-1.49243682422,-1.44878583288,4.68263073763,-1.56225185242,-1.47004195469,-1.54045770969,-1.07014618784,-0.879001821614,-0.987897801208,-0.900285859946,-0.532677631706,-0.600805994501,-0.916187753059,-0.837115308598,-0.564351673373,-0.654099999793,-0.394670803757,-0.484033170732,-0.538443273013,-0.506255155654,-1.02630678736,-1.06384262081,-1.1527863273,-0.930849276014,-0.888592016764,-1.08197355066,-1.02480307109,-1.04757293326,-0.947486156972,-0.927409867419,-0.880023140276,-0.740714714024,-0.786576311667,-1.16538192325,-1.21349059485,-1.35830807734,-1.3088129645,4.11178976703,4.1478014875,3.27739617221,3.19790411198,3.12671102794,3.37265656914,3.28788762891,3.53209294385,3.55246442965,3.60134381051,3.64659797342,3.69124334943,3.71574833624,3.4539648412,3.78576703105,3.79865007752,4.32378648055,3.86321292675,3.90052391218,4.00849599088,4.42767433064,4.37063879998,4.24726112216,4.34759394231,4.41379565532,4.60662241644,4.68906242843,4.58236522798,-1.07469917328,-1.20614609461,3.41373976476,3.36518771177,3.29975601855,3.12496562751,3.20413759164,3.28670936533,2.98224799672,2.88738165998,3.01677339408,2.98921202379,3.90007973446,4.0190071403,3.56583950125,3.59030428239,3.70110770805,3.67716102143,3.79485900449,3.79467507579,3.75345529045,3.7044817178,3.86909928288,3.74644187321,3.83187782008,3.94605616858,3.92259991149,3.69590442195,3.67027211162,3.54507711044,3.59139164553,3.43415122945,3.40002276104,2.78441062539,3.27085719598,3.15477212605,3.19894504541,3.0467098274,1.52992181677,1.3209794253,1.20926193963,0.0520557050989,-0.0111041319525,0.479497926491,0.844090664081,0.625232230858,0.662553751545,-0.286328786961,-0.424768790898,1.14075541203,0.883226179763,0.694153863072,0.779729489609,0.90314393469,0.733309721862,0.980570147581,0.92040906335,0.812990153716,0.936924892391,1.33400963422,1.23345086636,1.275752332,1.30115478121,1.24318426616,1.8721355232,-0.395876528186,0.512253220305,-0.427528696831,0.390192555403,-0.647090026357,-1.07597190545,-1.010824326,-0.257311821968,0.00159327438444,0.00123005312775,-0.0971723355906,-0.244691145379,-0.295427648697,-0.227407867804,-0.134069344697,-0.0590462290842,-0.100050703288,-0.154820191929,-0.128150858911,-0.094079994922,2.35033477579,2.21090053283,2.22907114737,2.39683186456,2.38260027352,2.30936714012,2.30298467792,2.11076480323,2.20090350896,2.13000012705,2.24124316862,2.27933920814,2.0632875868,1.97595032994,2.12890497511,2.14051176811,2.03906396099,1.96331840181,1.60887938972,1.59188768604,1.66031880117,1.91659338357,1.90363221342,1.81737525792,1.74742194242,0.577229282646,0.558368279874,1.92819652748,1.71734449532,1.84287532955,1.94580433162,-1.5033501868,-1.40820870743,-1.17487711186,-1.24028807522,-1.21402980619,-1.3119299812,3.76150220185,3.67552146252,3.55414274841,2.8825568235,3.71260772277,3.84959784851,3.9057829976,3.80964560205,-1.37940336937,-0.918176143706,-0.569263657795,3.30329868658,-0.281741754039,-0.527273656148,-0.696764383538,-0.54911632607,-0.110818931473,0.14698944896,-0.0755801774771,4.01508562209,4.09441058646,-1.52482352367,4.49469139936,4.42922945552,4.3489651884,4.06056624997,4.1318409981,4.27433892518,4.13704749455,4.36939704083,4.30735392684,4.12031548277,4.22412018364,4.51929589641,4.54828497131,-0.982835060468,4.67959479378,-1.49994664564,4.67160793245,-1.50008047576,4.32359355246,4.45095943067,4.48335066335,4.40186553974,4.28746532976,4.24342416849,2.98320146311,2.97275821257,2.87719303842,2.80375176794,2.74738937025,2.82257518306,2.90702972745,2.75124409549,2.96316670019,2.88382249678,2.96648048338,2.88181291026,2.54643863208,2.46846308257,2.55930370291,2.47596223297,2.65206664207,2.73423999449,2.74033903449,2.32242385046,2.40124921686,2.4859963519,2.57447430905,2.69838624061,2.73619186868,2.78068237443,2.59232373275,2.51519522062,2.50959954645,2.56156488972,2.5059453843,2.39157124603,2.40298981934,2.34272737415,2.66387052569,1.25710821708,-0.520778119848,-0.472456358473,-0.376779593002,-0.553630158545,-0.620793503962,-0.536003797967,-0.368986062637,-0.627595370192,-0.571409345743,-0.814521611525,-0.758877487349,-0.74902617384,-0.635176648602,-0.450964082682,0.450585003493,0.362601798471,0.317897211553,0.367411593411,0.462106277157,0.500077688045,0.10123505184,-0.0598011040823,0.0339175089547,0.374510422334,0.324437925658,0.687789298905,0.532772413658,0.0593521376375,0.15684755728,0.276187184,0.587562756473,0.627213146695,0.704906118763,0.620449777757,0.156403198682,0.07925793861,0.0241719224356,0.0621535098549,1.93645733843,2.01042176294,2.02532769442,1.94348651441,2.03208919727,1.78721674419,1.78747367364,1.87577018056,1.95972410881,1.87014484548,1.9539558368,1.30698986318,1.39923898619,1.11430059044,1.0089008294,1.17446512069,1.19860958606,1.42180867379,1.32196091003,0.867808065136,1.05928253501,0.978289930066,0.77075748547,0.835408730958,0.93682304994,1.58910093417,1.56503347371,1.69338108391,1.69435097996,4.39052380356,4.57739019768,4.0453597975,3.98715782078,4.43132436202,-1.33886469471,-1.44318297279,-1.43243399855,-1.48412031441,-0.933034486614,-0.94472135887,-0.46145751032,-0.569871114784,-0.414744428142,-0.482470361156,4.59818806747,4.70451001071,4.5493601062,4.61687578559,-1.45375776935,-1.54459562139,-1.50729524111,-1.32219700873,-1.44131947749,-1.31726737111,-1.40987071892,-1.24789490294,-0.933560952336,-0.888534854966,-0.623832672831,-0.798096497389,-0.764958341197,-0.680861319334,-1.30820167128,-1.20853590835,-1.29966574589,-1.35189787056,-1.16612463055,-1.21384728008,-1.16667538202,-1.07321375436,-1.02600673777,-1.07144967539,3.77466049805,3.72254181294,3.75204624706,3.83836245071,3.64156529611,3.62821360921,3.4969235183,3.58155838484,3.21651192787,3.06204447792,3.13482744689,3.06477567509,3.14524783542,3.22434399728,3.47819987364,3.38695486242,3.31005502491,3.23046086282,3.31806903779,3.95839803003,3.97041722939,4.21827946765,4.11846316493,4.30440955311,4.37843886551,4.20256277251,4.1622386466,4.03513289663,4.08900282812,3.93951914632,3.92782256731,-1.07276630762,-1.07066031785,-0.96134247878,-0.966975143454,3.3479244948,3.32459960043,3.1941020475,3.09334898982,3.2404192543,3.1142995242,3.22859538598,3.17812919269,3.25855691658,3.07010611471,3.13580455652,3.05808514899,2.89488707933,2.7937492374,2.89002562456,3.9615987815,3.87056482101,3.809199354,3.83939068563,3.57027168382,3.44732143283,3.52908565363,3.37375124907,3.36779080359,3.25206931086,3.06963679052,3.51740883309,3.71667318395,2.92526506352,2.78166329715,2.9528694053,2.3020242808,2.03635504778,2.1035507899,1.93654492895,2.31791036065,2.50457731049,2.39004840188,0.245551818308,0.138565693819,0.118169166964,0.224594800908,0.443676469217,0.549394366337,0.345314539298,0.34526314109,0.57033854587,0.465079665279,1.10075018065,0.961311597883,0.879636913094,0.94838076621,1.12033940838,1.18549588849,1.09501622667,0.972281807355,0.997258753535,1.36319042262,1.3872554937,1.47948060066,1.54668064996,1.5955487666,1.52310759607,1.43171897706,1.57180700914,1.47037079015,1.40331659579,1.74157744948,1.42099514456,1.5954623316,1.44966702144,1.5787338829,1.5868495068,1.764095608,1.84724185335,1.96942118787,2.05046679083,-0.204114864744,-0.273941677756,-0.172406711454,-0.0539859507104,0.209120337636,0.057505697431,0.0124334140353,0.344183649248,-0.125161633524,-0.114481900185,0.235886191325,-0.634984763249,-0.482836749633,-0.896890388144,-0.868229427474,-0.248080858045,-0.438321343365,-0.299836067717,-0.399016741277,-0.417255293668,-0.381619753955,-0.289716188633,-0.360499077092,-0.265551800684,-0.230830744685,2.16832507803,2.09269832138,2.18238350381,2.10041834551,1.8553678014,1.84568503036,1.70106485949,1.78082774691,1.69265480631,1.76263899132,0.662501482588,0.841026610758,0.813041231216,0.727826629286,0.684287879726,0.778234701603,1.82650746643,1.83393109797,1.74839905099,1.6486313337,1.62829305812,1.72049893638,-1.41329703558,-1.33088038055,-1.36335608048,-1.46206522929,-1.49615362828,3.67120850842,3.72741646438,3.80293718071,3.77109188192,3.03881354052,2.93263063369,2.90582064557,3.00214919523,3.09320459353,3.10734780807,2.91675967461,2.78960709741,2.83572048183,2.97891650582,3.47227592721,3.61134929496,3.65059543429,3.75798091435,3.46894033273,4.27670059623,4.36245108534,3.97831185466,3.68396630286,0.392556162182,0.521987179509,0.280727219171,0.566620828074,0.848314821636,0.522669290809,1.29949655136,1.17498995061,4.12009971434,4.06194400111,3.90873677207,3.95024039879,-1.49682914543,-1.49560448368,4.62219933178,4.64366776208,-1.02258232365,-1.08724239837,-0.935919149016,-0.976373196527,-1.25928060251,-1.39250901154,-1.38509351085,-1.290296873,-1.17482993728,-1.15224891154,2.8283741146,2.89647453159,2.82241192678,2.97603188004,2.98224589884,2.90854842477,2.63193499482,2.7993663794,2.71998611342,2.63703559891,2.71339090863,2.79796992272,2.32940082022,2.34366173201,2.25249905048,2.25865746006,2.42018938095,2.41222345059,2.57382423299,2.48983950592,2.00528678564,1.98392904182,1.99646785115,2.74282518267,2.53319550254,1.95568188737,2.54890725578,2.25744991678,2.19967512325,1.99907853722,2.37924478258,2.30027510505,2.32334293693,2.16145905626,2.12243088006,2.2031915972,1.27409373704,-0.235073072553,-0.327867871015,-0.515248522276,-0.468122938173,-0.605908971542,-0.64940230678,-0.600660956573,-0.509636962773,-0.417536094108,-0.37348318245,-0.187044899043,-0.323273383998,-0.213502822965,-0.0931954516426,-0.0222553111522,-0.25529436572,-0.0532549847771,-0.165655411613,1.26044084004,0.226376069738,0.0887284125577,0.179670858718,0.174646057199,0.0297499164949,0.0685723755223,0.216992415744,0.170859252889,0.133771905373,0.319199593897,0.36622949336,0.302707890101,0.072999761862,-0.0609589836709,0.114113916772,-0.0618693169968,0.461960281041,0.323018342973,0.530095088205,0.219985254216,0.43617727065,0.258817217995,0.870699516354,0.7773112305,0.304568496894,0.211407678612,0.314960809705,0.357314562064,0.222806153716,0.172412034474,2.11550274545,2.28561694864,2.19049143101,2.27368984305,1.52600481211,1.43147476415,1.13849736286,1.2382961182,0.985194833135,1.10988254558,1.11912142625,1.02815572703,0.806040552752,0.744850898944,1.54856780834,1.68376934533,1.40896847591,1.82722814427,2.06479521627,1.93141771012,1.81909248368,2.10367350426,1.97922633917,1.48165808494,1.38619655448,1.33581074333,1.45743588898,1.24477296269,1.26903892994,4.30335057935,4.25523034397,4.12786646999,4.16595991042,4.39541398203,4.5709384801,4.52456041265,4.4369019563,4.52928781227,4.44099680254,4.53526801337,4.58669685841,4.44011571008,4.5414471028,4.3079117133,4.13225734314,4.17601970946,4.26262696226,3.9632238708,4.02113904367,4.0024994382,4.51938870714,4.65421307095,4.56586913537,4.56104455184,4.29537255973,4.3846917296,4.2425427209,-0.846001385549,-0.828069455812,-0.696008982521,-0.606061958379,-0.754800942544,-0.645355207726,-1.30255583976,-1.17622257569,-1.18389967646,-1.26732014122,-1.39563418584,-1.36881141816,-0.932309812346,-0.88710773695,-0.882953298148,-0.789268638694,-0.749948576264,-0.745589185003,-0.793737825377,-0.653171391242,-0.611181423273,-0.659478233972,3.91146548665,3.86014595251,4.03831200082,3.99992424316,3.98401003503,3.89398744251,3.53249901266,3.42529456359,3.41277047182,3.49573976311,3.59507651468,3.6186950952,3.33641107817,3.33022825481,3.22979700711,3.12930425751,3.22715637543,3.12005021767,2.78498289014,2.78397002747,3.99723368858,4.13087415455,4.09110629769,4.07449287475,3.93695446756,3.97374676878,3.56309519573,3.53164051618,3.43912068184,3.4214823334,3.4921768025,3.19755824659,2.8599368788,2.80528687432,4.1519693153,4.02519816678,3.63916405812,2.41805327888,2.61881496767,2.44550676832,2.53711186661,2.46077346972,2.55663536556,2.67477561011,2.49214003934,2.68879346733,2.6026979731,2.14372512916,2.25753178739,2.34115340328,2.28797055852,2.08096982458,2.13729764101,2.37196272276,2.5252691959,2.64029590929,2.61007711713,2.41146213213,2.29550071453,1.20757136311,1.12813223503,1.23441516768,1.19390472134,1.05150657371,0.160812236824,0.122947907496,0.343916669682,0.517193364332,0.539219819135,0.322007195163,-0.776792527587,-0.739390956092,-0.658465845473,-0.508673237341,-0.445993749574,-0.555299741618,3.08436892962,3.09706432299,3.22774859578,3.35688994191,-1.36100957855,-1.24052862679,-1.17049379695,-1.33526516921,-1.05398803876,-1.09122775105,2.57831707496,2.66771351176,2.66275152527,2.50246617702,2.51430373453,2.59533401186,2.06439522403,2.04798237195,2.23738061663,2.16740999504,2.21267371921,2.12539083666,2.36398399323,2.26774244373,2.61766472447,2.52459169453,2.53666270378,2.33858770546,0.890058696082,1.09503588319,0.72811267792,0.79008246953,0.962658270056,1.10168636636,-0.0908045844539,-0.183573511431,-0.0571096291961,-0.287649500147,-0.475185853635,-0.407733656157,-0.457086430024,-0.366276098117,-0.495605932101,-0.43504271622,1.53340428207,1.54367322101,1.62287611085,1.62146719565,1.39165415471,1.45924921515,1.45050521205,1.06521011309,0.968592506858,0.933229531443,0.90300823799,0.986559342924,0.659486146307,0.709776880278,0.741799113273,0.87206619799,0.827834257835,0.905993446555,1.45059409001,1.74864651281,1.80850731224,1.65030863237,1.4272035249,1.32299756909,4.12193698649,4.26384920983,4.1743799457,4.6498418457,-1.50486135007,4.68801820312,4.69613748449,-1.49608571203,-1.4525170459,4.2807602833,4.27304024241,4.22626112179,4.51839148839,4.42973520785,4.37912058017,1.04285051896,1.11380674664,0.950837627717,0.939887136428,1.09186226366,1.00977131762,3.23887125029,3.27908741936,3.53769788417,3.37898002281,3.63764831285,3.53791212238,-0.148631966943,-0.137729341535,-0.257575482332,-0.336269037891,-0.216444876293,-0.306648463618,0.852349726905,0.701859872078,0.770132611647,1.25496559714,1.3486072223,1.3600626629,4.15887929314,4.2365405693,4.13413166548,4.09754147691,4.4213151257,4.43437269257,4.37018582963,0.900063330347,0.835976129884,0.871133548435,0.779264751435,0.718444142535,0.745871551818,1.28946496587,1.15746819352,1.24626681829,1.31203537719,4.25454971929,4.44226805203,4.39321636059,4.2949146728,4.3966709598,4.30654839189,4.5332125846,4.6060970197,4.6917751917,4.70420877262,4.52039093662,4.64821267195,4.566705559,1.13954856842,1.20553179148,1.18280606683,1.09242846249,1.02634901722,1.05042299454 }; const int NST1396 = 1396; const double AREA1396[NST1396] = { 0.00894018181647,0.00898190985275,0.00867251788703,0.009150701645,0.0104968461728,0.00862231377865,0.00899449729583,0.00874033629379,0.00939149485975,0.0089838496196,0.00915268615624,0.00888460276935,0.00895829332014,0.00930653610979,0.00916509516134,0.00869548588248,0.0090927836731,0.00920653230867,0.00894923424682,0.00877493050388,0.00862584990874,0.00938537797909,0.00892078607148,0.00895601436726,0.00910987672998,0.00869419894767,0.00887666867214,0.00852025222886,0.008955792361,0.00875006747972,0.00948137642964,0.00886322073709,0.00883286011585,0.00888942520634,0.00876435588376,0.00920615704042,0.00889576969031,0.00906959060715,0.00911609496644,0.00909347632403,0.00906206640256,0.00893933260409,0.00903301369616,0.00900773209736,0.00910940711343,0.00901671738745,0.0090792278104,0.00897711388331,0.00899986164277,0.00899258008533,0.00904807765263,0.00906514807217,0.00936210103878,0.00885044011472,0.00923171643839,0.00886319687979,0.00923331589779,0.00860488679994,0.00912818438017,0.00874278990686,0.00913962603316,0.00900982188294,0.00906326719033,0.00838425474961,0.00922373818429,0.00909367346905,0.00923647741988,0.00896505294824,0.00894184748471,0.0091044387789,0.00902321938426,0.00894457250028,0.00909007240014,0.00899365313326,0.00911598896703,0.00895019283801,0.00873392073821,0.00892321649495,0.00846409591391,0.0103613825681,0.00888497231921,0.00905184190441,0.00888402796087,0.00864291898841,0.00869830639888,0.00865819211661,0.00865193417673,0.00902500548487,0.00906046964309,0.00844135827346,0.00897152433919,0.00913810205854,0.00906533853823,0.00894757504031,0.00924295025494,0.00913968227195,0.00924280132434,0.00913498483163,0.00890825050722,0.00890746735805,0.00914222135819,0.00910050149405,0.00920122492835,0.00909369190868,0.0088551461056,0.00907792990976,0.0093934017487,0.00902926994333,0.00898277861005,0.00897203791064,0.00894396204089,0.00882364984166,0.00911488345564,0.00900544304636,0.00992883719765,0.00917332784354,0.00923501554781,0.00884572732488,0.00909508217842,0.00897844078871,0.00903407444474,0.00916686465053,0.00899310737491,0.00856911261047,0.00853842047526,0.00910841198192,0.00890522813135,0.00904537220316,0.00925409163002,0.00889643040831,0.00853287128049,0.00903565645626,0.00905356580203,0.00894540542949,0.00933580198024,0.00909131760892,0.00883535243506,0.00889553647872,0.0091009262343,0.00929898531415,0.00914201018594,0.00908291042211,0.00901120453878,0.00898175967136,0.00893308867564,0.0089757609442,0.00909120569018,0.0086464595328,0.00850244487149,0.00883462919356,0.00883392735912,0.00917622937396,0.0090856997451,0.00895203607293,0.00945816734825,0.00891922709028,0.00872550437503,0.00922409676412,0.00888470265311,0.00915464296697,0.00912014612062,0.00861830269521,0.00892834983485,0.0103146683518,0.00900313419685,0.0090931174162,0.00914363004999,0.00893449289136,0.00870314797351,0.00906919086183,0.00898111702759,0.008938583441,0.00908333854578,0.00946669542072,0.00923173790308,0.00938930990817,0.008546643907,0.00968987737695,0.00857862220914,0.00868049310841,0.010242409869,0.00861546050394,0.00901034696304,0.00905532442441,0.00900366049615,0.00900692228145,0.00920806819106,0.00919500770707,0.0091967469328,0.00900116593844,0.00901983172682,0.00880412447364,0.0091274748248,0.0089516613288,0.00849865417715,0.00857509864337,0.00855543571949,0.00846543321635,0.00846135401465,0.0103933021656,0.0087659991676,0.00899563627628,0.00907759436512,0.00919360793825,0.00896520016618,0.00899971952551,0.0087584364514,0.00883967666979,0.00859647641738,0.00897713513349,0.00898663522149,0.00885838151696,0.00912774892885,0.0090431269295,0.00895457507364,0.00884806785326,0.00921567974039,0.00887317507527,0.00885168138432,0.00917457983906,0.00922013709616,0.00883920314793,0.00904150504916,0.00906409620498,0.00899747916134,0.00909656028954,0.00924999228537,0.00885109205036,0.0090499450975,0.00910771713553,0.00895731982346,0.00904093199704,0.00915300250915,0.00896471186739,0.00885313433618,0.00915171920589,0.00868930175211,0.00873203318811,0.00860903224494,0.0085515091821,0.0084449390776,0.00928186204632,0.00927564416792,0.00918185043943,0.0088933538498,0.00889800967479,0.0091520121121,0.00902062478499,0.00895194244022,0.00907623884454,0.0088494701927,0.0090476930798,0.00892398119483,0.00861820089181,0.00910747909348,0.00895294229834,0.00918154716686,0.00890454073325,0.00912893413227,0.00903848993385,0.00898167812993,0.00904162317997,0.00893204529694,0.0090945772763,0.00909102837277,0.00891780351454,0.00882159618047,0.00911040596927,0.00898389395732,0.00894234779399,0.00888559368932,0.00916186555271,0.00865995499348,0.00936180660448,0.0088982133177,0.00910979580298,0.010326554403,0.0088262436829,0.00893485203447,0.00901584018015,0.00859076074956,0.00897949759597,0.00896722255753,0.00883190464112,0.00921091324661,0.00870675673091,0.00895171403112,0.0087505250752,0.00962827977253,0.00865982569064,0.00874205988484,0.00859541912656,0.00919375583643,0.00887362524008,0.0104096312468,0.00854122003634,0.00847412301128,0.00856517189859,0.00857798842088,0.00928294003184,0.00881961078751,0.00903438743835,0.00903858503928,0.00915868654833,0.00885551269725,0.00885070894788,0.00871644207157,0.00931217890398,0.00893514332781,0.00908090021821,0.00898293479739,0.00896250758843,0.00897933760474,0.00907840827204,0.00877782591175,0.00847450360287,0.00904244673722,0.00902411207846,0.00895444440649,0.0085331554389,0.00879402483336,0.00920909098549,0.00844638660534,0.00895009480414,0.00894562398321,0.00907951996392,0.00897860435239,0.00904438708378,0.00931479993945,0.00896408579268,0.00932732414882,0.00852659583103,0.00918137788231,0.00874456072717,0.0102549869536,0.00889165452592,0.00876167313161,0.00864789312492,0.00864905201357,0.00922218510312,0.00865726903169,0.00937031020274,0.00845296685132,0.00917730436893,0.00908797469741,0.0091151783162,0.00888936578568,0.00885903714144,0.00886739821618,0.00876754275964,0.00887145934179,0.00924260978035,0.00869995541654,0.00948292697758,0.00852527218398,0.00847854380484,0.0093135753568,0.00885705442148,0.00906830549196,0.00902297086716,0.00899144619648,0.00910275733205,0.00999580723752,0.00874556758529,0.00915572218506,0.00855017964477,0.00931713821267,0.00856635158189,0.00864100029913,0.00857102095176,0.00882801187153,0.00927264381925,0.00867499399973,0.00890530154341,0.00915389146472,0.00879665306997,0.00918069168634,0.00887192357818,0.00894566109939,0.00913056250288,0.00891057684561,0.00901782163788,0.00899144935528,0.00900672874129,0.00887962146152,0.00919078304473,0.0088728603449,0.00861357336076,0.00914249703895,0.00900942975393,0.00891973324858,0.00910348893551,0.00886806468574,0.00889421699208,0.00912819358406,0.00888453361303,0.00920088148954,0.00910690722228,0.009014886988,0.00894843138961,0.00903455169153,0.00904903356504,0.00902761978893,0.00901231261484,0.00905003764119,0.00893699312257,0.00884785829246,0.00911005888725,0.0089494585639,0.00908723847685,0.00893404110098,0.00881837686376,0.00923040679993,0.00866077765947,0.00929655058641,0.00859092916007,0.00966811006624,0.00853259454498,0.00852686316872,0.0106380037462,0.00861011300994,0.00904747086428,0.00889436808111,0.00910297956692,0.00895178780628,0.00907152199063,0.00926309178449,0.00887024605781,0.00892598642762,0.00907959901589,0.00896049772257,0.00911204046818,0.00891096267251,0.00896865139502,0.0092381044589,0.00866877571627,0.00909423139162,0.00911392320807,0.00890440783872,0.00872750559329,0.00887417211827,0.00912685766936,0.0089206401194,0.00902882302375,0.00912395504261,0.00892598963528,0.00900840611622,0.00937696879929,0.00901734954041,0.0088806473895,0.00911297469771,0.00893906566323,0.00911236344217,0.009145497754,0.00906559500156,0.00897216764015,0.00890073267382,0.00910615055856,0.00920650548412,0.00893406888503,0.00912650882859,0.00884945993102,0.00886604663272,0.00921989961671,0.0089302583196,0.00912717873411,0.00896063423381,0.0090914172584,0.00889690750135,0.00890916438682,0.00909174100358,0.00898460947526,0.00863376133939,0.00915951729888,0.00883478342071,0.00919575499112,0.00909554576151,0.00878638036517,0.00909608937852,0.00933140080726,0.00920616128452,0.00898590163703,0.00892146110184,0.00901148464649,0.00901143344113,0.00903393016064,0.00854836217733,0.00935704640766,0.00867900167451,0.0096618340009,0.0086364114073,0.00912951566352,0.0090448089523,0.00907270252126,0.00886779744091,0.00902257050941,0.00876125234842,0.00922167359137,0.00906521002767,0.00894740693115,0.00901849867716,0.00889106007265,0.00910250437807,0.00904864921134,0.00900343225946,0.00890640372073,0.00887309657576,0.00910398605899,0.00895898772995,0.00903504433995,0.00887003606193,0.00895933784473,0.0087048768496,0.00863879473001,0.00865333487889,0.00923839220761,0.00876785580637,0.00912331869027,0.00886331669235,0.00900119292525,0.00901915971404,0.00901304045746,0.00903266766736,0.00876703310494,0.00916567316366,0.00890172300072,0.0090524922964,0.00903457604533,0.00900068574752,0.00901177571698,0.00903077807934,0.00899347143121,0.00901100684269,0.0091947236564,0.00907006640461,0.0088913578931,0.00914621105704,0.00887235843095,0.00884498085857,0.00911849500393,0.00904256600553,0.00893042693569,0.00910635255506,0.00888177999019,0.00881687952644,0.00936573506856,0.00865542284522,0.00946844272693,0.00933294460436,0.00908928369063,0.00853330005479,0.00900472604742,0.00901869878766,0.00893202601314,0.00911799106976,0.00896922599642,0.0088792812085,0.00918644795116,0.00889176450591,0.00893610287833,0.00886917938495,0.00913453701546,0.00908275981792,0.00883750903793,0.00897492905406,0.00884444936433,0.00916012555426,0.00888066014512,0.00897086237293,0.00881298878396,0.00920208602072,0.00905154110195,0.00897343446874,0.00922153888031,0.00887533514735,0.00886868176328,0.00920710283528,0.00849956215555,0.00943860426567,0.00921437232392,0.00901997447488,0.00887825458424,0.00879278375023,0.00900289949109,0.00858282853879,0.00934296962687,0.00888679610612,0.00908127978088,0.00875310175656,0.0089454757621,0.00882084678959,0.00923885597249,0.00930965945045,0.00881486869295,0.00892263236549,0.00892841857256,0.00883677900165,0.00920176670144,0.00895033859444,0.00907977806445,0.0089811861487,0.00908850154908,0.00895937946089,0.00910946609569,0.00909455220095,0.00885924250426,0.00900023100598,0.00908375217996,0.00896510956254,0.00907473403066,0.00883477732184,0.0088902227613,0.00917608770137,0.00920206233922,0.00884937391484,0.00915153081126,0.00884096630284,0.0090797192304,0.00888421084727,0.0088280315913,0.00899067367484,0.00927259187578,0.00902262091603,0.00901834198131,0.00902514356806,0.00894572474556,0.00911815832943,0.00889602951403,0.00893292985725,0.00907301452085,0.00911965142324,0.00893136199822,0.0090554414989,0.00901819898773,0.00903636478775,0.00901504625659,0.00880904160748,0.00913829929916,0.00906698816167,0.00895323058532,0.0090029766731,0.0090943363678,0.00897497890949,0.00893887523819,0.00908147291044,0.00867696404315,0.00886126473659,0.00883216487636,0.00966697217971,0.0091310108045,0.00938045464987,0.00869850519262,0.00910356951384,0.00898974552697,0.00914079921845,0.00893672530324,0.00867884274594,0.00836788381408,0.0104036231847,0.00887919305952,0.00902576108366,0.00905428882419,0.00907877321747,0.00892847976268,0.00913032640417,0.00858211687394,0.00873022721089,0.00956943213325,0.00905794422237,0.00922523945763,0.00885509835882,0.00917321991461,0.00904828136806,0.00917808003835,0.00890736441472,0.0091066942795,0.0092626718391,0.00892504161876,0.00885538878327,0.00907042141307,0.00893368392911,0.00903958570077,0.00901187469578,0.00899504739525,0.00907886899241,0.00906622442202,0.00899326094203,0.00900094200996,0.00896788574071,0.00909312747161,0.00891225629944,0.00908862686241,0.0088343018203,0.00898127508001,0.00886338009119,0.00898490985023,0.00906936590815,0.00852838516772,0.00834874392155,0.0088503389592,0.0104803712025,0.008544774087,0.00909825214352,0.009243694576,0.00911592284361,0.00891724409674,0.00892843927359,0.0091239114152,0.00890398278581,0.00904012076161,0.00899410865948,0.00903986612097,0.00898009800956,0.00914157645147,0.00889795044859,0.00891682775825,0.00887615850699,0.00914761960972,0.00900107194686,0.00875130489641,0.00889551712423,0.00916357014974,0.00886879220661,0.00852645271018,0.00929658092211,0.00909608437364,0.00856461513573,0.00896900037195,0.00861683402429,0.00963480210964,0.0087131256555,0.00889806685111,0.00904848999427,0.00854846320759,0.0104607706485,0.00843001570329,0.0101405419384,0.008995843026,0.00852734623501,0.0092327166597,0.00895339338177,0.008792981739,0.00913286770759,0.0089398904372,0.00907509107026,0.00903790520775,0.00905742609952,0.00889431644313,0.00899058231119,0.00894005299035,0.00864333337914,0.00918971170416,0.00886052587865,0.00916217319862,0.0088382986597,0.00893489759847,0.00919027703289,0.00929555415277,0.00907397592584,0.00895347447769,0.00910433231314,0.00917807084844,0.00899775367337,0.00910593661867,0.0089002207995,0.00912395739721,0.00880335053144,0.0089296497892,0.00909198833163,0.00896933693168,0.00857540518964,0.00855976223624,0.0100605501726,0.0089617974054,0.0092102530412,0.00860294228807,0.00903586678252,0.0088981299645,0.00909421336342,0.0089664023618,0.008899375286,0.00916051114098,0.00899754333456,0.00903959276469,0.00900116398003,0.00897577095174,0.00902170785629,0.00902071587287,0.008960724269,0.00924554101257,0.00884124636382,0.00911891668284,0.00908968578628,0.00884409251623,0.00903315745122,0.00901164690061,0.00906762066073,0.00896457027809,0.00899628292686,0.00890802113874,0.00914761318856,0.00887202154472,0.0089727831834,0.00913332381603,0.00886685580454,0.00858066442055,0.00872073207009,0.00971542345045,0.00899767558098,0.00858030929888,0.00899941516085,0.00901028434336,0.00900466789579,0.00910010084498,0.00896006290051,0.00908230463959,0.00890903472828,0.00893067567034,0.00904259432722,0.0087330003146,0.00887413042866,0.00916514143747,0.00895583518321,0.00886564515787,0.00910203546982,0.0105688091132,0.00871356532967,0.0084012974985,0.00846298385192,0.00853462360854,0.0089126789934,0.00934849590144,0.0087960330396,0.00993262921113,0.00908705405867,0.00917858278529,0.00907052966149,0.0089105188785,0.00910810886799,0.0088840361766,0.00903403659287,0.0091003034802,0.00938399186347,0.00852269852588,0.0089627709833,0.00910620218682,0.00897471095941,0.00907021277555,0.00903572456593,0.0090057202437,0.00862822863877,0.00924788759998,0.008844844594,0.00897158341394,0.00903837592839,0.00888670720097,0.00915719347738,0.00922044553686,0.0088695049298,0.008828004086,0.00902009928353,0.00899840072723,0.00881591198662,0.00873696514728,0.0095373059534,0.00942797739806,0.00845600026283,0.00922912416849,0.00898131522893,0.00908251552124,0.00904163896841,0.00921143157743,0.00925706670599,0.00883705641713,0.00887338138677,0.00908679314236,0.0089897711341,0.00915544380238,0.00849730376389,0.00898046841346,0.00892338029721,0.00897152075476,0.00906265781476,0.00899282273748,0.00910480877681,0.00901805404251,0.00902639325784,0.00916410588253,0.00886568325064,0.009192796137,0.00888996627894,0.0088518639191,0.00919472937365,0.00888850830246,0.00895715999668,0.00918337409883,0.00886180687763,0.00923321081932,0.00893438398044,0.00913716374285,0.00889354134261,0.00905013654332,0.00912153637417,0.00899732923084,0.00867411119051,0.00925159592404,0.00879644784955,0.00898981304937,0.00887351938405,0.00910103120683,0.00919327189621,0.00902652440718,0.00904799432679,0.00892572406353,0.00903596138546,0.00907598075089,0.0089405395136,0.00901833365199,0.0102184192327,0.00858107170212,0.0086125248602,0.00940958470017,0.00918692732057,0.00898776086166,0.00901407361258,0.00897820075319,0.00905697552937,0.00891737014289,0.00909447665624,0.00881058204675,0.00883542265152,0.00852058854428,0.00940717317487,0.00923487891464,0.00872825147537,0.00860954094543,0.00866552253333,0.00955520186769,0.00856663278833,0.00935261259995,0.0102169140167,0.00876812778031,0.00896787549342,0.00904054327342,0.00904945216228,0.0089708818813,0.00909676745096,0.00893536786323,0.00887014574465,0.00920215188397,0.00919016932364,0.00886802410618,0.00886468069782,0.00921230040136,0.00915118339741,0.00895680659144,0.00903489351315,0.00903236423349,0.00917329524331,0.00874540013004,0.00884348443799,0.00885425896553,0.00916276124673,0.00873247369693,0.00895506347131,0.00880673404411,0.00907524124699,0.00901838789217,0.00907591497611,0.0089373909606,0.00910324788563,0.00892826773925,0.00892640715679,0.00889061468806,0.00913477412839,0.00888684067793,0.00917681442322,0.00894455669523,0.00899719330522,0.00903885037698,0.00859922677961,0.00857600465644,0.00862068360965,0.00898445236475,0.00905564266427,0.0090511403714,0.00902034059518,0.00901476780781,0.00903138000939,0.00879850840515,0.00924061963319,0.00907003062161,0.00896463979285,0.00870136537821,0.00897417561834,0.00861152570434,0.00958126296034,0.00856077898198,0.00938470255899,0.0086398975747,0.00872183486491,0.00865401094255,0.0102479755816,0.00859363762692,0.00854220945077,0.00934320329221,0.00871975606452,0.00893102261486,0.00927505409973,0.00877254033705,0.00894872821193,0.00904042091936,0.00892590383732,0.00905145213539,0.00895952872607,0.00908700772311,0.00888858024836,0.00921086466006,0.00899641647695,0.00906011054819,0.00898359017056,0.00924316697861,0.00914292339813,0.00883546107972,0.00890261715439,0.00897383005307,0.00915764172486,0.00892317342303,0.0084730654558,0.00912584947717,0.00894988970348,0.00911191094418,0.0088789041061,0.00897408526097,0.00908518297596,0.00918346105277,0.00905307617826,0.00907423108156,0.00896445363753,0.00907970386648,0.00892725870517,0.00904263108159,0.00895820003099,0.00906013697215,0.00911567077139,0.00894521703067,0.00900583766655,0.00945568368044,0.00936684688943,0.00907130428547,0.00895276957783,0.00933060082481,0.00877944042447,0.00915464969972,0.00895184195671,0.00888828026922,0.00914879102669,0.00908202605497,0.00898557786498,0.008914144751,0.00905208749239,0.009202135267,0.00910687347817,0.00895136095163,0.00901265345921,0.00907887062723,0.00900985822215,0.0090339570374,0.00926009947363,0.00883191930358,0.00914835101179,0.0089091576992,0.00854948616812,0.0109401245338,0.00832933739791,0.00919153999975,0.00878181885923,0.00850622105441,0.00908939709927,0.0090763228982,0.00910114473296,0.00895350638197,0.00903437852627,0.00884158637085,0.00888476912549,0.00919439155627,0.00905030175965,0.00894109095645,0.00910978172418,0.00886225939468,0.00901904334128,0.00905711661309,0.00897747653028,0.0090865411277,0.00907830834102,0.00892716755268,0.00904861381954,0.00899496181915,0.0089467281271,0.00947085361322,0.00872398352009,0.00921557631538,0.00892776638939,0.00905532688681,0.0089946020228,0.00892874181343,0.00895842333487,0.0090682627208,0.00942886888207,0.00920010852972,0.00880300601184,0.00866104332946,0.00853915908583,0.00854568168341,0.00907663285931,0.00934396165592,0.00899790118127,0.00903775812849,0.00865220355307,0.00939328880022,0.00957798500423,0.00931510100628,0.00923901233422,0.00892901011213,0.00852208519392,0.00866190742073,0.00883910913749,0.00890171446556,0.00925846606871,0.00872510548202,0.00917068732535,0.00880877782075,0.00916004297926,0.00893017154199,0.00909604719947,0.00898680987943,0.00907355113965,0.00891384504587,0.00889806284352,0.00891718343143,0.00914024997416,0.00890564853969,0.00911442877582,0.00906073454012,0.00871746783539,0.00922201276553,0.00880860247777,0.00896823858408,0.00921699545688,0.00878498652764,0.00920664379133,0.00888397225933,0.00917365226354,0.00886637332513,0.0105850019097,0.00915571809538,0.00918693044839,0.00885136483407,0.00920569449598,0.00886810059725,0.00922005001684,0.00884722423895,0.00884927578896,0.00914592962854,0.00897920182419,0.00922213545553,0.00889553310012,0.00938073945554,0.00874073222963,0.00887673174284,0.00913760698674,0.00882417471715,0.00899902697849,0.00888800217924,0.0090057168279,0.00903341039795,0.00914534756758,0.0088503065463,0.00858284445304,0.00852809742158,0.00916199200116,0.0087339267331,0.00881912657477,0.00888245571841,0.0089203605108,0.00898412714121,0.00886221458677,0.00894631419341,0.00910828424503,0.0088539184165,0.00913791555617,0.00918713202868,0.00886618322291,0.0088638578925,0.00916049244956,0.00889153446659,0.00903564986508,0.00893362206335,0.00904193189535,0.00909506578262,0.00893296999519,0.00903650043163,0.00890041309231,0.00910208391355,0.00888104065095,0.0091137832464,0.00896947135161,0.00903182828178,0.00898049097894,0.00910641336189,0.00893752496502,0.0090559270263,0.00888391598795,0.00906646093018,0.00871034648755,0.00948035560301,0.00856324980928,0.00916592624877,0.00885039836419,0.00889491862813,0.00897426801243,0.00930070552191,0.00887397864144,0.00896400955982,0.00900227334467,0.00909350337648,0.00885108184111,0.00916754434313,0.00896316534882,0.00893587430783,0.00911616394232,0.00894142405787,0.00896144786923,0.00907332423459,0.00882752835803,0.00870861314385,0.00929179200246,0.00893037632197,0.00912700993507,0.00892815816821,0.00908505470801,0.00902025902801,0.00903176872796,0.00891646552116,0.00912286663881,0.00899962241501,0.0090306035759,0.00892925771921,0.00910055044847,0.00923833045553,0.00872030142622,0.00888322112265,0.0088331212948,0.00900107971207,0.0089156220887,0.00915747268537,0.0089806161344,0.00908103079945,0.0088575189919,0.00886531290922,0.00921394171299,0.00873645883324,0.00918657394258,0.00869420437839,0.00907485201513,0.00890806637751,0.00912793376191,0.00894908766824,0.00892178200665,0.00912471132782,0.00915749743799,0.00894805190845,0.00893474522116,0.00912098268082,0.00920039592953,0.00903077909718,0.00898271650765,0.00879400238974,0.00921152690955,0.00905723241308,0.00896491718322,0.00899054302933,0.00899137960872,0.00902689982014,0.00897316718943,0.0090862671005,0.00883863399618,0.00889905648878,0.0103763388321,0.00865956340821,0.0091202987565,0.00843471517361,0.00927356159696,0.00927001375776,0.00885104717356,0.0091725388632,0.00903061643432,0.00844426029877,0.00864240793322,0.00877470617456,0.00881042817387,0.0084933460231,0.00884975869938,0.00881669976165,0.00927554289878,0.00874857513283,0.00857170777348,0.00929247298069,0.00843062922178,0.0091518637133,0.0102869070985,0.00848574020327,0.00898302702422,0.00907945368132,0.00904755881109,0.0089554294609,0.00889009552039,0.0092244370426,0.00863153996657,0.00893008851074,0.00884064318576,0.00907081826636,0.0089963150163,0.00897566957247,0.00905032984022,0.0090061984542,0.00917805493017,0.0088607007856,0.00889464751664,0.00890381189022,0.00916224408852,0.00911344845199,0.00893353087706,0.00914037355771,0.00892064616556,0.00891594656715,0.0090450337702,0.00902635345456,0.00897103443681,0.00906963103634,0.00903160721961,0.00895086066797,0.009076979252,0.00899963035239,0.00889575716863,0.00878761570063,0.00924140908744,0.00888730254577,0.00913625769046,0.00879610998338,0.00886676695124,0.00914228018205,0.00916286997831,0.00889951350434,0.00885930268739,0.00915711078878,0.00914473444643,0.00893859470725,0.00910310565832,0.00892642544568,0.00898928572747,0.00905796669962,0.00911906103182,0.00891526496139,0.00894575997317,0.00902863036575,0.00905848106889,0.00898542232433,0.00873336683637,0.00856125241584,0.00878497140584,0.00896281204806,0.0089683309849,0.00909888884802,0.00879410353345,0.00925073892448,0.00897507533311,0.00891207387156,0.00919114740204,0.00838938093151,0.00895245791394,0.00894274802292,0.00912208030304,0.00892191406565,0.00911262354204,0.00914949357814,0.00893833333641,0.00890684835808,0.0091388648925,0.00952877065142,0.00850974987783,0.00947733775239,0.00856780409863,0.0087257273796,0.0104880862071,0.00862791466217 }; const double PHI1396[NST1396] = { 1.54276431814,1.47170298581,1.50081248944,0.88698383876,1.48811893215,1.41653240579,1.0230608617,1.25861174738,1.18539335127,1.07448140644,1.15601920404,1.21876724693,1.28597807986,0.783341404612,0.742175392397,2.05647857789,1.5386818973,1.32598996496,1.46676618981,2.73830673409,2.81987772425,2.819628769,2.364645473,2.5792763134,2.49939194063,2.20827804719,2.36824652105,1.3392079103,1.17692571543,1.23219275483,1.31905078882,0.827649129355,1.16845947905,1.21324620217,1.28422571953,1.20919115423,0.367852558919,0.370500023155,0.305036241477,0.215523075555,0.298932987033,0.33614505113,0.389512306443,0.385209393642,0.313968755009,0.233979399417,0.43915662464,0.312528018977,0.238425504552,0.352350309349,0.322506160665,1.10024791744,0.866405637283,1.48593896363,1.51775038424,1.58211291221,1.564595605,1.40722098711,1.46053984908,1.32693582778,1.29640318659,1.10117900644,1.18360005916,1.56006494502,1.54177606551,1.79252174858,1.63700303483,1.86865629898,1.87465995076,1.76270014173,1.72705033642,1.68129353129,1.66343042293,1.77760868399,1.86700584568,1.85642504431,1.61264741456,2.47499249757,0.807423458904,0.902536862239,0.932520225568,0.75719172188,1.09746702924,1.17954728062,0.989973881407,1.04019450576,1.12011114478,0.914201269793,0.834984865833,0.952938872309,1.06090113194,1.04785765501,0.982550178916,0.975321665219,1.4585620691,1.29966612545,1.54445570323,1.47237851461,1.54180976557,1.36301073915,1.35722549785,1.29598465155,1.87618570176,1.63864036727,1.79689095153,1.09465581982,0.214075610716,0.2314649685,0.181371347567,0.226225996134,0.167692271483,0.0974868195866,0.083199487977,0.207505842408,0.532657941291,0.757425401918,0.75667866148,0.753352741729,0.89929946033,0.827298481248,1.27918136643,0.993794559298,0.623240188193,0.640561408204,0.717781643248,0.718925472117,0.685669471839,0.776643340363,0.622030250638,0.824879150124,2.13619383201,2.38368088706,2.46311921752,1.60858931609,1.74443654819,1.39754071622,1.32854327922,1.3243118618,1.3955866529,1.25329051412,1.25101827989,1.61402363852,1.54092022054,1.47094644801,1.61536009498,1.47232092464,1.54362630805,1.8089226082,1.88915902871,1.81131037707,2.05518264033,1.97569940901,2.59346618849,2.66996615598,2.21561185441,2.21895888762,2.29529688375,2.29538670771,1.89490357739,1.97460988716,2.14718029293,2.14366418137,2.07004828783,2.00704437624,2.13277981521,2.21127119536,2.09889831625,2.0633823911,2.34042233891,1.87128062243,1.82891882565,1.99171840762,1.95353474807,1.74273969449,1.56861158235,2.73550670345,2.7816321829,2.89116334158,2.85957098554,2.98763156022,2.90955329715,2.86764600486,2.28869310238,2.36520628607,2.61852481815,1.17268182029,1.21229905412,0.744625224877,0.517719087503,0.676249092819,0.690745870973,0.704215297668,0.646122898522,0.570037860227,0.792182638766,0.742386254176,0.652217327177,0.699013733554,0.867754081377,0.76266294562,0.846387846263,0.467296979105,0.421099462776,0.726995294758,0.358196029233,0.439068260677,0.441408974535,0.415140185693,0.33478890765,0.479795676796,0.586670957605,0.613397291656,0.566507332392,0.509741799697,0.448500245944,1.0527310898,1.09065934558,1.05459503043,1.53263713557,1.61477158795,1.46444049019,1.476631826,1.38527997026,1.46580830857,1.52256408902,1.49757941108,1.42382991615,1.43821848353,1.07095754395,1.02726551255,1.12816656187,1.11055671267,2.0121146118,1.70662027981,1.62559266268,1.6035942036,1.82548725488,1.80257903415,1.87030130614,1.94046031793,1.91173576997,1.79699941644,1.7718669827,1.01011841579,1.13048517337,1.0284823355,1.10768890996,1.07404201761,0.968870933419,0.991836538674,1.70053419336,1.77817597726,1.72879217636,1.58660947706,1.65098575668,2.19622079825,2.1555161696,2.09524725397,2.11527176784,2.26102804118,2.26020461681,2.30303766939,2.43738430453,2.30265365039,1.61412155944,1.61248575838,1.82346852201,1.82858411173,1.75786858964,1.68410442513,1.74961093674,1.68090239983,1.96913819211,1.9017941544,2.04312211021,2.26887763352,1.88108510654,1.98769813494,2.19378564221,2.06813109978,2.13498809778,1.839452973,1.81745508697,2.40078185512,2.34905175224,2.2730676425,0.796834101058,0.887768516496,0.917086200399,0.876111706027,1.12034004049,1.04288873735,0.681740428938,1.04729676415,1.10069590654,1.0378815113,1.18532884719,1.05204216958,1.10883505997,1.08071994056,1.39586191466,1.41626858205,1.36061177638,1.31804750288,1.47967102916,1.35906905269,1.49610198344,1.44006491213,1.65612032334,1.73574275008,1.43958444984,1.50839203509,1.58906290696,1.60048093408,1.42454651852,1.56236630304,1.49910526955,1.2176870147,1.22194741117,1.66097547105,1.69574040017,1.77426572882,1.31964848954,1.16769004152,0.80198691676,0.849750653408,1.03024295146,0.456257601629,0.362636890993,0.41347657869,0.550101014774,0.604074765647,0.466487097457,0.446065283828,0.582905502141,0.510206222146,0.356907573087,0.336987293373,0.290424618267,0.0912714820457,0.172112653651,0.101463913897,0.17993801974,0.449450600697,0.286603363375,0.352780084147,0.427750777342,0.93357639462,0.869963468282,0.964912377319,0.981766404617,0.919622712818,0.846374412202,0.882019634971,0.825557573242,0.796888841036,0.868961404418,0.945714802862,0.957039406382,0.819923909185,0.894063122341,0.714672886787,0.720316017454,0.794526240866,0.863284365359,0.805231624677,0.86796745522,0.576226146422,0.662251449307,0.68476140083,0.82990003296,0.843183378747,0.917027774225,0.898713442598,0.974021839511,0.979462752376,1.44938480369,1.34811628344,1.28402716513,1.36057829967,1.36997523337,0.852910338032,0.69810009338,1.20652869822,1.20982457812,1.14089932445,1.06458688895,0.48058408991,0.556711129025,0.594216341617,0.671409617272,0.542457138357,0.585028917628,0.68045626654,0.716024570329,0.89084664643,0.699006922401,0.856626011719,0.986019351977,1.09975072826,1.06558159861,1.08848173171,1.19336467023,1.11488298268,1.24370155458,1.3941432284,1.46023772165,0.853923508421,0.936491945074,0.843080261591,0.804139202867,2.1679309063,2.11424605204,2.10442040497,1.89312556688,1.88358533051,1.96575854652,2.03012477651,2.04918875202,2.00950301567,1.93566035303,2.11523343878,2.03241526122,2.28139428183,2.36307272122,2.41924013477,1.89054589788,1.97510874573,2.5352875329,2.47598993367,2.50037942174,2.55301549692,2.63433973777,2.52415854775,1.95292956352,1.82587700482,1.86908179727,1.60566768225,1.67279926157,1.86835823586,1.93309906112,1.92761604531,1.97149913627,1.98321337705,1.8641290635,1.9460547523,1.93905915187,1.70484584008,2.35573892617,2.73903907686,2.66991619083,2.20744507328,2.17335467035,2.35860854996,2.26020062693,2.27804296511,2.44346082072,2.43953128829,2.47819861273,2.50187850491,2.57730897223,2.52171057477,2.7275203724,1.86359856842,1.78302313247,2.15331942783,2.17808120983,2.11725443462,2.03679648625,2.0890266634,1.96627453356,2.05090521247,2.80108048053,2.65099056442,2.73407571674,2.78575726545,2.61079153471,2.52250873793,2.4749845506,2.47724251066,2.38999361716,2.50695794565,2.51825004071,2.55816805641,2.51032772229,2.4315864478,3.05982019743,3.007974161,2.99944488821,2.92303037069,2.88904173357,2.6136062104,2.62632583396,2.68155539657,2.76293365192,2.63877193013,2.66996792859,2.20009855335,2.21559493203,2.25387716749,2.12745513144,2.11275191768,2.07811394826,1.86748198736,1.82697154459,1.82358029881,1.99929559038,1.95762406259,1.99955925589,2.08685485035,1.48278305852,1.32155925266,1.69871079731,1.58133824511,1.61233734836,1.74227386858,1.69907700891,1.5667840249,1.61153098511,2.41495581257,2.38068966576,2.49622757792,2.41795129837,2.6506826471,2.59914419183,2.51984233283,2.49191642064,2.6155124844,2.53664869985,2.55361645226,2.41574932474,2.55713803185,2.48551508898,0.581058084423,0.501979597245,0.495926842261,0.473268823113,0.550885053563,0.462207548784,0.534558724634,0.614254750748,0.60863706672,1.15357600752,1.01294833266,1.0770969782,0.929099980165,0.919910693027,0.738732520541,0.823151612281,0.996793126109,0.947718068674,0.867095136751,0.83291674777,0.60460970864,0.552483668543,0.593040519693,0.688755654345,0.723682137677,0.679283199955,0.469712601738,0.509097344065,0.445137282103,0.554809571128,0.836471131104,0.994087462561,0.89113180397,0.967526935665,0.694980051431,0.653633661495,0.734113467836,0.753664500236,0.587672113909,0.60984107102,0.972605010339,0.808102138424,0.938555237841,0.856526025373,1.45140309146,1.37604424369,1.56036550377,1.71176696862,1.63039368398,1.3472338576,1.32871815959,1.20820726518,1.28281583863,1.19128419569,1.24747256804,1.29307447945,1.30945318625,1.38319129291,1.37176174478,1.22334511401,1.21845081226,1.95052958335,1.82616879176,1.86909397031,1.80832991207,2.05176420113,2.06702595345,2.0009562551,1.92210272763,1.90665054965,1.97039738595,1.57093434682,1.59817481638,1.73566871176,1.67990748366,1.43380621943,1.4879123822,1.35015086182,1.68703592784,1.63173068895,1.72650359469,1.66450506461,1.58681387571,1.71371116243,1.4508980642,1.53106508338,2.1308877369,2.18231299048,2.04656121023,2.29195500784,2.37065211071,2.39667731486,2.3384601884,2.2583422418,2.23731672977,1.94211849535,2.01048245789,1.94521620697,2.01502303566,2.21187610877,2.14598796848,2.29098605696,2.3008023347,1.68112540713,1.68364192184,1.68786046636,1.68747581845,1.76030093372,2.04863763027,2.04850945284,2.12377432065,2.12321176763,1.80786568881,1.99254418956,1.90992373065,1.88114529208,1.76715254105,1.84831186719,1.90554441008,2.18543441525,2.24946965644,2.15472136614,2.23302417242,2.02738735984,1.8753027098,1.93696865166,2.0074132457,1.91747338431,1.93243319767,2.00822008937,2.29325997489,2.35775189667,2.23973811839,2.15454042089,2.10800207908,0.762018809859,0.81212772441,0.789676197687,0.712390069172,1.31248314504,1.18416706826,1.25712950354,1.32206065487,1.02722386424,1.00143542611,0.945602742076,0.932682896404,0.540989887151,0.472793775846,0.494637566865,1.33197253564,1.40197663324,1.33135572526,1.40172958251,1.19297634837,1.20486978113,1.12865245164,1.12282704272,1.11325872219,1.1377697912,1.17521027399,1.25618996587,1.22174761231,1.27845048072,1.43340239254,1.45320497572,1.52969361858,1.56357998505,1.5218848168,1.15476669067,1.02466170848,1.16528113094,1.10349127639,1.22216914152,1.18220496897,1.22678572568,1.05522025579,0.927820844627,0.971793330896,1.44007179313,1.48652819124,0.818933779275,0.773708887121,0.713183834013,0.736026104577,1.0433406053,0.21057172147,0.294234666528,0.326547410831,0.314192898111,0.441542255574,0.399945066971,0.500486136316,0.430008492732,0.565031507972,0.557068786909,0.48118726077,0.418794048663,0.242670893882,0.324068801821,0.308521328559,0.240894466898,0.385996016154,0.429276723029,0.406595039758,0.738991141895,0.571280734827,0.937121719344,0.94057353743,1.01323627845,1.08163472827,0.425292584586,0.413779558893,0.631044396335,0.618919275298,0.567126343667,0.485440880416,0.547993565991,0.478664259493,1.42772625099,1.42007008074,1.48653787351,1.48880587154,1.57462857594,1.56559768938,1.31739418125,1.30397911325,1.29239811962,1.42475156423,1.35052100755,1.28483039314,1.1495628166,1.08071513526,1.09385784054,1.22590050201,1.23641610322,1.17298553634,0.711429088081,0.665271078683,0.642201443124,0.791351926707,0.810281432736,0.752259940768,0.845231382128,0.847214977971,0.768123265135,0.769993649255,0.917544198805,0.917693524071,0.879757513951,0.95812716356,1.01152513901,0.855968041585,0.989177237147,0.912181985117,1.35132283495,1.50549644193,1.45053816019,1.37358058092,1.40982019234,1.48693945731,1.14257955138,1.21912958715,1.27486103631,1.25651285755,2.34363390596,2.27178451464,2.19727495475,2.19311062936,2.38880019656,2.43601678727,2.39624817722,1.72177892752,1.64769920385,1.83589613336,1.79936413711,1.86073021883,2.32112201542,2.30143861452,2.37970662534,2.24533733085,2.39969903484,2.33689145051,2.26112312834,1.85116072604,1.79080335965,1.53198818385,1.39377364477,1.46051830983,1.53473515379,1.39624365769,1.46573060831,1.72446165866,1.79241133028,1.64886123632,1.79879392212,1.9241963641,2.05463363825,2.0034545349,2.01626083809,1.92294309488,1.88181702556,1.85221970521,2.0948885378,2.0952080812,2.05395675646,1.82263143411,1.8605977384,1.81619433277,1.66911176862,1.59149755172,2.52382164863,2.44833900613,2.37768310764,2.3768200761,2.52841284344,2.47546667194,2.77222100064,2.7190163528,2.63557063066,2.60744494505,2.65516199392,2.73553284166,2.51494763057,2.65903298612,2.58672084133,2.56386866746,2.29203136473,2.32035173727,2.59544956095,2.51086766853,2.36973164643,2.45222024379,2.4748434938,2.80160846657,2.63419775583,2.71151922761,2.76212519025,2.60133655582,2.71720678669,2.63562181464,2.93123273453,1.93401720565,1.9229434976,2.07374915916,2.00713565577,2.0669687065,1.98931094612,1.75102220405,1.83080195059,1.84419816346,1.77461446884,1.69301454402,1.68272918998,2.04024522156,1.93400170151,2.01483217373,2.07065512026,1.82697147807,1.9073156392,1.95785980713,1.9217959553,1.83660168402,1.79212666766,2.74733088305,2.61852422607,2.60496599027,2.66332038653,2.89199116628,2.962116873,3.02801188181,2.99428378268,2.91219486992,2.86842304217,2.64755870383,2.59037235241,2.61138875569,2.73712125039,2.13101845085,2.08516170466,2.12020396882,2.20333538615,2.54876451961,2.54519927635,2.47441163697,2.92529491563,2.89221835898,2.80575317536,2.75420250751,1.73939706065,2.41274493803,2.47908669764,2.33769525387,2.32651236133,2.3869796713,2.46419362443,0.643589715691,0.722617567985,0.708707705068,0.639331299902,0.788781712508,0.77931948569,1.06796558827,1.1322704908,1.13202334352,0.986509876299,1.06007074251,0.991092218519,0.954840442501,0.970979184995,1.01089122098,1.03066251278,0.929142566642,0.865815781883,0.888197159229,0.943768899408,0.862647587922,0.975127109129,0.930886330195,0.811558351355,0.848672472279,1.31730364861,1.25003539616,1.40320195193,1.41298831398,1.27207056978,1.34891369337,1.57378941131,1.51122354599,1.49977487089,1.59186312095,1.62512712535,1.73699428356,1.76202638937,1.70800960821,1.65669550617,1.59872401133,1.51742044029,1.46068340814,1.16669037659,1.57090261854,1.54392433978,1.62356699606,1.63588344382,1.38478378205,1.24290048273,1.30649358439,2.01770496476,1.93394855678,1.93475326666,2.23172055335,2.23081128358,2.15762112282,2.08714651644,2.08569003927,2.15521426257,1.90355351774,1.83286547879,1.97681813828,1.97634940936,1.53350509362,1.55220075247,1.74569513325,1.58051420694,1.6323496858,1.59951001609,1.67163313893,1.85907532951,1.71815588363,1.76816002556,1.7465819794,1.77064947159,1.79976213909,1.74300932132,1.66063731324,1.63411890293,1.68761254274,2.10958348176,2.0431431543,2.01806863137,2.0951147681,1.97957016714,1.87254203735,1.84460131778,1.89807498277,1.97724874644,2.0079156898,1.9541496956,2.27728197011,2.39312603632,2.361438962,2.33712505997,0.683260151161,0.555323134435,0.636412118214,0.521550528435,0.575481807031,0.655728225877,0.621341698783,0.688449344786,0.767592213933,0.783678681079,1.11976086138,1.26145711104,1.1902543652,1.26111202677,1.19101291646,1.12020986477,1.26485257613,1.40411397461,1.33342797063,1.40876899808,1.34410990165,1.27091909852,1.37225746914,1.38296976659,1.3109456028,1.2359362607,1.22784470439,1.29221590565,1.43852639512,1.47977595109,1.35443555114,1.30977413275,1.48138310675,1.56803396914,1.44645728527,1.11868057075,1.27123751511,1.25550959641,1.17875875888,0.873143856348,0.850600685242,0.908771011211,0.984699503169,0.152927589325,0.0693718009196,0.0656068749438,0.148638172999,0.710291092296,0.683078681475,0.653900105126,0.573384305793,0.530149724777,0.58529910159,1.00585054486,1.00977638309,1.14654298612,1.07764232849,1.08547422027,1.15054811596,1.5172265504,1.50489363955,1.37535515001,1.36574875233,1.4324545267,1.50550408026,1.51511486352,1.45164462843,1.21662207904,1.22726109669,1.18044710915,1.16453106941,1.04584925862,1.12212386441,2.14214473962,2.18213482976,2.26934086859,2.31306423359,2.25443383814,2.30623522633,2.26962526749,2.18644897987,2.13870334242,2.17055506791,1.63811667375,1.54213106271,1.55325078381,1.62906151866,1.71347770735,1.76081721931,1.99736510619,1.93764801337,1.59393055046,1.65861451898,1.67183680128,1.60197087057,1.74582216816,1.74057721852,1.69109146745,1.73814892008,2.46733669028,2.42491806439,1.80918405107,1.84635436279,1.7262298413,1.68314500736,1.79967527782,1.71959275743,2.57770640529,2.59251096523,2.52324175043,2.44672372837,2.43529785765,2.49725622677,2.5061092985,2.42503858837,2.40441128238,2.46252810967,2.75547606675,2.82863219595,2.54909707138,2.60232982714,2.68351216454,2.69313073863,2.61722626799,2.55540554238,2.6028466521,2.54799652851,2.57155997238,2.65225819684,2.34866292481,2.17919199097,2.85206502295,2.81297908619,2.73247207566,2.79537832548,2.71553689233,2.68811545104,2.86677980485,2.88148729022,2.84157849473,2.94300077257,2.76032270512,2.84801530882,2.84879295601,2.69072184337,2.69480723531,2.76573800393,2.25574125142,2.33983611931,2.26244829684,2.21812549742,2.39014086037,2.34973721528,1.98059465128,1.9162953124,2.2314266896,2.84347316416,2.84980227834,2.77103055954,2.69904566586,2.69466724309,2.76086752056,1.57275279614,1.61310614291,1.69799042349,1.6175413651,1.7408654681,1.70059749726,1.69639399513,1.74024774412,1.69770936439,1.6100913718,1.60995867964,1.56601333019,1.66180049247,1.79947261056,1.72312151591,1.65511224579,1.80408027922,1.73438237812,1.24645494212,1.30617289915,1.39868218833,1.42876108142,1.49232693786,1.47759297248,2.14515284912,2.06544359966,2.18152541712,2.13113478552,2.04633346359,2.0164371073,1.75932859828,1.83221515404,1.75708519044,1.90339017526,1.81803053481,1.88066612831,1.95674449705,1.96752867411,1.8994341766,1.82607288042,2.0557831429,2.07187036086,2.14902042167,2.21397537289,0.640722190308,0.61409931288,0.581347275498,0.723427102516,0.700090199402,0.750632541924,1.3500628929,1.30689016329,1.35014956747,1.43586503817,1.47909643781,1.4363585827,1.35340140336,1.30822322795,0.933326968565,0.970666306975,1.21270145606,1.13702480153,1.49345749607,1.61431760252,1.57816919949,0.204261793645,0.340470570151,0.278979889289,0.200467445939,0.286956248887,0.34522050628,1.64995858319,1.57050135819,1.71775177326,1.7039187905,1.55974271411,1.62546673951,1.14125912278,0.992358973706,1.06289143635,1.13598250975,1.02738931655,1.08783935622,0.949503152002,1.0751476791,0.934068585475,0.999337294425,1.66517175733,1.5979543019,1.61208439915,1.95547141671,1.97660765126,2.2420500222,2.22260463779,2.14064340544,2.07982100661,1.81138978929,1.89049383971,1.89909684258,1.7449133956,1.78740991335,1.8477114083,1.70873802353,1.69376533388,1.83450894136,1.75948516349,2.43316765879,2.47730605151,2.42979533572,2.34378620016,2.31367329768,2.30552080413,2.23103717731,2.17917940814,2.21943765455,3.00381772289,3.11787722572,3.08095815382,2.96091161812,3.03128854904,2.97260642241,1.9842599864,2.06552206636,1.9256032303,1.95045697894,2.40578984309,2.33212477733,2.26377342121,2.26424942697,2.17532890197,2.09280258675,2.03651663935,2.19119701603,2.05225760032,2.12418120307,2.46904366064,2.45102273599,2.40377475481,2.32967518498,2.36936679173,2.31285706233,1.26934921332,1.23835860772,1.21214993938,1.32152017631,1.37812529804,1.35195978563,1.40933592696,1.5260574994,1.4466671804,1.38627469682,1.54854286495,1.49208752216,1.33448338243,1.25706233285,1.28759648776,1.34990711216,2.11454569111,2.14200122206,2.0896724746,2.19530962974,2.25446407344,2.22559482889,1.36007311794,1.31328195572,1.32262121563,1.22820349712,1.23954499379,1.19167999142,1.182764707,1.09903623809,1.17979185801,1.22290286868,1.09555581385,1.05467517443,1.06246242082,1.10995424017,0.981056816712,0.951408287599,1.00506225842,1.08188272358,1.45525261765,1.34623759079,1.37098486331,2.17828322907,2.12218622184,2.18964665072,2.04613631852,2.03355485706,2.09821836699,2.3055787462,2.3479834458,2.30539082353,2.22018488044,2.17956184249,2.22289121739,1.11848333285,1.19434107817,1.05642131622,1.2095667697,1.07109589149,1.14821058271,1.56252596311,1.48826524017,1.59634729858,1.55503572928,1.46988094408,1.40823711843,1.41933948797 }; const double THETA1396[NST1396] = { 3.04793725109,3.09698465332,4.70279172318,-0.988787469234,-1.50608554965,-1.48286888729,2.66103924185,2.54476362269,2.5918613384,3.51324953644,3.54391026961,3.48723952804,-0.184764322671,2.8673967804,1.15632464419,2.38800401674,2.71159462345,2.58914004738,2.67217035376,-1.4813810341,4.48762574443,-1.55116994264,-0.815682168158,-1.41002169467,-1.38658839183,-0.883787361287,-0.582584141727,-1.52185263187,-1.54094791755,4.6693254661,4.68670553049,-1.07011530997,-1.37051455837,-1.29159810999,-1.4530998296,-1.45471629296,4.51845849022,4.281736693,4.68164749499,-1.04473025435,-1.11757105561,-1.35584803195,3.50608817481,3.2991318402,3.15315760591,3.24685007276,3.87399050605,4.11654968754,3.58917705813,3.88069843213,3.66291008326,-1.54412124764,4.42398828009,3.97546345117,4.13968079911,4.08636030739,4.00469264553,-1.39419675039,-1.33728387646,-1.37685547493,-1.29962971495,-1.20188870203,-1.21081388116,-1.4435553082,-1.36329807244,-1.5444484228,-1.47181686503,4.69947908914,4.6099896014,4.22221999455,4.05800988337,4.19130080331,4.11276898392,4.30649924783,4.43218691659,4.34508771561,3.34063708176,-1.25989935484,2.76021373175,2.7500962478,2.66936867352,2.66579679992,2.71887203007,2.68175583101,2.49381039973,2.57828264746,2.54631216736,3.44476185693,3.40333762257,2.82738848716,3.42105810345,3.23373991657,3.38374765869,3.28677328465,3.58381149715,3.51898418347,3.30649038251,3.18434787127,3.21809919697,-0.317251508216,-0.229983803466,-0.36314308158,-0.2649320938,-0.202091594256,-0.243557345275,0.0616276449083,1.58883574332,4.20469654112,3.89061082696,4.5780117252,-1.40242433589,3.84646498256,-1.51715686179,-0.653100266228,-0.109895136412,0.200262714599,3.10942599896,3.2331589674,3.23895061439,3.29317766717,1.86929617744,2.04138006962,2.02103315692,1.34241311144,1.27143217701,0.948805198553,1.06491950493,1.35343368761,1.87480984169,1.13211033245,2.54390528537,1.85579976263,1.80787251462,2.66609714628,2.57353573748,2.80283586639,2.84966272372,2.67717854941,2.71754618635,2.80994033118,2.72230437277,2.83517631883,2.79576024079,2.84131572444,2.91901998845,2.92589587554,2.96390799262,2.52761661845,2.40844685982,2.43710162089,0.417135009701,0.423493388784,-1.56204557981,4.66996411214,-0.788337651289,-0.587081443746,-0.743577884553,-0.637796911648,-0.349937296492,-0.376311688867,-0.641588860466,-0.738337965711,-0.798255077493,-0.752753826537,-0.444610289435,-0.485454009882,0.500198178332,0.58658410006,0.740125654646,0.966045980228,1.03489970522,0.746951683191,0.822292822134,1.16698553948,1.15826576457,3.49046459961,3.66158175101,4.28896327762,4.03625328969,3.45643035682,3.4793340339,3.72231531736,3.49704929052,3.47744470131,3.22898114463,4.4206775971,4.59023260869,-1.04618160794,2.68362786708,2.6682115239,3.02872192802,2.90087326917,2.79767718484,2.82206048435,4.40406765383,4.30060392234,4.32762471056,4.09900750367,4.08859917604,4.20952751765,4.19501884864,-1.18977442794,-1.34926025858,-1.46731494329,-0.942746111674,-1.01273271803,2.69723409045,2.88930110064,2.91568272984,4.02155358767,4.25025972962,4.10771717724,3.99741164822,4.31482769931,4.20251764757,-1.28260047877,-1.3704912968,-1.45797234835,4.21917858116,4.244120665,4.27273618626,4.34965785046,3.86122282313,3.89162600198,3.8379092958,3.75370504932,4.0307382441,4.1135368766,4.64855980091,4.46714084044,4.5728514938,4.48874112087,4.01398703917,3.97859156935,3.95191425712,3.8687759155,-0.87055373841,-0.787185511365,-0.737909991732,-0.792767976311,-0.87896170754,-1.00908582668,-0.925393841533,-0.838883494982,-1.04278807127,-0.93493232508,-0.954589721025,-1.11568163514,-1.00957726172,-1.10263139606,-1.42206711804,-1.45767400634,4.69103569221,4.6820678047,-1.55542210505,4.16508761773,3.97155493773,4.0404057775,4.13256724103,3.80300675898,3.60388710078,3.70241754986,-1.48670411009,4.64039159024,3.08579485585,3.16888187055,2.7001471733,2.78483540611,2.83131612047,2.79138798126,2.66172478863,2.70619081238,2.78865256332,2.82932955412,2.83825269159,3.09178958013,3.60274015147,3.92882957762,3.13392238598,-0.900532727193,-0.935926015654,-1.40666853314,-1.31959018953,-1.03282169839,-0.933652957896,-0.955499331327,2.56162711071,2.37249404904,2.48330848974,2.57534153783,2.45094891297,2.4141321557,3.29315320243,3.14061160733,2.80514285263,2.84919995133,2.8547909444,2.94909439933,3.92899880771,3.84630901003,3.63677261609,3.72219123717,3.77581291633,3.60467633165,3.36066612924,3.46618237494,3.44700722089,3.49870784305,-0.282580052419,-0.304449794263,-0.354584730561,-0.307318584205,-0.336969474126,-0.413730508219,-0.186974714747,-0.176054906006,-0.226617208896,-0.229419264606,-0.320926155862,-0.0628038051706,-0.140597829923,-0.159949363336,0.159386135845,0.0951433533454,0.741388340031,0.648932725409,0.125750316173,0.71770527895,1.2612607587,0.873111321298,1.0042369704,1.10520239959,1.03647549598,1.2075674775,1.27251223558,1.34058171071,1.47321219383,1.87547315138,1.6481517135,2.06295842333,1.96869259757,2.94204117521,2.92667448317,-0.419953264341,-0.53604272202,-0.701818657415,-0.615270610429,-0.813035748991,-0.887462838375,-0.535175658761,-0.637332930393,-0.707415586358,-0.672331057205,-0.494437758581,-0.561652369607,-0.337825581953,-0.3865085011,-0.0141439489185,0.090417236104,0.120907393911,0.160945791439,-0.172337236822,-0.0497171421151,-0.224203078941,-0.168660559057,0.00596643614084,-0.0579956768503,0.0049805755666,0.0210922639056,0.156380232439,3.06755061757,2.95167281192,2.92376571202,3.13518811582,3.09091065631,2.99402249201,1.63739970439,1.92114292315,1.78276645023,1.74974193375,1.66697275843,2.1583693179,2.07286517732,1.90713835038,1.99659263157,2.03934513256,1.99230356093,2.06812262802,2.11702381452,0.608597085719,0.845334656504,0.733016636993,0.857379377954,0.624210240905,0.736641979126,1.51014050545,1.81548159611,1.72629951879,1.09928320321,0.997386821218,1.08607635155,1.25589245053,1.1476039918,1.16310231955,1.21904606877,1.50235923358,1.55816454337,1.02844348494,1.01619934139,0.838650965582,0.937662625001,2.63613990283,2.79018982231,2.69925299063,2.64699974837,2.56239540102,2.69047203991,2.64932752025,2.5547795795,2.48316096719,2.48946708007,2.05266880818,2.07446998637,2.00377575949,1.97322059518,2.06123810987,2.04018443377,2.01212547663,2.6735273335,2.77165203981,2.03250673751,2.14397451418,2.12107098838,1.89464747449,1.12558452969,1.1833106806,1.11466854114,2.58045358665,2.53264408495,2.12241001565,0.346687398282,0.189675120763,0.262312871447,0.588074948461,0.668802387457,0.668957663851,0.508109026261,-0.00064995443332,4.23980700398,4.3937716256,4.48968099955,-0.117117921998,-0.0201083120749,-0.468172641103,-0.31882127634,-0.423329437469,-0.649485722564,-0.779269305171,-1.014972017,-0.877365229695,-0.838870010967,-1.13533909545,-0.719466833677,-0.657302809446,-0.623720050762,-0.187157784081,-0.284945183962,-0.347690356504,-0.315859479135,0.000473310010646,0.10529998302,0.0900119592653,2.05675722973,0.780721086387,0.725935037583,0.88554389752,0.934966287414,0.93662761403,1.04627155058,0.819448638315,0.828432191252,1.17357848118,2.27791409166,2.4104270147,2.53121968805,2.50893428978,2.30416483634,1.71197949276,2.84413957906,1.81763551043,2.08210478373,2.71781506579,2.88709873128,2.27060633246,2.26552377287,2.42639089028,2.59418975923,0.666755877974,0.836944276968,0.751869437172,0.831275394578,0.668944049454,0.748657229455,0.819041594086,0.889783196253,0.743668566745,1.05292605283,0.97311905372,0.900062307549,0.907344891921,1.17015055436,1.20167424971,1.2273028408,1.29936756272,1.22165693278,1.02480566237,1.08821186278,1.0204824383,1.08524820921,3.58106013585,3.69979918559,3.82073423191,3.81466014928,3.52125780918,3.39303764099,3.42698516677,3.56538142528,3.68104238757,3.68979995956,3.13109185049,2.98264494416,2.97658861442,2.91019070027,-0.958400443058,-0.894812237118,-0.722891395479,3.02897836395,2.97863849723,3.21169996717,3.29886915788,3.07943615365,3.22293747285,4.33127342897,4.3778590851,4.31058261605,4.34726020545,4.25314721404,3.99835897902,4.00166712236,3.83115188958,3.91005210517,3.90226816555,3.80262115152,-1.10587770909,-1.21497306941,-1.35199408831,-1.13755048003,-1.25429538258,-1.35813824723,-1.50251021104,4.48943109431,4.59916151694,-1.48128263191,4.6229947154,4.64183465174,4.53226212794,4.54414195739,4.70520461431,4.45912226103,4.49631285076,4.60814081832,4.54896057375,4.68641867004,-1.27856563329,-1.26526705124,-1.18453100921,-1.17353117376,4.63167951428,4.6212745156,4.37259558289,4.35202227795,4.32092196604,4.00223619144,3.91640809785,4.03356883776,4.06053508956,3.94601364606,3.88717675965,4.14533192585,4.30158221889,4.24952413839,4.16952862358,4.27279975847,4.19612894324,4.07172924107,4.17430075327,4.03819337024,4.08826283773,4.19214188413,4.28412734926,4.33655340235,4.29727873633,4.21040821335,4.15820196156,-1.22536624405,-1.3069992256,-1.28608825767,-1.33725765526,-1.25394185146,-1.19848325464,-1.23363187706,-0.898214061232,-0.952322745304,-0.759205692166,-0.815343747215,-0.787529908132,-0.676035986304,-0.435945996702,-0.465114074655,3.88000672494,3.79762228041,3.86411609267,3.90709402761,3.92112121613,4.03877842511,4.12592180626,4.09490846507,3.9928461733,4.47526961514,4.42794328472,4.56647826838,4.61454441603,4.26578572867,4.32451141695,4.30840929382,4.41835951048,3.29293058291,3.20930559121,2.95885993423,3.04189939219,2.9152522087,2.92947755865,3.11410570274,2.97936447334,3.07509841843,3.62378912303,3.48136801488,3.50638107458,3.80388410842,3.92021362498,3.94917246444,3.89769920482,3.2358028903,3.30670093124,3.43665907894,3.41180719175,-1.07506414223,-1.03408101056,-0.959002346756,-0.975043314822,-1.44241981918,-1.533050666,4.70929945646,-1.53387824543,-1.45620584729,-1.05431094504,-1.03749749175,-1.10269394772,2.44884151876,2.35213588896,2.23503020082,2.20228954007,2.31854341258,2.40484716338,2.45312732907,2.40939708311,2.32488644467,2.13759590009,2.29437701927,2.19630367959,3.45572649475,3.56475635247,3.72444675455,3.11338839684,3.06184483449,2.93700743179,2.97449371929,3.21979551349,3.39977667815,3.36486658762,3.27377142261,3.69188963701,3.77690057546,3.63003934948,3.65880173504,3.80082137236,3.74482184254,-0.101875630617,0.0660868595094,0.0312833143957,-0.0437917795407,-0.0955001936872,-0.369386959766,-0.476098792527,-0.462401498407,-0.516411893712,0.909149607778,0.989412389493,1.06237185041,0.918281186684,0.837155500474,0.923571528951,0.683597862774,0.609983269669,0.545937294493,0.322123153684,0.410435430803,0.526793807128,0.225413408161,1.18205428513,1.08684899389,0.859891520088,-0.274601085648,-0.0928608378677,-0.260223673613,1.51750482777,1.58659005464,1.63015304371,1.79435809663,1.88483957367,1.79296509729,2.23043573703,2.10373897617,2.64353398641,2.56286343193,2.53108279986,2.36633768137,2.19107152005,-0.552743355101,-0.644977834169,-0.224340523615,-0.329083836022,-0.376442187025,-0.324543656017,0.528673685158,0.100664963634,0.374888636661,0.240258498472,0.473221730929,0.415904587725,0.15988529652,0.229124900229,1.8011937687,1.88642344679,1.93799285135,2.02554715812,2.15951359253,2.07439058912,1.52609203332,1.6118047264,2.13761894481,2.06255426473,2.0100824087,2.0472395527,2.12920269358,2.17770705453,2.26766653957,2.17649535738,2.26843753769,2.31075520815,1.6955996794,1.48013841771,1.59479219681,1.65859067521,1.54488362202,1.46804178788,2.05204364384,1.83570467511,2.00141975879,1.88651552115,1.99488073487,1.89181778312,1.21717039627,1.197245339,1.27642965541,1.3244129984,1.37622498426,1.40372213587,1.3546651196,1.31677662388,1.25105706816,1.26925602874,1.41880595675,1.3993388413,1.32861906973,1.30756951082,1.37536354638,1.46352969721,2.92632748865,2.98445644884,2.93195328587,2.8331800255,2.17785544739,2.28199433608,2.39136340877,1.31072400403,1.35429868155,1.97709359551,1.82614966859,1.88764519835,1.78440791601,2.58110358822,2.60715833021,2.66299050808,2.72952520945,2.80922433653,2.77015643288,1.27330561191,1.34000722566,2.45499736851,2.45591997564,2.41290629083,2.54059802945,2.54419662857,2.58654889688,2.14009018914,2.16715545481,2.1978813536,2.25871171082,2.18365003116,2.23286741145,2.16401267134,2.31835740276,2.3324974217,2.26706971418,0.355112415026,0.163489866329,0.329525774902,0.251421989837,0.592887011377,0.51299387276,0.436815074125,0.0777189984887,0.090498120087,4.62222578235,4.67061046984,4.59422202035,4.47522561467,3.95578850514,4.06638009435,4.04362086348,4.19239049142,4.14046735557,3.97886860929,3.83576243681,3.84630709799,-0.59190233771,-0.606772516874,-0.679170969693,0.0216146135191,-0.141217687535,-0.24580908908,0.669359633763,0.702304652427,0.62440005325,0.595817328872,0.478958774216,-0.618684787806,-0.964731655045,-0.925361912137,-1.09802029039,-1.12634074667,-1.28923951783,-1.27589629082,-0.19443618924,-0.607759584516,-0.520491235855,-0.596583012282,-0.647425333498,-0.500369328338,-0.46463328451,-0.38519670955,-0.408976476727,-0.491670514715,-0.544888212544,-0.517140239753,-0.439777819506,-0.0692379132018,-0.201488116925,-0.225598973521,-0.160289266599,-0.0949863139149,-0.11487696692,-0.0482879167549,0.0369255295554,0.0518126737072,-0.0132901598839,1.89747216103,1.67796464221,1.84168497081,1.95380838662,0.497794420217,0.238131883826,0.476840194776,1.1139868276,1.10173021941,0.82900555968,1.07180919327,1.1998181854,1.35077846404,1.08121479941,0.993843727157,1.06612703701,1.15680252639,1.18189628887,1.60120020528,1.45267396729,1.67361304805,2.72918509297,2.43352882,2.46917882033,2.64066689225,0.741450456578,3.10953842948,3.18813332689,3.15859952919,3.27283478086,3.35730727019,3.32384445339,-0.87642873191,-0.928975236785,-0.675393922405,-0.729489980447,-0.853195688212,-0.742490793512,4.01451964511,4.08051468317,4.15871541116,4.18781844632,4.21396176866,4.0111642681,4.09102719247,3.7370104625,3.57468599222,3.66773023696,3.54433246748,3.61611997259,3.71638168602,-1.55285543282,-1.55919561657,-1.45967454223,-1.36817918446,-1.46427115672,-1.36615088576,4.37686395949,4.43700597012,4.40134746335,4.47524480532,4.52282878417,4.53622755567,4.44694168236,4.56921949904,4.4975406506,4.60118383272,-1.17064260334,-1.06365258499,-1.14826525636,-1.20090674061,-1.03435255329,-1.08854025994,-1.06116717526,-1.11621746195,-0.886866147778,-0.705246637177,-0.544078785307,-0.569747714722,-0.650135084078,-0.485775264663,-0.50098983479,-0.450702310732,3.78226809831,3.66008986287,3.75300085448,4.57785342666,4.47311850699,4.62282057836,4.5693638229,4.4733302025,4.42307094975,2.9206157741,2.9596313189,3.06031563834,2.97074394413,3.61555764046,3.70027746654,3.55804721148,3.47862671959,3.42660023522,3.56230596486,3.59540262173,3.45065782094,3.42778152465,3.48103000935,3.34208807594,3.70093226436,3.77706977731,3.84143658198,3.81684812325,3.73237164437,3.68088791054,3.2685815028,3.20652439802,3.3918011988,3.3651129304,-1.14369365157,-1.26472430275,-1.1784044402,-1.11881656252,-1.38667776036,-1.23445411614,-1.2956894764,-1.14385327838,-1.25162276833,-1.14528663964,-1.3462721796,2.43034997958,2.53448779493,2.5451666348,2.388200813,2.26957764419,2.299746861,3.50514162157,3.42280520607,3.47066622653,3.58535815409,2.99433179639,3.07569086156,2.944069066,2.98635516286,3.12810710633,3.08946207381,3.2552549446,3.2371783171,3.20165255226,3.32537036106,3.37886843105,3.34461357854,-0.0561850855743,0.0290010460923,0.0772293605058,0.040093665035,-0.0477342847139,-0.0955706921442,1.10583609824,1.02914652939,1.1189961101,1.05133234066,0.749800161036,0.744012240224,0.543836111637,0.252542584065,0.301215283365,0.213559732619,0.18700098807,0.458726945201,0.350027671962,0.26943349323,0.297770582441,0.865027020359,0.972593337522,-0.356386479205,-0.306574393162,-0.370037225284,-0.466690940212,-0.258556402652,-0.243925934798,-0.389270668283,-0.499074470678,-0.17536881416,-0.0743496404125,-0.18143173666,-0.227602590821,-0.0343898052206,-0.0883375339585,1.6879417945,1.76927521849,2.27803198239,2.18866481079,2.15104493611,2.19887818493,2.2844301024,2.32563531067,1.72884097364,1.64024020909,1.48868749051,1.58004622928,1.44855965385,1.42190534781,2.3828421624,2.46793167876,2.47719109571,2.38666424174,2.10615513248,2.19128532108,2.29094793091,2.29638072054,2.21594499497,2.12508665922,1.42841061145,1.53132572964,1.4557378732,2.03575931404,2.06272415917,1.99134990349,1.92555199459,1.86449479824,2.3248497215,2.27791767612,2.4459815896,2.40841712195,2.39648897856,2.31157367507,0.371421495728,0.444571377397,0.25059293603,0.369835294206,0.28348424855,0.202384061369,0.29201699297,0.224229467955,0.132915327654,0.146145965633,4.24922575917,4.40522787765,4.48012060472,4.41261365421,4.28515949155,4.20048290588,-0.452665129216,-0.39897668775,-0.279441504873,-0.194258677723,0.504402962769,0.357071708712,0.273961376411,0.164078685633,0.205019030551,0.403940334176,0.505140186012,0.427032163149,-0.110490844318,-0.226165344262,-0.367831324551,-0.428339873606,0.353998443415,0.324338142701,-0.162376536943,0.0805337798532,0.0502437421786,-0.368382124597,-0.306351587337,-0.124860633025,-0.779240297436,-1.33995564587,-1.06976797865,-0.614434090885,1.26668419644,1.3358697605,1.58779106774,1.40067210685,1.58664180898,1.68395924114,1.10700137196,1.12768130208,0.92831159333,1.00909799563,1.03412926462,0.932612706513,1.5127767094,1.44841470484,1.28387737662,3.21465247945,2.96098769852,2.85522560656,2.9672230141,3.16138440889,3.28651614751,0.603602905438,0.671448343926,0.668972594501,0.529069916029,0.595258552702,0.523172803146,0.811169834477,0.88408598913,0.950268821706,0.811287028954,0.948970412026,0.882876955209,4.5610717042,4.47646778495,4.43527386246,4.47815757414,4.56352766751,4.60487832998,-0.90951778997,-0.848426754011,-0.568813657358,-0.733994641266,-0.678698838333,-0.597647786227,3.70536763286,3.70600650494,3.61217084964,3.53082877542,3.54825750823,3.6303503457,3.08496830296,3.04666259424,3.16959526396,3.09678613331,3.30827180943,3.36313054859,3.32970240723,3.24036371087,3.18493838691,3.21905428352,-1.42359681867,-1.520730533,-1.56129942802,-1.49855741148,3.6376545568,3.8696599965,3.74356181269,3.66782818391,3.88125842587,3.78621425352,0.829266665364,0.904038196219,0.973215381466,0.964228844566,0.889446957662,0.823647362392,0.686446635289,0.758200523183,0.658545847021,0.749707991232,0.368234798461,0.3464779807,0.469079474926,0.381580928712,0.460664232003,0.495295626135,0.179741595971,-0.0144365178492,0.0801686024545,0.601994824954,0.437864682341,1.79230154006,1.81949176235,1.84845236947,1.92456326498,1.90326437061,1.95193454645,1.7634444906,1.84449059083,1.89748721125,1.8557432395,1.54670048194,1.6109738508,1.58027843969,1.70631317598,1.68388393988,1.74488009179,1.71385486795,1.65998803971,1.58230396245,1.77469553948,1.59844065874,1.82763286263,1.93084384685,1.96008320102,1.89574128533,1.74515079079,1.71729649264,1.63149751111,1.68933493137,1.43047962607,1.47907882554,1.47477349987,1.55338865641,1.57665170064,1.60625820295,0.140999910709,0.0253343688997,-0.0744251626429,-0.0563199406423,0.551324881704,0.434366463152,0.579795143234,0.496114128961,0.408092358884,-0.911434632676,3.92433728015,-0.430169293517,-1.38663939285,4.0034139128,4.40405663423,1.20728199787,1.22467568948,1.28622920205,1.36369331118,1.60824822208,1.66877893259,1.50070022804,1.61167725067,1.3506580327,1.31712734379,1.37650004357,1.45467068112,1.46895903129,1.51233811523,1.40154961881,1.27021448662,1.4812771128,1.4328669014,1.23794445505,1.31860310189,-0.993219445009,-1.14052399527,-1.05842551495,-1.15515773871,-1.09332012125,-1.01327650433,-0.95445494779,-0.842737812487,-0.81599195775,-0.873041037778,-0.924827645063,-0.979283067277,-0.62211693284,-0.589698875867,-0.763635537662,-0.706540811936,-1.36539126822,-1.20402348986,-1.26663921164,-1.39924338036,-1.32567895276,-1.22907483381,0.544390588217,0.613254572419,0.468193490249,0.606893084921,0.455227946551,0.5248792245,0.679594914678,0.673683300312,0.83395632555,0.757809066549,0.83503952185,0.752918001419,0.586922249442,0.510998034404,0.575226516542,0.477734803538,0.39807718134,0.419168200239,0.402996799548,0.321365717057,0.401771063984,1.76633839463,1.61256372667,1.66462211086,1.65382731821,1.7447959473,1.80430292219,0.0445291117033,0.141550231779,0.235659158671,0.0565534979661,0.150719011745,0.233541310494,-0.611246464577,-0.645616129766,-0.67283024618,-0.735489053766,-0.769428723414,-0.797257551834,0.309603507701,0.322613771701,0.231588232422,0.166339234754,0.151548572723,0.196249580917,0.270916590823 }; const int NST1410 = 1410; const double AREA1410[NST1410] = { 0.00879695591057,0.00901969149878,0.00880105390457,0.00908467662938,0.00889606258752,0.00895260183949,0.00919475003504,0.00896162037782,0.00897112300605,0.00898653693402,0.0084479989165,0.00837889825232,0.0103674467502,0.0085360562692,0.00881680587249,0.0085068376872,0.00871738935461,0.00885212317268,0.00937873782519,0.00893116007229,0.0089411373258,0.00883505549369,0.00900118020878,0.00898905475171,0.00915006142058,0.00914118874667,0.00911842831015,0.00866805724649,0.00888392142495,0.00867841256828,0.00865713997234,0.00881005313485,0.00878490581873,0.00883844457803,0.00880441328137,0.0090951626048,0.00882608886723,0.00906928513503,0.00883557733167,0.00874202088132,0.00893640771079,0.00895370784695,0.00903647978762,0.00904466967158,0.00883654829243,0.00890175622161,0.00847409056227,0.00862607946967,0.00910077472162,0.00896693376229,0.00899756322092,0.00885858873145,0.0101657247266,0.00884606832158,0.00938619006078,0.00857334292192,0.00901568746878,0.00891231546562,0.00904908764919,0.00894337745994,0.00911273371368,0.00903477579649,0.00897639688818,0.0088834479457,0.00895858042556,0.00910098238226,0.00876753107427,0.00894993485138,0.00894854259355,0.00885763923343,0.00880245954698,0.00908416948147,0.00880560251645,0.00908713043757,0.00881505870482,0.00908545783662,0.00865155005444,0.00919191592417,0.00881840533939,0.00903015328062,0.00885295152286,0.00901528218003,0.00866414386931,0.00940640900068,0.00842298775941,0.00881052114343,0.00866309483993,0.00912950498092,0.00905804687837,0.00882105005088,0.0088852610403,0.00890234411781,0.00893713116948,0.00920372744413,0.00894076088685,0.00918767303018,0.00913410699827,0.0083117355162,0.00899360065223,0.00923787261448,0.0090783946289,0.00862891857522,0.00885265171917,0.0090072250639,0.00893335163923,0.00888873850784,0.00900244584007,0.00889074198759,0.00943499713772,0.00887112524727,0.00859839097294,0.00929361923148,0.0106293460608,0.00944441849842,0.00835108489124,0.00908852058608,0.00870332001405,0.00841256128312,0.00884426443479,0.0090275263923,0.00890545244038,0.00841903759594,0.0088950259818,0.00907534110489,0.00950091487424,0.0101579857191,0.00914656304184,0.0090403743405,0.0089564094832,0.00875132228015,0.00916957609473,0.00909505361317,0.00927483257642,0.00887739665044,0.00866517402582,0.00884950707141,0.00849131897046,0.00901457200018,0.0088112353148,0.00854516404688,0.00928024060507,0.00922727102148,0.00895689795684,0.00885414427556,0.00891619236987,0.00896314768585,0.00893506396848,0.00887980958532,0.00901296888453,0.00887962419771,0.00898801459531,0.00876235975402,0.00894628765517,0.00882916566135,0.00884231080163,0.00904745368996,0.00891200147198,0.00895794640131,0.00892260993648,0.0089309936498,0.00894388341735,0.00894272149333,0.00913486525511,0.00888303621749,0.00885890784189,0.0090091417515,0.00901390566605,0.0088644262756,0.00893195415907,0.00892224228213,0.0089398714884,0.00920087726271,0.00891293350389,0.00890910914976,0.00892024894349,0.00884793811438,0.0089672682404,0.00899182000857,0.00891133514795,0.00889278215121,0.00881258741713,0.00888049629279,0.00883007407414,0.00888638466362,0.00899707609687,0.0087826103036,0.00880390332684,0.00880244254772,0.00904443911717,0.00891149297102,0.00899300559022,0.00888113404403,0.00902068897608,0.00883257804178,0.00905445775764,0.00880083433031,0.00893810030164,0.00891704199986,0.00877880729654,0.00894674323994,0.00875734781822,0.00880180148475,0.00908751213639,0.00899492275052,0.00912011814577,0.00901113196726,0.0088897905092,0.00895443344658,0.00897304698826,0.0087434804966,0.00887905207536,0.00899252730279,0.0088676907674,0.00913323428851,0.00843034769567,0.0086464677594,0.00899046061341,0.00887115846345,0.00882491298965,0.00890795259777,0.00888672157158,0.00892308135492,0.00835262722826,0.00898070647581,0.00902440814244,0.00835831799831,0.00952237163008,0.00907093765958,0.00850156564483,0.00925036196563,0.00821089198865,0.00939280516903,0.00860163837781,0.00850622352082,0.00926604449384,0.0104232041887,0.00907048800459,0.00875090127083,0.00899145726676,0.00896398436979,0.0089943720877,0.00903814952232,0.00879847350817,0.00879806266139,0.0090364869402,0.00885211582351,0.00903422226654,0.00878621124436,0.00922231024265,0.00874817864282,0.00908889741089,0.00880012379769,0.00884309082143,0.00904982955141,0.00879934868034,0.00883590680012,0.00883963705048,0.00904204819235,0.00897914667597,0.00877629526258,0.00902060559704,0.00881412885225,0.00885384068543,0.00911568997059,0.00867110228784,0.00899767808553,0.00896857821898,0.00890835976444,0.00900534141511,0.00893298792337,0.00894904703186,0.00905285933102,0.00884306809316,0.00893735181587,0.00884453807941,0.00914309974651,0.0085554293387,0.00875928412603,0.00871051437522,0.00876337109785,0.00887815807592,0.00888908450405,0.00900714810825,0.00896343406727,0.00891160657147,0.00918759016032,0.00835862835279,0.00857643424341,0.00904588886004,0.00879215464576,0.0102879969531,0.00839934945712,0.00845156825446,0.00890210530618,0.00896364747443,0.00890045226698,0.0090362099804,0.00892899747896,0.00878330215573,0.00895224313476,0.0083531097962,0.00904813065696,0.00883536103113,0.00878174042429,0.00913839408054,0.00883502065936,0.00897082774137,0.0088975259089,0.00903469589001,0.00886060204634,0.00864182202097,0.00905851000678,0.0086049337212,0.00883579767449,0.00893751482931,0.00886336167885,0.00878136718139,0.00905103681456,0.00896344671394,0.00879147681453,0.00898051111692,0.00900493905298,0.00882343406851,0.00877873977012,0.0089291059318,0.00893774269177,0.00893307395233,0.00890154944976,0.00890034667294,0.00900057665609,0.00885057608824,0.00891444953487,0.00908776592986,0.00877396008658,0.0089086705059,0.00894017458178,0.00895437882184,0.00893801298114,0.00894194958279,0.00886898371893,0.00895331839559,0.00888890920812,0.00898204574746,0.00893813290084,0.00894512544201,0.0087687137676,0.00909430037727,0.00913144689687,0.00880458097615,0.00877043994201,0.00909766900868,0.00860549470341,0.0088000535159,0.00846653948476,0.00878600851897,0.00867358396577,0.0091844740698,0.0105063708543,0.00897064077816,0.00900578995914,0.00876119137926,0.0091633008674,0.00828968195065,0.00894360260396,0.00890232555308,0.00879523920688,0.00880752888675,0.00907338816529,0.00875305400465,0.00888192520725,0.00938866249402,0.00896709647703,0.00896254393334,0.00890314145867,0.0089372661435,0.00893766102166,0.00889703196623,0.00885110578493,0.00895276955576,0.00895594973333,0.0090626438191,0.00896242734866,0.0089159378059,0.0090308545324,0.00865064814596,0.00902694702495,0.00884193064168,0.00891534903597,0.00898593480152,0.00890742394196,0.00879078123522,0.00876781297126,0.00905060014728,0.0089613334047,0.00890475238981,0.00891823200453,0.00893468892357,0.00903369516541,0.00886806699919,0.00939274436454,0.00854860071155,0.00878607906441,0.00889539462972,0.0088271209004,0.00901129390032,0.00904979155269,0.00919292460309,0.00920891934711,0.00872919785464,0.00878942545071,0.0089785218939,0.00876671394686,0.00915515879737,0.00868408210348,0.00899893638389,0.0100795240291,0.00838678349877,0.00897221513545,0.00877208656628,0.00904197313093,0.00863979814234,0.00871069099895,0.00853353088489,0.00846482880713,0.00857681273471,0.00894100078837,0.0090688136457,0.00901173413274,0.00887041627004,0.00890293244524,0.0089845445927,0.00879661076484,0.00861830058393,0.00936459934023,0.00880991283372,0.00864727436784,0.00857690242,0.00930311975539,0.0088400435689,0.00899493377185,0.0088715759683,0.00891697432174,0.00888570344183,0.00896707643557,0.0089971421182,0.00891220148835,0.00889670674982,0.00900294796578,0.00874393802015,0.00890617243841,0.00899061267156,0.00891539041708,0.00888812095923,0.0089081968019,0.00895004201346,0.00899046189517,0.00887755293395,0.00900696835446,0.00899150813693,0.00886501338235,0.00905022251078,0.00878544744253,0.00909989429639,0.00877798218141,0.00886900745137,0.00883354088095,0.0090594194448,0.00868733259029,0.00884920353442,0.00883897175605,0.00896116745791,0.00876202908103,0.00868835709263,0.00931443111641,0.0084348545882,0.00854064653323,0.00865344284939,0.00904534759902,0.00882741323731,0.00882758118742,0.00901404445825,0.00885106623037,0.00901574331898,0.00905197522186,0.00877438583097,0.00861613613588,0.00885063565376,0.00904493249544,0.00894017246426,0.00889978447527,0.00895844293367,0.00891361260186,0.00887702566524,0.00890753463726,0.00885840894287,0.00884652213897,0.00896718965629,0.00886545455249,0.00897678047945,0.0090790276842,0.00878464357167,0.00885890749564,0.00884560933213,0.00896777292149,0.00877384560846,0.00909746099156,0.00904542871926,0.0090821688861,0.00873562848198,0.00884607999377,0.00880999556536,0.00903951123328,0.00878727606993,0.00904018703827,0.0088528162558,0.00902150598695,0.00884607187631,0.009041768211,0.00883815694394,0.00903880601253,0.00876426444401,0.00897744631426,0.00895499083471,0.00890919551361,0.00894541085107,0.00899453511157,0.00891483433141,0.00892663616978,0.00893834044908,0.00894889252497,0.00886273371001,0.00888718960823,0.00901990486088,0.00882879403116,0.00835188080587,0.00909443206108,0.00881217973403,0.00852673828644,0.00913134911051,0.00884307538129,0.00900693934063,0.00886663401374,0.00892556525593,0.00886635058058,0.00898034098021,0.0089987589391,0.00880953342918,0.0087336905731,0.00934822186815,0.00854061696942,0.0106084181733,0.00915062850619,0.00875248595884,0.00889152613058,0.00899353483902,0.00903963930082,0.00889931410073,0.00901251126993,0.00898026146648,0.00888535982705,0.00890192872228,0.00887445389565,0.00900344325716,0.00903710368379,0.00897764012898,0.00885011847824,0.00900019850268,0.00886885072669,0.00887000839056,0.00897764757338,0.00890119194041,0.00877090331577,0.00905155968089,0.00838317815503,0.00837182567496,0.00852315188295,0.00880601190054,0.00897469367833,0.00898864192952,0.00892594517224,0.00876270049711,0.00908487230766,0.00877479559236,0.00884049140503,0.00899506533181,0.0096645225056,0.00875760821901,0.0090346055211,0.00853627143757,0.00914853457362,0.00840702114052,0.00844680483426,0.00838523749924,0.00889482011217,0.00871160709215,0.00917941795751,0.00840824386204,0.00873106715244,0.00878458413723,0.00895405641068,0.0089848036654,0.00882196342872,0.00903956839038,0.00905338679308,0.00883800947701,0.00904628215029,0.00885542635255,0.00911335971469,0.00878982006576,0.00905537198979,0.00881532143884,0.0090416418818,0.00877736438478,0.00895774016838,0.00896177144692,0.00887809349331,0.008752074165,0.00847055573834,0.0105790707602,0.00840401940024,0.00914398361594,0.00884864727889,0.00882933080859,0.00903821713634,0.00844691983911,0.00878136985999,0.00936199524822,0.00879226999875,0.0087368856931,0.00897008051126,0.0089104410447,0.00909967330621,0.00878420944798,0.00910333044556,0.00879245503804,0.00906757262724,0.00884805956482,0.00904730243267,0.00898353433205,0.00880764617513,0.0090516221885,0.00882440526911,0.00905744200314,0.00889306100464,0.00879247889326,0.00906195848308,0.00911158128249,0.00877295855354,0.00882159987374,0.00902600394158,0.00880890037965,0.00907746622002,0.00899412353764,0.00887350690443,0.00880344325989,0.0090776318477,0.00900764665913,0.00897460686625,0.00891638237069,0.00884687126446,0.00873717555441,0.00890958553206,0.00895469023782,0.00887179341117,0.00898151842786,0.00890760867425,0.00885382279736,0.00891242843203,0.00914414850825,0.00870264481425,0.00907023071694,0.00897335157788,0.00901769894033,0.00884230933399,0.00891392395059,0.00892806958317,0.00905172257726,0.00889952517204,0.00900171187283,0.00885019653883,0.00865055560039,0.00930236139697,0.00918240958866,0.00853871785585,0.00914351464991,0.00853964372047,0.0087421878657,0.00888550581672,0.00885887640291,0.00896125272677,0.00879738436592,0.00879248847375,0.00846689580979,0.00910564669965,0.00884390222509,0.00906504773326,0.00879970659261,0.00913442687645,0.00884357953745,0.00900403282236,0.00934643608862,0.00881063860448,0.00880372745419,0.00878295125341,0.00905798897954,0.00909294973966,0.00881646948639,0.00898393290004,0.0088667805132,0.00902094966254,0.00884501955619,0.00903922103738,0.00891614801451,0.00884184522442,0.00899668550411,0.00888563490099,0.00882604656765,0.00898722875654,0.00897020783899,0.00887740209137,0.00893916601146,0.00893871327899,0.00893530347354,0.00958723016634,0.0090125424951,0.00854147491635,0.00900839946679,0.00946746749059,0.00849224829723,0.0105247157697,0.00842524970495,0.0093059362116,0.00891469102637,0.00898971190157,0.00882673159401,0.0090403524668,0.00897490053301,0.00890641282084,0.0089395828794,0.00890400718435,0.00899380776542,0.00888687018255,0.00895333984354,0.0088833225699,0.00896881684965,0.00880758920014,0.00908152020276,0.00867066030325,0.00885355649646,0.00881784667858,0.00908652387958,0.00879823962264,0.00890813547082,0.00898557840235,0.00879643079726,0.00908327487958,0.00878184643564,0.00909382608442,0.00833215006406,0.00887014305248,0.00890424025876,0.00896250852804,0.00877257162621,0.00891935517849,0.00892377782365,0.00891858605177,0.00890460268188,0.00894617902886,0.00893114789207,0.00887154012828,0.00899083752397,0.00892592385692,0.00890416934922,0.00894564653621,0.00896070139359,0.00891683571328,0.00896506291862,0.00894048833721,0.0089109445157,0.00889789668491,0.00897350445237,0.00887129172065,0.0089723388851,0.00872340094066,0.00850639819127,0.008984882518,0.00851926294455,0.0105598482273,0.00929651694695,0.00834017462514,0.00944781328927,0.00865261358031,0.00899095481885,0.00886182877566,0.00899013297512,0.00895511198102,0.00906380395005,0.0083364589066,0.00874782240526,0.00859652271495,0.00865402926801,0.00845720165824,0.00899831562562,0.0088001587914,0.00904444506459,0.00882627093724,0.00884338797915,0.00897252815364,0.00890561091177,0.00889714027877,0.00887949845907,0.00899977060368,0.00889091663527,0.00896178916032,0.008898863622,0.00897594806973,0.00898381085567,0.00888950302016,0.00885996919378,0.00896357334091,0.00889770774883,0.008981695626,0.00897978173418,0.00893159496847,0.00862030748206,0.00904864148538,0.00898940297528,0.0089031659968,0.00900370500071,0.00885444898473,0.0088980612559,0.00882040836323,0.00904498593502,0.0088008705867,0.00902712685147,0.00883613157177,0.00888536283639,0.00899603390767,0.00876375763312,0.00915911348757,0.00921296648141,0.00862954896359,0.00885829885993,0.00874743564012,0.00882843313001,0.00912596667323,0.0091082540198,0.00865878909004,0.00890609432952,0.00901314709066,0.00904826827082,0.00899893830038,0.00908682312365,0.0088826445966,0.00900266428874,0.00880854681504,0.00880572199402,0.00902629397129,0.00896254824911,0.00895045868024,0.00857021452639,0.00888717726519,0.00864050359711,0.00828837805195,0.00890839686613,0.00894180599164,0.0084837497115,0.00897937852293,0.00869146128206,0.0089278845419,0.00904605968273,0.00883963523539,0.00870914878704,0.00873078822836,0.00911231324864,0.00847592269712,0.00856608881195,0.0084141826784,0.00898445595674,0.00876767999923,0.00901250889277,0.00887774439352,0.0090499502702,0.00883372147544,0.00895479539045,0.00906652673727,0.00884031306801,0.00900085851042,0.00907303766024,0.00881732036654,0.00885672987049,0.00899936118802,0.00882599171705,0.0090471448386,0.00904663494403,0.00888511038447,0.00902384273038,0.0088537782769,0.00908558235877,0.00887408640145,0.00883426044859,0.00942018474284,0.00939651662276,0.00858918518054,0.00919563710287,0.00862576550113,0.00915524375348,0.00865166400019,0.00943758496649,0.0089730575641,0.0100698772609,0.00888923200668,0.00889157497796,0.00896313486177,0.00899319304639,0.00885192215227,0.00884497483448,0.00903420950447,0.00882833122025,0.00865727813719,0.00861777701998,0.00907654076684,0.00926860757025,0.00860715337826,0.00909460599124,0.00884716941754,0.00904177089211,0.00880324699189,0.00882961065417,0.00903731838105,0.00880157502584,0.00889375621353,0.00902271599225,0.00879848761495,0.00897127755574,0.00888133176212,0.00887176830621,0.00869165732922,0.00910090131375,0.00859607469423,0.00939388575688,0.0083523786384,0.00893147506677,0.00898696183216,0.00890072023246,0.00879909802138,0.0090271221129,0.00900521317586,0.00881852374134,0.00898697375158,0.00888931824176,0.00883082388701,0.0088959386786,0.00890187657548,0.00894323690612,0.00894891278825,0.00892459087361,0.00889380892835,0.00888348307988,0.00900052290252,0.00891621368103,0.00885780699153,0.00881010846491,0.00908574103048,0.00876902020601,0.00903943995578,0.00890439128173,0.00900235311174,0.00887273147173,0.00881908864555,0.00888497227251,0.00879694010763,0.0090830063958,0.00892345676553,0.00895090689847,0.00895475769385,0.00888763242252,0.00900236321235,0.00887285594013,0.00895513334527,0.00893184738045,0.00892067820123,0.00905595882239,0.00883057236488,0.00892470935731,0.00896671782981,0.00879204622426,0.00909835088606,0.00891419506276,0.00860974161539,0.0090046318406,0.00888001440003,0.00888713271023,0.0089503258742,0.00890901929395,0.00896215629701,0.00856212383182,0.00882064188488,0.00910842800997,0.00879050934604,0.00913110781241,0.00903018548742,0.0088487871725,0.00891333897506,0.00899057047456,0.00908020039011,0.00878695079875,0.00897996133414,0.00878498069401,0.0090543417897,0.00884015417746,0.00878413945963,0.00912322476762,0.00873801392821,0.00909300570453,0.0087205105904,0.00879337323882,0.00839703249844,0.00877440157218,0.00909442094147,0.0087434146614,0.00923142593241,0.00857000772209,0.00864091965174,0.00849565114879,0.0084667008803,0.00858919332644,0.00880470732495,0.00905988775961,0.00891351917593,0.00890261524135,0.00883102516915,0.00895216674887,0.00906241158571,0.00878575625615,0.00906614029014,0.00885146187174,0.00849504807067,0.00845856144134,0.00845112649505,0.00855393221092,0.00871201580968,0.00856676830551,0.0094193949367,0.00935109709462,0.00853764903614,0.00847446448771,0.00850020666887,0.00881813344082,0.00903082313615,0.00871678630061,0.00861421881003,0.00843716197653,0.009077012975,0.00855594567948,0.0102142702366,0.0089815655802,0.00890137546504,0.00887926769077,0.00885707612094,0.00886481361838,0.00899520330667,0.00895124719399,0.00891290112738,0.00899691633152,0.00884971758772,0.00909968037066,0.00874070452788,0.00901946586832,0.00890493320222,0.00899350676499,0.00885937495965,0.00898104149609,0.00897045203713,0.00890183836465,0.00894620556416,0.00894630094273,0.00892984245881,0.00888376888095,0.00888348388004,0.00901025080612,0.0089626697483,0.00894771735228,0.00911014562312,0.0087906267227,0.00879453491343,0.00903922051468,0.00883152121936,0.00899015082364,0.00856079873661,0.00870723150138,0.00831449803441,0.00842439697964,0.00859169595393,0.00897630845948,0.00879809603989,0.00911916051964,0.00908126149701,0.00902348481979,0.0088022599961,0.00878032907763,0.00903579518092,0.0087734197411,0.00866993108334,0.0083621442184,0.00943669316434,0.00887478532059,0.00896085520808,0.00891370973377,0.00886817750501,0.00884451249353,0.00884320813081,0.00903683331596,0.00904742894676,0.00893671184921,0.00893398283122,0.00892480431469,0.0087127238416,0.00901156509284,0.00878475054163,0.00848807331325,0.00928443538248,0.00968353277362,0.008986885571,0.00847336945307,0.00891574358152,0.00881488369853,0.00835927811349,0.0103478182876,0.00849873570289,0.0090017672651,0.00886074638275,0.00902219159187,0.00877185769403,0.00879598063787,0.00914817317511,0.00864905084329,0.00879332200066,0.00869363651164,0.00905840327588,0.00903051896779,0.00877485850303,0.0088186408825,0.00840956961437,0.00866742079831,0.00886900047038,0.00899446130104,0.00898403766128,0.00883141938684,0.00881677006257,0.00878968070315,0.00901645670854,0.0091026540897,0.00868280575595,0.00895720078339,0.00884329120592,0.00892423806325,0.00895324553309,0.00890818385618,0.00898120678317,0.00884596261059,0.0090014767927,0.00882399630375,0.00903539162964,0.00889328599552,0.00897507163971,0.00897168262236,0.00884446021576,0.00901179676007,0.0088550039983,0.00895711089528,0.00888594287639,0.00894880862994,0.00898092230594,0.00891784406842,0.00891207460063,0.00888054914792,0.0089150619906,0.0089032011288,0.00897774928929,0.00900554134234,0.00875172046167,0.00917786122392,0.00850010111338,0.00912116106275,0.00850189774847,0.00852909938619,0.00852227340112,0.0101572407998,0.00878147371096,0.00908959873662,0.00895245136946,0.00893846336523,0.00890161156806,0.00880970472706,0.00884810053877,0.00903263397783,0.00901559163647,0.00892644206875,0.00888908418279,0.00893679542778,0.00874861313244,0.00887204483538,0.0090348457326,0.00918920315998,0.00945189496491,0.00906636857525,0.00895130703554,0.0090518351454,0.00882412821146,0.0089761128421,0.00857668257773,0.00901658811654,0.00885614789529,0.00902598440359,0.00886439607833,0.00880473374674,0.00905670483851,0.00872253737665,0.00899013336526,0.00888866685742,0.0090103050711,0.00895425420434,0.00893146268367,0.00900234521951,0.00895433797489,0.00889351360095,0.00889469964313,0.00898982254589,0.00896112258817,0.00887849243451,0.00884098308439,0.00902710224915,0.00881559231668,0.00889318275809,0.00897252325467,0.0089881971532,0.00907332682669,0.00877840488251,0.0083848308466,0.0101979444623,0.00862722173606,0.00875930149557,0.00976519684244,0.00889586874851,0.00860574717262,0.00852096703418,0.0089361177413,0.0085683624604,0.00853428775789,0.00925891829506,0.00854704316141,0.00897788735296,0.00970628453367,0.00865567132572,0.00883404783714,0.00871987576733,0.00906880123356,0.00869977216146,0.00922672964802,0.00845221980922,0.00892644685331,0.00890173732906,0.00885362197113,0.00897578230781,0.00884376710187,0.00899218575665,0.00886308417252,0.00865455527591,0.00864505024491,0.00841620725118,0.00902191868037,0.00877263028073,0.00900433468906,0.00887234398233,0.00917049136031,0.00836732562086,0.00908762099012,0.00862532714241,0.00879066931145,0.0101553264157,0.00862797302057,0.00840645689611,0.0085308902231,0.00892465574498,0.00895262578461,0.00890681057737,0.00875044636041,0.00884246077316,0.00903816918999,0.00901019704855,0.00889365234268,0.008998631029,0.00889355252711,0.00899468876866,0.00889446926703,0.00881812204396,0.00906926205474,0.00886091226149,0.0092626383925,0.00868500440783,0.00873863495053,0.00892360738593,0.00890034174888,0.00898874513333,0.00983193489248,0.0103198468436,0.0090986056107,0.00877932861109,0.00862399958446,0.00842083439339,0.00878474606816,0.00906599294908,0.00874430380466,0.00882394720892,0.00920195649837,0.0086775148853,0.00862403284423,0.00858416945499,0.00852790540818,0.00856746827137,0.00841831239768,0.00889119099975,0.0088496815647,0.00900144080127,0.00876160099291,0.00896649887209,0.00890928243685,0.00881964232986,0.00909055276105,0.00878806256151,0.00888522894043,0.00898477624246,0.008893071833,0.00884347664768,0.00849363791149,0.00878935623035,0.00896280098725,0.00919187769723,0.00874797786896,0.00909873776158,0.0089611805349,0.00909926494255,0.0087368899609,0.00877174060104,0.00918081946232,0.00875737440418,0.00905773331474,0.00828373400235,0.00914213903425,0.0103749930291,0.00856334800694,0.0084994196546,0.00908945036219,0.0089136410776,0.0090452733153,0.00853645596396,0.00873111066608,0.00910536428147,0.00870851806853,0.00856539050356,0.00875691832165,0.00912889353682,0.00853547972423,0.00898404371595,0.00888461645017,0.00898798440919,0.00891886491244,0.00872348110762,0.00872514206869,0.00854500642154,0.00877276654315,0.00893390265408,0.00888719934348,0.00896192890922,0.00920708454984,0.00868457022022,0.00911131101878,0.0088791432208,0.00880336095789,0.00907435415751,0.00912396923302,0.00901279170168,0.008939233483,0.00897313504337,0.0088787233631,0.00895007212562,0.00889383581123,0.00913651295566,0.00902752235853,0.00874692242258,0.00884921389445,0.00904815512673,0.00877339341017,0.00887609711497,0.00898843103224,0.00884530510241,0.00903529158794,0.0087696520448,0.00864117614223,0.00914173987326,0.00872431513148,0.0084971076317,0.00939301466191,0.00850566834496,0.00900541226838,0.00912699234381,0.00876694097616,0.00905857535893,0.00880889798373 }; const double PHI1410[NST1410] = { 1.62457401368,1.66062228507,1.74513083613,1.44987160312,2.34303542073,2.42118783456,2.18842189116,2.61572603018,2.04428100555,1.96280522385,1.66571472535,1.72497906235,1.62971709389,1.60396796237,1.63750058239,1.95865567696,2.02534985046,1.9422772128,1.60273857104,1.13149693494,1.41525821125,1.61182532589,1.85060010504,1.78118587327,0.117015482937,1.52827383976,1.76740189572,1.68869318699,1.29809371262,0.898049023432,0.96884282768,1.11572398196,1.12006498116,2.60149412575,2.71738650334,2.69078848303,2.3190111387,2.65314185775,2.5760523588,2.26913427715,2.27587943049,2.3480323331,2.33267675154,2.57015265485,2.64876206189,3.01451419056,2.68826433706,2.75175007043,2.23961009185,2.15582278234,2.24029270961,2.28474097554,2.5231993295,2.59582623532,2.73455179315,2.65058663509,2.62259512519,2.66730975721,2.53527156424,2.61973765237,1.48197213053,2.20841730399,2.29830116477,2.25456083216,2.17471875994,2.25657197694,2.37814993822,2.28419574619,2.28888445215,2.23929992789,3.06738171536,3.03662678158,2.95178139307,2.79697421496,2.80350959945,2.87341562462,2.45839686131,2.48389935441,2.28015699582,2.32728527476,1.52685998764,1.47828947959,1.39057133496,1.45489150267,1.52457985362,1.4112863199,1.54179767836,1.49272012002,0.600329815786,2.09918986204,2.06760396283,2.16882381544,2.14865833429,1.62119157417,1.90570096884,1.75067878492,2.17301754713,2.09670495448,1.98761355223,2.07360269724,1.94695771207,1.9876246585,2.11745602115,2.07198041051,1.70249332613,1.86337526662,2.19726873232,2.2029881425,1.88729238033,1.72414908166,1.83267671321,1.75633464383,1.78096415264,1.85592570544,1.72853994795,1.76940843759,1.64330439938,1.74729234153,1.59164884633,1.624643711,1.57232625849,1.495663024,1.33093443549,1.41012212664,1.2906879496,1.43868554925,1.15484723211,0.897873889368,0.970609741419,1.25907207814,1.26855616941,1.85733985497,1.68689436434,1.81887460943,1.73442196572,1.34084608364,1.65709409237,1.54945021774,1.63081858646,0.829512403686,0.824729010884,0.273869863167,0.640602588792,1.30785047085,1.2609133861,1.17941321693,1.16811884058,1.12370574022,1.16516763107,1.24893472487,1.38795204108,1.55054178553,1.50142842826,1.42410203188,1.54622724436,1.50722476209,1.29621247474,1.37913867301,1.41761864504,1.37406021523,1.29068151632,1.25113957882,1.63437062363,1.80572790253,1.38519067246,1.42021570113,1.29261358471,1.37539324881,1.62592847534,1.54148757949,1.49871914601,0.766094742419,1.64694215045,1.76522576712,1.73162116964,2.15517809559,2.11550443824,1.98621525879,1.86510605773,1.90109070699,2.03161712366,1.88348546063,2.10777894585,2.0223491303,1.96991723273,1.37995016085,1.2167074012,1.25157953751,1.33028074723,1.32055988903,1.28992802882,1.33883849621,1.3096719238,1.35951175122,0.671121228108,0.685654373133,1.016300318,1.04930648416,0.602833819314,0.40519551362,0.558260169868,0.46250178353,0.538096369996,0.407759039467,0.560331708046,0.437992030725,0.513200530869,0.330979858343,0.319624848123,0.184735328897,0.332309046875,0.285261794531,0.208470842942,1.68810562416,1.58821298344,1.66629482445,1.93052859092,2.01287908488,1.63651981353,1.28027266544,1.3914362756,1.36323984781,1.43980291829,1.36601937383,1.36412728864,1.04211765176,1.0374359457,1.18330382678,1.03947852731,1.11331940362,1.04744143224,1.04146624535,0.996200761255,0.902646043563,0.969004979045,1.18316707968,0.965165364356,0.52894564832,1.42279541108,1.40231474412,1.70760346789,2.68119142738,2.7327630765,2.60999155741,2.57087713267,2.47911597633,2.55848633257,2.2324266322,2.34139150157,2.37315768548,2.31494172232,2.33572039028,2.28073432421,2.26943014107,2.41876869223,2.41029259529,2.54589698039,2.46951225693,2.41932304136,2.86906764268,2.92691821668,2.88066211575,2.78622661871,2.7530320356,2.79377982479,2.59562179438,2.64699690772,2.58649904875,2.7264539946,2.7343858398,2.66397757218,2.45423174321,2.53693628218,2.44572061911,2.41155130452,2.89842377252,2.82814337558,2.96129960174,2.91561432603,2.39200971344,2.26419959264,2.34203047908,2.40865131057,2.24926498276,2.31079359986,2.45227787045,2.42804967555,2.58595635345,2.53279612767,2.5631637732,2.48655919915,2.46879858332,2.45313117881,2.28863300242,2.34633111943,2.20716824235,2.18082748221,2.36390893284,2.27791343792,2.41147979364,2.49259105251,2.41052151424,2.36951994594,2.49742650104,2.53844214849,2.48257280037,2.39798319807,2.34242291147,2.50738252966,2.12958579069,2.11398189836,2.23610840576,2.20111392176,2.2117250598,2.2792112579,2.28658645946,1.79951750435,1.88022584389,2.13146958191,2.17611712729,2.02062885597,2.13764583583,2.05822027647,2.42423399825,2.27520867921,2.42439176906,2.35541008686,2.49617786851,2.48938303372,2.11726501722,2.17545775818,2.21660859737,2.13467562027,2.21122100292,2.51326063387,2.45767657466,2.33779952686,2.41567356391,2.47860925688,2.34956855153,2.23768171029,2.21324492991,2.26817007331,2.37590875051,2.31860750785,2.98482932764,2.93947840685,2.9212764594,2.85553686439,2.84159695143,2.8155713851,2.75053213865,2.84978501714,2.67790839913,2.51074403666,2.72554463323,2.76478488129,1.83507706608,1.73680461186,1.87980915517,2.03952984956,1.97800845875,1.90222097757,2.19584478445,2.14711987129,2.40789701663,2.5160189742,2.4375020581,2.38133155697,2.52721458117,1.3162953939,1.15571632844,0.863668577574,0.91999440317,0.901383228281,0.602349183097,0.52201624677,0.673859362689,0.824376429464,1.3609671789,1.2621257253,1.39398259332,1.34654196793,1.14394296741,1.25491792475,1.27897604221,1.22742010958,1.11791237324,1.17746598782,1.88811682589,1.93882115987,1.83360158776,1.85764987908,2.14340029057,2.10956481735,1.77839708612,1.85836913568,1.74466261162,1.78820799206,1.43928301502,1.54234087675,1.38231654119,1.76496780138,1.82477465951,1.80057609914,1.6813708571,1.90818296481,1.69426235536,1.66069459686,1.72022702437,2.31282035324,2.23426701766,2.24674094158,2.20300320997,2.05838831937,2.03721578377,2.12347363074,2.13159076272,1.25103705393,1.21078157617,1.22999612532,1.25662472185,1.33887017141,1.29800395884,1.36647549693,1.46636385079,1.37893022247,1.38049396303,1.33671889715,1.50727827706,1.46347302123,1.41415480278,1.34438016942,1.35851775559,1.13890431949,1.11963355377,1.20706343179,1.19905119521,0.828194750428,0.836032154922,0.77269150804,0.910894404642,1.00165657523,0.925286505446,1.06241829311,0.975903728661,1.05087580812,1.38870165336,1.49161727798,1.60561720698,1.59770982412,1.64368831705,1.5110991795,1.47292467492,1.52161876776,0.954168072067,0.963518439205,1.04026845902,1.27348325016,1.24532222283,1.30365902336,1.35626126864,1.41061894382,1.386042904,1.19910691176,1.2812365428,0.54764055875,0.286121681051,0.358655230751,0.528709833851,0.600515135045,0.607319681074,0.292624617584,0.461184932565,0.454950166386,0.208919719513,0.224537416017,0.45875164463,0.391969051773,0.532564885359,0.410137072826,0.491038680663,0.547113958248,1.51136724332,1.43204749321,1.76727909555,1.12513770582,1.05259353429,1.92515571335,1.79798293915,1.88608652223,1.66701368065,1.75197427034,1.54060394233,1.50181812673,1.66585634281,1.62430967045,1.6268310355,1.54663009472,0.742101909193,0.794128413356,0.780042402686,0.879950431265,1.59566541027,1.51213055705,1.46109024307,2.14144303444,2.22677632059,2.25750454677,2.00203433155,1.97311831237,1.94485576267,2.08787288519,1.18881512176,1.25554031836,1.30343826241,1.27120276708,1.17200317652,1.13736795026,1.43858901503,1.49065056649,1.55894178002,1.39980386991,1.51202623305,1.43231535313,1.41736946246,1.44784553978,1.52714358304,1.57707617913,1.54770682323,1.46743014427,0.530881138116,0.598001263651,0.458040051108,0.601955696639,0.539815481146,0.463908626592,0.734498668708,1.13127246416,1.09304079874,1.03931172527,1.00132722053,0.253062802528,0.232425190415,0.275133554693,0.182907920291,1.54503360923,1.62665481539,1.65274624285,1.59062780351,1.52061023704,1.81697348486,1.89926177399,1.94427831363,1.9065505855,1.51587592032,1.56624077122,1.66166017216,1.77145742146,1.74579678837,1.71214965637,1.60189491839,1.62686686696,1.41746612769,1.14696853025,1.2290024348,1.48022111455,1.45469923245,1.36923329011,1.30942565315,1.1142255635,1.03095672019,0.999621186919,1.4344743222,1.57632975627,1.51720667388,0.981556637948,1.06124881023,1.02433732849,1.0820248215,0.840738623722,0.920944383127,0.943298323228,0.785017429443,1.17696020773,1.2556153154,1.16087669453,1.21893573278,1.32022405335,1.29956011826,1.27667878215,1.24428268222,1.31210507307,1.37834194677,1.36148549188,1.1090365548,1.17830567395,1.17745012514,1.10556633023,1.32753793346,1.2498294074,1.24731148283,1.31993578953,1.10505851985,1.12258875671,1.20330827445,1.22586990468,0.824016748968,0.888249996105,0.880096418551,1.02907106655,0.599903620172,0.747422846916,0.706988357578,0.685436543298,0.609590606734,0.545486354315,0.887878174482,0.930161766227,0.894684460358,0.817239225029,1.64592155397,1.50426084276,1.56555740703,0.746515172854,0.771069812319,0.674468138169,0.804979627809,0.864634576043,0.916458928387,0.888114827434,0.683542831362,0.699505123348,0.780682051342,0.841562010259,0.730483522396,0.779875734702,0.748103684315,0.735838942253,0.649777385351,0.627772645401,0.657008021878,0.607983480711,0.546644491818,0.274335921625,0.391313577921,0.253252426379,0.320674943933,0.39764961195,0.480793642358,0.408204464292,0.35609463743,0.489870613612,0.523104075107,0.156596376473,0.235226324487,0.158367828263,2.36850942629,2.44978658842,2.49104316819,2.33052662285,2.44447132163,2.36608545241,2.16735639291,2.13345231888,2.0575372842,1.83086919908,2.22781312105,2.20694689036,2.2579033886,2.43225933455,2.50994930982,2.36274361205,2.36021797582,2.43391058294,2.50890678642,2.55868757192,2.49056903718,2.48598109601,2.5501741011,2.71568491109,2.6660066415,2.832394231,2.80064736466,2.35948658957,2.38842950784,2.27386627763,2.22309094929,2.20246020906,2.25328013662,2.3329886475,2.23254704075,2.36594507318,2.31626619311,2.4459584141,2.45687856728,2.39002695099,2.31729039607,2.30408011438,2.36613417424,1.49589254783,1.54576017915,1.39518777,1.47546934413,1.40021182284,1.62223077104,1.69303412962,2.05808702465,2.09075344669,2.1206071833,2.18818929154,2.17179321872,1.85541881226,1.91063750515,2.15745869446,2.1042463744,2.12680902472,2.0447337014,1.99261605092,2.02171609441,1.8216329542,1.88108927624,1.96522267182,2.3796426806,2.27712941637,2.29209922848,2.24555990258,2.51282545252,2.61556076759,2.54686379565,2.64154083852,2.59671034465,2.17904180177,2.19759633786,2.34962794469,2.27324391063,2.41205734266,2.39167092584,2.31102722403,2.25461346706,2.14519224204,2.13509858964,2.41574699535,2.36976430252,2.40205813301,2.48341622851,2.56658421923,2.62574794082,2.57936776666,2.65544533953,2.72609151991,2.70822328443,1.93459546188,1.89315717906,2.28486434688,2.32356880299,1.29626569368,1.35496329437,1.33329030244,1.2131492827,1.19139939855,1.25288288163,1.03996321764,0.720724192288,0.762935334765,0.7840887937,0.763097891637,0.730896232052,0.651180231358,0.626123795167,0.685322074016,1.96672343977,2.09489277117,2.01651687375,2.12401216675,2.07229840491,1.9936049655,1.98422328777,1.90488562418,2.02900173127,1.86829026442,1.90933545025,1.99052327585,1.30235277812,1.30374833054,1.23798920711,1.39116586986,1.40576314166,1.5754827145,1.44135487887,1.51718075849,1.9753297759,2.10640404608,2.12000762758,2.05254193682,1.78559708638,1.72402159263,1.8950961527,1.97836842408,1.86091468739,1.91850479311,1.9916436461,1.08431889267,1.12843474327,1.02228476241,1.0988386607,1.12577172466,1.08835599645,1.13757418736,1.22097477031,1.2560870595,1.20982826455,1.00587168049,0.843394332883,0.891450530683,0.972703311302,0.999744578206,1.02502492253,1.05811553119,1.10709632653,1.16254606315,1.13859536795,0.656285120532,0.604963482316,0.751243669507,0.754698260659,0.680979586788,0.612816685434,0.696382536344,0.557629270428,0.63451078737,0.686188655328,0.547311833778,0.614171926014,1.44716852303,1.52946887084,1.59506376006,1.57935283851,0.441842974516,0.294864716944,0.403061361079,0.327932437305,0.480132632704,0.478314811654,0.350689644733,0.418849885226,0.410680669977,0.344040683508,0.563925121677,0.651014737398,0.517555062631,0.565545819265,0.3646727983,0.524723645514,0.478854519793,0.397955477763,0.42110531771,0.498299636663,0.539671891342,0.208345756308,0.169159141264,0.186605187614,0.119121295365,1.69534887869,1.5422309655,1.79667904886,1.75125205002,1.76000049326,1.6752779463,1.5193378902,1.5663086583,1.63851573427,1.67158931537,1.55221120469,1.63216523424,1.91649349655,2.00303259111,2.01550077841,1.75814499311,1.67638258935,1.76286575546,1.80499536643,1.63141042372,1.67120086437,1.79360234685,1.8760144188,1.79060172831,1.75003572627,1.92055163496,1.8785155333,1.62723776816,1.71196544162,1.60147178678,1.57312178552,1.6858107834,1.7423253124,1.82831270223,1.85772906644,1.79875994878,1.65788074233,1.71296445676,2.15666036571,2.0762826101,2.22197706236,2.19907508735,2.05731963825,2.11509360961,0.823627947463,0.805878559204,0.826838817333,0.685729119818,0.745364041205,0.866967240682,0.909267544514,0.915313364521,0.995416184588,1.00188928007,1.03999473764,0.112270339181,0.0506028035006,0.132069441645,0.146000656499,0.0388876302635,0.0892491094601,1.64794331241,1.68873266417,1.75024816924,1.73027191797,1.54554200164,1.6071384471,1.58620228594,1.46386552964,1.4839795052,1.36109151518,1.44312778812,1.50397693061,1.83130424327,1.71696528767,1.79120115058,1.78646168524,1.70106930439,1.67142111759,1.67629484949,1.59114637744,1.53126034759,1.34053386502,1.26122082741,1.34556554159,1.26334726227,1.4463099321,1.42004680813,1.38903475951,1.33485177316,1.16665561118,1.25047545258,1.30515313875,1.27708851614,1.12165224629,1.16853087834,1.10561098571,1.20033045258,1.29508356396,1.16690224586,1.24429906896,1.30500402022,1.06243822626,0.944765752997,0.922059760774,0.982249180724,0.808476925217,0.669239218884,0.668577544797,0.739676855295,1.22631246112,1.15936926081,1.22519418578,1.15763105222,2.02731582127,2.04088746104,1.662152027,1.75194439494,1.73966536053,1.6850440707,1.0981294077,0.808973690386,0.740935728035,0.748695053013,0.82504924464,0.645513462886,0.613223257569,0.637909752253,0.662822892672,0.554788302496,0.608784834558,0.493485510292,0.523560551181,0.936784634274,0.529742110899,0.612490392851,0.482864812152,0.537092204507,0.370316837881,0.29398083851,1.94090162108,2.01535720327,2.87797205285,2.80205564224,3.02763572634,2.94505227846,2.90935388104,2.62971200689,2.69725421109,2.62619940377,2.68899518507,2.77324473295,2.7679267539,1.80940863081,1.72355369392,1.62682509685,1.704285269,1.55684132903,1.56675595205,1.50086392367,1.46693158394,1.4331765639,1.55408783334,1.5743516083,1.46502455161,1.54032829263,1.45604391797,1.52071563467,1.60883997007,1.59816027637,1.76991372915,1.77658070669,2.13563755165,2.06076428497,2.47395226645,2.48961013232,2.41038757658,2.38873853091,2.35453535674,1.59690945133,1.73344494087,1.67779871547,1.86295167301,1.85033185326,1.8064819653,1.99365177588,2.05646743636,2.49685769509,2.54599700634,2.61339913174,2.53300304833,2.67498982893,2.643565917,1.89213224125,1.93761613804,1.92969786578,2.02459761898,2.01349477105,2.0631619161,2.1557875303,2.19819183017,2.06883782595,2.02301475698,2.30177827807,2.27294065336,0.881985450392,1.07426548409,1.01793107809,0.937039009487,0.91460436878,0.959544884663,0.974031461448,1.11237821911,1.05254856964,0.885409201642,0.882637304828,0.814862887253,0.742254613516,0.835563547676,0.820673866473,0.679223893653,0.745458128743,1.24600961228,1.23452606207,1.10316291275,1.18133330869,1.48152566458,1.57761004607,1.49343104011,1.61662282307,1.55726267166,1.92742044141,1.86698576284,1.88379523035,1.96282277549,2.00768882203,2.02642400864,1.74407667482,1.67897891878,1.69482824531,1.82237501642,1.77179665626,1.83435466349,1.00311263916,0.961711890607,0.880931282941,0.970322100469,1.42871933645,1.32771730228,1.34528477878,1.39626227254,1.48042027384,1.49540219809,0.639083890886,0.766028243666,0.691868292136,0.679972327761,0.802483084187,0.767856887438,0.253600393531,0.408842419624,0.457570480309,0.461423648213,0.39121125003,0.319412435921,0.334767378911,0.400842828806,1.68760035989,1.63847051689,1.67188346643,1.75135982125,1.82421992948,1.91132532384,1.93486047838,1.7680606703,1.87822144861,1.79853745497,0.934842078649,0.906273947435,1.02067090506,0.877095277332,0.867074354638,1.44439257662,1.36933489625,1.46939961254,1.40602911541,1.49075105952,1.44486293466,1.38439205765,1.55175828279,1.52739686008,1.26071617986,1.38551074904,1.30751038452,1.24483472632,1.40295146094,1.34078062689,1.08488041645,1.16737364539,1.05394717063,1.02713536614,1.19334090845,1.13739879888,1.08712147561,0.948421131824,1.02025475796,1.08777084563,1.93012853194,1.94720147965,1.84970579795,1.88259589593,1.78783589756,1.80375665048,1.89483998241,1.82822187583,1.98118985458,1.97294612865,1.83826515489,1.9131018174,0.981154704141,1.01593427242,0.898280167759,0.853692102398,0.821653109855,0.884737277265,0.963790821066,1.21464103586,1.13371365091,0.880668388484,0.948431197285,1.01966544915,0.889181722035,1.02841862618,0.965557933907,0.885485172501,0.868823405773,0.917293762959,0.782838861951,0.664869385022,0.748388651291,0.802997111702,0.642465728576,0.655690989479,0.376868816333,0.403500341148,0.240446579126,0.296961416182,0.357184797956,0.277546475353,1.89085571974,1.82204316252,1.89634499193,1.9237319147,1.87023197608,1.7904333616,1.76940597797,2.12236952025,2.04642764287,1.99921480323,2.15150982375,2.57715223118,2.6310220783,2.52764415147,2.55151715836,2.69955900358,2.78106353181,2.65972375731,2.69083624682,2.82532084712,2.77260108293,2.640048909,2.5579977,2.56709367449,3.0738807895,3.09729570555,3.01436317359,1.63985558111,1.64258979773,1.70291782838,1.70739822634,2.05757622267,1.97203442767,2.13077227954,2.1800816549,2.19976691866,2.08905345865,2.05829252354,1.92059120251,1.99137564198,1.85231643029,1.99360894687,1.70747465691,2.07883648292,2.07354283348,2.00601334889,1.94049051168,1.99475702337,1.93440403565,1.84575781281,1.99068001599,2.07419213923,1.93052257096,1.95392609062,2.09756813453,2.03732434665,2.25207273885,2.24494434003,2.17325032287,2.06220116425,2.01258162005,2.15009805025,2.18660068858,0.980188540792,0.903441401087,1.00753179363,0.957561594029,0.868725391247,0.840946098018,0.634920757239,0.699833827035,0.769573178642,1.16216682344,1.097981599,1.02379761341,1.16010721923,1.02120549707,1.09329131916,0.892470511343,0.867819003464,0.790313586414,0.735399797377,0.764871589459,0.844047146562,1.15957744262,1.07635674916,1.21142855645,1.0007363834,0.961728423788,1.08875755361,1.42147777614,1.40085463819,1.44742812358,0.907630027573,0.843929076979,1.06840277252,1.1491204893,0.999264391447,1.0865023099,0.432039105569,0.506560545545,0.567959964041,0.43565480595,0.515400302142,0.573150674859,0.77946318879,0.70276312187,0.833120559846,0.710775279358,0.794778307655,1.99030445065,1.96971499666,2.07066788192,2.1264149744,2.10096648941,2.02481487693,2.78698872843,2.7135873544,1.85509988223,1.92535543711,1.78251612967,1.91504330136,1.83760301229,1.77516822611,1.49956411228,1.55620962212,1.63174818664,1.49707944359,1.57666614871,1.47280022682,1.526821346,1.60606434223,1.7644323385,1.84691662031,1.91205494957,1.89141460318,2.00268302295,2.04832001231,2.04521131986,2.12046187113,2.16394118023,2.13417019355,0.776587871704,0.800874847236,0.750709697752,0.69602030844,0.638679016291,0.669971789773,1.00118069596,1.05075713559,0.966629960468,0.945189875081,1.34900203333,1.3217828788,1.246473254,0.933714015791,0.986478253154,0.959620169854,1.04046290416,2.70312231363,2.64831260282,2.59669289528,2.62125742141,2.82351139239,2.88714572507,2.96405117338,3.00200058747,2.93304361485,2.86112415953,2.96198039108,1.74512189305,1.70016022271,1.7846658098,1.80702903358,1.63983939677,1.66254272303,1.07715607119,1.20305917902,1.12575107173,1.23208291587,1.18258289014,1.10517250871,1.30107020003,1.32703703264,1.27799525118,1.20089323992,2.84672342746,2.73193681794,2.76421516733,2.88762486714,2.7568476611,2.82542503965,1.06722356563,1.2259957631,1.09509450307,1.17483123813,1.11948382407,1.19859252156 }; const double THETA1410[NST1410] = { 3.15026418775,3.07710262364,3.07326826409,-0.0911346091709,-1.24130495534,-1.20992705766,4.38575066458,3.45162189132,3.66717626721,3.64338582012,3.21981026785,3.36361819701,3.34972758506,3.28377861572,4.48701675354,4.5182004306,4.45981437689,-1.45526001619,-1.50567947786,1.77488557233,2.00818447701,3.01168462934,2.85274265301,3.00065815094,2.39443767123,-0.122626403851,0.268153561099,0.262674432481,-0.0211281815933,-1.05545043246,-0.993920256401,-0.597428551996,-0.693675741637,4.58806940225,-1.19817754128,-1.38527222256,-1.35083734868,-1.07374826186,-1.12985828707,4.35123058326,4.2451089902,4.19639597009,4.42565862531,1.95361158377,1.9860644221,2.74258143974,3.48675967943,3.34680017881,3.0819272472,2.91022130309,2.90212057522,2.9907701746,3.24812118168,3.28389135856,3.16171580788,3.13988076964,2.98833899796,2.83355589231,2.7379200421,2.70375514067,-1.08894350174,-0.909374369025,0.209351506219,0.304590303252,0.298189918286,0.11273708358,0.209011363069,1.0992142254,0.406064741221,0.490946397154,4.40299924005,3.48096833608,-0.8467646265,-1.13291445507,-0.890014296509,-0.724506989473,-0.514878484161,-0.631124068167,1.61285973461,1.70151886851,3.02601675669,2.96642925074,3.21370773596,3.27552776289,3.24926249064,3.12845165594,3.16517748043,3.10643762468,3.74921519546,3.59874840193,3.75716963327,3.8841327447,3.78673832526,3.77636290045,3.70474917087,3.43893158562,4.48209665065,4.51078056732,-1.5201305049,-1.52012916447,4.67614384884,4.60837559777,4.67117788215,4.60442148893,4.63882279485,4.65873347437,4.08454515606,4.18648285064,4.50033819434,4.49079652191,4.57331740963,4.56338575022,4.2670085187,4.41587440146,4.35091337818,4.41674562026,3.8557126928,4.20747019087,4.55020713804,4.62952103342,4.69573234696,4.68188690739,-1.10710816658,-1.13979842977,-1.40993675582,-1.52636546727,-1.52969316539,-1.16002483871,-1.19871525602,-1.15755833858,-1.24302250086,-1.47839611722,-1.49814700765,-1.56075124915,-1.57060010674,4.37307089455,4.21599158017,4.12170177547,4.14048899742,-0.899329198197,-1.00577864241,-1.31201378616,4.42252793786,1.63666185258,1.70922854432,1.7006246466,1.8568473725,1.93300127959,2.01181464896,2.01147504444,1.64311509832,1.64914620425,1.86275576518,1.7189129352,1.79126568642,1.72040357974,1.78750311842,1.79060396268,1.86364201538,1.93635845307,1.93658854876,1.8607028988,1.64872622329,1.63459384789,2.23014433463,2.15410474237,2.08559147844,2.08253104159,1.92893671224,1.93262974849,2.005319698,2.40799826429,2.93789745808,2.85762563754,2.93075389913,3.08018430706,2.99709043542,2.92162311119,2.99908575317,2.9242269027,2.99870863945,2.77825615904,2.833703595,2.84325517806,2.77152087847,2.8422820233,2.87709562953,2.79248149486,2.77615762482,2.38600076214,2.46690982614,2.54023579723,2.62281564297,2.69332470862,2.58750570623,2.45320378205,1.67502395954,1.76518803142,3.60175411993,3.39145596254,3.34510122569,3.54897967694,3.49956497185,2.99164168333,3.05433014552,3.19290635793,3.19984748543,3.42383935068,3.69581096175,2.71634336134,2.94054149649,3.17314942686,3.15198222133,-0.175085270285,-0.0733636188926,-0.0986809005846,0.281379903445,0.287592283219,0.331076668345,0.91084515352,1.00215859058,0.924115355094,-0.0116744349146,0.0229546404508,0.109696308638,-0.567131799584,-1.03792128135,-1.12413536925,-1.13880427966,-1.17728298475,-0.742259327377,-0.833682676247,-0.659207567523,-0.842946813538,-0.887206556841,-0.750105836221,-0.183571122993,-0.0335603033133,-0.600576330037,-0.519616630587,-0.548302989809,4.56425337844,-1.55591180804,-1.40420278439,-1.54964303867,-1.30683907168,-1.27876255462,-0.549359391127,-0.389280573242,-0.497548882041,-0.577192659962,-0.683951632958,-0.853700370824,-0.751255461714,-0.719528175051,4.39337092271,4.46356099944,4.49031202865,4.26803959752,2.49802768675,2.7472664029,3.01505833941,2.58517391392,2.80383002497,2.98246599389,2.27580460755,2.53643371126,2.4400194156,2.4558813803,2.24137400741,2.16745263399,1.80509845332,1.81277448704,1.5805650229,1.69508703131,3.34713497327,3.46212680937,3.62890662503,3.99367425918,3.89775306263,4.0299122626,4.08163357155,4.01655772762,3.92406917622,3.8584080097,3.81151346176,3.69414441282,3.74649025082,3.85123316838,3.58581868924,3.5760727729,3.33666424839,3.47120856104,3.75070594452,3.673319598,3.71979341392,3.6212168168,2.78970356943,2.80755612826,2.87936704176,3.09945134141,3.08808338806,2.98630211986,2.86569304332,2.98514540284,2.63988813112,2.6771480286,2.6011501696,2.50518361785,-0.867925014831,-1.45184749208,-1.36853029804,-1.46002103088,-1.00663464849,-1.16607273812,-1.06128029145,0.34700873747,0.354205007709,0.638460189295,0.117002067181,0.121294741349,0.207127156112,0.206791323738,0.101607825056,0.986443120009,1.11088675819,1.16508405618,1.18650430622,1.32400156259,1.3925386975,1.45973055951,1.14850316608,1.29416935519,1.25526968115,0.688267101294,0.779564379715,0.926181066786,0.982775405542,0.911264766726,0.622232870432,0.769866737176,0.666914262543,0.593403737761,0.737681681532,0.810967091212,4.63991780536,-1.25904846849,4.3542193895,-1.32207375578,4.46779124351,-1.56571236621,-0.0682833136307,-0.449716483727,0.0230958167281,0.0890371837114,-0.274447747971,-0.445867918422,1.31779371695,0.628978946783,1.47372273099,1.42349847531,1.36258750829,1.38942783985,1.63029597161,1.55705050513,1.9077852677,2.06440398068,2.02806387883,2.11534598526,2.2114082879,3.2365808787,3.28818044015,4.1330793726,4.0544525911,3.95088564147,4.29108228643,4.27223538506,3.81614099558,3.91369750949,3.06724308021,2.94208716207,2.98550961594,2.92358706825,3.04772475127,3.17280661511,3.08842764708,3.02536174437,3.13732168623,3.19882428799,3.38929828351,3.55746700947,3.45676943325,3.5374566721,3.25418888098,3.16459085472,3.29911659416,3.30676879416,3.22106166113,3.14772778507,3.35973474714,3.75910161298,3.72447235001,3.740224005,3.68181630114,3.60017373325,3.71769463179,4.11090406488,3.50164748086,3.64127298419,3.5824034259,4.53586218328,4.55690315919,-1.54586826028,4.65304449335,4.18293644668,4.37246700695,4.32730373361,4.2326946602,4.50862965733,4.58418058644,-1.54431936173,4.65663130286,4.6591360474,-1.48603602753,-1.53777422735,4.46320435898,4.59304727097,4.45085221879,4.51525624348,4.53899213829,4.60440562225,-1.21712405143,-1.26946030109,-1.35532303928,-1.44043592218,-1.26620783252,-1.37942376214,-1.29805416767,-1.22881239557,-1.3411786031,-1.4235142194,-1.37197227355,-1.49617358265,-1.47607085086,-1.42111304429,-1.29942680429,-1.32762322497,4.30924623189,4.18301430922,4.27509924079,4.41260271085,4.35045363318,4.40004598112,4.32379108217,4.26105574504,3.77947796886,3.88267964366,3.91654913977,4.2159650226,4.13639788413,4.07200909922,4.23032171526,4.16697911796,4.08803668273,3.97247467217,3.99316259932,-0.933365782443,4.6650162445,4.20926063808,0.132911342398,0.209058590488,0.355405573423,-0.150202447332,-0.293007062924,-0.123784956703,-1.13298675083,-0.735358946175,3.73928766253,3.83683134122,3.83015004309,4.05202025522,4.10787200811,3.99287117885,1.57492456753,1.57044956941,1.33679007647,2.08976302084,2.25167663778,1.97313484954,1.91546751578,1.90585815594,1.9970562265,1.99031822237,2.07493872529,2.14940327375,2.1390464738,2.07036356324,2.21456227158,2.22032634177,2.20929331491,2.29246213481,2.10067446423,2.27051179056,2.87345608923,2.88756169765,2.82540352168,2.74429555957,2.72636786981,2.63123633485,2.69342967594,2.54890025909,2.62635030009,2.67625819876,2.31932009389,2.16210351137,2.23500738389,2.31289518257,2.1658910864,2.24537280545,2.68077758373,2.74660798159,2.3687604324,2.38025435863,2.2971133626,2.30215529453,2.53159536265,2.45239998131,2.44604122943,2.51641740576,2.59279567376,2.6014928362,2.56370617108,2.65186534693,2.64964324514,2.79757695503,2.89471282299,2.84286364419,2.66161962176,2.89547681435,2.98309683721,1.92889495438,1.84281388673,3.82141001359,4.40107024541,4.14689584329,3.57153236525,-0.206241223882,-0.2331719124,0.183484995399,0.0137778801407,0.0437463120254,0.196252439254,0.202161708461,0.12284128471,0.0403041200699,0.453805385942,0.600914471792,0.405049892661,0.490935119996,0.415362588705,0.553920508326,0.467258143915,0.540763073156,0.859451078586,0.968466184622,0.979139187207,0.586389325448,0.512568126007,0.492861171509,0.548599509487,0.884417774708,0.874958899035,0.787783274421,0.14583949227,0.179162011872,0.114993634577,-0.282404548434,-0.316560729106,-0.473913204235,-0.410497999528,-0.324835881692,-0.351126003,-0.449082090262,-0.413696270399,-0.537684821562,-0.560530033692,-0.444054406785,-0.388341350079,-0.49608108711,-0.417060956458,-0.635517621724,-0.720823509548,-0.781332963425,-0.733196806131,-0.651863508211,-0.890818281102,-0.855778747303,-1.03606792116,-0.98904980486,-1.02750417278,-0.990389819833,-0.90760013896,-0.863028091892,0.314024256069,0.406198969892,0.437901382989,0.523528485628,-0.21596982347,-0.144371023933,-0.0361854608651,-0.124569877348,-0.0907985450563,-0.179598388401,-0.397708147771,-0.270954895524,-0.238670291741,-0.344741412711,-0.735403296608,-0.649518962407,-0.532449390405,-0.523812124364,-0.603071003645,-0.62892135472,-0.576217343192,1.17437034002,1.0539163144,1.21561463475,0.659530974158,0.857780971602,0.774602162021,0.67669860481,0.40177930115,0.527230117312,0.553085079275,0.472021622656,0.961013765301,0.85373295709,0.75319718328,2.00512206408,2.00306685303,2.36165990685,2.23190963632,2.12122974888,2.40374325379,2.19436366421,2.54447576833,2.51420574623,2.67015680119,1.9642012139,1.98070269169,2.32978026861,2.16105673127,2.28480064971,2.12942322246,1.82041064994,1.90116245174,1.27160486493,-1.44341814229,-1.4322004998,-1.54844610385,-1.5474062703,4.61785035612,4.62978651554,-0.0676121327138,0.0275123036632,0.0320103178781,-0.433713290298,-0.267508308595,-0.449759182323,-0.370085056665,-0.836580314256,-0.896478362534,-1.0136593173,-0.901661593343,-1.08501359647,-1.0362028676,4.31158705502,4.21638952154,4.07674737004,4.00092643062,3.67739497728,3.8023305758,3.92997701031,3.70686502825,3.18538054657,3.28873184697,3.17493639704,3.26233683073,3.44608992039,3.36151238676,3.37659683973,3.54563156843,3.48159504754,3.56606489446,2.42957144945,2.29556811815,2.23968105961,2.3099598809,2.42470166307,2.48614308611,-1.24888506392,-0.95381353165,-0.896445051699,-1.00692001428,-0.978490313223,-0.981817195103,-0.930300693848,-0.921188186573,-0.591182727211,-0.775178592336,-0.715252266101,-0.619075350981,0.502795487178,0.434599203898,0.472632777708,0.546092822744,0.381069781326,0.370938871779,0.44494224573,0.528880475217,0.644039208892,0.581077418183,0.596568785584,0.00497363038267,-0.177551894113,0.0160742740694,-0.0745387101195,-0.398229003204,-0.111215143303,-0.0670639078223,-0.277333644797,-0.405925317033,0.832801116081,0.935328232303,1.28422343695,1.32335106483,1.36469245195,1.48442830115,1.50945242182,1.43021892707,1.09078383099,0.989151310353,0.318194354159,0.419954169706,0.534220139273,0.557420566907,-0.669970222,-0.565969380305,-0.822701369066,-0.900481768999,-0.797610852829,-0.609247078668,1.82827971841,1.76301769001,1.79648857242,1.8930588219,3.31854234405,3.37978889169,3.45651242097,3.34384438411,3.43192307398,3.48278565277,3.16725524004,4.42361156552,4.31653894178,4.1080168321,3.99100501661,4.20088834978,4.17725146013,4.04074559373,3.94917671438,3.40172971761,3.33678108963,3.32615561018,3.42986715059,3.50672271173,3.48944981737,3.23946385154,3.23269279772,3.16068145229,3.15161436288,3.07560354551,3.07781724435,3.69646214776,3.6131920109,3.57040230187,3.59103369499,3.5213401272,3.61766438965,3.66163854734,3.67664340957,4.05266256414,3.94275042752,4.03833291127,4.08959778557,3.81937977641,3.87595586502,4.34708526629,4.32722459946,4.26386650396,4.19687331786,4.23133869511,4.51084710615,4.5896856093,4.69091018965,4.67719651208,4.42999506704,4.34795806528,4.27318422306,4.28389193873,4.36217267673,4.43338725726,4.34098294426,4.32574805787,4.23592493469,4.24982155814,4.079513006,4.17267016527,4.01062066365,4.18875981437,4.12017785632,4.03469609804,4.66734225928,4.55199341796,-1.06354187241,-1.1834410776,-0.989015491075,-1.04151683284,-1.38758124975,-1.43648705445,-1.48177983856,-1.25797757893,-1.27368357382,-1.19350947215,4.02738758344,4.04479238402,3.98794842138,3.91323198368,-0.635486865609,-0.681359679363,-0.440658245039,-0.414430231665,-0.991495436883,-1.18445914249,-0.904883167675,-0.842057259921,-1.28619202951,-1.16580719986,-0.767472948673,-0.503101039758,-0.625623806785,-0.485397142622,4.62129992283,4.56749722231,4.41937695181,4.41567133188,-1.4990354321,-1.55157970441,0.451976999645,-0.0556615390552,-0.392493024243,0.383445378636,0.771144388351,1.28913722308,1.25803280264,1.49192919474,1.42700280108,1.57047840693,1.57749386988,1.42044703627,1.34363508208,1.35309233321,1.43292221235,1.5020516796,1.50504995451,2.26685982803,2.28402150613,2.37745302804,1.85015292029,1.7178115244,1.71079696297,1.77528253133,1.789071896,1.85690292437,2.05765743278,2.19724265084,2.20173525196,2.13308910948,2.12095336067,2.05000241469,2.79892187999,2.79033417187,2.65968708728,2.73436549374,2.6512615615,2.71720482228,2.71015224599,2.63609579173,2.57026676193,2.51039517288,2.57818388907,2.39411789631,2.42776199147,2.46374217805,2.55712386606,2.52443917204,2.58393899364,2.47679759374,2.5979951524,2.83814083296,2.86254355282,2.79486930159,2.09369706614,2.00594240536,2.17928043711,2.00903910432,2.17372390593,2.091145034,3.78469145338,2.94216262386,-1.32607020001,4.40499559984,0.367336296748,-0.627945427087,-0.310248319043,-0.468042675998,-0.411375562059,-0.331754770938,-0.496382961655,-0.443213112003,-0.36480271761,-0.46837436783,-0.255362199068,-0.359651732895,-0.387246808798,-0.337088084797,0.044312020528,-0.0298053022008,-0.0350655509834,0.12095560897,0.113764201362,0.0424011647346,0.689479327338,0.674791734806,0.734967127665,1.07085999078,1.06122835543,0.413136753286,0.38360547105,0.720635619523,0.645724876893,0.78237931568,0.627927796419,0.815201736043,0.830801985933,0.767183146635,0.68739539767,-0.260054252672,-0.115397992424,-0.166328413297,-0.297939418607,0.156842756266,0.259012047421,0.296449066105,0.245372055572,0.466360368045,0.601102015956,0.50215007473,0.434762443675,0.0140385499187,0.13430259983,-0.00259431466177,-0.0560896369867,0.02379873014,-0.022106057141,0.115446771138,0.165983182855,-0.653375382359,-0.741905469582,-0.684597448938,-0.794933370812,-0.711866467986,-0.849043971573,1.04235203633,0.131609030973,0.196373648787,0.32020294278,0.362781117399,0.978685213967,1.11578249227,0.625642875429,0.746768968959,0.600271313138,0.864423432477,0.724821315642,0.870438685768,1.65428471187,1.84655999451,1.87608445925,1.02969181544,1.15780770708,1.75241889766,1.66872978688,-0.04701001056,-0.0536790493385,2.19602189709,2.09458931539,2.09832601224,1.96110130674,1.62022827513,4.25918436211,4.3813881314,4.08264683928,3.99501091101,4.30876592364,4.08798419432,-1.42030607257,-1.42991364152,-1.06081865114,-1.0906200513,-1.11452393116,-1.19743425345,-1.32274595496,-1.45329872441,-1.37644996211,-1.44661606329,-1.36612491178,-0.844586305093,-0.873209117729,-0.762791421853,-0.710009216279,-0.820255800753,-0.738594936172,-0.960968826848,-1.04262767972,-1.05484186869,-1.01174355905,-0.292911203267,-0.155138635361,-0.100555788977,-0.300160143233,-0.191208086136,1.19049305696,1.14759635179,1.21192987891,1.09551168809,1.23793918768,1.16127099,0.993734933348,0.943931579559,0.319221173962,0.197706560834,0.447636167331,0.444395355967,0.3098378331,0.181766638689,1.6193467695,1.68317416439,1.53681139957,1.66656048184,1.51405707985,1.57973690095,1.7228651356,1.80047601842,1.73615863298,1.81803404717,2.08058747928,1.97714476598,3.23011054384,3.32314677059,3.2639891276,3.30042312139,3.40492738153,3.5686738169,3.4645820724,3.47240402736,3.41986003481,3.62325890076,3.73442893671,3.79912516477,3.74567523436,3.45073474313,3.56618774904,3.54855337664,3.62206920517,3.83132577597,3.74597672455,3.8556126786,3.88686674751,3.50079202477,3.40856431619,3.41572042242,3.4853155,3.54223312338,3.79121133343,3.84707099307,3.93358648,3.96621420454,3.81950113848,3.90832754273,3.95584545443,4.01002981508,4.08593402721,3.98539298552,4.12241530214,4.07653492124,4.51426844514,4.42644327118,4.42532717399,4.60721929178,3.95078495839,3.85614074597,3.93286010542,3.79933706883,3.81871867605,3.89375774699,-0.742864902218,-0.822988258438,-0.852170070218,-0.617736079412,-0.715144737891,-0.621171107896,0.537541701952,0.698263427574,0.210783728435,0.388607510833,0.501590763523,0.377204754874,0.0762482524057,0.0421143701047,2.43433511816,2.3631858788,2.28570801279,2.27881977924,2.49661073252,2.48530090272,2.40949991805,2.42868616583,2.34297986827,2.35054477987,2.34880387822,2.4413448332,2.33596122502,2.76216593129,2.6514122098,1.16347487682,1.15354458201,1.24812889299,0.359957185293,0.380614423656,0.227078651352,0.278977144674,0.320301784668,0.247438696429,-0.246609957874,-0.144411098734,-0.109494425192,-0.157359782035,-0.225261168619,-0.279167285856,0.557250168983,0.582310334337,0.71329133298,0.623980744452,0.66716929059,0.731101886061,0.122087437517,0.0223726052371,-0.0257932684034,0.025083341333,-0.540452466831,-0.625675713879,-0.516121518167,-0.683309625397,-0.573785679721,-0.656101820306,-0.767680281847,-0.823198035712,-0.885292473411,-0.798091149589,-0.908308175556,-0.939573245958,0.958640644051,1.04182925868,0.955131727023,1.04490726344,1.22876949499,1.14588145348,1.13868479403,1.13441250523,1.12629336329,0.185042354887,0.127289429101,0.175308305093,0.293983331847,0.274957360247,0.334859401451,1.73174509798,1.91345133156,1.83079425661,1.90541080796,1.77587675873,1.80137684697,1.7108146466,1.63895839736,1.35097612788,1.28018558432,1.06600258388,1.16515741908,1.377466482,0.879840224903,0.872846031369,-0.371145867979,-0.120066179803,-0.127913662946,-0.215890507009,-0.287689448194,-0.270886431584,-0.1910695856,-0.154932259375,-0.145605350604,-0.226787831883,-0.252191472604,1.68230030231,1.37681286623,1.56069975939,1.42152904979,1.83851832105,1.86125901709,1.67368470525,1.50373521561,1.6480737279,1.45786242643,1.20957499168,0.971471689816,1.12212136371,1.23397558374,-0.491646829889,-0.459659610879,-1.22235278941,-1.31749192064,-1.34560198918,-1.16954828092,-1.36132954382,-1.3656295769,-1.14684748883,-1.29631157191,-1.20211489974,-1.29595682651,-1.20346629051,-1.03005211383,-1.06586491043,-1.08000779139,-1.16592593217,1.06107971128,1.13739190014,1.23526974744,1.0863880812,1.13062410457,1.27224855251,1.21965583488,0.721669476423,0.67895759737,0.703146123913,0.740786464809,0.822082676437,0.795198371363,0.851716368416,2.26173686084,2.1539696796,2.30486206521,1.89156125046,1.96885227901,1.88731523863,1.96821564052,3.09996985285,3.12631688784,3.0046986325,2.93445077913,2.93816125647,3.03551394811,3.07470908419,2.98222612498,3.05584546628,3.61502315102,3.56849270819,3.61925864048,3.70808940284,3.72014822697,3.76154915221,4.61862721396,-1.5601238411,-1.53953802101,4.64743204729,4.53231787146,4.52490598359,2.40019988076,2.41023204451,2.47446267419,2.844606579,2.77061681084,2.82746219177,1.3246445324,1.488504818,1.41146641911,1.54356163919,1.32446126031,1.60070508103,1.61628553474,1.21208572085,1.19958597412,1.61064311513,1.68037688017,1.57712916684,1.40517756174,1.32444508283,1.41606347142,1.60299987104,1.5598199157,1.51355281292,1.42647750888,1.40623775818,-0.477653584278,-0.390478176513,-0.500234259181,-0.429123289298,-0.333977752001,-0.318166459222,1.23106793598,1.12224600772,-1.16541947447,-1.21490028966,-1.20654248769,-1.30537927312,-1.33648940774,-1.2877235903,0.872626776352,0.810066212478,1.04664278064,1.09461623286,1.111574275,1.01588443727,0.951152178929,0.964811563645,0.996540277718,1.01705565875,0.960287612333,0.880158662519,2.122444262,2.04762243727,2.21631047245,2.22531670831,2.13493081172,2.05108667659,3.38139228151,3.26425112968,3.18098607565,3.42173580883,3.32373249443,3.19985954996,2.67787739099,2.49554497471,2.5131800126,2.6043029495,1.31536798047,1.22883310918,1.2193749495,1.36639377936,1.31653827158,1.47656907774,1.51205661958,0.933325223584,0.595463208887,0.723030084148,0.877432472211,0.0298422592345,-0.16199026811,-0.0344806550956,0.949809782811,1.25509529718,1.09529665407,0.455676727961,0.918443751186,0.764769966395,0.781645815381,0.859169959869,0.824966156277,0.901374151244,2.6622975868,2.7216626959,2.73839525103,2.6346983124,2.55983375361,2.57051379826,1.39240838323,1.47884486512,1.55416196771,1.54264263463,0.814624667573,0.596462236845,0.783134844131,0.532719402577,0.383561791754,0.303288808399,1.35515650192,1.38169770165,1.44172740714,1.45643113644,1.28344956598,1.29509084431 }; const int NST1596 = 1596; const double AREA1596[NST1596] = { 0.00898161472215,0.00793682351914,0.00783726493283,0.00782135123312,0.0074515533379,0.00795027285775,0.00754964557486,0.00754709851389,0.00789529320983,0.00779422962641,0.0079598426657,0.00781208999869,0.00782222139311,0.00793534499444,0.00785454321021,0.00787019625809,0.00789994885333,0.00790234378106,0.00789239710852,0.00794186991099,0.00902995471139,0.00740452989968,0.00771354178207,0.0077928398572,0.00790263620368,0.00792652528232,0.0079634858516,0.0079683816427,0.00785004525586,0.00788545009992,0.00786835858881,0.00834110622304,0.00760578122914,0.00817281886622,0.00798607134963,0.00867766491901,0.00811427399573,0.00752765823815,0.00732914423251,0.00805994337421,0.00763119737763,0.00798127102672,0.00786152117516,0.00776565252017,0.0077537397352,0.00753720328731,0.00772085304708,0.00752374898059,0.00748862773388,0.00780995092341,0.00795562496885,0.0078777278841,0.00800603742547,0.0077889175066,0.00784319815166,0.00801618045518,0.00777821788753,0.00797682885569,0.00782875378278,0.00768468291508,0.00810254353271,0.00772306506771,0.00795275629356,0.00772903805536,0.00797767947585,0.0081371903108,0.00786369969534,0.00789445354644,0.00786416718552,0.00797746159238,0.00786882936882,0.00756299057667,0.00814079455955,0.00784613639084,0.00780160697227,0.00792102959074,0.00745670930428,0.00748200498895,0.00782134771026,0.00795317289266,0.00767401433596,0.00801610949628,0.00784972361624,0.00780643416237,0.00786437909415,0.00783814293829,0.00780153681811,0.00783024067183,0.00800366105568,0.00780102084296,0.00795358205916,0.00786317933465,0.00787993546148,0.00797125353596,0.00791593752927,0.00781347555591,0.00785045788102,0.00796436721636,0.00782778116135,0.00791269597233,0.00784978175952,0.00750260869672,0.00756237168506,0.00774604241931,0.00754645494411,0.00804202871288,0.00791089290936,0.00774589772623,0.00798192053622,0.00782458635071,0.00765570924067,0.00795675883932,0.00774984513443,0.0081034102948,0.00792981152629,0.0080613304939,0.00771900213821,0.00765215407236,0.00828701935049,0.00754954439258,0.00794568879158,0.00788818566097,0.0078373845923,0.0077606510394,0.00801362272013,0.00774636913226,0.00781870563392,0.0076398073947,0.00799830347767,0.00762493512953,0.00786456002171,0.00845775861574,0.00750382673007,0.00858935446889,0.00748497121451,0.00868060566407,0.00753618968285,0.0075875387935,0.00778913765524,0.00797809433969,0.00797912331517,0.00787986329649,0.00793431323721,0.00783634585003,0.00800865463389,0.00775140401935,0.00777637810634,0.00932436942175,0.00802639600159,0.00776616512533,0.00802696140042,0.00774012409232,0.00800807369337,0.0078590915576,0.00791011882051,0.00786170636672,0.00828292836645,0.00777633158101,0.00800169814087,0.00753012056473,0.00745626449743,0.00763095847552,0.00768240110701,0.007882909447,0.00795223006364,0.00844685363646,0.00817073762648,0.00767568915754,0.00795096123014,0.00776221396848,0.00787829201953,0.00740190807849,0.00793489135432,0.00784633567435,0.00786262881205,0.00797874086825,0.00778118816078,0.00797728411855,0.0078716129665,0.00798654519255,0.00780531895904,0.00753596230686,0.00744429925992,0.0076607193185,0.00774911272191,0.00793339659714,0.00740683174483,0.00806700677297,0.00753235100743,0.00753077756248,0.00766197177015,0.00789339400098,0.00762443342574,0.00809812088108,0.00743495832411,0.00765661224421,0.00802196937256,0.00830425266874,0.00793845943583,0.00784417574329,0.00784784333255,0.00791213374715,0.00794246834537,0.00786751688385,0.00804449234747,0.00775731454438,0.008030697364,0.00807251910468,0.00775881960301,0.00778746496758,0.00782473640615,0.007945568543,0.00799390170644,0.00875599370939,0.00745258445338,0.00829210518705,0.00788561252421,0.00775102019069,0.0076694224547,0.00804980943045,0.00759057946423,0.00776877192468,0.00797931728957,0.00836134361084,0.0075475440366,0.00832868379063,0.00809217764196,0.00775957594264,0.00791863332924,0.00780502429122,0.00801135803047,0.00786747813958,0.00825691008205,0.00789820576041,0.00791440164334,0.00793424750219,0.00785157363822,0.00801769266529,0.00765987992365,0.00780635463159,0.00795219325783,0.0075689187208,0.00739551099448,0.00907639089007,0.0078260776299,0.00773341920624,0.0079722063769,0.00787388115359,0.00780895475646,0.00796152673288,0.00798356026236,0.00785421335867,0.00799744127467,0.00796340594202,0.007829251001,0.00762403098454,0.00804782958036,0.00777788739819,0.0075096304737,0.00793149115036,0.00769028513404,0.00778335690256,0.00796203527193,0.007925155324,0.00779841618373,0.00784956435458,0.00787167394594,0.00752322586812,0.00755844482713,0.00809091779818,0.00794891675652,0.00795135008896,0.00793707900216,0.00781816800954,0.00789497734284,0.00787187079194,0.00782029853949,0.0079461099228,0.00790998607656,0.00782944453148,0.00774313176919,0.00795241599832,0.00809771039586,0.00892257020693,0.00751398019817,0.00746755895482,0.00781079128685,0.00807399739546,0.00756744986881,0.00781255259201,0.00780828986893,0.00944582149556,0.00748813325657,0.00742288160874,0.00800543670324,0.00740368784394,0.00819542193622,0.00791146620867,0.00795151507219,0.00795712187195,0.00781913685054,0.00797678946032,0.00779573624692,0.00790673285202,0.00792670286958,0.00794480763419,0.00776590104756,0.00727388418052,0.0075698372814,0.00741955680551,0.0096109326308,0.00792843572582,0.00771041887396,0.00819574647762,0.00750290696944,0.0074698479175,0.00779150364274,0.00741307807809,0.00793352090197,0.00802580338751,0.00791569994824,0.00784018905772,0.00797038594176,0.00785248080886,0.0078506498152,0.00779472918281,0.00779643016091,0.00737377112012,0.00785238843586,0.00789451127617,0.00784126768817,0.00795431833201,0.0082234266937,0.00771060330347,0.00793355694875,0.00779792023466,0.00805045565278,0.00794748677954,0.00775155340021,0.00801411954029,0.00789539341334,0.00855434140899,0.00733280329735,0.00812061519702,0.00800045776998,0.00783685871514,0.00794954701622,0.00779897618126,0.00777321445654,0.00784777676483,0.00795364610248,0.007826522324,0.00785729207921,0.00809521460806,0.00793979288522,0.00783279011606,0.00795435258391,0.00770924654185,0.00795551688282,0.00780138685649,0.00792943594364,0.00792048928009,0.00786143748922,0.00768777758566,0.00809478380802,0.00761513533244,0.00780289579129,0.00805241642981,0.00780379211225,0.00789110111037,0.00793120656405,0.00796395054774,0.00789386472916,0.00743000792658,0.00931785859398,0.00763248831567,0.00780212119099,0.00756086023991,0.00781262986502,0.0081827823486,0.00764551917382,0.00769529438687,0.00770223589443,0.00775220230086,0.00793646489298,0.00804806048146,0.00767416234391,0.00797547330996,0.00752515836204,0.00803176294025,0.00789609638356,0.007523871932,0.00796394103641,0.00781242242407,0.0079070064246,0.00793710195838,0.00790428340276,0.00780838720027,0.00800880157937,0.00789634794017,0.00779151344865,0.00787690597472,0.00792805369793,0.00783057339385,0.00755287763165,0.00779637069873,0.00789483839103,0.00786926235568,0.00787637360133,0.00791162299064,0.00791572979029,0.00793543893778,0.00780063436585,0.00782490068295,0.00795674518041,0.00755883938052,0.00742982843782,0.00769439588882,0.00774046624811,0.00796631391351,0.00781558098516,0.00801045122604,0.00797824586066,0.00789835789793,0.00788448408665,0.00733652782533,0.00780227649692,0.00800407846594,0.00784479370249,0.00799069358939,0.00781332706339,0.00741132535669,0.00751145041221,0.00779590165208,0.00775061931008,0.00800919341037,0.00794785202086,0.00777812537784,0.00801303349629,0.00777926750626,0.00804634837315,0.00794734573526,0.00788408344207,0.00790085743777,0.00790130229524,0.00773913715038,0.00792327119343,0.00785010707717,0.00797548317015,0.00779822051433,0.00787300251216,0.00788834098145,0.00795495765438,0.00785685827125,0.00764020297288,0.00781310969381,0.00775881822039,0.00798074955596,0.00807224167424,0.00808076165428,0.0080121317127,0.00775874851292,0.00784296327073,0.00795505190089,0.00775004036848,0.00795925736437,0.00772895261493,0.00803449609705,0.00784700418724,0.00790827515684,0.00787524423953,0.00783089707125,0.00778538647788,0.00783502220014,0.00783954006314,0.00776027908066,0.00799236785917,0.00791815273808,0.00783285578282,0.00801969253297,0.00744770300373,0.00749889613953,0.00788187044379,0.00802256378544,0.00781929136026,0.00798349093721,0.00790310764457,0.00790935382644,0.00894667577537,0.00740660785219,0.00789554146633,0.0079301441629,0.00774813536482,0.00801427525687,0.0078557966207,0.00793049525545,0.00783976228579,0.00783919395448,0.00826391026028,0.00758103709196,0.00793628264197,0.00791600464083,0.0078620371548,0.00792691200604,0.00804609707436,0.00782794900684,0.00791010184384,0.00778696421264,0.00801438304171,0.00781595083935,0.00822742672938,0.00814513611125,0.00767736130958,0.00809060251919,0.00785131355085,0.00784885143289,0.00784780342493,0.00805788594668,0.00772617345362,0.00799089919533,0.00813293975282,0.00918712298985,0.00774469869069,0.00815496447822,0.00736808301975,0.00778495073601,0.00790054335922,0.00764053298041,0.00773407211814,0.0079158742946,0.00790838764107,0.00778219459799,0.00796833868911,0.00781277284376,0.00747769619482,0.00747438536289,0.00743564057436,0.00789114673637,0.00772928582434,0.00812844739038,0.00763495710114,0.00743666336433,0.0076677230459,0.00950346621535,0.0074863417532,0.00730013077296,0.00803158369592,0.00787475909549,0.00786854898161,0.00789044270878,0.00789180483787,0.00784555760611,0.00792398924501,0.00789368113344,0.00750357995486,0.00812063335605,0.00746649840081,0.00751492553462,0.0089071357774,0.00771115245739,0.00807264280049,0.00797335985552,0.00802898159655,0.00757503374798,0.00823812999792,0.00777944815652,0.00777808043909,0.00796676307564,0.00776785510954,0.00797785078258,0.0078459336433,0.00785082490509,0.00792543475211,0.00878269442426,0.00834119776826,0.00744254724837,0.00777390492164,0.00786935812821,0.00798904035843,0.00789118336677,0.00789762396944,0.00786082154454,0.00746502643529,0.0075353760945,0.00815250395729,0.00873447183251,0.00752714311934,0.00790760517078,0.00785923732888,0.00790647895631,0.00780784882497,0.00782148861247,0.00796268815885,0.00791238539914,0.00782032620954,0.008053967829,0.00774480400065,0.00781383535449,0.00798692886326,0.00794504695302,0.00783135950991,0.00785456467681,0.00791952286654,0.00779128616865,0.00791608041964,0.00756161434532,0.00831696159165,0.00761751466561,0.00781282799321,0.00805488464172,0.0077902546926,0.00795145137857,0.00794952662686,0.00794002593938,0.00781560696476,0.00785194952938,0.00790040956457,0.00777146154469,0.00787048175755,0.00796262000429,0.0078205044852,0.00793512716227,0.00788720966311,0.00788063572965,0.00784686782722,0.00773573941672,0.00741809381588,0.00814117477468,0.00781175295198,0.007929059676,0.00786775801672,0.00790399292116,0.00777058521706,0.00795302226801,0.00782431422204,0.00804708048399,0.00782200904316,0.00795714170502,0.00794132284062,0.00773790023507,0.00743274151104,0.0077510722545,0.00803276794127,0.00894762129206,0.00790922249173,0.00774098877011,0.00781573380639,0.00802358392978,0.00779664983708,0.00792090365217,0.00777786265477,0.00795955736791,0.00780691737944,0.00798519691411,0.00785834384104,0.00787244617958,0.00774998236824,0.0080664767601,0.00787275741489,0.00778933341074,0.00803310867477,0.00794488000906,0.00780566833411,0.00801680981646,0.00785878288573,0.00788775372838,0.00791592370534,0.00786084684302,0.00779957208287,0.00796598283068,0.00775779664267,0.00769011701941,0.00804812789254,0.00792314033744,0.00792169488155,0.00785339815225,0.00788855772636,0.00790668692376,0.00786101687101,0.00801586037214,0.00806529783275,0.00770438004729,0.00779296303467,0.00816211733094,0.00726657586694,0.00786840909776,0.00755696353182,0.00747483972999,0.00755081404953,0.00792050908866,0.00823049820048,0.00753172323464,0.00778695999128,0.00812792598941,0.00854194676723,0.00783630970131,0.00792664487316,0.00790016911123,0.0078751810745,0.00781121367148,0.00788255911903,0.00788627300556,0.00786720767714,0.00785365628202,0.00772860765406,0.00816788480422,0.00737405968969,0.00784498559951,0.00791835710094,0.00784915207285,0.00798633043351,0.00793792507423,0.00781581372087,0.00803173064833,0.00750655702712,0.0080505293692,0.00777475665104,0.00801123284673,0.00771267608501,0.00807473008243,0.0073882381082,0.00756890433859,0.00798196941161,0.00771461468506,0.0090811913529,0.00782268876176,0.00781746770255,0.00796528525763,0.00785957092211,0.00793665183472,0.00782285518583,0.00748313268358,0.00798748891948,0.00774604889165,0.00772081481949,0.00800825506085,0.0081821286143,0.00814534332053,0.0079991985802,0.00771197220557,0.00832230163434,0.00737619732843,0.00799112779667,0.00776277067556,0.00780560993041,0.00794638172018,0.00794134626331,0.00780741096034,0.00794665699244,0.00781369707562,0.00798367681495,0.00782957420915,0.00745451893812,0.00743206538487,0.00744905415183,0.00781191091561,0.00792450576746,0.00789060268258,0.00790430470954,0.00801011595644,0.00796937343604,0.00781066668512,0.00784703654803,0.00793950518681,0.00784282904539,0.00793347393029,0.00794865712157,0.00783640430103,0.00794752827819,0.00786355876301,0.00787028654145,0.00791489608808,0.00790957394225,0.00789802193959,0.00787996798858,0.0078681939893,0.00772223191273,0.0077809139666,0.00778133925617,0.00782700195031,0.00783276876007,0.00791856631682,0.00798846558538,0.00786143449408,0.00747044811096,0.00761611020966,0.00834008038573,0.00753999393388,0.00780693431652,0.00817863618827,0.00789037846456,0.0087700012967,0.00804555680542,0.00746602710776,0.0078693505795,0.00816792967008,0.0091024413166,0.00745160549307,0.0080887888476,0.00834017377377,0.00834138796984,0.00794864274188,0.00772591762379,0.00795565053043,0.00758516647976,0.00762033156375,0.00767323777416,0.0074980430554,0.00752020484473,0.00746030773166,0.00943604109294,0.00760028351396,0.00777522786961,0.00780625992098,0.00740250921599,0.00803746157009,0.00783804507342,0.00792652044886,0.00782926610912,0.00790022776178,0.0079302616295,0.00799464837436,0.00780190933088,0.00809404872772,0.0077359929001,0.00827895268203,0.00803082772333,0.00802704599905,0.00776969440025,0.00787197447673,0.00783545571484,0.00786569063849,0.00916045807513,0.0077044403654,0.00743021626476,0.00785460738642,0.0079557181882,0.00783350881472,0.00801303948938,0.00779831916188,0.00791742374803,0.007604947549,0.00798228869901,0.00780592738123,0.00821750011533,0.00795454969436,0.00753427938425,0.00781952087185,0.00801596025667,0.00767682951005,0.00783614863889,0.00845868792252,0.00768785828736,0.00799132366591,0.0080702811605,0.00756180021394,0.00748200012045,0.00731962892396,0.0083645348747,0.00822291738553,0.00743072996493,0.00792501343223,0.00784359167875,0.00784309495434,0.00780711042074,0.00795236939857,0.00789349649792,0.00785914600542,0.00789792495338,0.00790318485156,0.00785847990547,0.00798568654126,0.00778049792202,0.00791749574666,0.00793140578968,0.00779862332357,0.00788885706679,0.00792079187632,0.00784626086286,0.00779183737282,0.00783431727761,0.00795384097457,0.0076603435856,0.00760144838988,0.00828592524492,0.00738559621774,0.00779837468304,0.00789565902114,0.0079318101836,0.00783403839738,0.00784578077018,0.00780583775505,0.00797608851022,0.00807844197095,0.00762035857166,0.00773641018392,0.00774405886815,0.00778419582049,0.00799708073865,0.00768160664771,0.00776079180715,0.00805845979982,0.00744006565337,0.00794800105396,0.00791539332046,0.00785834850326,0.00792200208045,0.00795726049855,0.00781353587977,0.00784581383,0.00788709456756,0.007910466034,0.00784939571497,0.00789251397224,0.00788623243936,0.00790413395993,0.00786195357812,0.00779735990497,0.00791702101578,0.00803181768693,0.00773652569428,0.00802587983961,0.00791499470013,0.00782467832068,0.00785668205417,0.00784455971593,0.00778648764146,0.00798830567778,0.00805163770882,0.00796063955917,0.0078165957992,0.00795851231203,0.0078321396043,0.00775388558355,0.00793299675051,0.00786266613181,0.00783792704336,0.00771450682605,0.00782359563289,0.0078924735016,0.00805260580878,0.00794087236314,0.00785600141789,0.00789465640694,0.00764128106524,0.0075169633459,0.00821925789034,0.00772713584325,0.00782976277977,0.00784352703441,0.0079334413492,0.00781629561513,0.00794112852773,0.00776075207975,0.0080248735478,0.00804301853881,0.00781163107054,0.00778566621131,0.00798376966736,0.00796425412421,0.00782101318948,0.0077832213642,0.00789829509242,0.00802460762447,0.00790946820831,0.00781253682366,0.00793341209148,0.00781940568387,0.00782360857194,0.00784275030529,0.00792436062646,0.00739423125791,0.00810027908285,0.00744547038023,0.00779181561309,0.00805224012698,0.00764750791094,0.00777526636411,0.00798933151788,0.0077228314432,0.00801255282202,0.00785819914145,0.00795202704805,0.00934032976881,0.0076042933487,0.00796731976407,0.00739231820895,0.00824569061529,0.0074054835819,0.00741260133575,0.0077437702048,0.00786076331993,0.00778796193783,0.00777248817827,0.00756545808675,0.00824722920813,0.00762649787713,0.00785147871896,0.00784356527502,0.00792980413022,0.00779090555875,0.00781359065032,0.0077998883778,0.00795493878806,0.00799269826364,0.00778678896015,0.00788297096595,0.00788850635671,0.00793502832778,0.00780031674882,0.00794875301675,0.0078422389772,0.00794990909881,0.00785045010388,0.0078358154408,0.00795693050619,0.00781925613869,0.0079731479906,0.007915136338,0.00780820321458,0.00778526383766,0.00797094587883,0.00816787512008,0.0080381874042,0.00799188468219,0.00780670056845,0.00801371922923,0.00783650126085,0.00770810270451,0.00811636727853,0.00750492652289,0.00803962786242,0.00779418953792,0.00772758135897,0.00791587532138,0.0079384384868,0.00784914947499,0.00785854056041,0.00802690575096,0.00777998381322,0.00795586069881,0.00784983800314,0.00785847380267,0.00777769344458,0.0080222051483,0.00776141775842,0.00784468176228,0.00796758108709,0.00862410752633,0.00751955720686,0.00751879462776,0.00795626681719,0.00786012151699,0.00778264242388,0.00800989690213,0.0077234995504,0.00776051244607,0.00755588234718,0.00811747762322,0.00810341652426,0.00762069794227,0.00772439356385,0.0080367006034,0.00804664054621,0.00760298154158,0.00762063439351,0.00801617444646,0.00789896357144,0.00786638503968,0.00783500438893,0.00794697267129,0.00797967166151,0.00788991431228,0.00786780819023,0.00786329907347,0.00782658592608,0.00803076065866,0.00761033521219,0.00798435111909,0.00778723252434,0.0078133128218,0.00792244262248,0.0078153065182,0.00800020733483,0.00749426700794,0.00775393513254,0.00774116356684,0.00795062000193,0.00784623124681,0.00791007971193,0.00782135692469,0.00789335739308,0.00787289502923,0.00787768533614,0.00770463205381,0.00801804591068,0.00778753722538,0.00784051714102,0.00807174312434,0.00771587628385,0.00758849433959,0.00781491429931,0.00787510127507,0.00823163031868,0.00791934818377,0.00847222005199,0.00743774389723,0.00746791021826,0.00761665988774,0.00778718744084,0.00751229853668,0.00796540047514,0.00777909964982,0.00784245005859,0.0080055918642,0.00796499706837,0.00781729003539,0.00794607770732,0.00772189720085,0.00795050963454,0.00754562891341,0.00850170632401,0.00768412928721,0.00786216995385,0.00789981188138,0.00787716514181,0.00785577827606,0.00784936507325,0.00794134424797,0.00790502320069,0.00785005097931,0.00792037232615,0.00786722562337,0.00788648429141,0.00790492473615,0.00784193211937,0.00794473214094,0.00787302396574,0.00788998427499,0.00790294087577,0.00791490596191,0.00786396539584,0.0077911446359,0.00798303345523,0.00777311807198,0.00794226702608,0.00781231476204,0.00786539044973,0.00782280124327,0.00798399601519,0.0077468226289,0.00739211833529,0.00744159432726,0.00769272328417,0.00746126715607,0.00928073849411,0.00728178742481,0.0082576573793,0.00779152819352,0.00771157854839,0.00812102720178,0.00748167459215,0.00780519620945,0.0077081413799,0.00803488128225,0.00790785660056,0.00772365121095,0.00785056375646,0.00791074538329,0.00761290344378,0.00810452804037,0.0078250129133,0.00781535782041,0.00793175341011,0.0078106073748,0.00800561961881,0.00792614399092,0.00799500969624,0.00783832313089,0.00788464127967,0.00793520646451,0.00791765198443,0.00787106626999,0.00780315334719,0.00783334735819,0.00790736512764,0.00786188161401,0.00767280737248,0.00769421365591,0.00818683783636,0.00819842870783,0.00791090240952,0.00802157923355,0.00795687672081,0.0077454098971,0.00774724853437,0.00803693369654,0.00784799294748,0.00793622014998,0.00793355724673,0.00785375138942,0.00792599963111,0.00787950088134,0.00786800894469,0.00793671402032,0.0078939067884,0.00787203790062,0.00785632856099,0.00784820211696,0.00794313363593,0.00783122551738,0.00790297280976,0.00789149902286,0.00760671048206,0.00915063410599,0.00750316262689,0.00750265490106,0.00794585331599,0.00779136210299,0.00782060869232,0.00787323002182,0.00740460938884,0.0074578533547,0.00918978730834,0.00807458828801,0.00800728735177,0.00748203287986,0.00818617013651,0.0073300299701,0.0074483147966,0.00787658878072,0.00885043496912,0.00756229394576,0.00812974856644,0.00762970000403,0.00841960166729,0.00796307930609,0.0077995246139,0.00792083247947,0.00786302170016,0.00791670529317,0.00752425459254,0.00751746263343,0.0075157378518,0.00779757473156,0.00750992986189,0.00739735815646,0.00814373351178,0.00768814526,0.00804402066718,0.00741201264867,0.00829280486981,0.00779909456205,0.00797955890757,0.00781152796158,0.00798322938579,0.0077962782489,0.00799503502763,0.00778476402719,0.00801414911705,0.00778207745586,0.0080035261637,0.00799958625721,0.00779191626486,0.00790443769045,0.00785328660404,0.00784772312551,0.00790032067833,0.00783462640542,0.00793124583671,0.00802236040955,0.00776990473501,0.0080621493485,0.00766637392512,0.00777797374016,0.008020324438,0.00802066147777,0.00777825742808,0.00798612141405,0.00778494890801,0.00802139898742,0.00776059283736,0.00803413090766,0.00777731658168,0.00790433236287,0.00796448997238,0.00796054580579,0.00780429042927,0.00785193455906,0.00783934533118,0.00747716516935,0.00853626566336,0.00779741705303,0.00754496082338,0.00793422026839,0.00785885924877,0.00783761505978,0.0079052003565,0.00801874713404,0.00777763434831,0.0077672399186,0.00792789554881,0.00788169947103,0.00791055983078,0.00758633279888,0.00947950797006,0.00748212737919,0.00794929047555,0.00813079596078,0.00727864872959,0.00783058756235,0.0079183879984,0.00781014958081,0.00799376331315,0.00781020342795,0.00794961081156,0.00792948322962,0.00788505718217,0.00787954119594,0.00792423971423,0.00784774293483,0.00791256245098,0.00784113674254,0.00792762748743,0.00792532492544,0.00782412243565,0.00793738326271,0.00783423042605,0.00780009701745,0.00797346650136,0.00751572235093,0.00811945747897,0.00742355996054,0.00905598621981,0.00738634697704,0.00802908097751,0.00784059393298,0.00777057744083,0.00784893913386,0.00793819316552,0.00795825832928,0.00754837121835,0.00815398501008,0.00746947751106,0.00780753380437,0.00921696112216,0.00799927996439,0.0074298985325,0.00806514821116,0.00808189295041,0.00761994031969,0.0080407288147,0.00765569703945,0.00833822777789,0.00824604342379,0.00778630324924,0.00794804891797,0.00776114249294,0.0080096370961,0.0079387120651,0.00783116350239,0.00779213160958,0.00791685953512,0.00796788771445,0.00774454726808,0.00787567047442,0.00793653778957,0.00776367133852,0.0080069633507,0.00779652667877,0.00784441139208,0.00798772779016,0.00768070580055,0.00750821749079,0.0075103310307,0.00766231484178,0.00732880719697,0.00772435765697,0.00910371145291,0.00794785880169,0.00743372554331,0.007995182638,0.00774970359998,0.00797209818927,0.0078125898921,0.00806102354583,0.00779449357928,0.00758969498271,0.00768003895753,0.00843959953582,0.00780028646027,0.0079689443456,0.00775644138821,0.0079445063522,0.00790943039102,0.00788434160022,0.00784443446437,0.0077461508836,0.00757820629947,0.008463107985,0.00764818696095,0.00777653668776,0.00797532347408,0.00747417609133,0.00819212409576,0.00753568601249,0.00849590871768,0.00775419787426,0.00806819788002,0.00767328650142,0.00777316583985,0.00818195706458,0.00763986117175,0.00804157057308,0.0077426947953,0.00776009011314,0.00772212661359,0.00766982499761,0.00810064436947,0.00779453726987,0.00794678209556,0.00799059841488,0.00772302549161,0.00781006348589,0.00781865026698,0.00759667331496,0.00777874210681,0.0078740990624,0.00754403538148,0.00788169463953,0.00789798222866,0.00787531995411,0.00792321483812,0.0078577487178,0.00792090217265,0.0078271981662,0.0079088783514,0.00787946108295,0.00782425059332,0.00789224560719,0.00781829754446,0.00787412103766,0.00787755949006,0.00821507751134,0.00778751398644,0.0078190565905,0.00789553825817,0.00800674686308,0.00769034368886,0.00788784608431,0.00785856897352,0.00795237731769,0.00767638804386,0.00819436501518,0.00755587925327,0.00776449615566,0.00781026036136,0.00808132655964,0.00810777247683,0.00853611199943,0.00770311100334,0.00751396538805,0.00799159141309,0.00796059252975,0.00772608270099,0.00769003458039,0.00781918263445,0.00786695900415,0.00790056747279,0.00795865543371,0.0076228958275,0.00830468546277,0.00763811233704,0.00777625271811,0.00780842439258,0.00801136992103,0.00770262397204,0.00810960660613,0.00776138970492,0.00781538739563,0.00781554262924,0.00797703221904,0.0079008357367,0.00788818726365,0.00789152196312,0.00789659933572,0.00744539501645,0.00767114756518,0.00745909911281,0.00747858649294,0.00807151067345,0.00797204961926,0.00776589592584,0.0078989281127,0.00787741388473,0.00784332179375,0.00781948402257,0.00772654345552,0.00754909355056,0.00799220112999,0.00769336813385,0.00798943652177,0.00786173734567,0.00792609530051,0.00787392523422,0.00787218176903,0.00792568692507,0.00786554618988,0.00786704712941,0.00782127634166,0.00796543735385,0.00789602962058,0.00790499847869,0.00783728055532,0.00783263428074,0.00782184384362,0.00794622462833,0.00795585875889,0.00772487545037,0.008147614614,0.00746920628012,0.00751619204365,0.00750732119292,0.00795183654413,0.00787588072183,0.00786057516225,0.0078060717454,0.00771949784601,0.00813536553471,0.00778716379402,0.00796125328993,0.0079723973733,0.00781558895083,0.00783488330055,0.00798160264582,0.00828133286928,0.00781785482322,0.00798737139131,0.00754687381335,0.00807000838106,0.0076665209269,0.00783526185521,0.00776123267256,0.00800093197903,0.00777155770378,0.00794223570567,0.00790407675357,0.00786620512486,0.00778710556539,0.00770558549321,0.00794928589739,0.0078555716816,0.00778915008503,0.00800913809054,0.00798366668218,0.00791766180164,0.00793537590768,0.00788686763923,0.00802387244036,0.00792917000448,0.00780155962906,0.00783067491742,0.00799055122464,0.00778096221095,0.00793586582683,0.00782472010571,0.00781783822769,0.00797138509473,0.00781493827489,0.00794755916565,0.00797154250706,0.00796498263202,0.00783635691197,0.00791600820946,0.00765477888501,0.00747418895083,0.00831077279529,0.0078980483916,0.00786325278881,0.00805669978545,0.00793828667631,0.00784477918472,0.00783403498389,0.00792218650684,0.00786495815678,0.00792034680265,0.00787030643408,0.0079089602233,0.00789168315541,0.00789062851105,0.00773521531167,0.00797271523231,0.00778098753326,0.00774544856647,0.00813492264146,0.00749762520459 }; const double PHI1596[NST1596] = { 1.65154573632,0.878777661509,0.801075377441,0.72379754617,1.64925334578,1.58340147682,1.52949679808,1.4625426712,1.65479418575,1.63361181874,1.68300209764,2.04552171761,1.6393151619,1.56567431819,1.50239773682,2.12603510904,1.75793573253,1.81152025462,1.82252455386,2.25112608671,1.24161407244,1.30105465723,1.37297074303,1.17839887022,1.19618889749,1.27244203313,1.10521449661,1.27073243314,1.34650424944,1.24470819778,1.29623089613,0.882543287182,0.954531964847,0.954893761187,0.617716506095,0.545797171586,0.606149206889,0.5400098331,0.814314337888,0.980424352552,0.916421196486,0.803949334848,0.847758173776,0.79107020231,0.847694329049,0.491258004323,0.3670622599,0.415764806778,0.229787585604,0.906515571303,0.828973362547,0.568369737488,0.95450502041,1.03014867838,0.971167165092,0.85530553917,0.930947424948,0.986291555902,1.23982807887,1.02770215741,1.03353229334,1.10589860068,1.16965822255,0.627095602804,0.702193588992,0.614234756789,0.963950531404,0.722657723603,0.654379995299,0.1225121376,0.196565962158,0.566359008628,0.505165969751,1.19469936764,1.28762206911,1.061188819,0.955979865043,1.03638126746,1.18002702475,1.16368577921,1.18565212855,1.21129897842,2.09268421881,1.80632196774,2.03038381199,2.05633342179,2.3709960333,2.25436677091,1.71513056656,1.30569213732,1.44228241541,1.58062915171,1.51068414127,1.29213885772,1.23710447214,1.22824417626,1.77814153823,1.77227494192,1.70622436782,1.02987463363,1.03070397102,1.19857301646,1.14375636816,1.11080007775,1.01571501951,1.13833688403,1.09145245972,1.34243851562,1.26589425662,1.21584685339,1.18575550233,2.1225615827,2.14200472186,2.06887831693,2.02123758964,1.96221221728,2.03730589135,2.14166559684,2.17151810968,2.24130862074,1.83723576638,1.94372182819,1.91596108084,1.72770177972,2.64018971062,1.59303157286,1.59482895621,1.53381708321,2.31697067419,2.34913773948,2.22777606371,2.29889675471,2.23796011849,2.17334324365,2.32125335271,2.2604687701,2.27892148034,2.29254373058,1.78540987639,1.71679122232,1.78081157507,1.7668288734,1.84111144549,1.84843098081,1.79090881775,1.71955723333,1.64143407166,1.87995013882,1.92382450621,1.29075960756,1.24025077467,1.1682196444,1.74048664066,1.43774933048,1.38925147974,1.45283046853,1.71958219606,1.41489310958,1.34241012209,2.1119709172,1.58438751674,1.61336958718,1.55579956963,2.7563713405,2.77809612045,1.6280304357,1.60159508933,1.65829288142,1.73258010308,1.76177430531,1.78679162958,2.18134246223,2.19646109593,2.26001893433,2.19995642622,2.86291251444,2.66935176914,2.74085633811,2.32993554115,1.68030708404,1.18087793772,1.11614788587,1.24899235618,1.61156674916,1.54804127764,1.42758945098,1.32558173864,1.45688565753,1.40804323749,1.36992692263,1.4316052133,1.17523562448,1.11013037338,0.812084674409,0.747209010244,0.679951338026,0.679622345856,0.879022732888,1.36061000006,1.35853987702,1.29023332212,1.22304164603,1.15937397774,1.15606896792,1.02299093794,1.09502740448,0.672241546068,0.807381421758,0.809189321317,0.74280487904,1.0089387407,1.0320415703,0.931792379321,0.880569739459,0.909967239859,0.983444113951,1.04644726928,0.870599938005,0.901225580468,0.909081059071,0.97389841302,0.983316756578,0.919264088746,1.04580013047,1.04586578251,0.724527851125,0.303147373591,0.757271896531,0.96855084258,0.999454143088,0.268000956479,0.402480961388,0.308164483118,0.671140300425,0.591340077793,0.490822845123,0.433214362422,0.354590970423,0.33950053444,1.02571505103,1.24821004793,0.618270731575,1.00386966476,0.938365700439,1.12777755813,1.05063504589,1.11956334348,0.85313713143,0.273677472928,0.345474820437,0.533349666254,0.472718249518,0.605018326012,0.570994696582,0.494285359093,0.585857392401,0.583026459438,0.514243967365,0.264808957854,0.134640134648,0.207128588702,0.345408852336,0.419715146912,0.253751060235,0.381471023997,0.251651398457,0.323145979136,0.322682824376,0.443349822848,0.379041654277,1.31557554506,1.38106715664,1.27010189859,1.30362564728,1.13926135597,1.01975369468,0.901398934577,0.940971950653,1.05975074258,1.37539052637,1.16693864666,1.07662725503,1.09219482126,0.850702641444,0.917735477835,0.984346738357,1.13842234414,1.11678041529,1.04571592851,1.04301321952,1.088824801,0.842875042493,0.801208271774,0.934692613147,0.965389057254,0.848867318337,0.92120696027,1.8483931697,1.91458887595,2.12988144061,2.14979024471,2.22291794771,2.17919902766,2.04311074648,2.10484948745,2.01984426068,2.00318649344,1.6889978467,1.67615369332,1.56189145492,1.62010949701,1.95462336277,2.50698052103,2.52220829266,2.5900434673,2.50499151227,2.38588402722,2.45499440571,2.18964272629,1.85502769432,1.50880603683,1.37163835707,1.30298957942,1.57797209176,1.30829222795,1.32593141671,1.35955000255,1.49929969148,1.43768805801,1.36688497015,1.10483823689,1.09880685934,1.18294598001,1.10807445779,1.09957813613,1.049945914,1.07026279864,1.36811356025,2.62173258561,2.67454056131,2.28996902644,2.26904579195,2.22612633361,2.21792062029,2.04059869906,2.07434603757,2.14938844564,2.07766823655,1.99261765401,1.4776702038,1.55483269509,1.602999062,1.44959683172,1.69649073671,2.58333608786,2.50611636611,2.44604109531,2.28627614967,2.48386850497,2.61187541692,2.65543357113,2.53367393165,2.4983753291,1.86505668505,1.89676592955,1.9157006644,1.53951712935,1.621407658,1.26289933143,1.23650427893,1.21233750482,1.77255031269,1.84998056465,1.75960380507,1.70899992302,1.64680969299,1.73152933802,1.4660831292,1.31917859113,1.78464307289,1.85679626454,2.08331932022,2.00545220957,2.08745052784,2.24091852337,2.12553150411,2.20161241894,2.10911861448,2.15246225821,2.18452497657,2.17411682486,2.10622722037,2.02803172924,2.08486668668,2.57685008778,2.42380021712,2.46914041195,2.54462098642,2.2804649935,2.18596979344,2.20486307479,2.24010450457,2.31803768413,2.33971237351,2.35968853111,2.36412304272,1.89692184697,1.9066680659,1.96016617827,1.9808561408,1.24844831298,1.38518170625,1.64549889907,1.58125295405,1.51334142637,1.82936877103,1.85634167593,1.79216663607,1.95568813009,2.00648964187,1.97861906086,1.89893290564,2.1098021864,2.14062684346,2.2142059159,1.96756669785,2.05592778196,1.9846950181,2.11377605076,2.01923643044,2.09384291036,1.78703051389,1.85873155865,1.93006202209,1.86119532297,1.85850304909,1.51217152901,1.53828830085,1.61416567007,1.66308223719,0.791879255964,1.33491626812,1.32568267073,1.25760657618,1.1973569644,1.14588167084,1.20684138923,1.27629864203,1.21663354565,1.29075700136,1.26639222986,1.31483302105,1.46096045073,1.40251375333,1.66128795188,1.56016218478,1.68232663974,1.63509970542,1.57215377234,1.59199549242,1.46726190955,1.53802581464,1.48102009123,1.4133056353,1.4981285666,1.44713106363,1.69800939239,1.68188115993,2.17949413723,2.11793466338,2.04506149759,2.03403309913,2.84789716707,2.71808518457,2.71306364862,2.58854364813,2.64845552191,2.228811705,2.16882205916,2.09630507556,2.5680601451,2.55975313253,1.91830654303,1.8383576066,1.78635869939,1.81383532422,1.89360008717,1.94623283985,2.23833246147,2.62862037231,2.79972843318,2.75344310225,2.59855692714,2.60201370327,2.266374699,2.33278065367,1.96754128066,2.05016010527,2.08349626438,2.1664612043,1.19049319973,1.11841530477,1.05468264878,1.06785208748,1.16395631905,1.14396509186,1.20295507041,1.24145730828,1.29677226932,1.27820043419,1.69054061309,1.59766356758,1.52134732516,1.50580613793,1.65592292505,1.41100164615,1.33654592052,1.47151757397,1.45867876662,1.31975866153,1.38146779694,1.29759519934,1.22695295922,1.32436855972,1.35108170243,1.22208490472,1.24937454116,1.20532074295,0.817320049507,0.888034597996,0.898562365567,0.837958247992,0.762495513552,0.752351313351,0.888630184988,0.890083298765,0.839431712378,1.08779420306,1.0191285991,0.94735765631,0.949357319938,0.744332412118,0.675880098613,0.766714313356,0.726246207589,0.644691481968,0.615896123885,0.972257160296,0.886512586905,0.95885557735,1.14264953396,1.06624842384,1.1675142646,0.644282881077,0.715844281568,0.63451360453,0.694716420042,0.771453949863,0.78217268215,0.666793211819,0.686830181692,0.455694187534,0.350774207719,0.336302331406,0.404575685081,0.426499559801,0.474830565674,0.482614989153,0.400616082023,0.693485426878,0.271700470903,0.293494354019,0.270050543087,0.207209534836,0.662326389674,0.723105075044,0.782773422955,0.702679881777,0.821050911905,0.46283018084,0.54235770128,0.481182331645,0.546165110713,0.418238506403,0.409006182112,0.548889307288,0.492766671353,1.09389723317,1.16498195444,1.09532422277,1.16263542627,1.23251967794,1.23155259213,1.08847023298,1.0216037411,1.11670370311,1.18883186482,1.05937777356,1.07980252414,0.895726697743,0.684063053159,0.755551126136,0.687369148637,0.829848322821,0.757514081701,0.729001264897,0.663213658127,0.674630191621,0.800702402242,0.99148356018,1.05239452844,1.04143310013,0.969501555389,0.932546411789,1.06504657559,0.987306756308,0.830202990005,0.798662663511,0.661157371056,0.736005798343,0.752232517195,0.696179195753,0.833158986433,0.801632735496,0.723150076166,0.680807704019,0.798163921049,0.72488394058,0.569024607814,0.524018026052,0.618677422222,0.59933868152,0.373865061391,0.450601313535,0.391143950303,0.339085969893,0.465842327023,0.492419930567,0.061105270571,0.115970948509,0.23646361786,0.210248894615,0.13893539122,0.209379751779,0.407584841001,0.557186836623,0.523836352682,0.546165492463,0.50668858379,0.433955099936,1.41860686616,1.49889461458,1.41698932047,1.37769772554,1.53891748996,1.4977743617,1.73518998949,1.77529889803,1.1820761826,1.15346290979,1.20526629571,1.26141342025,1.29811136177,1.14221323856,1.18378509485,1.15043076168,1.07373528942,1.02396043064,0.911992302021,0.94463320253,1.06601167312,0.956087373296,1.03062324229,1.31211184613,1.24022704509,1.17681984123,1.32142537245,1.51259626269,1.44841955622,1.22369802894,0.696832222713,0.602392477379,0.619298662335,0.667983251743,0.87159121891,0.828684453186,0.814016517335,0.735491630062,0.747959048497,1.05714758931,1.10653939688,1.08350497793,0.980615098581,0.946478858698,1.00028521359,1.98507469818,2.12316022349,2.05029830482,2.11979732668,2.12408847554,2.12410813648,1.8518998243,1.78405809853,1.63677286468,1.70227510934,1.69379499662,1.62672140067,1.49740433477,1.56582029469,1.56422932814,1.49494552491,1.42692913124,1.4260692384,1.75560860429,1.74453126031,1.92517281252,1.96733572311,1.85214091003,1.92907068834,1.92771052741,1.904784762,1.80089384745,1.87274855433,1.76822047888,1.81735200689,2.31887158126,2.23744124024,2.31025904821,2.17632919493,2.18418777442,2.25384174358,2.65161312468,2.53962372042,2.56266205755,2.659306847,2.58453660387,2.69273305006,2.63956901242,2.32044020644,2.38541836274,2.45771722437,2.45643088912,2.25660606928,2.32301760674,2.19023136485,2.32142973763,2.19016708072,2.25489310013,2.39036898675,2.39169697948,2.45959853245,2.45689259201,1.7136507233,1.73643679828,1.81579098142,2.20134372552,2.12433983859,2.18752390733,2.12064529329,2.43507046989,1.98560177063,1.96329851253,1.43127194162,1.49967130898,1.36628035296,1.43386456747,1.29986508207,1.30043023111,1.37001253329,1.36820835358,1.43879736001,1.43754361998,1.71669016711,1.78561157077,1.85553888499,1.85496915736,1.31413326052,1.24198121206,1.24387451239,1.31947872806,1.29548467698,1.34501525033,2.48712075,2.54361182145,2.2705800389,2.20305636675,2.15992883339,2.19281049814,2.0460897121,2.16544972758,2.08912614067,2.36285880526,2.51756779301,2.42307830428,2.49977448379,1.95920507258,2.1044394297,2.0882803545,2.01599261602,1.6416953841,1.65880826475,1.57433815972,1.62052931422,1.49820117091,1.60041850288,1.74076681345,1.81762555476,1.85262290819,1.79433623979,1.72316498563,2.56906944704,2.61090993731,2.66674104015,2.5961481866,2.59107370942,2.6598277953,2.53083911113,2.52961553506,2.73369203013,2.76607965077,2.84043330438,2.37979674904,2.42025858741,2.36196506136,2.41211346986,1.82122182587,1.66744951563,1.59069435963,1.61677557537,1.50172309714,1.39158234859,1.42370685509,1.79312809689,1.69230158,1.76805127179,1.89078417928,1.96870036308,2.00909714119,1.96906161367,1.89133123055,1.85331914487,1.50963500094,1.37616947822,1.41633735601,1.4581087444,1.51669887742,1.52411464841,1.44554936119,1.3775649988,1.38277200249,2.0299255379,2.08252817537,1.95333701066,1.93074980585,1.98305148591,2.0579074596,2.03508706352,1.90134717507,1.86613886701,1.90161224155,1.97250570426,2.68835401652,2.75676532231,2.87628394034,2.8067936576,2.78974208763,2.67861978768,2.69750196481,2.65397148412,2.75166392815,2.52862527016,2.41921366125,2.3993054612,2.45161578442,2.4280032608,2.41557827095,2.62220007184,2.55005342926,2.49248070445,2.4969536626,2.62690157527,2.55922731603,1.7281446706,1.622153245,1.70019351064,1.74845859835,2.14916089487,2.2140343434,2.13590630722,2.10669096554,2.25859597257,2.26013664549,2.22413081055,1.75894935436,1.80539305394,1.78921173201,1.86864084507,1.9964975811,1.91703062174,1.88386019892,2.03611586918,1.99213481396,1.91963212138,1.99817765681,2.13350659538,2.1317344092,2.06324907816,1.92225489259,1.92772121691,1.98915541348,2.06144967562,2.06540210435,1.99861332075,0.96641324724,0.889006978636,0.873408440965,1.0251103794,0.935375356168,1.00951399316,1.07214349992,1.06357819069,1.15818210526,1.1191427397,1.09992465693,1.19432225176,1.52794388032,1.65477871896,1.58775517009,1.66204852558,1.53725041872,1.60429425053,1.28798561553,1.35736262709,1.23083618563,1.24785165406,1.32173828663,1.37415485318,1.96181459321,1.91753734366,1.86267521319,1.88594342102,1.85757096423,1.73478759182,1.80504375961,1.83512310224,1.70979338805,1.75775931884,1.94872431584,1.92827984369,2.05386179443,1.98185595837,1.87294048613,1.94710631744,1.82358203378,1.89649508091,1.76940259066,1.91538878549,1.78521098193,1.85822267027,2.67878432199,2.62971271419,2.64125388496,2.55264610386,2.51448574349,2.39315326915,2.5262656278,2.46333189351,2.3109553541,2.29921885382,2.38292676575,2.44148276166,2.07580275157,2.02428016367,2.15723596429,2.79077796055,2.75558412495,2.68376232459,2.73620512262,2.66195714454,2.64227796615,2.09523594155,2.01704214805,1.99595582135,2.49356698663,2.47360907669,2.35864793098,2.42858298211,2.34064444584,2.39183832196,2.50608130751,2.50292511236,2.30214798636,2.30870744532,2.37484329688,2.36344552556,2.43594691619,2.44018607814,3.11228505292,2.90200199487,2.97523854929,2.77526738433,2.84972272782,2.77790441166,2.84890264048,2.52334115837,2.53156843262,2.46549882,2.39817186715,2.39158994265,2.45073208332,2.18333236786,2.19417591798,2.26224742187,2.32218353991,2.23726287207,2.30786790121,1.89258531288,1.91732218572,1.58367563091,1.53569751127,1.5611234844,1.63484044075,1.84633294651,1.56233012699,1.44439207476,1.49408684327,1.1461216239,1.11746397408,1.08852759328,1.13187191035,1.01216405616,0.978102932131,1.02270891724,1.0998873186,1.01310013294,0.990908901207,1.03965282928,0.582109471581,0.595810216614,0.51131842681,0.451547201021,0.46891580032,0.54183246405,0.531363538335,0.569533938012,0.643021565307,0.68199432423,0.419285154468,0.353333149205,0.370868572585,0.444944419232,0.659947694341,0.580300632726,0.783899300993,0.831882318547,0.803566280463,0.703455065362,0.727094655811,0.674540345385,0.528379444704,0.591939105068,0.600537055329,0.548811113818,1.02827276245,0.964185172911,0.963180044921,1.02627528969,1.22384735246,1.15754972489,1.29313605429,1.29621055315,0.830286731627,0.977858540685,0.966917360638,0.897987997753,0.699502957844,0.636838180825,0.660065901922,1.08934876058,1.16565216174,1.14367024216,1.19143319841,0.960027935749,0.911725318121,0.944257889105,1.03884058075,1.02089803258,1.06749850215,0.314680165075,0.452558754527,0.444938993932,0.379652833774,0.329360702086,0.40066090428,0.264896170679,0.223521653475,0.149950299208,0.122728876353,0.250173922546,0.188353560682,0.189960764581,0.3368403202,0.289077765655,0.21535477103,0.329695107323,0.259760579241,0.14693526407,0.149132711375,0.0830795807866,0.0199810546078,0.0935865279035,0.466443223529,0.467704214094,0.540335229679,0.54269176412,0.609468262672,0.610859672315,1.65935537247,1.66236734315,1.62036833472,1.73809418706,1.78171622239,1.74477121675,1.25955877798,1.27073918628,1.21009268809,1.13784421017,1.12575429926,1.18688585796,1.68324073674,1.39482930179,1.45858086602,1.53344966225,2.0576182624,1.99062422102,2.0565987674,1.98808310439,1.92107436778,1.92260382757,2.05881462583,2.05742283815,1.99063208028,1.99175929463,1.9243195913,1.92448759885,1.961134719,1.88963352768,1.97234241297,1.90894442115,1.83692203542,1.8286907902,2.76439384571,2.90060670902,2.71734894247,2.83575540666,2.77949904127,2.68947298458,2.71644158426,3.01381944571,1.8534811149,1.78231510789,1.7785067505,1.91804324616,1.84006883121,1.90826374225,2.2424539184,2.30245672453,2.31855235587,2.25042995899,2.38422137969,2.37626226708,2.41329418949,2.35402375848,2.43104360656,2.46252759435,2.28672685432,2.33919884843,2.23471728314,2.31097851835,2.17279591287,2.03301762146,2.11380702341,2.04561852594,2.21229877211,2.18810008506,2.15831672157,2.08685561834,1.93974261029,1.88142830735,1.83194681939,1.86064893501,2.07985904352,1.98592242713,2.11056935063,2.06307527789,2.00281327412,1.95621060609,1.57097868785,1.63967631144,1.71344976528,1.71101011822,1.57682216441,1.50641131157,1.50465308563,1.57337485485,1.64619213085,1.64449437405,1.71784210288,1.64927564851,1.64849264535,1.71793414793,1.78663263812,1.78733826427,1.36952399045,1.45063336078,1.5046860001,1.48833067089,1.16432209578,1.23174987878,1.16435669357,1.23375418528,1.22294324846,1.09293836574,1.16419970925,1.19669480274,1.12192140396,1.07690161814,1.31953536531,1.26826753796,1.3965830669,1.27265160104,1.32930133397,1.50689046713,1.5543931552,1.42628568457,1.39532345532,2.35347784571,2.4103165928,2.5150720601,2.5202754017,2.56098424312,2.33483767661,2.37916398283,2.45739659238,2.45607788174,2.3826770113,1.53448221076,1.56169109316,1.4562143471,1.40294768773,2.84340547434,2.79085311352,2.30261511881,2.15170802212,2.18984971517,2.26588376386,2.18436936704,2.25902363353,2.40610975302,2.37721224221,2.30036988333,2.25389867278,2.3530026154,2.27789126226,2.53604988096,2.48971822901,2.61389544408,2.51318072004,2.585490776,2.64065262768,1.69552354234,1.72171143053,1.85271708657,1.79961352361,1.51393438538,1.36402691322,1.48869514845,1.41418085177,1.33686865415,1.38762710523,1.46290542089,1.58889306102,1.56431177114,1.48730681131,1.43804220914,1.53628321478,1.6389820511,1.56160971719,1.54456368678,1.51288860605,1.62037599393,1.54432351994,1.6545212525,1.49894748258,1.25998232142,1.2967121115,1.41907704794,1.37666072365,1.25744708106,1.29639022418,1.17939230138,1.25644662869,1.17708941643,1.13879595009,1.97979377538,2.04092518244,1.98796562949,2.04560247976,2.11841417409,2.12180742338,2.54541650266,2.47118364906,2.71227506794,2.65717482457,2.58182227405,2.5589788144,2.94053250474,3.07270951164,3.00672250093,3.02669420186,2.80690112983,2.88288177356,2.93409752836,2.88940041319,2.77592932384,2.81097803951,2.33333857847,2.4833195832,2.35984992805,2.433111937,0.984932412492,0.989458476355,0.921798567362,0.857437830521,0.855121554588,0.923747943559,2.04647445663,2.08197572291,2.00680297366,1.98972126507,2.21509396785,2.26767097519,2.14095444564,2.12224980048,2.25314685406,2.18212308516,2.15188391545,2.22520435164,2.2793862446,2.71134419156,2.71394022663,2.63794561326,2.57518682234,2.63882837627,2.57381922792,2.87824507782,2.90916803205,2.97970561703,2.9077505895,3.03434067604,2.98334397298,1.78838758698,1.81613578962,1.76366816506,1.68748201569,1.71022395347,1.66165134527,1.88118537471,1.86248185915,1.78542613576,1.7302432521,1.75106448622,1.82489555307,1.97482532805,1.91828261938,1.95527621221,2.03702284653,2.04730270459,1.92780864708,1.93652413244,1.97636067151,1.52314084481,1.37306287073,1.42900708389,1.50373599897,1.39437573023,1.46965679343,1.70244472565,1.63772591457,1.78424066815,0.912874248229,0.867417622856,0.790750375579,0.758535633758,0.577784022977,0.654038240895,0.557220116834,0.615797574689,0.565227135735,0.505396651112,0.844678720786,0.861624113565,0.888146620568,0.962854532246,0.888894563878,1.02251956947,1.00951572343,0.770351029192,0.787926213833,0.864462670448,0.835957073023,0.914617491463,0.925984168605,0.397619786992,0.463257607964,0.335870339203,0.475680332933,0.35305338568,0.426022067768,1.09627734783,1.16068644687,1.16342987684,1.09729750144,1.23180909839,1.23007857242,0.737835586362,0.870467372229,0.807861494061,0.74669415505,1.67311647796,1.73686838414,1.72519924296,1.65077053073,1.58727543528,1.59801359131,1.34311099034,1.40537816204,2.79598810172,2.83789855498,2.81804234234,2.88924390081,2.91691548199,2.95011038668,1.42705627625,1.36226786254,1.29676068368,1.29870951326,1.36842549193,1.43128631212,1.57605980143,1.52493538791,1.54848138022,1.47114585251,1.42030907611,1.44666288663,2.4401754547,2.28142961136,2.39543993826,2.31626708519,1.52989347635,1.50820311485,1.47380289026,1.39884539782,1.37449081026,1.42784466266,2.92039163488,2.96135385525,3.07412886026,3.03437934012,2.76712164362,2.71555653196,2.73035765082,2.79705420213,1.74784770227,1.76997660755,1.71974221452,1.84882711325,1.87792083999,1.82700742545,1.46031167154,1.36077059358,1.43580898508,1.31083891851,1.33636497005,1.4106800326,1.62256974701,1.66835962752,1.66173868573,1.74239886229,1.74659748349,1.53695815871,1.53738697521,1.49662492212,1.61638232344,1.65616689046,1.61738476346,1.30392371699,1.27764995449,1.42823334287,1.3829043251,1.40369291982,1.33224599076,2.67165590542,2.59716320943,2.71946034858,2.56671922102,2.68189415493,2.60489677029,2.44554402271,2.36871850285,2.3365035113,2.49012480928,2.45183460263,2.37558114523,2.12878946091,2.02527191809,2.05123933717,2.07610854094,1.59687644383,1.65294874277,1.8565500497,1.7919078552,1.72537750531,0.883937000284,0.914482864073,0.93574827525,0.806753949263,0.734999234695,0.767550061653,0.498035692982,0.530308891277,0.553869258138,0.609667499398,0.63208490977,0.656438911972,0.791001282012,0.907336374694,0.918436107878,0.862779565747,0.835811439523,0.775231148164,1.50600710199,1.29622252779,1.35503104707,1.42703276706,1.43687399383,1.30790625365,1.37652926005,2.25855008007,2.20116205525,2.15462195811,2.18153631315,2.43555954762,2.40076666038,2.38682341786,2.30950402803,2.32163151397,2.27871318872,2.93406729728,2.84480795129,2.86173779417,2.88874380706,2.96667983543,3.00059775198,1.57118863796,1.62058827735,1.59894680987,1.67784585223,0.70676609312,0.782383063053,0.688564121912,0.749846435235,0.823958633032,0.83868749132,0.729365107263,0.690850343695,0.629185446499,0.650601782937,0.762397330714,0.780405037152,1.64083605447,1.56927481721,1.70752819771,1.70084153481,1.47911063474,1.48889104549,1.56196372514,1.5434760167,1.61811415059,1.62686458789,1.74729478646,1.69850018162,1.72810586318,1.80832344536,1.85743441567,1.82582515051 }; const double THETA1596[NST1596] = { 3.24066028244,2.37326418767,3.45413313757,3.43130741464,3.15141406102,3.11207682255,0.326429816102,0.283827886981,0.569504712009,0.439505319258,0.497010190697,1.45308563367,-0.0536263820861,-0.0256305773417,-0.0705294886142,-0.553072577261,-0.381653371172,-0.257188650031,-0.334126266113,-0.451866858628,1.33037112033,1.37471785922,1.73094348779,2.14642548701,2.06349482298,2.03816940038,2.1761105812,1.82320648597,1.80600890014,1.90243926233,1.95968446899,2.91859843441,2.97142366182,3.06055949903,2.87218849021,2.5822436481,2.35011098445,2.41571218131,0.989023267522,1.20125784912,1.14852442429,1.5351727397,1.21060711767,1.41877040301,1.32792214096,2.67126617444,2.76207218507,2.60146560262,1.93045278467,3.57286030454,3.554864153,3.37863312905,3.49954707881,3.52020155228,3.24601751449,3.37927587992,3.40608715734,3.33899854411,3.18656584166,3.09936061167,3.18675473533,3.21710598115,3.16045454793,3.28420066577,3.31930379518,3.15124656007,-0.0658979439754,-0.857341598329,-0.924948228852,1.4364955694,1.59294437431,1.03251777869,1.10385090002,4.14120670131,4.27914692554,3.60675186478,-0.594784780472,-0.608715747611,-0.671810156242,4.21969479049,4.36587408696,4.2889784399,2.26133502334,1.7039753437,2.00431185784,2.08810697294,2.26630236561,2.91833249828,3.11484293893,3.13447158181,3.04332236164,3.03506928255,3.00051983719,2.33681333158,2.20082419172,2.28436019598,2.53278217992,2.45398553882,0.626459029076,-0.0226484661253,0.0687422144436,0.305954208986,0.361955284942,0.910447129135,0.77918963961,0.826214284754,0.764096612221,0.843330566307,0.863755197677,0.804310575897,0.438405259564,1.43416796272,1.34663702386,1.60640995556,1.53348780682,1.69096513929,1.68832856771,1.60124002144,1.50919406645,1.50005853382,1.63154937797,1.54576171248,1.62141440598,1.71833878176,2.14037318608,3.27613803175,3.36225948827,3.38612749656,3.76894227401,3.86668453418,3.94758553964,3.96111569245,4.315970015,4.33475058659,4.05665690632,4.1419163238,4.22545455158,4.39760272463,-0.684656774304,-0.728614027991,-0.609079346572,-0.457286522858,-0.48833837645,-0.565416220063,-0.836409880281,-0.80414215472,4.70884887272,-1.08607561855,-0.925135937555,-1.56113953038,4.65832196197,4.67565746306,-1.46252807259,-1.38228484032,-1.44069533021,-0.781133202276,-1.17155176831,-1.30305585962,-1.28100612056,0.25674574057,0.178277653269,0.102256735406,0.0499609513053,0.984791680494,1.19831501445,0.233473261481,0.306940020485,0.365302303405,0.349518353061,0.483571355074,0.410129144558,0.209145858164,-0.601656935925,-0.554061420938,-0.699152902344,-0.438758256236,-0.848977290684,-0.76441328205,-0.609306496466,1.66206708292,1.3625660092,1.30164616608,1.23624292897,1.19490562166,1.14296138468,1.5836897535,1.45438064864,1.51003692135,1.45488735827,1.33226557321,1.38180104424,1.45464263635,1.47539962545,2.96471497019,2.90889382523,2.96163814723,3.08074409771,2.57058073606,2.54336135743,2.46537668662,2.41897396814,2.45134871801,2.31522432996,2.40042628965,2.29606042998,2.2618198531,2.41799706772,2.5273753175,2.41803104353,2.35863840698,1.02251781496,0.936071835767,1.05487050825,0.978131031437,0.876265585655,0.866881028549,2.11822884676,1.55273028238,1.65132245031,1.35326661603,1.29031735166,1.48034645157,1.46266739669,1.33767798738,1.41943927246,1.39344434175,1.90339834392,1.63283094094,0.703204388049,0.623397246797,4.17220622157,4.39477891944,3.61232058164,3.52319319124,3.50770754409,3.33839835527,3.45964432874,3.41519556161,3.19825111479,2.92446207998,3.2682560757,-0.473623607385,-0.437554128678,-0.510500037514,-0.815812857999,-0.696911827574,-0.728573317084,-1.3089309672,4.4746186026,4.54392545895,4.35693474055,4.46052929983,-1.50035842696,4.65244071945,4.62659218529,-0.733496789955,-0.866422553769,-0.945031446387,0.496976202764,0.785001489802,0.754760068568,1.68353942863,1.70273007891,1.02761557078,1.30488500792,1.35135568617,1.45172120366,0.933146850126,0.99754662688,1.0831343824,4.20443606839,4.05919223755,4.13589505516,4.06239368378,3.62166283607,3.67727096073,3.74206906697,3.66438095861,3.76033974251,-0.15362579284,-0.585771381758,-0.467075277454,-0.554344477072,4.60289198924,4.61732773361,4.5604700304,4.52310643035,4.60713598924,4.62246495901,4.15448542572,4.22812426546,4.2606600266,4.18040085519,4.25079873163,4.16546815159,4.09089459798,4.08459727999,2.56492910387,2.51705546286,2.10349768408,2.19370803636,2.21483790459,2.02802957219,2.41038441146,2.3500103908,2.23807048436,2.15461854516,2.09180001402,2.17248844854,2.18807151433,2.2175567085,1.9949415854,3.31361598556,3.17709931903,3.12634984385,2.8815162294,2.82006632017,2.77219544357,2.95987712685,3.04493101755,2.92460082786,3.01072997002,3.05666447952,2.88391615655,2.17263431156,2.09255149757,2.30674466163,2.24351159374,2.19844794677,2.225753968,-0.157379629928,-0.0702331464247,0.226513759038,0.19315255678,0.106390757257,0.249906633435,0.33974747526,0.765365346183,0.529179506028,0.650546804802,1.16540632389,1.39352099426,1.22220923567,1.3155218123,1.84749750948,1.93069035954,1.93870884036,1.76851329748,1.38772624566,1.64171068602,1.62435738873,1.68100624761,1.71608556814,1.79516950515,2.24980344795,2.21316989222,2.29868251897,1.58941144344,2.09395159858,1.99649791025,1.85724084699,1.98897734204,1.87389768884,4.21659546149,4.35922908791,4.28252078487,4.0506906389,4.04727109348,4.57770411597,4.43212292814,4.51125504483,3.64900877555,3.64159053212,3.50925509156,3.42988645355,3.43470581291,3.58307526079,3.34120044953,3.29100700368,4.06457877667,3.92757970204,3.91730647236,3.91493143365,3.76328011657,3.76680747061,3.84335006644,3.85074995515,4.61531905011,4.43672255419,4.12382316457,4.02531585571,4.0033163829,-1.43078713728,4.69751359052,3.9226176803,3.87822252369,3.77697712827,3.78814613082,4.49343750943,4.60224769344,4.51322131761,4.67944285123,4.66818729862,4.57039222452,4.25136730179,4.36025767293,-0.363046527556,-0.441943093195,-0.311925023344,-0.474657073061,-0.701353485563,-0.755662498138,-0.699177932033,-0.750266420941,-0.725505007262,-1.03643349426,-0.955610283106,-0.912174135895,4.63842156136,4.70588251626,-1.50213805461,-1.49396016894,-1.26976018512,-1.18124351819,-1.16716572609,-1.0613736969,-0.952055374834,-0.980739353892,-1.01689506695,-1.12263330719,-1.10741201075,-1.19455728043,-1.15565824528,-0.841050524281,-0.796191373197,-0.719649152914,-1.40284182386,-1.48002988654,-1.49929033603,-1.44277789556,-0.906844605555,-0.895861483182,-0.81244590335,-0.786062409757,-0.843465481678,-0.984525029607,-0.928138263244,-0.953890620222,-1.31719856121,-1.33958266804,-1.48042588958,-1.42020580443,-0.862908825319,-0.920640395535,-1.23001447953,-1.34542426917,-1.30897762479,-1.36599894322,-1.12916061606,-1.20812893928,-1.24475083818,-1.26642681014,-1.02754689105,-1.00347986555,-1.1080826414,-1.16522779931,-0.000432334693382,0.0800577318003,-0.408825965659,-0.461617599965,-0.424839250783,-0.340611192756,1.30542730136,1.31488134837,1.51157279458,1.31941031265,1.23172806152,-0.251021956521,-0.313908594077,-0.283076377222,-0.326799392776,-0.175737402573,0.67044861803,0.677512924021,0.614725257659,0.544215762922,0.532749443598,0.595998590402,0.263050130608,-0.0925358913197,0.812355688844,0.628259587588,-0.615071886431,-0.761097321123,-0.76007779161,-0.718966439615,0.737477835661,0.887908102537,0.974062471519,1.15181215559,1.18452093616,1.21745446048,1.16515315542,1.07928459854,0.966529350234,1.04935905154,1.1018092177,0.942057363989,0.998046182709,1.07537934816,1.17346014469,1.2666671112,1.28688922868,1.36112522588,1.32151357179,1.10889177808,1.129955569,1.16270632556,1.23512580436,1.20848603342,1.25957533272,1.5201435497,1.52629932395,1.66720114246,1.59426191207,1.76149845801,1.68038174739,1.61382437562,3.07338460959,3.11497092193,3.21391061689,3.27929017518,3.2432796974,3.13509832809,2.66129519217,2.82816242216,2.74558580175,2.43427118928,2.3838347309,2.42563195405,2.51508946464,2.58749828814,2.53911865895,2.71818907799,2.78815944005,2.75165713053,2.63252340054,2.14656528644,2.27379252904,2.23933446152,2.00656014915,2.03118283227,1.92372417387,1.24030035279,1.27699301571,1.10956133022,1.04622191158,1.08344173599,1.18543431988,1.49332763924,1.61747206748,1.86728189501,2.09316399388,2.31996512356,2.42028265504,2.039912667,2.32905665141,2.16343699951,0.236884007576,0.282108254027,3.04344926419,2.76589555782,2.48573910584,2.32497421436,4.20625737033,4.14851029119,3.6381005097,3.62974543099,3.7340502797,3.62055744021,3.6248166031,3.17943581102,3.09133431279,2.91742198729,3.09548371444,2.92619040173,2.84153050469,2.96013440003,3.07673502007,3.04651511749,2.91042044415,3.02544629741,2.94504303952,2.52160050197,2.56002845148,3.30258099693,3.32719866937,3.36462606166,3.45286940886,-0.011266368285,0.169018018231,0.104849338089,-0.0581723159019,-0.0547908584922,0.000967748700403,-0.743703090711,-0.681417019454,-0.568604805367,-0.676652197923,-0.348959735929,-0.292957249642,-0.204422728888,-0.161227225501,-1.32198238957,-1.27157655896,-1.25130692002,-1.2147876757,-1.01408552657,-1.04761102036,-1.08518919965,-1.19300385085,-1.28064159467,-1.48645727104,-1.39328038171,-1.38766216382,-1.49329393312,4.69959574434,4.68763953397,-1.3762549579,-1.09533991301,-1.26277907047,-1.1355013953,-1.52772213686,-1.51798142587,-1.1620607306,-1.32344087497,-1.2108124922,-1.36760555838,-0.492694123626,0.170828263978,3.61647195188,3.96255155635,4.13575906963,3.22952455131,-0.159020257108,-0.222225871022,-0.636766620067,-0.486914870793,-0.347262526014,-0.344393843282,3.99030393193,3.9877300277,3.85785512903,3.92376092855,3.9208053738,3.85746944574,3.71923722317,3.78677661304,3.55628869884,3.47371029256,3.41047989871,3.99248475837,3.92270358425,3.91834178912,3.9933923041,4.06872118342,4.07338409645,3.83427223667,3.91026403439,3.82889227751,3.91518932472,3.99512095595,3.99495848768,-0.194583983614,-0.155284191448,-0.198236583064,-0.274817228367,-0.145999436483,-0.189353131991,-0.533161274879,4.57470589464,4.41307710148,4.54738994118,4.33262918929,4.42121639391,4.50706770398,4.34190726981,4.38032350583,4.49156858748,4.31132176423,4.37967887169,4.45811378675,4.32279212258,4.41275898998,4.47947599233,2.55040475214,2.62289220057,2.49779673267,2.53106692812,2.8083484835,2.90247011857,2.64488922311,2.68836541058,2.46775128973,2.42332643271,2.34286843047,2.31154888585,2.47062093108,2.43243308959,2.3564352858,2.31808717193,2.43049557475,2.35369672707,2.29572836756,2.21923961541,1.91625508047,1.84250599457,1.76899006195,1.76614013578,2.13388450363,2.0577064529,2.16984914626,2.19294781184,2.09195334859,2.0391559856,2.44330182979,2.31102125856,2.34024818923,2.37791800059,2.47216948852,2.50737431225,3.21948015439,3.54288204097,3.41289564931,3.6648866964,3.66395722157,3.50179859237,3.37301233041,2.98114826475,2.93517826698,3.10288313025,2.98921083758,2.6086011495,2.6540240585,2.66440264445,2.7626835965,2.76231054857,2.81433026495,2.48453213097,2.59528718172,2.65510684216,2.41552532706,3.27938792474,3.3588007399,3.36198460306,3.67995125696,3.68393053374,3.05895335198,3.09175590474,3.34480973783,3.14988598386,3.32492324364,2.58375359088,2.54617865728,2.69954707327,2.66025936319,2.81995191867,2.89935647326,2.93349218681,2.77770020334,2.89043997767,2.81376185244,2.80572430446,2.76591413834,2.88487484071,2.80467334628,0.214564248976,0.177446404801,0.725245465819,0.706828136602,0.566673210868,0.627269876769,0.463195702346,0.559292121314,1.06241547196,0.890661074575,0.978266070753,1.0570486129,0.733578939345,0.810865937641,0.811932076809,1.18853022068,1.25328124851,1.09597270152,1.12220119361,1.24454131428,1.18072662322,1.28277422373,1.30446242848,2.0353590458,1.95592956785,1.757332234,1.81513199021,1.77496428824,1.89475261832,1.85211780533,1.84024230191,1.91127451801,1.97135307328,1.9332675477,2.85890817103,2.97323087414,2.46925977774,2.39067298377,2.68968094671,2.6426509508,2.59906101254,2.46758920695,1.8432606126,1.64911177541,1.57997337621,1.77302900522,1.87368498504,1.5790486706,1.67131496542,4.38398050094,4.43383002861,4.65249034845,4.57900997569,4.1194008163,4.19712438469,4.12530640648,4.24506189519,4.36214871519,4.33563517599,3.70806710851,3.69889096905,3.76755748434,3.84493257852,3.85127471846,3.78310557818,3.46402025032,3.78998103092,3.72602520829,3.2692285529,3.15321565832,3.2282486813,3.11926343324,3.16417851827,3.23938461156,4.39306291981,4.4554372969,4.41903576133,4.49622491023,4.55978798373,4.54537575754,4.05185902685,4.14282907832,4.0752269255,4.00063089107,3.9942051937,4.49514938762,4.41840943364,-0.734081109532,-0.874341100105,-1.09832912154,4.1275491802,3.82434268831,3.95722635722,4.20513210077,4.02433824679,4.18843959771,4.07508547054,3.9922125032,4.42715814961,4.54348880658,4.22670311621,4.16227353058,4.2410001706,4.37405937671,4.39121917501,4.45469411191,-0.961426213401,-1.07350847347,-1.09378375246,-1.03931874185,-1.34924842255,-1.51609985684,-1.51147869975,-1.43153603795,-1.24941826026,-1.43016105624,-1.34322370819,-1.33002577021,-1.27405800513,-1.4069010616,-1.42137292714,-1.35748862354,-1.35628489774,-1.2859288495,-1.27864650091,-1.20554100709,-1.21376266549,-0.808699299837,-0.73804687689,-0.831002914421,-0.86362795262,-0.600246295371,-0.679269635065,-0.556276112491,-0.597296565683,-0.685516294287,-0.722946231733,-1.1647802633,-1.1419631134,-1.04773794151,-1.10055884249,-0.983589354473,-1.01288224096,-0.955114058689,-0.870690723158,-1.0679711776,-1.2106513358,-1.12579841322,-1.23465769376,-0.887480958627,-0.854876280361,-0.830669150406,-0.936615061924,-0.969471378841,-0.994212378722,-1.03732985961,-1.06191395373,-1.09471511898,-1.17688678592,-1.20064794674,-1.14333080847,0.302634298904,0.457923720766,0.396182587876,0.319108063567,0.178026013733,0.139436270336,0.117025051372,0.258222915276,0.216975231333,0.27453680437,0.0729899493393,0.156619344198,0.197731950251,0.2200551367,-0.205270382912,-0.230752652496,0.0353522778012,0.0128449324214,-0.0225738696181,-0.0687995888134,-0.102092771346,-0.125582792762,0.947937305759,1.06939622192,0.796967000368,1.03018939414,-0.415643745862,-0.554709242438,-0.551626111323,-0.616329189019,-0.393335634601,-0.286722014317,-0.439739986345,-0.367616052981,0.113452677462,0.0521839298464,0.113975123056,-0.407972528839,-0.204454440761,-0.216055036988,-0.570714934443,-0.517732373368,-0.362894149017,0.341248802718,0.364331529971,0.442820594368,-0.147882979082,-0.03608718724,-0.215748677873,-0.249653519016,-0.104887870973,-0.0282863861324,0.0858006452377,0.342647899914,0.22436709065,0.112472359742,0.082142238726,0.304041201528,0.265537062465,0.154710278732,0.801477029059,-0.16112818602,-0.112920563073,0.434121372288,0.344806101085,0.00498907077649,0.0716107313568,-0.953484289183,-0.820933429138,-0.74285467281,-0.788983337816,-0.905818095701,-0.98997099361,-0.993243886282,-0.895096305259,-0.863965522911,-0.93833830568,-1.06905194059,-1.0461759729,1.48142156482,1.40352839216,1.54927116987,1.49308776847,1.41718721953,1.3979746143,1.12919947043,1.07033736442,0.747513669023,0.806107517763,1.77986687343,1.86304067332,1.5631668756,1.63013568742,1.57151366223,1.65151504204,1.72850101628,1.71517418363,1.96758495333,1.81220054061,1.88203522655,1.32700096136,1.46574695945,1.27138442653,1.37789326867,1.55303238824,1.5808055953,1.8566663285,1.72180696942,1.72916108886,1.84382365774,0.422318788432,0.558004860657,0.720940530958,0.796973710557,3.7354120316,3.74644994744,3.8225067588,3.91160256092,4.00344149016,3.83148339828,4.02913038338,3.94841400768,4.19858986177,4.13113961672,3.98833808498,3.88454093144,2.83366055323,2.79075029104,2.69621290628,2.65093669188,2.53468441283,2.57065169025,2.57993264838,2.6599109127,0.148936102456,0.220660336855,0.125537195965,0.0896723529338,-0.168888137372,-0.250085593897,-0.361963697615,-1.35609759556,-1.37746704112,-1.52355692067,-1.46025149971,-1.40677477638,-1.48658729055,-1.56868322155,-1.42048217434,4.70916070517,-1.50531368166,-0.819782642521,-0.678261983847,-0.860429679857,-0.952223287196,-0.564460677109,-0.528753166914,-1.27383685132,-1.55264630903,4.70063956361,-1.0156548512,-0.95486337569,-0.752394319871,-0.00297003067537,-0.116586448554,-0.335702781657,-0.348914690046,0.128564070426,0.229962331676,2.52696934567,3.07950503155,2.05056507245,3.19963769371,3.61993123615,0.1355315119,-0.0301186873089,0.20014398134,-0.0856179984746,0.120236935072,-0.00599121311057,3.85361191659,3.98273103705,3.91923551627,3.85438350513,3.92693944479,3.98966926195,-0.319180513855,-0.400956244112,-0.449479956271,-0.415251839381,-0.329481733126,-0.282242311516,-0.352807371725,-0.309052130359,-0.26484910924,-0.295401026976,2.76144845293,2.80495358694,2.67328261243,2.6346188455,2.68084933582,2.76342863645,2.94030911532,3.03116049628,3.06215240547,2.89016552409,2.92849383412,3.01013960099,2.29863716155,2.27457728309,2.38272006978,2.43632658225,2.40571617395,2.32768197126,3.47282993359,3.32668750888,3.11138830512,3.12716298699,3.221276202,2.93696742756,2.77405170022,3.94602672038,3.12337465533,3.15790000962,3.23332099289,3.17587128462,3.28403286341,3.26150268808,3.22659103825,3.29799716551,3.08981485563,3.12510206983,3.15609870606,3.26394222929,3.46113100602,3.67215923855,3.66802462446,3.5581140589,3.3987103263,3.47979299814,3.59126632652,3.58154173996,3.25388106522,3.30235045254,3.18592033555,3.21254824403,3.42139183338,3.51284993453,3.34879391421,3.37009675147,3.40800586393,3.56469615766,3.49847826976,3.42210328019,3.60910622325,3.47184533379,3.52654873044,3.45695600683,3.61980714019,3.55225694634,2.58309239531,2.54311423235,2.65314170378,2.57720326953,2.80879140629,2.77306191469,2.69745254536,2.65812541182,2.76913320507,2.69381805789,2.88197765677,2.9957397293,2.92024496126,3.03591799798,3.00080080021,2.92206415683,0.17298589736,0.212546416571,0.169324040475,0.0878090753584,0.0565356176427,0.0937182122011,-0.0292798490208,-0.0730132116384,0.581012181884,0.52227746798,0.508404287994,0.660005690932,0.676754665984,0.611825224363,0.484551306331,0.428993036065,0.334486430567,0.347420820749,0.305114359533,0.401428227137,0.456026747679,0.40788653247,0.474197797443,0.411447504024,0.491568164964,0.679303358406,0.903134546645,0.793246445142,1.38090701769,1.28484421008,1.32029722937,1.44380015667,1.4763871199,2.11025107085,2.04498694089,2.12157359277,2.06908164048,2.85154644601,2.70235338497,1.77396667966,1.7710048566,1.85802826001,1.86346644191,1.68550480227,1.68318798914,2.07499263146,1.96945204976,1.95834601605,2.041945885,2.16035189409,2.13909933121,1.75378392037,1.65296581319,1.7300204323,1.52553816821,1.47334632349,1.57348622877,4.56133125381,4.48834138968,4.51763536925,4.46530407854,4.66964253708,4.70393239941,-1.53780428055,-1.51913478783,4.56404660605,4.6263794831,4.61089584824,4.44963436544,4.52198284693,4.53658259011,4.263179399,4.39040890681,4.30573781201,4.31804173641,4.18318880827,4.25522714037,3.51831285315,3.52372451511,3.58722929237,3.59579768191,3.57156779782,3.64723107991,3.5947478334,3.65659269647,3.85123329641,3.78443008417,3.84594168305,3.71107701907,3.70088736554,3.76896892416,4.16599300982,4.1283973314,4.25542535958,4.30551585081,4.26633943007,4.17775341458,4.59684988024,4.62948243266,-1.1400177964,-1.01222195156,-1.05209428204,-1.18889852152,-0.891241302659,-0.967025703347,-0.610893095115,4.56509037401,4.06690197565,4.15527626722,3.91441702379,3.62811661846,3.84922696578,3.65705214696,-1.23700401588,-1.20697770666,-1.13111566838,-1.10874274412,-0.747093312125,-0.834072933946,-0.685699525808,-0.728968586598,-0.846612152938,-0.888442773182,-0.031302078076,-0.19764783916,-0.174417591308,-0.0918625511001,-0.152352792094,-0.0783297467612,-0.130652623147,-0.0466407514572,0.0283391924695,0.037414069558,0.403123874964,0.373947009139,0.441948056629,0.308130406962,0.131095064659,0.374152123929,0.288365449866,0.0527823119451,0.137913030937,0.821044619903,0.528828574535,1.25825118811,1.11893048098,0.819696092193,0.383736858651,1.57031957532,1.49568837457,1.43638985039,1.45485690703,1.58642268498,1.53038090642,1.26714174981,1.34313586099,1.36154560592,1.30372089259,1.22722569425,1.20928535621,1.16729904101,1.1100863127,1.03329379229,1.0390724749,1.12608844559,0.964428317635,0.812228120326,0.884502675136,0.938969508855,0.976958938766,1.03297725696,1.01438695333,0.900341517017,0.881131020035,1.10370326355,1.05279085029,1.07763861222,1.82320679476,1.73928461514,1.73930609055,1.83802823975,1.97888873079,1.95915542836,2.11679071328,2.21208632804,0.8748776907,0.749767498637,0.614746637913,0.791007694499,0.705361648437,0.540156458806,0.529801558869,0.475160040816,0.397035336512,0.312294018007,0.415643665554,0.43447529401,0.245181706614,0.280169776698,0.367260228493,4.18735243824,4.10228829857,4.05635736121,3.92491176916,3.82091016759,3.78531954134,2.69765257572,2.65630054142,2.82649257219,2.78595345613,2.78207826424,2.69992480072,-0.396105297674,-0.486085889133,-0.560304892768,-0.514651477475,-0.278268175773,-0.230452038418,-0.154777851689,-0.128682189149,-0.175922109063,-0.250078312368,-0.433075365054,-0.385828161414,-1.49193486956,-1.28462553947,4.56130318769,4.46398467807,-1.25496501231,4.70154814866,0.0489901686861,0.090627613935,0.0488700675299,-0.0324804907838,-0.0734790469616,-0.0340240195585,0.585176288468,0.529324401431,0.658488377511,0.673738019046,0.612185541142,0.540971400219,0.894795585999,0.889484045573,0.993240311968,0.983330830162,1.91136244075,1.98238804293,1.84947852502,1.86553145002,1.94015051902,1.99494110873,2.76833778835,3.10770360081,2.47891119116,3.27882403844,2.02147257245,2.17588091666,2.37185499043,2.45935876346,4.61570424951,-1.53812507457,4.6898820313,-1.55503746211,4.65241554228,4.59527569738,4.40168606494,4.48748834654,4.47565002243,4.42218313769,4.34591363966,4.337388385,4.17676059163,4.23640855259,4.10954289123,4.11975522621,4.20252782578,3.65854063656,3.79045094125,3.72685086066,3.65537725763,3.72141310295,3.78818197384,3.50990323705,3.43108861616,3.46512346049,3.52361382018,3.39091868401,3.37087328045,4.67171939476,4.70466717669,-1.46877195143,-1.44000331416,-1.30522758321,-1.31125636499,-1.53689061803,-1.52656017822,-1.42898945079,-1.43286581669,-1.32260349584,-1.32946220641,0.491374354602,0.586098244703,0.507493486211,0.656527015939,0.920583046599,0.978266173124,0.95885138167,1.00872570352,0.960577024453,1.91423246844,2.08096638105,1.9884935476,1.92883548401,0.501075646143,0.605510218376,0.452986645323,0.592503018817,0.33969880474,0.594241671531,0.369305203608,0.486342190863,-0.331323237293,-0.2126996194,-0.312672819036,-0.376181151482,-0.162019853683,-0.215865024565,-0.645826504075,-0.56369979148,-0.512452147209,-0.540570502481,-0.619704890812,-0.646007569728,-0.673702923919,0.540986264999,0.723102887278,0.647447468351,0.560430968514,0.690877696496,0.796119797841,0.600388817656,0.618357013993,0.800606766255,0.713925968453,2.42767354583,2.04391809074,2.30083898305,1.7912991795,1.73053585231,2.15680299698,0.788626151696,0.84513577942,0.714671583721,0.698437925497,2.05452234222,2.03088363853,2.17187281842,2.24772825664,2.20900881279,2.10805830147,0.700765952341,0.923004426011,0.832515361901,0.704037125259,0.892756157883,0.795600952399,-0.623463855908,-0.595105923056,-0.577603119645,-0.502579962261,-0.415605184879,-0.49122685883,-0.519419254475,-0.369633970043,-0.398600797374,-0.473009079987,0.885993733864,0.828307529445,0.755460050439,0.746331873253,0.813836159446,0.880600133812 }; const int NST1610 = 1610; const double AREA1610[NST1610] = { 0.00771503984311,0.00783155983693,0.00761471595757,0.00777918555608,0.00791141620966,0.0080217882768,0.00749152743438,0.00764204235133,0.00769057810026,0.00798442227314,0.00785766998554,0.00795615719593,0.00796989063162,0.00771458884476,0.00791503008815,0.00770839579274,0.0079595854035,0.00785271294883,0.00770998847668,0.00770383638623,0.0074759712762,0.00884346048924,0.0077884782018,0.0084490957535,0.0072159936648,0.00806479930367,0.00758070745827,0.00809971114913,0.00740556821427,0.00827592531071,0.00739413560098,0.0075201059156,0.00733655391478,0.00771268604458,0.0077449621368,0.00770827229896,0.00790888027419,0.00771814433879,0.00793061137015,0.00790145957736,0.00793336445721,0.00793179933016,0.00771539163481,0.0078375764227,0.0076592572713,0.00779764381365,0.00773343790266,0.00772006407586,0.0078759568387,0.00778586534801,0.00786207327374,0.00771430098962,0.00790106721573,0.00769839449166,0.00795196290757,0.00781691637162,0.00773123272518,0.00783398689329,0.00782436502583,0.00777517909659,0.00787736981382,0.00793767708824,0.00772379689841,0.00772905493685,0.00782729021564,0.00783347171633,0.00784076283077,0.00770996380578,0.00779509569292,0.00784897978828,0.0075245963651,0.00779458751538,0.00797634768752,0.00778976091918,0.00780080862307,0.00787776816677,0.00777547191858,0.00773833682416,0.00776611506779,0.00778160068711,0.00820824399863,0.00826773186149,0.00791152014857,0.00773935345521,0.00786508471801,0.00783154295374,0.00792586107777,0.00785417730817,0.00764268014425,0.00795650192337,0.00776420399386,0.00791581762682,0.00797495495286,0.00771652735488,0.00794887676029,0.00768973978039,0.00769406081509,0.00795785065113,0.00755571978303,0.00799265604692,0.00749461520731,0.00771167742168,0.00790174625165,0.00801596306083,0.00794274955962,0.00795837912301,0.00770986786525,0.00786565059291,0.00787174098261,0.00779078271412,0.00775523447757,0.00764219749425,0.00757025844981,0.00775961072152,0.00774602324975,0.00796917986708,0.00783555949219,0.00772583650037,0.0078216376343,0.00781729010401,0.00776120744424,0.00793941808756,0.00794617914673,0.00771061893242,0.0076680936725,0.00765585270002,0.00801014713125,0.00755730434038,0.00925850459697,0.00742074644569,0.00735626301417,0.00796936900305,0.00742198384254,0.00807953140765,0.00747116435438,0.0073964879588,0.00751699542749,0.00740954515195,0.00768575874656,0.00770901517772,0.00777013341176,0.00754273370493,0.00920397469626,0.00822570313004,0.0078143432916,0.00781899627533,0.00779358623289,0.00784109841343,0.00775576461388,0.00785854567946,0.00800544793133,0.00798125714345,0.00804723301107,0.00783880478802,0.0077737385004,0.00778723530467,0.00782764185292,0.00798211870506,0.00785891450475,0.00777390216014,0.00778671426087,0.00775317133432,0.00777712527479,0.0079865109801,0.00772685654528,0.00781015112916,0.00783430969516,0.00782107603466,0.00773035076306,0.00786116838549,0.00785679809625,0.00779512090726,0.00779934170361,0.00770041393432,0.00778509124411,0.0078717031972,0.00779507838324,0.00774452121784,0.00790028047001,0.00767927813923,0.00777571430721,0.0078487233728,0.00786952837835,0.0086934613461,0.00740806137969,0.00794230183867,0.00781959926272,0.00734847759835,0.00792603979822,0.00775698584867,0.0077457933569,0.00793112037389,0.00783673310203,0.00780902955435,0.00782999479246,0.00783094230874,0.00781608811334,0.00794782295005,0.00789347167184,0.00772676325301,0.00774301599689,0.00890066780675,0.00770202112385,0.00796666031277,0.00772224353267,0.00792990406499,0.00803164333313,0.00764559464739,0.0074136769891,0.00773063406791,0.0073644897317,0.00913374163661,0.00734227128271,0.00791978414346,0.00810831912314,0.00784468231111,0.00771266431724,0.00790670453254,0.00795270301366,0.00794961356177,0.00772114648734,0.00747869810184,0.00796058379306,0.00793855449633,0.00777387039104,0.0077908350681,0.00823276767915,0.0074629313782,0.00803379457318,0.00763091382472,0.00766436888365,0.00888648588761,0.00761206754866,0.00760592860339,0.00746518120274,0.00781633110023,0.00781883963502,0.00791819625378,0.00766287005191,0.00795783642919,0.00770733666247,0.00760825731401,0.00821181722963,0.00798396996979,0.00771482372472,0.00793592926269,0.00780688682076,0.00783947667818,0.00740953274761,0.00752758176245,0.0076158215182,0.00759180642106,0.00821519283102,0.00743477394919,0.00787707773905,0.0077264884424,0.00788072898921,0.00773454481511,0.00798623340684,0.00798894344355,0.00767779221408,0.00768351131518,0.00787798728797,0.00795804059034,0.00774326577302,0.00793109226422,0.00777026871809,0.00790736007183,0.00773251336195,0.00780601713462,0.00784574320099,0.00779485546602,0.0079600228968,0.00768963431268,0.00783455213675,0.00770937136509,0.00793941956379,0.00791142120654,0.00778946373316,0.00779924999237,0.00776336732,0.00775210297298,0.00782231595188,0.00783285816231,0.00739121641647,0.00798628033387,0.00790612706683,0.00763058939041,0.00783755881389,0.00783085174186,0.00782685292844,0.00781315113146,0.00780186402642,0.00784641850318,0.00821011204296,0.00754956609225,0.00772742000821,0.00772406639963,0.00788048291337,0.00775222265317,0.00788898051928,0.00776860889576,0.00917999148633,0.00728150416131,0.00742741659545,0.00778347068437,0.00744800952015,0.00852760731072,0.00748913269914,0.00772670898099,0.00760557359103,0.00809796127961,0.00745947421489,0.00749874230127,0.00761746218947,0.00736126356153,0.00757462713584,0.00760513620832,0.00769658713876,0.00782721205099,0.0077451737991,0.0079623427969,0.0078627140712,0.007782904125,0.0078318041231,0.00782611909243,0.00768902679637,0.00781458358499,0.0077960377507,0.00784620758861,0.0077822321933,0.00777997154003,0.00787152207902,0.00778261053971,0.00783226621086,0.0078269464452,0.00790471507671,0.00775813772195,0.00784315572226,0.00771484534368,0.00787057995494,0.00795503754897,0.00764700122159,0.00796486017657,0.00801839048978,0.00770955562432,0.00791555912196,0.00776786410375,0.00768535073176,0.00794580108567,0.00770667921145,0.00786919679242,0.00783173071056,0.00780827193708,0.00772266114189,0.00793165708808,0.00772042903042,0.00772777313769,0.0077053806239,0.00766718311063,0.00792250669589,0.00777541699135,0.00797956619099,0.0076005385595,0.00820351215416,0.00785059886487,0.00750187541424,0.00791234842265,0.00788215065593,0.0073708368243,0.00806471076155,0.00768069461781,0.00776513713338,0.00778452327477,0.00783810736703,0.00789336218585,0.00769936781246,0.00781872776656,0.00766830976984,0.00794312746334,0.00775396617063,0.00785206057264,0.00782993063019,0.00779983814906,0.00785164979105,0.00778819725122,0.00782708337653,0.00782129967535,0.00786870444309,0.00776899300325,0.00772965659031,0.00785874217669,0.00780197803573,0.00787810554133,0.00787632005265,0.00780104649211,0.00779156861586,0.00780176977944,0.00778208532804,0.0077176863127,0.00792305110323,0.00793290160351,0.00772253396271,0.00748591338889,0.00793599013594,0.00805480962963,0.00771840671378,0.00773030257689,0.00792217091302,0.0089874457002,0.00776793266532,0.00774372993609,0.00786391239409,0.00752923348981,0.00790761098453,0.00777003106626,0.00791430575893,0.00774916298703,0.00771046472403,0.00791569162337,0.00771842804855,0.00776960339684,0.00787519642658,0.00779282672916,0.00796558341082,0.00772849391296,0.00787425079057,0.00785000593442,0.00783196634893,0.00778586276425,0.00765476760647,0.00789160089413,0.00778046808208,0.00786563572133,0.00761183462191,0.00781360281466,0.00779625112049,0.00805113962048,0.00753208273029,0.00790481494594,0.00788444052887,0.00744696668515,0.00734093629284,0.00789055546536,0.00799095237588,0.00765900300182,0.00803579963046,0.00773657982879,0.00762097341136,0.00778309965508,0.00744329555108,0.00738163770685,0.00827283921711,0.00797401495357,0.00733397517833,0.0077950216627,0.00749365585935,0.00905355995825,0.00772904570258,0.00790044743158,0.00789980778566,0.00770796410278,0.00779594624114,0.00747069384342,0.00742177276338,0.00773425764254,0.00739369785153,0.00737231495155,0.00786406602073,0.00777382297269,0.00787042533951,0.00773654973736,0.00787752662727,0.00776233126589,0.00786791878472,0.00777733614365,0.00793048382312,0.00750566547071,0.00785018211248,0.0078091692768,0.00786503923957,0.00778532994799,0.00774624090024,0.00790756531553,0.00773088747957,0.00788597544814,0.00785831162012,0.00767308432385,0.00782128905842,0.00783672411527,0.00787998782295,0.00779591152712,0.007883477181,0.00773396623906,0.00772813294847,0.00792776319386,0.00749578109282,0.00768089398069,0.00795255637597,0.00801391869451,0.00775557408064,0.0077948047026,0.00748697617459,0.00791694254697,0.00787487339272,0.00762232634769,0.00767419068201,0.00804128026579,0.00788209448607,0.00774588553731,0.00803295169855,0.00768969852836,0.00785063503723,0.00779246360169,0.0076560960492,0.00785375512924,0.00778048258631,0.00788077356414,0.0077734621822,0.00787146712416,0.00805625842768,0.00801208924349,0.00791329410523,0.00773956124489,0.00764799673523,0.00805912049312,0.00790088852789,0.00778494216592,0.00766159165074,0.00796661697103,0.00767968537318,0.00753337036504,0.00743703258676,0.00783581684478,0.00755778437161,0.00812739453781,0.00788686095472,0.00781670525208,0.00780494751608,0.00776996165909,0.00736646318143,0.00879516322208,0.00800910149898,0.00748865470993,0.00789069925456,0.00746051893892,0.00771807692333,0.00786206070939,0.00773040850509,0.00788739308761,0.00788725550462,0.00776398953909,0.00780575702137,0.00785444935871,0.00745100372717,0.00736578796447,0.00846189342071,0.00769102029153,0.0082636926079,0.00756956417765,0.00788679743534,0.00751852215377,0.00774003608436,0.00757195499202,0.00816038428982,0.00751692599906,0.00758978648477,0.00759984120463,0.00744259944426,0.0073878211204,0.00741992909822,0.00783371659397,0.00779126600874,0.0077302707915,0.00794128514922,0.00762941952361,0.0080655660124,0.00798925954671,0.00809816468247,0.00789727070313,0.00785296303841,0.00774701311574,0.00791151380191,0.00784806604147,0.00777442176201,0.0082652529514,0.00780807953117,0.00792865204578,0.00770734953548,0.0078734589838,0.0080370420026,0.00786546677724,0.00786104632357,0.00778593777396,0.00786578198754,0.00774707615833,0.00791776476372,0.00776063434347,0.00788060197453,0.00781566185735,0.00780285203202,0.00777469328427,0.00784266348647,0.00774641168208,0.00789104452361,0.00865502132355,0.00747952474317,0.00793809675685,0.00770805183474,0.00792525925108,0.00773546471309,0.00782345100497,0.00784363341087,0.00779167503905,0.00784057158088,0.00783803124732,0.00786122574466,0.0078677759949,0.00737951851358,0.00927005614038,0.00761011143529,0.00873204333743,0.00743462470401,0.00760004530762,0.00772464134063,0.00739067195952,0.00791045738481,0.00734105221818,0.00797003122013,0.00781262110512,0.00788329872315,0.00735682340477,0.00747709903606,0.00757016214204,0.00737137237005,0.00765046100485,0.00773627205505,0.00792233960245,0.00787056400262,0.00793419873328,0.00786786743529,0.00779409653213,0.00783637637519,0.00785276986363,0.00797014586249,0.00769265261824,0.00777180009448,0.00768195160738,0.0076317463627,0.00795471931005,0.00751130903492,0.0079324687813,0.00742800079944,0.00816547561026,0.00781163644603,0.0078316330668,0.007685071871,0.00791056847476,0.00784963004654,0.00751319427977,0.00779912877054,0.00790336411117,0.00774152816854,0.00788988966162,0.00773489162944,0.00779990029696,0.00780709718703,0.00778218393668,0.00786349291178,0.00751651206688,0.00782523368045,0.00756630625256,0.00808315643775,0.00763068946243,0.00802106156083,0.00830274868588,0.00768703891681,0.00798940614265,0.00790384030863,0.00764309956323,0.00780860149438,0.00784040951585,0.00789064053803,0.00776988268298,0.00778343804376,0.00798941833285,0.00764407747978,0.00773246682763,0.00793584034491,0.00766717896323,0.00761849787728,0.00750041777565,0.00786104435787,0.00751724696519,0.00859709632126,0.00892108583839,0.00818072771131,0.00735699880181,0.00782807863236,0.00785350132169,0.00785155879464,0.00777380323918,0.00781517136902,0.00782361938724,0.00789355759429,0.00778166241017,0.00780022023762,0.00783714166812,0.00781890569675,0.00780868150165,0.00784047125379,0.00781069755797,0.00780241358289,0.00789397609471,0.00783842004646,0.00781519070203,0.00783179493537,0.00776506179,0.00782482696212,0.00785833198383,0.00777966457459,0.00778656274584,0.00774114502017,0.00773354181522,0.00786748176899,0.00791026316402,0.00770164623078,0.00775688912201,0.00780332668002,0.00776149114363,0.0079127705611,0.00786819588758,0.00775570540116,0.00788812080283,0.00786828772394,0.00777381099698,0.00779439882588,0.00772642665315,0.00771611206745,0.00786238056537,0.00775136319801,0.0077976078132,0.00781426830403,0.0077946229431,0.00783370276778,0.00782781790118,0.00749324649911,0.00749169399699,0.00755526232213,0.00818861192419,0.00762164482695,0.00768288325579,0.00764263990718,0.00797270816404,0.00788099127739,0.0076795335583,0.0077530059995,0.00783616872208,0.00768082522349,0.00767097508146,0.00802666433131,0.00774660865512,0.0078551744894,0.00778702270409,0.00783004133695,0.00780813354077,0.0078420124199,0.00785264559526,0.00779412786165,0.00779485797321,0.00784747809942,0.00775772764322,0.00787518065653,0.00777325170809,0.00772588130746,0.00791909739939,0.00776811717746,0.00774729217201,0.00776837961406,0.00784320142334,0.00790979067484,0.0076799970805,0.00773280629636,0.00769941068583,0.00790573204869,0.00735457054828,0.00801389135799,0.00741080663697,0.00903879483096,0.00737766483516,0.00762338780972,0.00766314494072,0.00753861528359,0.00826599668138,0.00741199257906,0.00813419442921,0.00737904402324,0.00803498219295,0.00885281477529,0.00781048119717,0.00821204730823,0.00774087680025,0.00751041810462,0.00793180130282,0.00760836331316,0.0079877066919,0.00778196516886,0.00788183389095,0.00774468425694,0.00788064579588,0.00785210058145,0.00776830054743,0.00784340385543,0.00782956650487,0.00776876719761,0.00784428514067,0.00780122961817,0.00784043651677,0.00779140622607,0.00772353734657,0.00775805219398,0.00785657623785,0.00773056982444,0.00745052540305,0.00792319696429,0.00789700146794,0.00792749114336,0.00774088314972,0.00779239763724,0.00776841176715,0.00776961680793,0.00780569494914,0.0078736284412,0.00787819360764,0.00784845645063,0.0078850403918,0.00773064307037,0.00778412766409,0.00777147152534,0.00790071183389,0.00774688349155,0.00779999846261,0.007738187024,0.00781397697363,0.0081884730281,0.00791097654206,0.00760772765493,0.0082297935407,0.00777555409728,0.00737966282869,0.00850242781355,0.00773061767801,0.00767779316764,0.0073611734071,0.0074372338506,0.00772339413107,0.00771905658526,0.00787599255105,0.00772994829406,0.00779475120051,0.00771812708878,0.00788946144713,0.00774682547101,0.00793128555701,0.00774093336582,0.00790514364034,0.00766109996954,0.00783601456486,0.00774179210858,0.00792390057596,0.0077995538247,0.00784334339013,0.00774663459519,0.00792246810074,0.00787644139524,0.00787650115064,0.00786290983617,0.00778353905747,0.00747863905647,0.00740707632042,0.00740984554312,0.00755739238915,0.00778257980858,0.00781434772278,0.00787684404855,0.00775796539871,0.00773053032324,0.00794347871477,0.00766250543691,0.00769601634893,0.0076909435435,0.00748718046199,0.00796510679727,0.00753577747219,0.00732717775212,0.0078312509599,0.00779087510261,0.00777985345265,0.00780226699142,0.00778812596534,0.00783746747339,0.0076353318076,0.00779308682092,0.00813006403184,0.00741937334137,0.00773411962295,0.00786308239432,0.00772939944466,0.0078979307256,0.00790380356798,0.00773904715286,0.00787534541519,0.00775018635077,0.00780511707029,0.00785571793597,0.00785728007108,0.00778478196512,0.00773673372669,0.00788200469752,0.00775470082063,0.00781896648942,0.00778362978344,0.00789542805532,0.00775625615665,0.00788832599066,0.00775510346146,0.00789374305232,0.00791749116462,0.0077437226492,0.00751863590079,0.00897663964064,0.00730505088152,0.00784604672954,0.00744515096653,0.00795101880277,0.00770552219271,0.00780600217475,0.00782115897593,0.00788960672922,0.00780606210153,0.00770382439128,0.00737960325438,0.00802005279995,0.00788718249264,0.00755895514169,0.0079067034667,0.00770829694786,0.00770387943604,0.00788457810658,0.00764975205419,0.0078282404158,0.00800509926341,0.0078423896285,0.00757329943238,0.00750883383314,0.00749538212175,0.00741577304055,0.00746029244201,0.00780477864641,0.00789941957356,0.00750105251222,0.00818179842275,0.00731603111593,0.00778074305109,0.00781523410832,0.00789364265313,0.00787663691492,0.0077817617258,0.00776148259856,0.00800702117418,0.00764378511294,0.00800124873072,0.00803038647367,0.00765040594269,0.00754395009203,0.00763892801955,0.0073944410096,0.00781560518837,0.00777725276765,0.00781795600322,0.00784203368073,0.00776112614771,0.00780233300565,0.00742454303822,0.00771431217522,0.0078585081919,0.00771668511537,0.00787474160342,0.00786659882617,0.00762722205463,0.00756550513966,0.00806047273977,0.00775448136002,0.00791696553572,0.00779454172551,0.00782349179355,0.0077773267351,0.00768917571052,0.00787414362507,0.00783964726346,0.00767248800017,0.00775331740809,0.00790383609495,0.00768833991352,0.0079480055231,0.00764444265768,0.00774330924661,0.00780396150488,0.00794455672239,0.00774269905725,0.00789092411194,0.00778590345504,0.00791999725304,0.00788435132659,0.00775694549927,0.00781441703386,0.00784190931712,0.00760942425364,0.00776717117856,0.00784521312871,0.00746838432408,0.00813357699635,0.00766906878288,0.00793297087668,0.00769151985183,0.00780843389265,0.00778476222553,0.00787122112521,0.00776905175552,0.00788468085798,0.00793977194427,0.00790142872132,0.00777755918284,0.00780616618294,0.00796803883469,0.00775175274402,0.00793268648931,0.0077220696319,0.0078571550936,0.00777993514495,0.0079309914976,0.00766992604266,0.00777473087266,0.007739493186,0.00785426209823,0.00780976324991,0.00783146116155,0.00735999771193,0.0081123096775,0.00789885426427,0.00786112638323,0.00776071776695,0.00765315862822,0.00739815448774,0.00732417122796,0.00783257576694,0.00786262497487,0.00780519510113,0.00776100021488,0.00780027947724,0.00789656032687,0.00769579256193,0.00789360665017,0.00788354504205,0.00778396757006,0.00774486215528,0.00786355469856,0.00780123104142,0.00775822773474,0.00772730909927,0.00790534262592,0.00786490715139,0.00775139994641,0.00773073312583,0.00780471894266,0.00782755424204,0.00795277890209,0.00782162158747,0.00778018221906,0.00782392244939,0.00776304887766,0.00783228665736,0.0078428280895,0.00733554674585,0.00778059744958,0.00771915853307,0.00899345397934,0.00782584369865,0.00779063704129,0.00772221834117,0.00792936049015,0.00768677583768,0.00794281918629,0.00767617748234,0.00799706981294,0.00763602866379,0.00796596643603,0.00769409304757,0.00785138182908,0.00779760476656,0.00784748953832,0.00782731758503,0.00762348953426,0.00799053228129,0.00762773210148,0.00793307945138,0.00777496608013,0.00787899509789,0.00744914549524,0.00762864018698,0.0075225895019,0.00754290745445,0.0089318515429,0.00843324338287,0.0080519763776,0.00779871760417,0.00783181814729,0.00770834260685,0.00785414231988,0.00778874133755,0.00782816064216,0.00781455184344,0.00899605622682,0.00740026312519,0.00730052526101,0.00779658154987,0.00799796462643,0.00737394514467,0.0079631233141,0.00733718281132,0.00768666341089,0.00786365820215,0.00781635333459,0.00802853682235,0.00788472654876,0.00782818497326,0.00785250396756,0.00779764516451,0.00781129133393,0.00774003662268,0.0077607529884,0.00790091295953,0.00773150483712,0.0079266516112,0.00771162675279,0.00769206756605,0.00790404655921,0.00766640462491,0.00795064243811,0.00772067261383,0.00793916143926,0.00781235637046,0.0078695490026,0.00773932716326,0.00799886867606,0.00767067014408,0.0075732148253,0.00767882599545,0.00797230595319,0.00780147351124,0.00846343274922,0.00778151880449,0.00772812500174,0.00813712315037,0.00754493418376,0.00778274197249,0.00764919313162,0.00761262427331,0.00799422818969,0.00777110349029,0.00754320135779,0.00794438879657,0.00755162530103,0.00828809779529,0.00752747885647,0.00776072654511,0.0078335169803,0.00778747385752,0.00786444303802,0.00726232915426,0.00900096193086,0.00760109593592,0.00794543543956,0.00747895692457,0.00786096392095,0.00798338536896,0.00764624652789,0.00785272953672,0.00771356475136,0.00741167582022,0.00760946511505,0.00818677809038,0.00751837651037,0.00784423828394,0.00762924271881,0.00772786195927,0.00785014038682,0.00790153694122,0.0076596907124,0.00778283742605,0.0078437045231,0.00785136304539,0.00781447011667,0.00773009156271,0.00788059004852,0.00894243915647,0.00737256691828,0.00777646560505,0.00774834029584,0.00794963099328,0.00743362679289,0.0078625332,0.00737299232772,0.00773493213892,0.00782555232678,0.0077434048613,0.00794303822644,0.00785707242679,0.0077808839196,0.00790648710314,0.00780595628179,0.00776493559751,0.00784294583556,0.00779333569964,0.00770003734942,0.0079218507177,0.00777714983897,0.00784748135349,0.00783722936142,0.00782753792469,0.00786284570517,0.00783799357284,0.00784158485157,0.00780361262807,0.00783464652253,0.00781610260024,0.00782898957441,0.00773615624233,0.00783864120424,0.00779738390101,0.00783406759189,0.00785216447879,0.00771539890151,0.00776516916622,0.00786809494341,0.00797689618,0.00786709981122,0.00782789449957,0.0077977326603,0.00785274109055,0.00778946000554,0.00778859608251,0.00778819329529,0.0078511137332,0.00787524078568,0.00776003955837,0.00787202662995,0.00788771154585,0.00778218220211,0.00785571619951,0.00767095447538,0.00801297948971,0.00763345023747,0.00781396651969,0.00742564888519,0.00782095458559,0.00776841203276,0.00779494897274,0.00775751245597,0.00800151773015,0.00781473017191,0.00792860642529,0.00769517558506,0.00777653124347,0.00781744889391,0.0074416867394,0.00737107945246,0.00774536099303,0.00898799771231,0.00774036170313,0.00792953561525,0.00801855908954,0.00785345759397,0.0079131670287,0.00769641590098,0.00736686074026,0.00738249088936,0.00742490347747,0.00783945941671,0.00779772103167,0.00786382017946,0.00779771836962,0.0078486864676,0.0078782839754,0.0077431878204,0.00792356785442,0.00773046082913,0.00773093239337,0.00800938312734,0.00738073384001,0.00805162925449,0.00742800831442,0.00797839002613,0.00734563669006,0.00774561536998,0.00743935599341,0.0074073164253,0.00901393744808,0.00772352597217,0.00799436923158,0.00744085848258,0.00785460220953,0.00776199739787,0.00783017705877,0.00785810762029,0.00739977683746,0.00743032340584,0.00738439270872,0.00780035257673,0.00752642392439,0.00779293613582,0.00782464814993,0.00763666204503,0.00742011660228,0.00833518780496,0.00747741782766,0.00770295620289,0.00783157107487,0.00767452416886,0.00773800410602,0.00758817080153,0.00797674372251,0.00792098800441,0.00768032139216,0.00787887233601,0.00777968689182,0.00789343278439,0.00781902150798,0.00780849706799,0.00789424034102,0.00784580416566,0.0078512756001,0.00777157375622,0.0077274979306,0.00784920823022,0.00785851418832,0.00773262845607,0.00784477308175,0.00789097501245,0.00780379047978,0.0078223951439,0.00781132163747,0.00788199110135,0.00770694708292,0.00786115753549,0.00784988817515,0.00783103282718,0.00786870070857,0.0078272183725,0.00784122724476,0.00801560523568,0.00762352149769,0.00781998856687,0.00793300836126,0.00784890301661,0.00773681507351,0.00785352730664,0.00783871308654,0.00786196558504,0.00780863534003,0.00772240670374,0.00779788002194,0.00815712492709,0.00785477397641,0.00815322939954,0.00813436170372,0.00786067757078,0.00781939959537,0.00784594708638,0.00761603121592,0.0076762615778,0.00778486347253,0.00759024388681,0.00800531531917,0.00784730748342,0.0077650321143,0.0077679583939,0.00779298160167,0.00764952161262,0.0079751722417,0.00786253397888,0.00779598474361,0.00778498963152,0.00767016574455,0.00796795455615,0.0077631333185,0.00789450048597,0.00775233081129,0.00805799873914,0.00736066571538,0.00791461494762,0.00750114864426,0.00778615081126,0.00893823859779,0.00779522226415,0.0078027630165,0.00801116272777,0.00784854908596,0.00773956082434,0.00776109796913,0.00768999360686,0.00792913263857,0.00772644046913,0.00791078630294,0.00785838030732,0.00777877447954,0.00789531286119,0.00775481890836,0.00782864049853,0.00782809611694,0.0078307544477,0.00782228353906,0.00781852995926,0.00777331915126,0.00787371958015,0.00773012340455,0.00792243423153,0.00777595017617,0.00787513675514,0.00773607111211,0.00796079695975,0.00763131988533,0.00774274991531,0.00786438905595,0.00787880456027,0.00777626571373,0.00771998546446,0.00779335501961,0.00786933022597,0.00778781469502,0.00775455066059,0.00787479207361,0.00788860763387,0.00788857427877,0.00791686525408,0.00792024141829,0.00779297277714,0.00785183440206,0.00780082450571,0.00787835816041,0.00776924745002,0.0077784479555,0.00786858020688,0.0078293270702,0.00788411230152,0.00778387409976,0.00888770703262,0.00796758960024,0.00809237172095,0.00733611566701,0.00772265875453,0.00773492728799,0.00791277582542,0.00771817442996,0.00789984767218,0.00745431688447,0.00793752126021,0.00734005960501,0.00745195351633,0.00813729610485,0.00905189114296,0.00732800155324,0.00736623136025,0.007993981278,0.00779852539183,0.00769920093573,0.00788651912346,0.00771513964915,0.00792674843068,0.00771661949455,0.00753918978559,0.00758869169021,0.00747120675813,0.00751340914831,0.00760136905651,0.00779112150103,0.00793834635916,0.00781649613062,0.00772145133321,0.00785422833461,0.00789084316185,0.00778157938023,0.00780575426774,0.00789383814128,0.00776328093782,0.00782402434413,0.00779914106546,0.00780132695838,0.00781218292212,0.00776099902084,0.00788807555739,0.00777488226516,0.00765508006325,0.0076889352147,0.00743144556996,0.00804248685064,0.0077971034252,0.00777031982688,0.00787377772819,0.00776074156782,0.00777626756958,0.0077865867006,0.00763833674366,0.0081907620478,0.0074679961324,0.00788429904188,0.00743921042552,0.00781551383834,0.00776815496168,0.00896104022596,0.00777700798847,0.00784566577665,0.00789902379438,0.00774313386002,0.00763423598063,0.00920225069227,0.00747467480093,0.00800034809068,0.00730240494684,0.00781923038516,0.00779537100711,0.00783221710711,0.00777513574122,0.00778239731592,0.00786322557568,0.00783042069911,0.00774778968959,0.00781762525851,0.00766040954904,0.00767558257591,0.00796915248568,0.00789793216058,0.00775682616364,0.00775172099174,0.00791003549639,0.00776726043726,0.00786123007483,0.00775737688003,0.00782830482259,0.00786496541989,0.00778283292471,0.00786430208561,0.00780279100842,0.00789892862302,0.00776054233458,0.00775346483759,0.00787330420858,0.00791452055988,0.00790272620388,0.0078065900449,0.00780484710327,0.00736219451939,0.00738426930234,0.00746126618399,0.00742884559526,0.00773022699643,0.00889855116351,0.0079133824106,0.00736228258321,0.00800346888932,0.00777516267376,0.00817985051978,0.00750396305573,0.00747224662162,0.00775485638708,0.00827026283003,0.00782117393007,0.00792635242989,0.0077739624072,0.00784650430957,0.0077329852824,0.00774833436936,0.00789298980843,0.00783553868668,0.00769960016587,0.00783461410339,0.00782522494529,0.00780221632372,0.00797664085567,0.00771956287226,0.00786471549106,0.00778706298623,0.0078236202702,0.00774515006067,0.00793495307233,0.00771486885687,0.00791068994005,0.00791767202467,0.00771159788401,0.00752368581582,0.00752248605557,0.00751462932857,0.00754434139149,0.00752108604145,0.00782035533736,0.00782459153632,0.00781983105978,0.00774319829939,0.0078868361636,0.00775455176814 }; const double PHI1610[NST1610] = { 1.78931303873,1.65288815053,1.75860399374,2.30909135267,1.68164876231,1.99066953958,1.98320088197,1.92255044518,1.85232786157,2.22289421717,2.20202752018,1.68941047368,1.62251240835,1.66828732861,1.20758811057,1.26398114832,1.72328690797,1.80270671843,1.85483456704,1.94756211289,1.89632977599,2.02566842214,1.96191234078,2.06334967706,1.94415811346,1.98684037902,1.62498510224,1.76626728011,1.83316691969,1.69947282827,1.69904658615,1.86202498654,1.80643021905,1.82124451778,2.0770914483,2.12735375462,2.06676240863,1.52032991558,1.51850312493,1.38140591501,1.31434874587,1.45189854571,1.45030887724,0.117742706528,0.368119308193,1.09155602771,1.6788510091,1.74532367476,1.74865814184,1.60614353165,2.24056154295,1.8240249211,1.82364252863,1.75381003763,1.75463110565,1.61283701593,1.59669995909,1.71915400409,1.67587756904,1.72971751375,1.66766246977,1.82175505661,1.88817895425,1.75210412592,1.74693551356,0.923810425998,1.03339762405,1.24107353206,1.54850138196,1.54468147544,0.925773752989,0.891277773338,0.938495151048,1.41077126678,1.46896071143,1.33593328688,1.40423215551,1.61155275077,1.33396866531,0.99626796929,2.7221813061,2.66301947305,1.78777426952,1.71867137407,1.65279069223,2.04602127221,2.36910375535,2.31509265358,2.06370871131,2.06695774602,1.78837384439,1.78718878647,1.92656467568,1.9270365868,1.8584746018,1.85742266745,1.99777888525,1.99726823562,1.92411633375,1.85066741398,1.91362225985,1.82319745772,1.8190160337,1.89409573782,2.15875766775,2.48456422931,2.25979907057,2.33503469327,2.43105004111,2.35136774736,2.42391828445,1.51860355209,1.63057862194,1.50381579748,1.55804428992,1.564014451,1.0751307599,1.13430549091,1.53446701179,1.52768599626,1.5151054518,1.53336049665,1.56412605578,1.58848600941,1.69725375011,1.61802496687,1.59368703499,1.64551993963,1.83001146563,1.75754142388,1.87305270841,1.82804017454,1.72244885335,1.7499988638,2.08380605094,2.10170379856,2.18194007491,2.15173234375,2.21059616848,1.51004929057,1.49544173357,1.84954880849,1.79473558429,1.7241898215,2.59380653392,2.63802485345,2.52530453218,2.59927195163,2.22883753204,2.30195729911,2.08638723132,2.23636408654,2.28825229317,1.98023741666,1.9931535538,2.74839555865,2.71249137331,2.86180177933,2.82372294058,2.97500034715,0.905198191845,0.839685113148,0.568176548813,0.156973756207,0.526428768912,0.30675414954,0.239313127046,0.188162809581,1.22565625646,1.16868832589,0.976810682231,1.04435572061,1.58495435322,1.51790050641,2.01890611151,2.08415984949,2.2396260065,2.15965587311,2.16692373339,1.96108729442,1.89450007188,1.89408632512,1.54131218152,1.3934189236,1.46223392584,1.53335533212,1.77939531348,1.90332824841,1.83315783611,1.76972311494,1.85195855088,1.91258094508,1.58674159128,1.6471827743,1.81046939463,1.86349431003,1.80142003265,1.93602758868,1.88205580621,1.94555721893,1.96695179112,1.97541880686,0.944223132983,0.795805479737,0.847179118914,0.920385121126,0.895707693633,0.820979277504,1.38847311802,1.45642692603,1.30304624276,1.30538594228,1.37811449849,1.44856208105,1.39186414722,1.40390192399,1.4666362529,1.47047639636,1.02056158521,1.27147920882,1.3339926657,1.25811713871,1.32572439151,1.28087675998,1.16468458524,1.13261992092,1.00512165878,1.05189167292,0.854797781074,0.923788848675,0.988119580513,1.00344249216,1.00530458264,1.11656068812,1.03812973602,0.899386003689,0.95594818035,1.61409030766,1.61655022431,1.68474276697,1.68498321879,1.47208978208,1.40134965398,1.54756928582,1.54485892998,0.75936707249,0.81532633286,0.885449226907,1.03278902599,1.14166600131,1.20355550355,1.33397068334,1.33250559375,1.26936385139,1.46683642261,1.40014727569,1.53604958294,1.53868417074,1.46841954538,1.39906326909,0.72382936918,1.13052906218,1.26634756883,1.20010594432,1.26745537761,0.704313548653,0.746246684719,0.829633574969,0.759245538752,0.973759933162,1.08693980344,1.23154946342,1.30576494676,1.36347026836,1.34976093002,1.72066285984,1.65475112042,1.60874888396,1.53813020301,1.38550434597,1.3168782506,1.18087081948,1.25019200042,1.25409439367,1.08436971207,1.12008632477,0.731531679571,0.779347206951,0.872156160145,0.726105179858,0.836096788476,0.7627073968,0.840644792743,0.768479344956,0.405626855238,0.47619378963,0.483880889137,0.68850256823,0.550626952991,0.658591368177,0.634798337104,0.564539821382,0.236889680105,0.150107516573,0.988928113983,0.945703250237,1.10350378853,1.07435357728,2.58701486587,2.44134971475,2.49559940599,2.57189536492,2.79139826697,2.84400220699,2.91912056735,2.66302766843,2.59113690096,2.59049055427,2.44011678152,2.50193536471,2.78072013241,2.27022886318,1.59847522246,1.59021270418,1.5208251006,1.45879592663,1.72299253941,1.86598440257,2.03482614631,2.00431661852,1.899981366,1.94580381341,1.96073997673,1.98978524653,1.98281479766,1.91094753431,1.92402350543,1.85390039206,1.84776766605,2.06494846266,2.06050231034,2.5253808811,2.522484206,2.4516542575,2.52753625861,2.52419287787,2.45488701161,2.20114764488,2.13666819095,2.1352859611,2.20120308581,1.72182726902,1.65442880782,1.72176387967,1.58709520733,1.58732856514,1.6547169239,1.66642074222,1.65809371832,1.78613889981,1.72130018333,1.75127442983,1.7382384447,1.79477383007,1.86976300826,1.82379571074,1.88575490737,1.88371245271,2.01218385567,2.02507577992,1.95933252206,1.95303463907,2.0179148468,2.09009255446,2.08927354779,2.28249075963,2.46790476371,2.51960754291,2.36764095126,2.39126944349,2.41436509176,2.48889353779,2.28896745873,2.21506993402,2.15062318694,2.15708639831,1.00016087135,0.938992132742,1.12165803661,1.7477255397,1.68271549235,1.61203836712,1.60564932614,1.71397618956,1.64211163399,1.58162900191,1.59144385403,2.57460670226,2.53517975834,1.48667406653,1.33693000754,1.46539465775,1.39170780259,1.54418648266,1.69312070763,1.59735066813,1.55766942269,1.6375063237,1.661334694,3.11225663093,3.04555191309,2.8602405374,2.91253429332,3.0058981142,2.99237527736,2.61546805389,2.60585902174,2.8686079329,2.50922069759,2.4608447537,2.47698152182,2.55240367739,2.54828238954,2.7996370349,3.00219100998,2.92240708847,2.87653048217,1.40050084043,1.36418638745,1.42011342732,1.32419475718,1.43826810779,1.4569986963,1.55194011926,1.62695859899,1.53301867784,1.58958963743,1.68490620044,1.66635280514,2.3654510623,2.47919506484,2.26000053903,2.1828840512,2.01576691846,1.95462958085,1.88571570437,1.87412798003,2.0627914029,1.97324772879,2.04061810828,2.00768562789,1.92215844692,1.93498497573,2.1114095258,2.16283010451,2.03798507623,2.023517909,2.1377368825,2.07187130013,1.75922572196,1.90613622641,1.77319658783,1.84607929611,2.93451138689,3.02306838646,2.95319399853,3.06090584479,2.98279012232,2.65355914098,2.49776660289,2.88907482017,2.87575988742,0.500333872972,0.436013598067,0.367385095912,0.1190718413,0.98631633587,1.05812574337,0.769241426842,0.766493286146,0.632799919313,0.700612536171,0.743155878022,0.795160665593,0.779847608719,0.708390241847,0.193189012269,0.12533419166,0.0983189162541,0.0539684087483,0.26210954538,0.331945021069,1.30147655136,1.35648070304,1.4548647739,1.43243157677,1.45875762635,1.38018032833,1.4484595651,1.05778353425,0.983357961102,1.02404084013,1.24885893988,1.18206383758,1.11542703503,1.12244764468,1.99722498731,1.98530588523,2.13403891187,2.07188023939,2.02969251172,2.09377833963,2.16487672572,2.16956273152,1.56916423733,1.69112860876,1.70026998268,1.63792645984,1.62046300338,1.56080678429,1.5056472209,1.37910219634,1.45278721228,1.51401357773,2.34710222374,2.27101285688,2.22319726337,2.24558557126,2.12430935075,2.19170529723,2.11097495222,2.1519172053,2.00187023733,2.02902007238,2.03912933479,2.10679780029,1.06992722594,1.04670993474,1.17488469372,1.10161503192,1.24513502639,1.17445120094,1.2681874594,1.28874177137,1.19321512547,1.14298142879,1.35174355671,1.48974606781,1.4826610633,1.41231413043,1.43672316706,1.37775580043,1.42859108328,1.3609661775,1.22112209525,1.08639283957,1.14376978479,1.10340627982,0.83004079578,0.749859676484,1.06203711284,1.06502718407,1.13495711224,1.20283114637,1.19760872663,1.13253358117,1.47803416281,1.4805880843,1.40721904281,1.35478193178,1.40139594539,0.805225054785,0.867126032321,0.905799707747,0.981678274919,0.881487360331,0.855260489455,1.01005339282,0.96013974323,1.07268698768,0.934206647413,0.942648472212,1.01370147128,0.997500945074,1.06482995452,0.416007992962,0.782352410114,0.823397230859,0.801411276494,0.675573946703,0.538436941946,0.80539356628,0.931065229167,0.865196624782,0.800185579758,1.19907011648,1.13053940019,1.06368819493,1.06827602909,1.1469849279,1.21819665628,1.13828116653,1.27879032251,1.27146966448,1.2022191223,1.23897283925,1.17957158716,1.52216318378,1.58918983179,1.59191069748,1.52958616693,1.49087205744,1.47986474002,1.35057915651,1.40934020743,1.04307434672,1.11294921126,1.22772573859,1.24857720537,1.28555361255,1.14050068113,1.11690244942,1.16707422123,1.32610802007,1.24755418532,1.3212306576,1.24573268953,1.19569020604,0.425774564719,0.653714360744,0.61667412716,0.346248351701,0.267088519067,0.358943743829,0.2316167416,0.298891294206,0.0340073505091,0.105030468053,0.0894334878676,0.167891439665,2.50962521713,2.46535853232,2.3910701431,2.35876876223,2.46979159421,2.39398327498,2.5831103981,2.61437047107,2.69325050998,2.62064609619,2.82112128259,2.86780384447,2.90208901671,2.93178525729,2.62676690042,2.70010238031,2.71738243023,2.65538150604,2.30776601395,2.0267136022,2.18718858532,2.75043849213,2.78946310796,2.73724622866,2.66109082063,2.72165753354,2.64293733021,2.58967277385,2.58051330346,1.79175501162,1.93743854021,2.19995507444,2.13648179231,2.00283852678,2.06933544393,2.19876396193,2.53216938391,2.47414384232,2.30283759537,2.40249241855,2.38134663768,2.61896844777,2.63000238784,2.66865093498,1.94834919818,1.80930254784,1.80153808972,1.66884384147,1.73083598486,1.86000635939,1.91570833502,1.78405010585,1.78776953595,1.8376908569,1.89686083253,2.14567476592,2.07332408628,2.19380749857,2.15489936154,1.3546383683,1.42737960088,1.36033596141,1.43346958605,1.5017095335,1.66120454758,1.56376340507,2.16984722555,2.09544802039,2.0797416695,2.19622461041,2.1815825281,2.11826485675,2.12581829212,2.26730002491,2.32750726739,2.39475551592,2.2689828556,1.87625062242,1.85821049812,1.93110294149,1.9398436281,2.29630651683,2.36574652928,2.22960143812,2.22882635693,2.36338486892,2.29486589256,1.05183882845,0.91822682655,0.989480119453,1.04351014619,1.7416371802,1.67026101516,1.66280739384,1.80552718372,1.72490276283,1.79619112726,2.33442553982,2.30296484304,1.98069862961,1.93279301904,1.00170341481,1.05497753959,1.18929877325,1.13357634154,1.15845864294,1.36261731671,1.42626413796,1.46565336863,1.4398853773,1.49586852715,1.60595833931,1.57465565188,1.62926319821,2.54866658813,2.48105932818,2.54165233765,2.46782296552,2.41125260472,2.2677972028,2.3369507495,2.64510530565,2.56659136955,2.53371171668,2.51340576397,2.74526460156,2.66922104201,2.61961625435,2.61027673632,2.65045688587,2.69079915026,2.76763464567,2.80135538263,1.48104361626,1.49491581595,1.57013034021,2.44008088077,2.58471938485,2.49994822013,2.57279077935,2.37652592589,2.30234386233,2.40559137685,2.35110554816,2.21512553074,2.14389209107,2.27412722063,2.25367048594,2.12845339707,2.17923749407,1.88999226527,1.81608105343,1.93013095223,1.9497913019,1.85399994876,1.79955012902,2.84926827302,2.79025266022,2.93179865753,2.92911194768,2.81359196917,2.71417909308,2.84713916342,2.78868160674,2.73321307501,2.69094184064,2.55064545379,2.4070235083,2.42385850124,2.4928808303,2.52954544297,2.45538239184,2.62111330539,2.6767538185,2.74895708396,0.242545895607,0.245139263859,0.196047886605,0.231028899944,0.302310218509,0.192601747705,0.163782130446,1.10602537515,1.17840997586,1.23341767337,1.51087395496,0.591927242828,0.60083585094,0.174233200126,0.213175569692,0.29194362617,0.409016921589,0.331317320497,0.544938889549,0.447400993256,0.342759070959,0.330457432232,0.418411897502,0.4724682575,0.46226904586,0.396548194122,0.374293683554,0.31932174304,0.76468636673,0.941116518936,0.850885869548,0.922725822522,1.44200227875,1.57988876624,1.31727298929,1.25293414197,1.19314838151,1.09092687444,2.04174362026,2.04237692306,2.11623833004,2.26723235998,2.34115468187,2.36038277338,2.29964856554,2.21085006028,2.22442136314,2.58113831093,2.56449049434,2.48963104907,2.43417084012,2.03193196601,2.0265495626,2.09896326233,2.10072569194,1.95926461221,1.9629169837,1.30054579107,1.2315271993,1.17120738726,1.3092188133,1.25012289411,1.18119053089,0.955042357453,0.874616195038,0.97806003794,0.85251330446,0.915238392624,0.738566446988,0.677531466888,0.610508541859,0.735412342619,0.669796798668,0.605912749453,0.6346477893,0.618585137001,0.493140000884,0.545697677298,0.290385334113,0.370105292596,0.935777749555,0.875041046307,1.00555505661,1.01559299066,0.886467240332,0.957124144218,1.43841887778,1.43196731059,1.37305101651,1.30862919263,1.30423388183,1.3622451532,1.40008743654,1.46210135397,1.33064559028,1.32442915439,1.38916699157,1.45738521737,0.974196116673,0.903811457421,0.841318181567,0.835641914176,0.867216578507,0.887663392084,0.959468759898,1.18827899289,1.11648955144,0.578289938977,0.650548795703,0.670264733285,0.622743094474,0.548531379225,0.449140460028,0.523288001,2.7133893081,2.78108199414,2.80005545051,2.73367261779,2.66104327811,2.66365856458,2.31207098675,2.26757550257,2.13831775038,2.05971340969,1.98553676548,2.03889617877,1.93885095528,2.01206884697,1.71417749431,1.71476852156,1.64672026342,1.57784486087,1.64764796651,1.57937713887,1.99846526045,2.07343634966,1.53852551887,1.68144614422,2.38780475887,2.32892262446,2.35396808224,2.27371999894,2.25897655889,1.93634472106,1.93319109054,2.06382293762,2.12951436695,2.11856497684,1.99442306754,2.42776301113,2.39072161577,2.50649819103,2.54983559691,2.44787018615,2.38903288624,2.47027430286,2.50063416932,2.34070300771,2.36966999711,2.07540361697,1.96435238908,2.0416621427,1.3720167754,1.41569066532,1.53745594736,1.46720047976,1.40727197478,1.41396130527,1.7930936149,1.71802920659,1.67759303726,1.74727374828,1.82583217618,1.58029910694,1.54623193859,1.50347500102,1.48743017748,2.13640696571,2.11417236628,2.16607173575,2.26103388577,2.25389997068,2.38831303541,2.31704901633,2.33225680566,2.4595909394,2.46112651021,2.39794274554,2.32935953414,2.3935925454,1.65613986031,1.6493455686,2.39432984431,2.41132432683,2.48076765794,2.47132880969,2.29644028878,2.3413105447,2.45609779287,2.42052604239,2.19546733538,2.16733213952,2.08845316879,2.180416302,2.21605325062,2.10126566425,2.0578255663,1.93462762021,2.00263451367,1.70559668608,1.82686542374,1.7721621481,1.95932750089,1.90536437427,1.92803930346,2.03772440435,1.39993226106,1.32260649308,1.26727255761,1.47088933985,1.42278784824,1.50191659951,1.52649548553,2.75507229059,2.68798228137,2.60086905725,2.57905778129,2.72922538884,2.67457116479,2.68266813643,2.74957855659,3.02409792681,3.0802059009,3.02045608572,2.26888200434,2.33028624723,2.33791453638,1.6260461972,1.73538298787,1.70319207176,2.44818407405,2.38053992007,2.3801090948,2.44604689406,2.51957983574,2.51781094827,2.55640062522,2.61480427324,2.56271754932,2.62847580391,2.82277217836,2.75858520187,2.69321668032,2.68536460395,2.81143974523,2.74021769036,1.27901992836,1.21981801983,1.26829998801,1.19631955683,1.0289044757,1.09600701561,1.22602085919,1.2875837397,1.38955439581,1.51199570948,1.58158405167,1.58518156208,1.216889711,1.35851939649,1.32036403385,1.25145478982,0.85402731406,0.86416671188,0.655446129448,0.660085112387,0.785127033708,0.721885794104,0.728150045714,0.786681730641,0.362652865223,0.36471721994,0.304847017218,0.230549714552,0.232472230347,0.30318407292,0.405524983515,0.898877778131,0.834772313091,0.84411629243,0.918846512977,0.635708521499,0.703328415602,1.1748141327,1.05161326274,1.01216591995,1.06848118834,1.32364605223,1.3960391701,1.3201625894,1.35573684053,1.36778977385,1.3086209749,1.23735319465,1.27080156847,1.28401725719,1.2247616654,2.15207228744,2.1192506603,2.24036988449,2.28193295992,2.23989969198,2.16614321096,0.234198423791,0.282145527032,0.277981088503,0.584857173495,0.516689400796,0.704791269801,0.731785451818,0.978244254983,1.05060742294,0.913464893478,0.924282117497,0.506371776635,0.544236387673,0.514908043999,0.443943833026,0.31881202075,0.397325235003,0.396178256305,0.430278183943,0.273366478823,0.319836742004,1.79433699663,1.86131777256,1.86712930904,1.80617345302,1.92065749525,1.98771995955,2.04662267712,2.04750841034,1.92031764974,1.98830987748,1.859741828,1.79682571633,1.86675081258,1.79310859193,1.72560371759,1.7223573451,1.68263545999,1.79723460377,1.67152496366,1.72526581069,1.6176736956,1.55524730434,1.61946332682,1.54629555914,1.47593619214,1.48315414547,2.42751245805,2.4833570867,2.53869920735,2.50730070414,2.26501024585,2.2332430231,2.16563795867,2.21315115927,2.11920745479,2.13519388386,2.41164957672,2.40503622404,2.08714587675,2.02293758924,2.01664840366,1.87829756784,1.88398401845,1.94959391526,1.24833583737,0.93554500627,1.5454373543,1.48356446094,1.61516206073,1.62142793562,1.48958874677,1.5577028637,1.32947948838,1.40087000943,1.31872934769,1.37955506603,1.90503236598,1.83575281152,1.94526863301,1.91425346323,1.6396211763,1.70754810319,1.6337560978,1.78059114519,1.67470205576,1.59760499473,1.53742031183,1.55474832543,1.8703005228,1.81098003258,1.73471035989,1.77639518971,1.76535768467,1.71340653929,1.64257647493,1.63073363993,1.69058393069,2.24426189113,2.29717676157,2.40304029847,2.37795940249,2.32791885457,2.37731039543,2.43439386927,2.40779982153,2.29852956564,2.27530161934,2.14018106718,2.06152939862,2.00567658348,1.92612913116,1.85346855521,1.28982460351,1.2365815386,1.39154704606,1.36790496124,1.26234474364,1.33911827051,2.88915773674,2.82108146843,2.80549719391,2.95262286989,2.73178638039,2.62415816888,2.69913977437,2.5834508349,2.60708381074,2.67909790096,2.80308443383,2.84916875327,2.92450920302,2.8162760879,2.88473192335,2.94960483542,1.67371675038,1.67545985963,1.60431018711,1.53632874,1.54190573182,1.61163370602,1.20588737163,1.32758696157,1.33693520297,1.2782698585,1.52403066008,1.5185582945,1.40312600754,1.26961293839,1.34237949884,1.27963183244,1.10838882456,1.14121900316,1.09657411343,1.03046099775,0.983397858814,1.01690784259,1.22424523361,1.21163049235,1.13243174399,0.456617505576,0.437406555835,0.713638064302,0.822698318968,0.804201891919,0.769060311676,0.693072966347,0.673077516745,0.730986870825,0.643063303905,0.629356565594,0.526142732493,0.434651056851,0.451886768103,0.437101316644,0.452219645762,0.502354867093,0.566894320337,0.525777053369,0.575677142406,0.763024579785,0.695755204897,0.700242152244,0.506099401538,0.577017209364,0.788362340543,0.718293148501,1.41615919733,1.3831124132,1.44502303303,1.50938618074,1.4960378362,1.26621001905,1.19979785985,1.13949823366,1.26260740533,1.18842258264,1.13179370446,1.19829418126,1.18649765043,0.357340966286,0.505504113546,0.403386799782,0.47254420438,0.406811319098,0.354977405186,0.389891632384,0.468162323351,0.575365426965,0.685212980807,0.615417027356,0.714178616324,0.679944863152,0.611568067571,1.05931890724,1.14603899837,1.13314190205,1.08705504168,1.01265990019,0.997607049265,1.73299780338,1.66229279512,1.67660973246,1.73900353269,1.59677354569,1.60509056808,1.74664945078,1.74726652591,1.80958688294,1.87371114906,1.87230823155,1.80759620393,2.34092813869,2.34313957333,2.26797161154,2.19680911621,2.2578705623,2.23018889847,2.31063677457,2.32649543046,2.16576881884,2.17781994591,2.12027490499,2.11131007118,1.97977340288,2.03515547609,2.07633221543,2.01586072076,1.99680720391,2.06145314522,1.93843326058,1.94297160651,1.10666170834,1.03524451054,1.0544346357,1.11508262402,0.970274671177,0.981118606942,1.24062924634,1.30350200274,1.16602007401,1.17033703055,1.2978795069,1.23063522589,1.4585453065,1.58771654125,1.53038101167,1.44794720894,1.50867523724,1.57656544902,1.69245196193,1.69871373231,1.75591792407,1.82351989411,1.83915002396,1.77773725771,1.85297837009,1.90983919952,1.813465457,1.88982435329,1.7170282896,1.63980821229,1.75645812625,1.77608073581,1.67940825424,1.62169800543,2.2682377463,2.30471194721,2.36471720041,2.34589948844,2.22999934881,2.21207678721,2.16089921988,2.23913782117,2.25411628947,1.8364974581,1.79495147695,1.87219389601,1.89280778035,1.73962383165,1.76068345707,1.04118334348,0.97244173503,0.909102352097,1.44420974518,1.31446841159,1.44691372672,1.38336922789,1.18064953389,1.25096220729,1.19484765378,1.25793317001,1.46492579149,1.45871209154,1.39983751534,1.329027831,1.19988692159,1.05226131905,0.524099439732,0.643769251507,0.568627083952,0.584616593745,0.658806771863,0.532409825353,0.562712777432,0.676123893282,0.68330936945,0.638789907759,0.57569865875,0.832695935974,0.898267820228,0.963350298982,0.969714275838,0.447365033721,0.374656352987,0.31942500887,0.351145515883,0.88590722859,0.814092388358,0.933265718811,1.00923379007,1.06605977528,1.08041378168,1.010117467,1.15197956083,1.13855285195,0.507425250705,0.627443534008,0.584283355968,0.603884795085,0.533750276051,0.479673207592,2.14045181647,2.20173628625,2.172762011,2.25357943206,2.27092599,2.10134262223,1.98427618114,2.02493346037,1.96779584091,1.17525872726,1.10596101317,1.18777281924,1.11626139644,1.37667902728,1.31047496976,1.24164077828,1.24035578043,1.32254084277,1.38717060625,1.25110713753,1.2452315691,0.786072253876,1.09805037503,1.06256553322,1.15293142319,1.13859852331,0.751834162056,0.796104326961,0.873799542873,0.904927226353,0.641383701646,0.668492933688,0.837530578806,0.770673242924,0.697638071881,0.497695075305,0.564366985943,0.498224372552,0.569071436144,0.969981302872,0.97832137342,0.972428457646,0.843847376767,0.915928994116,0.937024749966,0.897628741796,0.893139251464,0.770240901253,0.8072071322,0.70661289373,0.636164436512,0.446623969548,0.592902308906,0.504705724011,0.57560140543,2.11602204364,2.19758038683,2.19041309255,2.05597945209,2.13317421217,2.06599679357,1.1723253011,1.17468042899,1.1043315843,1.03675616402,1.03909671397,1.10893919997,1.37670572836,1.38223324938,1.30921942469,1.31178935248,1.44534569473,1.44832799451,0.80626409341,0.757988301917,0.864603997233,0.789706504037,0.693847963475,0.626361664377,0.700568972286,0.630458081779,1.06864852444,1.03255587109,1.14749499912,1.0930442861,1.1583143379,1.0555397595,1.04627901945,1.12383278087,1.11642763148,0.988558813822,0.918107013481,0.986643294016,0.841120566835,0.913571545155,0.775531466356,0.92269149318,0.831278106505,0.900330240956,0.900666611223,0.760961890299,0.834298958277,0.763659113404,0.652366011906,0.693538983325,0.593537717145,0.666912764041,0.818466823125,0.771235669702,0.694075061131,0.667160818582,0.794422713225,0.720827092916,0.879252603249,1.02532780992,0.979616939218,0.906200335264,0.931381174585,1.00380166833,0.860166101835,0.862593348396,0.788524757089,0.737259215528,0.784758104649,0.57747843932,0.469626427154,0.543999229374,0.427408736845,0.469893168104,0.544410345391 }; const double THETA1610[NST1610] = { 3.16383736864,3.22592112967,0.447316867188,1.77438754874,1.6955163572,2.8905268851,2.81187973107,2.93541301582,2.89324955894,0.165367712105,0.892869119268,0.477350922799,0.433691456685,-0.131762220569,-0.0187543814041,0.0395478975425,-0.0740850335772,-0.0868891466392,-0.0276271829491,0.104404587802,0.378992590377,0.37132350609,0.328481047478,0.175753815553,0.247652363501,0.181349564627,0.361816810972,0.365928282068,0.334151990279,0.324372776637,0.253886155326,0.254207592292,1.45531094029,1.61217300278,0.776479725384,0.920269841299,0.861523880524,2.98193404035,3.1355116209,3.13172749008,3.09091674083,3.01710775312,3.09405945793,4.49894222206,4.20609280948,-0.138887839085,1.62241726986,1.50729474651,1.58136011861,1.58784486827,1.82754577154,1.84183702837,1.68801827071,1.72999098369,1.80533412359,2.03524077925,2.19055131979,2.27423945576,2.07542681992,2.19497423591,2.15386246534,1.92016295312,1.9592087451,1.9594227112,2.03756759764,-0.343067455217,-0.202269450291,0.755720218983,0.46689753239,0.539215208107,0.825207010877,0.731135827648,0.644812141887,1.37910112309,1.50539230207,1.4895459297,1.45794607039,1.73350639545,1.56942990751,1.59172882754,2.75204363003,2.87569054096,3.24188545754,3.27337329958,4.6668639341,3.43622473913,2.739766237,2.82553101282,2.92196766822,3.00641894925,3.00711347161,2.92662775853,3.0136646349,3.17348217862,3.12983376365,3.05171397998,3.05271954454,3.13483780523,2.68908530304,2.81001523625,2.77372443915,0.49368262318,0.571415024296,0.457359097338,0.475335722665,0.864546270109,0.960535147896,0.934611894884,0.669393942479,0.830145297376,0.78868295216,0.103674323658,0.212328818786,0.182653950831,0.316934596137,0.237674290072,-0.0567020788071,0.00358314932545,0.687189683566,0.7627810453,-1.5431810216,-0.171259170246,-0.0454944567591,-0.117010206257,-0.00563888198299,0.00806136699341,0.0818230131975,0.135309228173,0.194208000168,0.197985517197,0.11105045368,0.0478133940745,0.124041770697,0.0567878084602,0.333656172779,0.242675985436,0.238468671957,0.387748506241,0.328493517598,0.915625401273,0.993009113697,1.30865541428,1.36221147158,1.19607031889,1.06486234798,1.19571594007,1.32591831006,1.33525297698,1.63723783122,1.67365612708,1.56506400185,1.055740994,1.13158478408,0.970812879259,0.888747664323,1.3648882758,1.1883038206,1.15996738906,1.39308926377,2.4670367303,3.09243613282,3.14955221193,2.92439261172,0.678024550631,0.0801467441636,4.35790743958,4.2659588401,4.56163858223,-0.0981591357556,-0.157619466442,3.13482335784,3.08819005963,3.25577418181,3.21122139618,2.04259227719,2.08929127136,1.92193690146,2.05332614377,1.96469076576,1.67256899333,1.72129025786,1.80011308295,2.07168672109,2.12764231661,2.17968001607,2.14879846802,2.31699081083,2.40981609113,2.4411174995,2.39683147858,2.28192802633,2.33033024725,2.2684208318,2.3107667288,2.07884514053,2.20202564293,2.15806663462,2.16453257468,2.04007451343,2.0814631549,2.53848192151,2.46407143773,0.992761618563,1.02256927533,1.10695786271,1.08508827323,0.912772132486,0.920129262528,0.751379138436,0.791053748491,0.860179988794,0.793384056672,0.894809804872,0.868042501391,0.679461600854,0.526492094007,0.643804927869,0.57159896683,0.97761668335,0.504288600561,0.555707107637,0.670784847974,0.636778007378,0.422578114856,0.790242110469,0.875112405117,0.824550007566,0.896677791288,0.521713327093,0.544452412785,0.482799435761,0.393039516676,0.663275677697,0.736361298669,0.749656449476,-0.253349895267,-0.182999010725,1.80699166677,1.95781121605,1.92011545504,1.84405596705,1.80996582975,1.85411239965,1.91895378433,1.84393040013,1.95280158847,1.87433039286,1.90685871651,1.96162886042,1.84897313179,1.80186485675,1.7304805528,1.81534657681,1.8491254502,1.58425379574,1.61642554043,1.62546217822,1.69830339669,1.73754727296,1.69716626443,1.03948929615,1.67865528878,1.60325349781,1.72123388383,1.68382946162,1.15814171286,1.36006486074,1.21118514903,1.24438431845,1.15673395907,1.282974685,1.22610153215,1.1997384592,1.2515228325,1.32973416107,2.87979923947,2.91374345668,2.62810818183,2.66398451712,2.97464657457,3.01050219214,3.00538713272,2.96728282181,2.88747038999,2.12492761062,2.20400657777,2.15479551114,2.06221659301,2.35573305069,2.36946849835,2.26292248857,2.26212955237,2.45447090108,2.46873389466,1.5063176579,1.60365797945,1.77758678916,1.91941667403,1.8352378134,2.1434834912,2.016121984,1.9866790594,1.30885073605,1.17698667871,2.26851743056,2.34953776925,2.3431614241,2.27387232999,2.82016620039,2.76089843534,2.66266429008,2.68517586554,2.789626489,2.59828841569,2.69755891125,3.02969683318,3.10688420932,3.25638812238,3.62719635714,3.71069411488,3.88029845112,4.2061250649,4.54515946384,4.62406199024,4.66084774904,4.61888163078,4.63349761279,4.57275954718,3.52093847864,3.6865224116,3.49713990379,3.6297153872,3.5492909098,3.30140342294,3.38472825881,3.41687065279,3.25435406792,3.28841249591,3.36798845444,3.17800349951,3.26414757162,3.32817674229,3.46222723514,3.51022959709,3.0525663795,2.9153144949,2.88121420626,2.98038869581,3.04231530035,3.13241343456,3.17543388203,3.03861494548,3.14782968372,3.11749747051,3.10222125411,3.02534918545,2.99232815858,2.67266357125,2.75338840462,2.76283973217,2.7990052583,2.55589205538,2.63638326732,2.68084045671,2.64330953352,2.52078633398,2.56345690796,0.620223359092,0.723703776693,0.469609790395,0.504419102532,0.589927354536,0.640972332293,0.519340501005,0.605603436184,0.356190223999,0.986181910333,1.08473462361,1.11555647705,1.01297634704,1.20982153726,1.20672437296,0.765170773527,0.800903519447,0.743897183072,0.6551409133,-0.0314157782597,-0.0937075568101,0.0885566324896,0.602363150864,0.554927163455,0.583325085244,0.659350245513,0.912013366764,0.93796625712,0.887296213285,0.811215938096,0.134919679651,0.0077024360458,-0.0261885246074,0.0168308020033,0.0493801679258,0.0723340400477,-0.631601653003,-0.201382935901,-0.580948065836,-0.241395486943,-0.25660185779,-0.327392179719,2.25735362463,2.79987054149,3.82147361654,4.03906315075,3.45087768846,3.98543074138,4.59289286866,4.43877784436,4.29503798718,-1.00555588268,-0.904168788327,-0.782216507234,-0.603849287842,-0.74110358239,-0.195513116656,-0.0141101009982,-0.00837165282582,-0.257972255676,1.09805190653,0.971041855404,1.02154145823,1.12302027056,1.22303395563,1.14608710892,1.03995980235,1.01343416307,1.11670771674,1.16275187836,1.06622226978,1.13897605686,1.60717105586,1.43587158915,1.21994600152,1.2471914576,1.53135261911,1.58763919109,1.56095285358,1.47781314863,1.37699344339,1.27933201097,1.28482723433,1.44718210977,1.34455499512,1.4206286458,1.00894765793,1.07628840085,1.03181355933,1.1157760588,1.17908295087,1.19518674213,1.04230328752,0.993521957642,0.963324757429,0.937907315994,1.13498975598,0.54591067561,0.749963410314,1.30826112288,1.49681364829,1.96994390862,0.604851649977,0.560894474962,0.257007664188,3.0012634408,2.91432371646,3.01730975099,3.7870486719,2.43150728455,2.42006106809,3.10658129657,2.99527731743,2.9960220127,2.9349967459,2.58030614588,2.66540386638,2.77438455959,2.81418370492,-0.0845956903618,0.173472524102,-1.04156770317,-0.242736835166,0.0843098609954,4.60498822957,-0.117287862698,-0.0608502703833,-0.154443140494,-0.0807166391655,3.57727666677,3.20916753781,3.2469483382,3.26071383136,3.22473803292,3.55655171034,3.13039881052,3.08844672101,3.13073863636,3.2139992388,2.208700216,2.2949765631,2.22710233538,2.17266642912,1.70616579803,1.65543841768,1.69364627925,1.78423987213,2.42463792119,2.51247916091,2.43281907253,2.38970094808,2.54819352081,2.50368795661,2.37906001493,2.28463289206,2.25476546457,2.30155462961,2.63505284054,2.62237145351,2.70333612359,2.80261480465,2.85874360217,2.88045161682,2.60036934693,2.68640388528,2.66971588686,2.59913066623,2.74859380247,2.76342147505,1.04642176771,1.1336599399,1.17073812989,1.19659674036,0.921845148151,0.935939267555,1.06640867875,0.990815424396,1.08743742226,1.02633499674,0.396027485815,0.342947801222,0.421287595349,0.448223404825,0.207898980645,0.152098360856,0.289143360039,0.315083102586,0.371020093532,0.35272938378,0.402887782872,0.26540624232,0.419779499316,0.388683963801,0.521101810141,0.602017294792,0.482859576419,0.532203790953,0.617925019947,0.649220844049,2.03153367494,1.95601972239,1.92541135762,1.98838153015,2.05633154923,1.76353292134,1.69907263707,2.00597834422,2.02608353356,2.1755179414,2.0817841805,2.11410811596,2.18731315128,1.81589799366,1.74192381303,1.84002489864,1.87382142906,1.68619445361,1.7256368692,1.3086086892,0.818400231081,0.717331121002,0.607765995794,1.40663257637,1.52445396929,1.42848375734,1.54326483196,1.59402543993,1.53968844114,1.55686093269,1.59446558502,1.5476416853,1.45928315883,1.33886790056,1.30823799707,1.42391075531,1.35975448004,1.44102826115,1.47417162692,2.34261149518,2.37320168981,2.90388473072,2.86894641565,2.78917501494,2.74450057362,2.53877022504,2.61934552603,2.60981022394,2.65518545036,3.00139916896,2.96139679061,2.07015451755,1.93074693394,1.99391628806,2.06172356373,1.98628536076,1.93231445653,2.15451984283,2.12956751753,2.23657528565,2.26105986536,2.19981857072,1.90251988373,2.37898574633,2.26020776822,1.61047119503,1.55671858302,1.83850295772,1.85852265718,1.99821454093,2.07710193416,1.66693245467,3.12690915993,2.04023740465,2.43135053819,2.32264186,2.33899385708,2.44273814776,2.54631673785,2.54102570911,2.42339757292,2.28175006612,2.56840700256,2.56149481688,3.01408299697,3.54304203378,3.03242184885,3.3284564594,1.48268220678,1.5176050368,1.7007087997,1.8043400141,1.97568026429,4.05860379295,4.04015973856,4.05853248057,4.24808065769,4.39195354191,4.33511856596,3.73970452963,3.77856477833,3.54110667763,3.67557468964,-1.39131603223,-1.32674525045,-0.769215239709,-0.734176462576,-0.748714481381,-0.788158746816,-0.873773809244,4.38926472936,4.47420297966,4.30031999055,4.43296873423,4.32177722029,3.91793568528,4.18030151543,4.05196056062,-1.40945493263,4.44483070225,4.5245524849,4.51013023631,4.55545722493,4.6495832344,4.7123111155,-1.52851677394,4.67918407398,-1.46175709768,-1.47422376965,4.28971397542,4.1270736667,4.20117676311,4.12257549546,4.36737708217,4.25189937566,4.28494122251,4.17106992565,4.14006244309,3.92472180705,4.18785887326,3.54925093703,3.57769869716,3.66327666384,3.2706886836,3.45812660457,3.40244653595,3.31317514356,3.01079826298,2.93472798507,2.96786163782,3.1168332251,0.701427052477,0.860048228722,0.833951363051,0.753502659758,0.665344709742,0.612850218225,0.518970201761,0.613327482208,0.500650971262,0.460294547212,0.116366271503,0.0940025515009,0.0572435142206,0.207361896681,0.678903563309,0.707240607281,0.783754115017,0.728853268994,0.833652774963,0.807343233692,0.279099498501,0.177231801374,0.0300015115286,-0.0388467515678,-0.353741499591,-0.283814651518,-0.2346098517,-0.297051514391,-0.373412828882,-0.546376330653,-0.688515343757,-0.618135777548,-0.552398484557,-0.491126606154,-0.381040974955,-0.506080856129,-0.453627850787,4.66415844906,4.59924634542,-1.48180565323,-1.43966474083,-0.710404189501,-0.710520659948,-0.759023651488,-0.129239316244,-0.112524864854,-0.340226674611,-0.217790678772,-0.342173595747,-0.284212887969,-0.536777298077,-0.386225381093,0.155277484891,0.0109192247077,0.00807859245134,0.21092232751,1.34821393664,1.27011847046,1.23940877169,1.64453838257,1.7390014624,1.55968489219,1.59504768059,1.31175737173,1.30588628555,1.41910292619,1.50398829694,1.54207907465,1.50867101975,1.47627800427,1.38487607808,1.40401488657,1.34588457774,1.07078595233,1.09396106778,1.20581109175,1.13172113014,1.22608633539,1.17526204282,1.63709881015,1.78172423607,1.76015457411,2.10451775327,2.38791243984,2.07729414906,2.15828379909,2.00608031607,2.40235039832,2.25376888093,0.382792743669,0.307581420101,0.426603207592,0.47193507209,0.244779094086,0.217228164935,0.433432355138,0.319220866842,0.372935688147,3.36484289463,3.92483338087,3.67487970477,3.05196775144,2.90412489283,2.46058503884,2.84652425023,2.4887393303,2.4625979378,2.51450174316,-1.38625031847,0.0107194006788,-0.130737199526,-0.806688514593,-0.445645894314,-0.467357083798,-0.657907981682,-0.681472324268,-0.231412639881,-0.492391404205,-0.276852965916,-0.0472991120585,-0.321590102133,-0.188986408781,-0.0135984360181,0.0713176539731,3.23208293178,3.40319504299,4.12474967138,3.38290170155,3.2523356278,3.28412093463,3.64731522541,3.33318138124,3.2568980121,3.21935513494,3.26040844716,3.62153948298,2.43326589388,2.34355498229,2.31190489689,2.27059775888,2.25081519749,2.14521778121,2.07490107474,2.19982434788,2.10877316266,2.02923165602,2.16979988024,2.2015709104,2.11352132181,1.79281845456,1.96028717264,1.91900242251,1.83211130394,1.91867830455,1.83754045665,0.260380907505,0.289587423032,0.234208669101,0.178415305384,0.121657695519,0.147952844353,0.342952842273,0.350833354425,0.244920147871,0.247487183856,0.191412715346,1.7175128834,1.79328116751,1.74133557532,1.5974234931,1.53489246109,1.60108826637,1.18941960612,1.32353516891,1.26283325367,1.37096059963,1.13217814647,1.16382371966,1.44457553856,1.38533808435,1.4054760827,1.31368869789,1.28273217274,1.25094094352,2.41227175956,2.49311105727,2.36494975019,2.39791820336,2.48034019988,2.52811482542,2.73587940436,2.78033517764,2.77179297252,2.851842562,2.89550893049,2.86016528002,2.95363631974,2.99721693004,2.84260617905,2.9445062088,2.63985819755,2.53978128097,2.52338541874,2.84200182731,2.87737882331,2.77913894849,2.73304556813,2.60656056779,2.50526102138,2.52959113114,2.73155214871,2.67936354059,3.16931125897,3.19558258162,3.44533291936,3.559328942,3.31700744333,3.47137642199,4.12184017701,4.03406309399,3.96779126482,3.98145380795,3.76744241105,3.83081730194,3.92890746322,3.91385536072,-1.49625173802,-1.42082542449,-1.38500889976,-1.42407577015,-1.53817268954,-1.50203278689,-1.2793401349,-1.30992011821,-0.930033312555,-0.850928655316,-0.928734792363,-0.85737377639,-1.02972903103,-1.0154194274,-0.913074152674,-0.802128789454,-0.890960651949,-0.873746956694,-0.923340919183,-1.00801594453,-0.922843567443,4.23642766675,4.13009435942,4.26031692687,4.15855222679,-1.32423583575,-1.11831509635,-1.11984676839,-1.22989558336,-1.20932158921,-1.30630393682,4.28397895052,4.21373682821,4.19989498822,4.1221097388,4.4141493999,4.50234632883,4.53906573058,4.49533556278,3.80053355817,3.95552059771,3.97460486205,4.43131843204,4.39715137896,3.5255292676,3.67802850146,3.82560329982,3.70105732871,3.77447269223,3.72669645649,3.81369625958,3.88276820355,3.32207241025,3.42103715287,3.43998714774,3.48252640719,3.15884477362,3.26322979482,3.1355457822,3.08738529945,3.2698257863,3.32486557533,-1.16167418381,-1.30977593318,-0.386041539342,-0.601963715916,-0.539811603273,-0.422350582831,0.00136420958789,0.0932019020044,0.00491440067211,0.103628399514,-0.156976214928,-0.0738387038903,-0.0622137279281,0.082519553828,0.0026524886286,0.0893889412247,0.0209919491918,-0.630725057649,-0.663600494532,-0.474548097597,-0.160486050466,-0.217095345282,-0.113501370683,-0.175738984619,-0.251075474174,-0.127525525782,-0.210179916579,-0.193092796937,-0.250710818923,-0.423365732974,-0.282642808106,-0.296862267974,-0.365890188272,-0.544313527336,-0.627693240489,-1.38601129889,-1.24675503456,-1.29599676248,-1.43098680048,4.67946708166,4.59096401191,-0.603012265096,-1.25257759949,4.52519020025,-0.614227709101,-0.455336737698,-0.555848155678,1.28488787639,1.34087930335,1.26547206847,1.76022495841,1.82193659173,1.93030384501,1.99608518062,1.81623242307,1.94638639639,0.816219801089,0.915064760611,0.67292372645,0.594717399417,0.701741634619,0.583134450044,0.681918336678,0.864565385888,0.950846647272,1.00245731526,2.645209272,2.59790029605,2.72676536878,2.76103144186,4.22428989557,4.26703411413,4.35545893333,4.40307949342,4.65688855754,-1.30863235506,-1.27147238993,-1.19571390347,-0.526356253982,-0.697559512073,-0.621153966569,-0.612945596812,0.0370307727462,-0.0630531441522,0.0848412168049,0.218123078213,0.0862168203875,0.0252680868472,0.270822017601,0.200776177531,-1.2732472948,-1.05788730482,-0.915353650153,-1.03676441792,-1.38428656815,-1.44197926129,4.61280022721,4.13223396821,4.0781528809,3.9752066431,3.94084494733,4.08950787455,4.04926992949,3.60064718268,3.4885504437,3.4059594386,3.34392058179,3.35048244349,3.51818781931,3.53609703021,3.7500123626,3.66995476855,3.61819750506,3.64726342998,3.86108479269,3.77970175526,3.72893475271,2.53051641728,2.45929482078,2.53488431907,2.44961084863,2.36624012855,2.37980169747,0.623208391762,0.844488148572,0.361275261584,1.07697932182,1.10150223813,0.470679751838,0.587640816061,2.86333673927,2.82771884966,2.80605603586,2.71123277257,2.40321380711,2.25982337479,2.11204493349,2.09045304211,2.23466528683,2.60035373654,2.25115146259,2.41837072137,2.45804561979,2.6552058576,-1.08411046388,-1.03444117472,-0.94696910884,-0.915010593043,-1.06967270762,-1.01443832731,-1.04985849194,-1.1408544473,-1.15767875313,-1.19352920764,-1.20538999608,-1.32286336096,-1.28886047353,-1.16715243884,-1.20482103465,-1.27742967518,-0.686717077598,-0.576164088662,-0.605790143679,-0.552022639576,-0.819092174037,-0.708755802967,-0.738825126328,-0.858016354599,-0.814559669081,-0.745300411633,4.03504416303,3.82503926698,3.92643037067,4.03912852871,-1.19820244971,-1.0934815133,-1.0841107081,-1.2715782214,-1.16687429902,-1.2501458455,4.66141183839,-1.51157215112,-1.39132053063,-1.44321559719,4.34434959562,4.41407849221,4.32952620311,4.29795618165,4.02374465096,3.85046936242,4.42348047355,4.37920992138,4.38769081883,4.31039163444,4.29918357077,4.26637244881,3.91071351062,3.88007646565,3.99167904282,4.04096435739,4.01665263556,4.02607799017,4.07872301959,4.16058980048,4.0795840523,4.05128770253,4.15733921685,4.0872448936,3.57898009644,3.60468901496,3.55789650978,3.48434104348,3.65441895149,3.60269245851,3.62789789627,3.39887011238,3.47646398375,3.35108323839,3.38079138327,3.45682678949,3.50445153759,3.8681169889,3.94681258048,3.8413814046,3.93956366996,-0.0879490996438,-0.282320262331,-0.198155717705,-0.0946079683226,-0.26120963176,-0.169488555246,-0.226163958009,-0.208544574142,-0.269506684072,-0.54779513936,-0.520956874787,-0.325628123494,-0.385698562528,-0.412139167683,-0.340262164145,-0.462115348819,-0.473720916998,-0.561389863144,-0.675301929201,-0.914016254868,-0.782709299657,-0.94599780058,-1.11995800576,-1.12063018399,-0.988822020872,-0.843708339763,-0.803273617566,-1.33683611467,-1.1306295502,-1.14412951854,4.71012956655,4.58133784108,-1.51410953073,1.47515486365,1.4015322719,1.51437551718,1.47339106834,1.39481600669,1.36239418837,4.52344322124,4.61418153106,4.53218781408,4.48687268905,-1.07964769576,-1.15565530153,-0.842167518446,-0.902138510313,-0.782288215684,-0.80922580651,-0.441311395421,-0.517857319179,-0.589973817536,-0.435116595849,-0.511762077885,-0.590174047338,-0.760518406386,-0.675453514675,-0.66069917977,-0.801491202422,-0.977825388224,-0.936136864074,-0.232814610203,-0.130793101298,-0.313645402206,-0.29230817159,-0.172514219756,-0.0934245737457,4.50769969092,4.22823575813,4.70615217012,-1.3485473333,-1.51842833956,4.29511572282,4.46711050511,4.20516626358,4.29034419543,4.542038494,4.45859353851,4.23557823923,4.29626918532,4.41249565344,4.04396054889,3.99424780722,3.90015984417,3.92609940256,3.45252404555,3.37688709354,3.32144385574,3.36290280899,3.43823139918,3.40095338314,3.3485567908,3.38521317779,3.48492863259,3.52009725589,3.47262624107,3.89103514259,3.9730120837,0.794539264755,0.795091283509,0.971850710916,0.955409402092,0.276118466264,0.415133583205,0.61737226897,0.637937072152,0.801322862366,0.690474047073,0.674750354606,0.812127776278,0.930941911559,0.935949690643,2.74188081705,2.62918627967,2.71105492737,2.57209700654,2.59500061408,2.68338631771,-1.04748688837,-1.08714688919,-0.931604418007,-0.965569053003,-1.04541650772,-0.971514728731,-0.715358878473,-0.799555564053,-0.829394784842,-0.772838951902,-0.686204393662,-0.658855508599,4.50551218046,4.61118357683,4.65857056864,4.60683812125,-1.53631532805,-1.36039179692,-1.38370454272,-1.47548980195,-1.41978645874,-1.50467394708,4.64212021214,-1.55694895969,4.69595510132,-1.5244729034,4.48176857951,4.42411026655,4.60127305212,4.58020438047,4.54121252411,4.46196826162,4.09544774429,4.13593206569,3.959546825,4.00814301611,4.08733092844,3.9977852655,4.10509472022,4.15391348314,4.22496099684,4.14122960945,4.23616306801,4.27074258003,3.9300368122,3.95206338518,3.90183650963,4.01020388669,4.06012152638,4.03038474708,4.27394625498,4.19918120756,4.31684709196,4.28024714285,4.19569383231,4.15773334775,3.73168206376,3.78761417544,3.88314390279,3.8662399268,3.70157869392,3.7257836544,3.82647237303,3.75337512497,3.8488553325,3.80015001299,3.77730266548,3.58426567342,3.65706762386,3.75856470433,3.61295229738,3.70538864876,-0.31014655606,-0.332040680036,-0.423663967255,-0.442689035298,-0.291010238604,-0.309529107638,-0.386669670253,-0.345888492789,-0.420652405261,-1.43327145305,-1.38689363645,-1.4340135814,-1.42560852317,-1.50639915568,-1.50482051246,-1.54573478,-1.51127769267,-1.54874691813,4.6070471707,4.65213015185,-0.962546761897,-1.038511529,-0.918390930153,-0.951083899114,-0.931596620975,-0.988690102968,-0.498843030607,-0.390809014867,-0.373978340776,-0.877835322993,-0.846215353723,-0.768618915017,-0.629798391915,-0.507311791554,-0.726456103871,-0.620936528655,-1.47821723831,4.28878937025,4.23329600383,4.27574743122,-1.29195049522,3.92973415882,3.99167118539,3.8354638265,3.61440105772,3.77672730704,3.7911607828,3.6930873566,3.8161463053,3.86803078964,3.69386755356,3.72256503457,3.75430811245,3.83519816671,0.508285404225,0.438062210408,0.539343135815,0.300702095458,0.240970460996,0.343580439666,4.45854145108,4.52144481991,4.36848581348,4.37333848124,4.46918588348,-0.372978706904,-0.491927636052,-0.350356368888,-0.40872638671,-1.42861057703,-1.38760750489,-1.01437881724,-1.04380415053,-1.38601977872,-1.42561993648,-1.38563064974,-1.30491820886,-1.03073503475,-1.07373385228,-1.06427430447,-1.14397416869,-0.90689110355,-0.738102055947,-0.904980247587,-0.799591163073,-0.877710487486,-0.508974524659,-0.414600835301,-0.422753424676,-0.510369076764,-1.51618592633,4.63648422194,-1.38882687012,-1.45334601908,-1.41655138544,-1.24571611282,-1.31383570101,-1.07967536603,-1.01787635399,4.38333901001,-1.01909904061,-1.10836495989,-0.983363416492,-0.955395054328,3.54658981116,3.61510177553,3.45445727149,3.70128004153,3.60766622464,3.17643172773,3.12862922006,3.28259465321,3.35493971649,3.16475741021,3.21592024338,-0.458061420352,-0.577335882582,-0.486100665781,-0.518216646046,-0.637922753966,-0.607487458687,-1.26162477074,-1.17886666728,-1.30087427663,-1.2522394978,-1.16260241439,-1.12903056208,-1.30722017567,-1.15145825253,-1.26642692289,-1.18785420617,-1.2694526665,-1.19197919258,-0.800288618701,-0.710979848749,-0.599974931628,-0.606804407871,-1.2979628457,-1.23725661337,-1.0550521476,-1.10256174705,4.49730765206,4.41410084509,4.47700065386,4.35034756914,4.39273646134,4.57627762965,-1.5247125195,4.63920604622,-1.56117654675,4.60367350601,-1.53601935947,4.7036150572,4.38894226374,4.44057098287,4.45022640754,4.54279576526,-1.28979681597,-1.24078092265,-1.14610289233,-1.23749157126,-1.08584106839,-1.12672931034,3.60553445722,3.71332282724,3.85597616482,3.83024370633,3.42942490243,3.51351390465,3.49934944965,3.38275263637,3.32539998279,3.29400114201,-0.782279487124,-0.751525048364,-0.674691289398,-0.685653027502,-0.86004340725,-0.840719836607,4.69331622486,4.58919895961,4.54842524117,4.63810158885,-1.55287752811,3.60507213828,3.45277306884,3.47004520802,3.60784668417,3.75957050514,3.73974751123 }; const int NST1796 = 1796; const double AREA1796[NST1796] = { 0.00692599989559,0.00710417279517,0.00690379583366,0.00807252480222,0.00660941358854,0.00698787022317,0.00688049591296,0.00707651260945,0.00679992205263,0.00688881157811,0.00801179453387,0.00660485772371,0.00713085788951,0.00696280001851,0.00691826061145,0.00705474302191,0.00699895720716,0.00655356904615,0.00715469159308,0.00670907193504,0.0066559363709,0.00658217547323,0.00714103511184,0.00708596555483,0.00700878674025,0.00695640006306,0.00819080302376,0.00655929944844,0.00715044689307,0.00687103160787,0.00756553583713,0.00669509932191,0.00696174341006,0.00709333660424,0.00710422980888,0.00688077111082,0.00671692926548,0.00701900357319,0.0069992180459,0.00701791689171,0.00702933437887,0.00691773408958,0.00662555908723,0.00695907423578,0.00693141959828,0.00695610589587,0.00698339364758,0.00717573853945,0.00670848442547,0.00710308646798,0.00778197057468,0.00713264466259,0.00702288513012,0.0069390287544,0.0069253486694,0.00704895322726,0.00714066641203,0.00709038816631,0.00737540316544,0.00695276124416,0.00697929107072,0.00694497967348,0.00730324079724,0.00697484096899,0.00702003132512,0.00712851766418,0.00706325183531,0.00698426229123,0.00697547321946,0.00714925605896,0.00695612275916,0.00706435390283,0.00714598043064,0.00697658990131,0.00691448165359,0.00686466313643,0.00688253804416,0.00677246718143,0.00727564266802,0.00723601911965,0.00689038375888,0.00706475655485,0.00700157249276,0.00700023052512,0.00700007449144,0.00700140082026,0.00689050284167,0.00702883225788,0.00670286837742,0.00692667362319,0.00701051609526,0.00654779955093,0.0067614666878,0.00715886704226,0.00651931079504,0.00680164535594,0.00706859962123,0.00722998024816,0.00692658599397,0.00737913326978,0.00711339202994,0.00694945655018,0.00705060348005,0.00709807018821,0.0069763381191,0.00697886891048,0.0070776443463,0.00693675196101,0.00699838198241,0.00702297011107,0.00693256081662,0.00697870245478,0.00718923751482,0.00705226826535,0.00657404509947,0.00705687964187,0.00688738938208,0.00684135510444,0.0071542462222,0.00664806949347,0.00707705193449,0.00686093944027,0.00704033613583,0.00703885700877,0.00709422945549,0.00692279546971,0.00699795574023,0.0070648305986,0.00700791402203,0.00702788751559,0.00693948460818,0.00703692627638,0.00701445691794,0.00700156547815,0.00699982519151,0.00701080225748,0.00705112420964,0.00693141174752,0.0071056039227,0.00699424492776,0.00701741168611,0.0070250256679,0.00701864158232,0.00700416099865,0.00739945788679,0.0069054375062,0.0067512257637,0.00695035580331,0.00734033103101,0.00647582239145,0.00688520212333,0.00680024897461,0.00741971621407,0.00668478224184,0.00660855345393,0.00822373418215,0.00682054678316,0.00702299779109,0.00699055577608,0.00691852567722,0.00721445310731,0.00683651531091,0.00700377121753,0.00655967427848,0.00661930723441,0.00690066979349,0.0067639462358,0.00710272885838,0.0071804423813,0.00687683988381,0.00656308630704,0.00726754807779,0.00684212723994,0.00673776086459,0.00828105304397,0.00667753794435,0.00747435403421,0.00660547327732,0.00696741744056,0.00705539826914,0.00703184822313,0.00694463509627,0.00702778704411,0.00678391055768,0.00724785202683,0.00711052719164,0.00701933556072,0.00692831055049,0.00702107123575,0.00705279369097,0.00708400627395,0.00707025232897,0.00692743074504,0.00695912069561,0.00706463442555,0.00692537737733,0.00748812911043,0.00714630961803,0.00693255057882,0.0068858176212,0.00712489296072,0.00697411977804,0.00674879657805,0.00727886678168,0.00693077829747,0.00695879514842,0.00691820687751,0.00822890543809,0.00661497274063,0.00695628319323,0.00706637174179,0.00733749225609,0.00696519622145,0.00700140943124,0.00706720715137,0.00698717576541,0.00702433864431,0.00698937508997,0.00696513323465,0.00687842107548,0.00709726460203,0.00701234457721,0.00699545469173,0.00706721319651,0.00700380682123,0.0070462536617,0.00696256155107,0.00690532021553,0.00660701020509,0.00719773277242,0.00662088092449,0.00798923805078,0.00702787174439,0.00663228590463,0.00694101327248,0.00709305936932,0.00692136553132,0.00695160124161,0.00707475228646,0.00693856114964,0.00715338299125,0.00677833682089,0.0069793521361,0.00705789224329,0.00702355759063,0.00690111477193,0.00675020234822,0.00697597355664,0.00663149127897,0.00657154590566,0.00658673735391,0.00679627561521,0.00708630112144,0.00687800713005,0.00692201724068,0.00695732062125,0.0070302351423,0.0069701339464,0.00693616975914,0.00710440024815,0.00691354544418,0.00706673811269,0.00687516588577,0.00705416667583,0.00694385918534,0.00710247076129,0.00798645787609,0.00660283660853,0.00677334116727,0.00675262391302,0.00738039698269,0.00695589844069,0.00706331106469,0.006968311192,0.00699013118587,0.00711063304458,0.00687783598806,0.00693830371136,0.00661788684992,0.00660227829141,0.00703283433547,0.00698828656485,0.00687667411885,0.00704804769703,0.00690538521611,0.00686408978787,0.00716742797545,0.00729158193241,0.00715760522465,0.00704559065801,0.00709995971794,0.00683959915414,0.00772332980663,0.00694030690579,0.00755930724977,0.00721049532887,0.0068301712742,0.00710750037157,0.00683131846598,0.00697128594836,0.00669450381235,0.00728982351842,0.00708676490041,0.00728967626881,0.00701789715213,0.0069704170132,0.00719563428107,0.00679139892295,0.00720209553961,0.00689235727059,0.00698092936343,0.00671241225927,0.00752833178122,0.00665077108099,0.0066344347663,0.0067676219114,0.00729068650101,0.00701377536103,0.0070296744865,0.00696429175261,0.00707640222472,0.00712283734335,0.00696566170546,0.00706455465486,0.00704430908997,0.00697702414908,0.00703745191912,0.00703058469787,0.00670473535327,0.00688715173852,0.006987354352,0.00707857956517,0.00701563648029,0.00693731242727,0.00691319294547,0.00702276647309,0.00714751803378,0.00703713387578,0.00691472981649,0.00690150836383,0.00708657201329,0.00659093502852,0.00702288557084,0.00720329041109,0.00659317273847,0.00723780702929,0.0068359537714,0.00702335827337,0.00697480288485,0.00710394079555,0.00694096741678,0.00706131411942,0.0069909038207,0.00696150932588,0.00769163681173,0.0067746789751,0.00687207401923,0.00692591184694,0.00710754839523,0.00683141632985,0.00659057501161,0.00675658790754,0.00705720530137,0.00721600990045,0.00679057458975,0.00731136667946,0.0071613845972,0.0070108602065,0.00690621221679,0.00700780215877,0.00706384004203,0.00690348351239,0.0070819126054,0.00693648711297,0.00692459699288,0.00711348960346,0.00702749803957,0.00702197303138,0.00699881710798,0.00695059103347,0.00716233457293,0.00692437116275,0.00700017071404,0.00748999711562,0.00700089854251,0.00704652462957,0.00704508957062,0.00705165280081,0.00696335637311,0.00673036856874,0.00735080483148,0.00695497250912,0.00698202044836,0.00705660466208,0.00696205117289,0.00702512486158,0.00699585989102,0.006988988991,0.00703119420535,0.00702522615269,0.00699266179589,0.00696591540835,0.00708190918251,0.00667579639722,0.00705406685587,0.00701690341268,0.00707399174591,0.00693726371627,0.00690801427441,0.00722278544143,0.00715591410813,0.00692313967284,0.00710992447631,0.00696313323108,0.00702601009615,0.00702430950709,0.0070132295464,0.00695965754257,0.0069498894207,0.00699348279606,0.00691486159637,0.00693645574034,0.00704804403335,0.00713228817254,0.00687437112053,0.00700278767488,0.00703453606102,0.0069841449652,0.00701878436835,0.00700354620178,0.00701768501649,0.00708655857546,0.00693511419306,0.00696339505987,0.00709411592195,0.00707401604305,0.00692510958839,0.00702317543661,0.0070142756625,0.00701963632233,0.00706651752546,0.00687170930122,0.00709207036185,0.00708007032976,0.00693818945155,0.00707736201548,0.00697665745485,0.00692387705751,0.00695003334475,0.00712676603487,0.00662163806346,0.00664943299632,0.00658200661046,0.00692687608771,0.00717628711424,0.00675068500963,0.00696944702628,0.0070872193315,0.0069662638797,0.00709624960848,0.00710011288855,0.00707849801331,0.00735295587039,0.00677165102952,0.00711967229385,0.00691513666541,0.00805032380554,0.00677552958195,0.00651541519904,0.00660489713448,0.00697424348068,0.00708971309806,0.0070131530943,0.00657651296817,0.00686330956198,0.00689922459492,0.00699109885928,0.00703571217624,0.00698269592402,0.0070854500615,0.0069860783346,0.00696411030536,0.00706255505636,0.00692576495957,0.00705656811508,0.00703545990089,0.00694809843592,0.00709669985147,0.00693728697182,0.00709758237628,0.00698084349835,0.00709321204493,0.00696819410568,0.0069544197899,0.00706402162806,0.00695814637232,0.00703050881306,0.00705369545404,0.00704605124271,0.00698065595904,0.00704555812542,0.0069725688393,0.00693528820111,0.00700861435453,0.0069288311628,0.00704776353689,0.0069445844184,0.00705706525424,0.00693633372393,0.00709033855424,0.00702728182653,0.00698186584672,0.00659727861711,0.00798752526289,0.00697596717181,0.00706728321281,0.0069425403369,0.00709327306666,0.00759955731817,0.00670416294221,0.00692324227539,0.00703517523794,0.0069859626076,0.00713117064541,0.00693829641113,0.00699702546788,0.00700829198367,0.0070017166832,0.00705895358062,0.00672468322008,0.00704246455116,0.00663008845426,0.00713298619462,0.00690433595743,0.00698881487602,0.00693976136331,0.00705499179264,0.00700113704343,0.00702356051032,0.00704648443612,0.00698478324881,0.00711581883446,0.00697833415359,0.00701679554084,0.00696918030611,0.00698405505769,0.00703805762646,0.00717767995525,0.00702469330795,0.00695827253952,0.0070586204913,0.00697726151572,0.00704003946482,0.00697657580482,0.00691652580843,0.00711398808632,0.00692727886183,0.00705013198352,0.00689362154115,0.00706658439844,0.00673869455572,0.00717155491062,0.00705821320788,0.00695630657192,0.00710443828319,0.00681855748409,0.00684018418657,0.00726536966228,0.0070325151301,0.00701495274199,0.00699487412469,0.0070072836632,0.00704474941296,0.00698283486758,0.00693440679647,0.00694585241881,0.00704450561601,0.00689159028617,0.00663169619377,0.00717445262702,0.00697654374111,0.00689842907392,0.0070551615415,0.00697851480328,0.00695996642152,0.00713858655555,0.00696486224596,0.00690652456157,0.00659811782764,0.00678238296738,0.00682337048679,0.00760231269506,0.00657110585823,0.00674396060421,0.00667743237974,0.00717504633995,0.00790086949556,0.00704874128747,0.00684551118603,0.00693151329207,0.00679465881107,0.0070436065664,0.0070613479441,0.00695053132116,0.00694857231162,0.00704700384562,0.00706336907871,0.006827859681,0.00714735562766,0.00688312518082,0.00673134130664,0.0070008450684,0.00655491026394,0.00705394464078,0.00666718776178,0.00723040512211,0.0081910994342,0.00702243583365,0.00701329917928,0.00695471840378,0.00705150832699,0.00705249886065,0.00697073164543,0.00693355308034,0.00704868014898,0.00696879201428,0.0071775090124,0.00686951034549,0.00713525189208,0.00719321726345,0.00704470940187,0.00696813626889,0.00700210762851,0.00692494735104,0.0071092391523,0.00689223398827,0.00698513622764,0.00704837607696,0.00699116424651,0.00702559030352,0.00708214951568,0.00694828830277,0.00692736654442,0.00699308011044,0.0070111733974,0.00699758242621,0.00706243970749,0.00709762497334,0.00692425699376,0.00701673771345,0.0066803426918,0.00713302375482,0.00681642757311,0.00792775076545,0.00694707682926,0.00698601896602,0.00694809306453,0.00707297964239,0.00702293356505,0.00699299616245,0.00693542974839,0.0070845240509,0.00700451806257,0.00694637092051,0.00686853336307,0.00720233351237,0.00690827023531,0.00713290113407,0.00690977954791,0.00684423480606,0.00715652684653,0.0068667663845,0.00654820393929,0.00672574033593,0.00663420259662,0.00685372829458,0.0070626455687,0.0073837814231,0.00672039721636,0.00685024735719,0.00719602207098,0.00754093313127,0.00698936657229,0.00668078167336,0.0066116049435,0.00740954721877,0.00718120587936,0.00740214199047,0.00673684243239,0.00825923211542,0.00656601645705,0.00706346040939,0.00696436730832,0.00690997712815,0.00704181036396,0.00695384206899,0.00708673601289,0.00695193171509,0.00707757568868,0.00693469335672,0.00725039217654,0.00694067263606,0.00689797571413,0.00713198992383,0.00700671175768,0.00683381495859,0.00704941672243,0.0069446911411,0.00671149532304,0.00671223142753,0.00673856726588,0.00666361046393,0.00682864371094,0.00729503887058,0.00743375806187,0.00687671624427,0.00709528661385,0.00726543718393,0.00671971681683,0.00737488185446,0.00683954598957,0.00698459461513,0.00707458565814,0.00694028231054,0.00703432311659,0.0069204999994,0.00682355280218,0.00688157741015,0.00739962307121,0.00664232943066,0.00732843412645,0.00671893046115,0.00685881901446,0.00693428558171,0.007066429921,0.00695757090781,0.00701421815842,0.00704244436942,0.00694263001743,0.0069730667623,0.00706672985947,0.00697736614079,0.00701719855324,0.00696943121036,0.00720016152196,0.00671612674916,0.00679664903951,0.00672411542975,0.00721364829685,0.00697331740255,0.0071580984597,0.00705490446931,0.00673522056166,0.00692286428916,0.00823222804871,0.00670726040952,0.00703105935255,0.00724025587422,0.00662199370651,0.00700155273068,0.00693599831384,0.00714043407459,0.00691941538839,0.00699109401658,0.00691952077584,0.00700760311593,0.00674017776088,0.00658790275606,0.00678292818614,0.00703183421726,0.00783060719923,0.00701231953034,0.00672061275586,0.00715807218984,0.00773513395844,0.00703193928824,0.00771830931684,0.00665168691099,0.00678069559928,0.00668566405984,0.00767697441649,0.00674417453732,0.00659463142447,0.00704213681748,0.00698310837269,0.00701462439121,0.00693548920565,0.00696416162184,0.0070754979926,0.00710565144252,0.00692390103978,0.00690379317887,0.00711715368436,0.00702239025907,0.00698591503229,0.00707755700571,0.00711596808133,0.00711971242259,0.00691486402286,0.00669726161546,0.00660410749282,0.00784458513399,0.00672033053756,0.00802507549139,0.00684360260913,0.00678042798848,0.00743643517919,0.00667753465514,0.00712757579599,0.00828689957365,0.00672381096081,0.00700961211531,0.00691407115748,0.00694046652177,0.00707671406271,0.00692427167701,0.00695479296041,0.00653112980305,0.00713224476109,0.00707355592145,0.00696864374323,0.00701820076052,0.00707343299798,0.00700435783238,0.00700035638225,0.00711186664936,0.00703023571092,0.00700393276393,0.00700263541043,0.00705591295516,0.0069363331546,0.00709107042018,0.00699982728378,0.00703646428796,0.00696850495954,0.00708546069591,0.00707548533321,0.00732026377152,0.00688261845831,0.00722797798321,0.00675434099847,0.00686586268454,0.00715713663336,0.00681053077337,0.00708099578685,0.00731135987288,0.00708962165709,0.0069078105268,0.0069142180866,0.00706759639596,0.00695075652359,0.00691583196667,0.00678080718755,0.00683067584636,0.00675624121394,0.00716616963533,0.00674586901948,0.00711682624432,0.0070563411658,0.00693205710304,0.00696516619364,0.00703767889933,0.00679003979189,0.00686623155429,0.0067242720097,0.00720219607439,0.00806491653039,0.00668588795145,0.00665766492693,0.00741971594367,0.00680636081594,0.00678869557314,0.00733069239398,0.0073704765793,0.00688116937152,0.00686561532116,0.00684628606586,0.00715456780568,0.00709882333608,0.00695242619852,0.00702848351306,0.00707620824385,0.00689695223834,0.00711499713025,0.00695772391909,0.00702602060582,0.0070764893654,0.00696758603615,0.00696184121912,0.00706951904797,0.00693350844199,0.00707649301208,0.00691259547265,0.00709559941659,0.00702961874049,0.00697735092874,0.00723679568063,0.00688133736496,0.00722469931215,0.00726037131385,0.00709512325988,0.00798829723588,0.00692793232935,0.00700162110194,0.00687365445791,0.00712861856912,0.0070314512142,0.00696767179506,0.00708152794344,0.0069320080703,0.00708860212007,0.00712687172534,0.00699927977363,0.00704009864065,0.00685741398069,0.00704012654997,0.00708217446417,0.00691456974121,0.00690265640108,0.0069179437856,0.00704798027965,0.00715891531778,0.00687660339019,0.00703291370222,0.00709204015989,0.00713551227171,0.00690269995775,0.00699945484837,0.00702236381515,0.0070000354444,0.00697687903858,0.0070435869755,0.00688522646018,0.00674744179447,0.00676410582306,0.00703077759555,0.00697600036793,0.00742883462724,0.00680423611861,0.0072129638974,0.00683818276413,0.007277368362,0.0070262737934,0.00698296542585,0.00713064510109,0.00695583950895,0.00658122970894,0.00690366388816,0.0071514792486,0.00712108677602,0.00682473509221,0.00667193765687,0.00714706006611,0.00757167946538,0.00714893634884,0.00698608176871,0.0070950932027,0.00705362407944,0.00695533439187,0.00695016529824,0.00685420701176,0.00675106141764,0.00729843765256,0.00691878319258,0.00694956394366,0.00687907757902,0.0070678698215,0.00708795289555,0.00691685532469,0.00707026212367,0.00693124513814,0.00704648264306,0.0070127173775,0.00702711488678,0.00700146121624,0.00695478284922,0.00705613559951,0.00697371494589,0.00697919337332,0.00703173761272,0.00702600772746,0.00691886152957,0.00696781377582,0.00702035219919,0.00691191117918,0.00708753839457,0.00695556870296,0.00760712811945,0.00692250535787,0.0071288898314,0.00671791940005,0.00660737639473,0.00796876715362,0.00676810605304,0.00696014490486,0.0069834324995,0.00681087195954,0.00708941043477,0.0069202504086,0.00705599466958,0.00712349296587,0.00696885505635,0.00700325011055,0.00709621304522,0.00697498411866,0.00693022399553,0.00700732972091,0.00702209764383,0.00691506332805,0.00709705888093,0.0068553791454,0.00669326444274,0.00715600879065,0.00711640330219,0.00687251339463,0.00712183838134,0.00710898688726,0.00693788288183,0.00701376317805,0.00691945622453,0.00704517784263,0.00693141137143,0.00709202901252,0.00695634043423,0.00706441123049,0.00694148291639,0.00722127711854,0.0070589672735,0.00676706650175,0.00701714077466,0.00699779641075,0.00695714727233,0.00706204307725,0.00676477177912,0.00726780527202,0.00661751845187,0.00706485351227,0.00712020658053,0.00703758726918,0.00694914128949,0.00700688472124,0.00701038932285,0.00708624690954,0.00695531629861,0.00694822953607,0.00703172591291,0.00700006368888,0.00709555433015,0.00701708727425,0.00698753995218,0.00701871440755,0.00702038940333,0.00700105258767,0.00703425762726,0.00692504253025,0.00701991047439,0.00711072847778,0.00700195342611,0.00690337812577,0.00714625265134,0.00777904255592,0.00700549777739,0.0078217932183,0.00680605154397,0.00695742338406,0.00710773144897,0.00666890013837,0.00714336353051,0.00697786904395,0.00702588967659,0.00670877383597,0.00697917712791,0.00668747153236,0.00677184178718,0.00683742365457,0.00696849876369,0.00706757938552,0.006923855895,0.00692393156672,0.0069451075532,0.00706788794213,0.00707403269257,0.00693515828569,0.0069791799731,0.00699146744658,0.00707605917654,0.00688249454224,0.00675992187496,0.00664214901485,0.00660392553603,0.00661246169941,0.00695853003924,0.00704160192517,0.00698439361977,0.00704619839098,0.00690177048816,0.00686528052203,0.00731301386896,0.00678094089378,0.00680628654401,0.00732032508143,0.00659030459889,0.00694682790933,0.00689758911083,0.00719934763455,0.0071158794948,0.00713407785278,0.00690442584121,0.00693673380757,0.0071486644184,0.00695145960108,0.00706411726801,0.00703944823034,0.00698833122206,0.00703039531949,0.00699131313353,0.00704414804418,0.00697766329128,0.00705034471766,0.00699321857482,0.00704023797445,0.00698537842312,0.00698491634199,0.00705459580093,0.00824879912585,0.00665214266516,0.00706857087715,0.00660417149871,0.00717304056646,0.00665181938994,0.00699515063355,0.00700471070525,0.00706965527651,0.00694693260134,0.00700971209938,0.00698051800281,0.00725630853366,0.00758356360493,0.00694464934645,0.00680968675523,0.0067444870777,0.00717206507577,0.00675177800254,0.00752626505665,0.0070719425006,0.00713900439373,0.00675887906795,0.00703455349558,0.00662249363543,0.00682047324881,0.00663906679091,0.00674069226154,0.00645859474561,0.00697325790624,0.00693672141891,0.00702409734347,0.00692753024042,0.00709246932932,0.00705461767775,0.00697357961393,0.00692236661886,0.00710878472444,0.00696066072924,0.00703442097089,0.00706983857272,0.00695400620922,0.00694540976718,0.0069225668293,0.00703599586858,0.00694424146936,0.00712316054864,0.00699125581705,0.0070204186872,0.00696521241187,0.00695251622263,0.00709129854654,0.00702474362731,0.00721575930944,0.00696310755231,0.00687712631776,0.00701939301518,0.00706792904797,0.00695323488054,0.00690846065269,0.0071102262541,0.00684853859009,0.0065699277637,0.00673384393561,0.00666610386814,0.00691501729606,0.00674931100769,0.00676516155442,0.00719390117576,0.00736565491063,0.00659036525981,0.00709703592387,0.00692008811026,0.00702189004768,0.00700658403117,0.00698927071172,0.00691334716503,0.00713805428187,0.00686867025479,0.00659004427511,0.00725387253227,0.00667090845729,0.00806508637976,0.00682696980723,0.00676500227747,0.00658311439696,0.0068684386673,0.00644764941457,0.00666929695215,0.00704322748874,0.00680904270948,0.00749244826637,0.00656312049623,0.0070699807821,0.00689969590842,0.00702404028817,0.00700704557025,0.00727634732527,0.00677919644431,0.00707624819161,0.00713639938464,0.00687949005143,0.00691592225726,0.00691321942719,0.00667776175845,0.00745372340055,0.00716088623672,0.00698558606599,0.00717871706191,0.0068125053018,0.00655260933412,0.00797792274381,0.00671888115901,0.00717711786754,0.00707373222504,0.00663803353293,0.00691720341273,0.00658273308459,0.00709561668236,0.00660458440796,0.00829815523083,0.00653505880435,0.00658114339355,0.00802089060697,0.00677571493708,0.00693803775819,0.00707634650948,0.00705346624525,0.0069589742408,0.0068144893074,0.0071223612017,0.00721914065647,0.0066992822863,0.00666320404861,0.00730782243262,0.00828980107678,0.00660129914939,0.00659347360565,0.00717182320947,0.00708237855596,0.00688204269942,0.00703494685113,0.00695515291451,0.00693510256786,0.00707199014843,0.00736066563946,0.00678740475478,0.0069121729289,0.00704688139945,0.00695796519581,0.00706504444321,0.00691430497017,0.00692810352597,0.0068148038111,0.00717034476581,0.00687280577978,0.00669682565738,0.00691775229858,0.00703491437681,0.00683701186241,0.00671496079573,0.00675065131444,0.0073409325411,0.00676693820999,0.00714297491428,0.00691735158533,0.00704044097524,0.00696105969997,0.00694181242077,0.00674458207311,0.0070763441664,0.00695836667903,0.00695330319374,0.00704576052532,0.00700275462108,0.00704120043323,0.00693415398266,0.00692681680435,0.00705380931419,0.0069635173542,0.00703074812378,0.00693067653402,0.00704702969223,0.00696612696363,0.0069145480293,0.0070864038371,0.00699490936998,0.00704905426288,0.0070313943323,0.0069729791354,0.00695390580269,0.00699524570794,0.00703858761505,0.00699481096471,0.00677602138521,0.0066207328033,0.00672833168557,0.00686074497142,0.00661082469561,0.00698967025136,0.00705449782874,0.00698427542975,0.00702392280601,0.00683013259135,0.00669170402321,0.00683772460393,0.00709250236348,0.00726391944077,0.00708860840408,0.00698185623603,0.00701507198124,0.00695895866185,0.0070969877944,0.00694041751728,0.00695300622561,0.00708309770471,0.00701139795681,0.00701667848424,0.00714819975526,0.00658005819838,0.00690268575106,0.00698124596769,0.00698698402838,0.00703540049684,0.00690696602983,0.00690179433143,0.00687378656583,0.00719850837399,0.00708635915189,0.00693934759132,0.0070093959428,0.00720731664492,0.00679119429938,0.00673699746512,0.00723879879097,0.00662039530476,0.00658661793646,0.00689618521246,0.00677687081112,0.00659243930946,0.00667712029257,0.00671806895787,0.00691538598049,0.00665543473781,0.00669415400131,0.00667163775785,0.00711893243298,0.00709668102798,0.0073885028229,0.00682867265505,0.00693352743396,0.00692152549764,0.00710519840775,0.00707015065227,0.00691149036682,0.00713508810108,0.00671083592525,0.00694289435182,0.00707439436788,0.00698029255783,0.00703989625469,0.00695806032516,0.00708014802419,0.00656307466572,0.00724117565553,0.00685432967812,0.00704451797697,0.00695300837394,0.00707491466348,0.00708888540202,0.00700554745422,0.00695378292636,0.00704845054375,0.00707415771971,0.0069474913979,0.00700225707517,0.00700508302964,0.00706288217221,0.007080808322,0.00693813463236,0.00706759939875,0.00701016129212,0.00691787128127,0.00667767219259,0.00719844820715,0.00705493576558,0.00696686745952,0.00696392502303,0.00704757093023,0.00706217573884,0.00695500961636,0.00703924887379,0.00697922454807,0.00705498139366,0.00705471322417,0.00695053431118,0.00701204533835,0.00688273450999,0.00690038810986,0.00695416315389,0.00707928851465,0.00708662322284,0.00691670764493,0.0071181381366,0.00671263331949,0.00697531124144,0.00805892850628,0.00691116535222,0.00685956518293,0.00727982975889,0.00662653857781,0.00803585001051,0.00660578488276,0.006980638691,0.00699787383399,0.00703974829417,0.00699736992461,0.00703430179564,0.00698635007395,0.00695810329586,0.0070052233588,0.00699228510336,0.00702971609581,0.00698858335906,0.00710161507669,0.00693344022921,0.00715979029702,0.00706077141112,0.00707974613861,0.00693426766286,0.00710279575384,0.00693133389719,0.00697549618531,0.00694456797816,0.0070734100023,0.00691052341417,0.00708144971397,0.00694823967887,0.00695227603957,0.00702424428234,0.00697109366254,0.00708724826923,0.00709304022186,0.00692589971949,0.0071937380677,0.00686663186945,0.00692658352657,0.00710493989607,0.00690726769365,0.00663587052154,0.00675588451467,0.00675936946632,0.00703195651333,0.00693864069242,0.00701490346602,0.00697165234381,0.00705749700671,0.00695827321796,0.00692224691608,0.00709647170227,0.00691120795264,0.00711247105941,0.00694805015986,0.00706667363767,0.00704291722141,0.00693024304332,0.00698307509276,0.00693918344167,0.00697577919853,0.00703053745986,0.00700011823991,0.00700781176187,0.00698276016195,0.00705176611085,0.00695215435631,0.00702990241567,0.00696809749615,0.00693355051203,0.006995757056,0.00702699145647,0.00693076182555,0.00712372562107,0.00692460485918,0.00711150034536,0.00699997626213,0.00704187390623,0.00698637726865,0.00704082354065,0.00699760220016,0.00701666906233,0.00710415045803,0.00705642380606,0.00695866679661,0.00697564507867,0.00695821244866,0.00705052360465,0.00703937657848,0.00738900209034,0.00685885805472,0.00707139910427,0.00716957840939,0.00687265774065,0.00689710084998,0.00670582200831,0.00714611332748,0.0066751572743,0.00714818843961,0.00647283105396,0.00771350782983,0.00667353954592,0.00716940166015,0.00771589635721,0.00669752509554,0.00699566626996,0.00700085571423,0.00694521601756,0.00708433894054,0.00730302748767,0.00675252467021,0.00687694479868,0.00683112140993,0.00687223374918,0.00715032306388,0.00705314434239,0.00722995982508,0.00686486067534,0.00710907022903,0.00697799537142,0.00665661009537,0.00703818260728,0.00688184907591,0.00705368102926,0.00697279218043,0.0070154479075,0.00703539517559,0.00698767270853,0.00694173484084,0.00696334053076,0.00706801383525,0.00702476321383,0.00702113202665,0.00697440239308,0.00691004431288,0.00705060541724,0.00697310590178,0.0068907442756,0.00684563448324,0.00715190005046,0.00700398260086,0.00690828430608,0.0070517594985,0.00694342091691,0.00714152448559,0.00685345798693,0.00691755012831,0.00690251581025,0.00709203070155,0.00709534292426,0.00711054449588,0.00691377541966,0.00713130819899,0.00691776468412,0.00711586298591,0.00691537761489,0.00689398783159,0.00716266415962,0.00709456188976,0.00690498606947,0.00667051388863,0.00657179330403,0.00680676553696,0.00662411437056,0.00685333554408,0.00688241001968,0.00719694149992,0.00721446537719,0.00675487167197,0.00733719555686,0.00689552478145,0.00713520624968,0.00674082233096,0.00715696295932,0.00670722549904,0.00660356539518,0.00715184202052,0.00709014741161,0.00674748173244,0.00695234437487,0.00659792677842,0.00708811292431,0.00664071206897,0.00702509957415,0.00702840085658,0.00699629269088,0.0070044710697,0.007018634346,0.00700431531906,0.0070007227246,0.00694647896823,0.00695090949577,0.00703333695666,0.0069375952762,0.0070505024627,0.00688498378668,0.00717649325742,0.00713405875989,0.00695354945572,0.00707185705981,0.0069196884462,0.00694024993937,0.00692636843992,0.00699230018789,0.00701153876734,0.0070277613519,0.00694965593393,0.00708905577956,0.00694244127986,0.00710425957381,0.00710062887571,0.00693684719583,0.00680394575516,0.00665766440832,0.00713935932353,0.00676062137672,0.00675775034594,0.00756413469772,0.00695446039028,0.0070148728282,0.00701101848802,0.00701471600013,0.00697790448346,0.00705218581173,0.00695295826649,0.00691223872775,0.00701968971356,0.0070072470255,0.00695432802686,0.0069930823042,0.00704423268506,0.00701120537132,0.00696414228546,0.00697136022398,0.00705714427342,0.0070596335074,0.00697336726551,0.00694553159555,0.00707445671119,0.00668382528116,0.00665551659927,0.00664681056243,0.00666907756478,0.00690745102881,0.00690143485603,0.00708812163381,0.00721407679825,0.0068595557068,0.00708106535329,0.00689943117646,0.00706467224958,0.00695575551823,0.00719326462853,0.00690546317992,0.00684735025877,0.0071191834716,0.00685328606898,0.00713580795614,0.00692061023261,0.00694357539324,0.00689865131516,0.00710100952774,0.00680494567949,0.0071718167543,0.00705355233406,0.00693451019707,0.00712536686411,0.00714396229503,0.0070435179424,0.00692078100539,0.0073799915175,0.00665851658922,0.00829482308249,0.00661527327239,0.0066460060289,0.00676845878284,0.00665167209091,0.00692467877869,0.00703443216665,0.00693672932187,0.00710041834074,0.00703844412355,0.00706653993023,0.00696570918528,0.00699274061028,0.00704325445675,0.00707112053857,0.00696089555998,0.00694194077148,0.00708690175442,0.00694187400432,0.00693089286126,0.00693209602284,0.00658593648311,0.00716945032053,0.00704946846858,0.00696044657262,0.00700589448648,0.00700262412195,0.00699524672613,0.00703713707965,0.00705352819275,0.00695259508204,0.0070808954424,0.00695774891272,0.00703756050349,0.00698922425644,0.00715832999692,0.00690333534926,0.00709111768162,0.00684938878564,0.00697884556386,0.00699075366144,0.00658983167649,0.00786648844821,0.00694967475262,0.00808330402047,0.00663001405852,0.00703734963743,0.00699122492928,0.0069674636432,0.0069835071021,0.00712538142467,0.00681271003918,0.00685945668413,0.00696661603323,0.0071497072586,0.00674273564895,0.00695717756443,0.00702536284083,0.00706772707225,0.00693842921102,0.00699755750839,0.00714084871423,0.0069297110427,0.00700855070996,0.00704576333846,0.00683687623979,0.00725175278027,0.00686792169501,0.00735145151511,0.0065974383155,0.00678266406227,0.00693381152909,0.00713273758931,0.00684848518757,0.00695006810902,0.00697426167172,0.00694994183701,0.00705346240841,0.00689486751628,0.00705864187498,0.00703392675884,0.00701329974064,0.00695234925879,0.00709051767033,0.00696201180521,0.00701071220916,0.00695515208297,0.0070340367342,0.00704961745685,0.00698711609104,0.00696630976862,0.00706519979436 }; const double PHI1796[NST1796] = { 1.58420912087,1.51101882331,3.04302378009,1.87312173349,1.93584936399,2.14511559175,2.28471900732,2.30983528622,2.80690693406,2.19770356865,1.74751082084,1.82370508787,1.83363620784,1.52713315956,1.50740662462,1.47939760106,1.36036872367,1.41834591208,1.48305783666,1.05832494016,1.20458468179,1.0729596368,0.998762256254,1.00563388938,0.0519493458812,0.4998107985,0.496449696587,0.410111432835,2.78924346987,2.72652156045,2.65911153052,2.72279028846,2.34070716885,2.18903972576,2.13899896125,2.2110526965,2.41642804733,2.14816493571,2.12563289709,2.1746312025,2.18511361536,2.05321756303,1.98622808547,2.10272933652,1.83603962743,1.8251450989,1.89492925555,2.00250291571,1.8835848715,1.93122354515,2.19433879698,2.27776053324,2.15147412122,2.11964683053,2.1733855357,1.42902727021,2.88020694212,2.55854723563,2.75787968128,2.76845494232,2.78779064683,2.64847082596,2.69390491721,2.29169935343,2.22312765296,2.26777904607,2.31768204004,2.38193230691,2.33306302307,2.3298328036,2.29753770411,2.03822487661,2.02974395359,1.90289449185,1.9610442668,2.32648988857,2.31885305644,2.4579020925,2.39636878418,1.85627375996,1.78068230409,1.56390150862,1.61057273475,1.6814255614,1.36854164365,1.43986623544,1.91118636776,1.43317510718,1.35927272045,1.50047805683,1.45320690011,1.21278132478,1.13822629268,1.06535030195,1.12520215362,1.38020858902,1.32590591929,1.25064106318,1.36576995487,1.33657122814,1.28244679703,1.35277402276,2.19458095454,2.13150816414,1.47425861666,1.44009689519,1.92587264185,1.99314365383,1.70183912938,1.77630601804,1.89069754811,1.81573423675,1.79271116455,1.41975985511,1.57294179028,1.50194112192,1.76542976174,1.62369649154,1.45047748175,1.47484436607,1.36007275435,1.43070953859,1.00102042759,1.07098160827,1.23596512545,1.16324027696,1.01798651029,1.04669895948,1.79868887267,1.72755296191,1.62273256212,2.21062868253,2.18094256269,2.10521276456,2.16185410069,2.07273198741,2.05824404413,1.913054513,1.29181900029,1.22684035936,1.23127228145,1.36521267271,1.30109121968,1.30765302292,1.56089399388,1.49479396872,1.57079824974,1.43492758418,1.54014848388,1.52804686882,1.57090306115,1.61682208647,1.60777513036,1.66327432463,1.73147144206,1.40743061469,1.46019221835,1.52974791126,1.48336243681,0.975696899313,0.973612636484,0.400532193294,0.44529740282,1.46714384682,1.74085205514,1.3585210996,1.32007882487,1.15207498553,1.08329913191,1.02800592875,1.44031334118,1.41016970352,1.39064822034,1.40014182581,1.44259405317,1.41557040922,1.27317176525,1.32469218711,0.982383498889,0.879946676024,0.958571668296,0.946608362242,0.571229942208,1.2839963028,2.44421055905,2.51791820681,2.66711493774,2.22766814953,2.14225975902,2.15881358585,2.23583745912,2.02480517244,2.09700733438,1.9826058877,2.12699295962,2.25528063985,2.45928781197,2.3071611087,2.23073212705,2.19860402382,2.24091972248,2.63841732549,2.5641156984,2.53264526617,2.25072522472,2.31012123779,2.24151242699,2.30644774792,2.71184376593,2.63371979918,2.89042036207,2.06419136785,2.13975662035,2.21501955888,2.22867302782,2.24664604812,2.26774908549,2.33720217685,2.19108086601,2.0848766895,2.15717082961,2.19377128219,2.15377456052,2.02901480434,1.97266504653,2.04555109496,2.075119296,2.06966687759,1.85352757048,1.78619497868,1.97434643756,1.96014062441,2.09027063862,2.02012272434,2.44051780105,2.37214018588,2.85554819963,2.91268841179,2.96827694946,2.93153300991,2.94958867356,2.57541410418,2.64051420473,2.54844864019,2.42487526512,2.49721942636,2.30132666343,2.37304713331,2.38403896755,2.31055520797,2.25969438676,2.07666977758,1.92729340114,1.77062232171,1.8223864517,1.45557147415,1.47820252641,1.85314095955,1.72834263826,1.80178221692,2.97318794366,2.97979929776,2.91044890952,2.85404288758,2.66570178574,2.7294830238,2.60783975019,2.66039883584,2.68802314851,2.62234321293,2.77715709885,2.18753146018,2.11311876923,2.0757821205,2.22093318867,2.1765447379,2.10609878084,2.3868294402,2.52725429923,2.55851049981,2.58322421006,2.42905892999,2.40165491684,2.40532015145,2.43340588401,2.51160108588,2.4422442411,2.54764977179,2.50550218838,1.78347531964,1.77464143762,2.57700454151,2.5446844452,2.10365326335,2.28163249974,2.29470482023,2.23013910896,2.16570880352,2.08468710246,2.0709757941,2.20657382688,2.15516584542,2.38889843886,2.39348256414,2.51269752108,2.44986374417,2.51555527677,2.45716701085,2.26188898038,2.25966088483,2.18603460443,2.33727541004,2.26824827511,2.21533981317,2.22013312573,2.3393552092,2.27520124858,1.73350670565,1.63765618323,1.71015329576,1.75865728668,1.94091942013,1.58764313311,1.53921714457,1.75516607744,1.68293809913,1.65899689023,1.70619331085,1.20680794668,1.46818062327,1.46030697096,1.55338881882,1.53228877365,1.50284216572,1.5822739522,1.5145416359,1.46630913985,1.58814875905,1.61035635722,1.48975506369,1.56010680829,1.86457497927,1.94169547364,1.86841241876,1.83793999008,1.41790527638,1.3478971082,1.28953925266,1.34496902276,1.43009003473,1.40599485212,1.54691728379,1.52367043415,1.19311309597,1.31473969113,1.24356791283,0.999668032316,1.38398961619,1.3120338766,2.07391083618,2.06767035148,2.30294241589,2.2151154198,2.23667506123,2.18733355815,2.11835402683,1.44913703091,1.4799898169,1.49118018683,1.55388670094,1.7799344254,1.81848952242,1.39408416808,1.46347591112,1.3662751011,1.41000109515,1.66245103686,1.54849613063,1.5883322247,1.6164679694,1.74064674232,1.66685380821,0.947688423164,0.662390899225,1.30933869594,1.62434474444,1.7339325481,1.66189831489,1.60745165997,1.75350897277,1.69831137416,1.47910134778,1.43866963728,1.51411449785,1.53328991365,1.40493032404,1.38357909656,1.58446725261,1.51100609004,1.45635536823,1.47565048827,1.49167921652,1.41822629913,1.39764888718,1.4672032721,1.8113258956,1.91961765867,1.88578999764,1.58265623307,1.61084475725,1.68567299511,1.38442071502,1.46019602714,1.12218071057,1.10707776333,1.06349109437,0.939991670212,1.00821034619,0.908800265971,1.22085252405,1.2633138161,1.32427267761,1.25368083398,1.3375828119,1.36588705482,1.15024979327,1.11979011921,1.04951488434,1.00990127292,1.11294444669,1.04306390762,1.62923728156,1.7016348481,1.60234113516,1.74679875176,1.64839390285,1.72035258667,1.98272942116,2.05897989674,2.08616803711,2.03629437175,1.78013343254,1.97470900126,1.7898149076,1.85284793045,1.9157702615,1.97923839005,1.97677301809,1.8497460862,1.91021671999,1.29184087494,1.349402265,1.31994267161,1.23005223123,1.19422670431,1.2449921713,1.16769928107,1.03979822503,1.10024334137,0.43885600094,0.646353642613,0.70417418285,1.74402054027,1.68476335181,1.89833887688,1.96774028617,1.63189666233,1.67167768236,1.74419966523,1.66328865773,1.4106743887,1.55082841392,1.50380702207,1.53036672341,1.46323577362,1.25307616394,1.24492446993,1.17482319619,0.991711599833,1.12833313596,1.04804297693,1.11552958251,0.552808760437,0.509674006106,0.54574839834,0.661150515928,0.861048753031,0.834192935558,1.18002803447,1.03664782873,1.29497405278,1.25300907874,1.63139111688,1.67523985569,1.88189475723,1.94985578748,2.00490005432,1.7148564613,1.63904203484,1.61159077005,1.6593444569,1.74225445009,2.51087905075,2.11118704206,2.18934588157,2.12423907216,2.14482976862,2.16270847098,2.19293218723,2.26385113089,1.26519381111,1.20105579835,1.1307320667,1.13822358204,1.4259159719,1.05212275193,1.07899320227,1.15010384613,0.373092944055,0.294324197494,0.111722985848,0.0868674113013,0.152657686601,0.260233370662,0.188115974748,0.535220739072,0.593772189461,0.353543046884,0.44381985768,0.465421712,0.371453336649,0.327003031787,0.537676472446,0.588525234199,0.660613801498,0.966020084887,0.93841147643,0.682271910235,0.958954832844,0.806975254602,0.904884047358,0.921215476332,0.359413549666,0.712737347355,0.822523873168,0.782946671885,0.835556003095,0.678411876115,0.396580383835,0.933540252446,0.873738637037,0.629093511445,0.755405679929,0.698068227212,1.17114889463,1.13884707392,1.06678343039,1.02749010406,2.47764882403,2.60533956264,2.60050685056,2.53484754361,2.48284990228,2.54449167722,2.28403863293,2.3525391266,2.39306430964,2.41014954011,2.2941037785,2.31928079702,2.26740271199,2.19465456008,2.17131432409,2.21911130966,2.17638452927,2.05294274433,2.11221900864,2.1727984994,2.04861977261,2.10441939788,2.41761419549,2.29911086459,2.35149751977,2.29552059227,2.42224601663,2.35968388547,2.33953851016,2.25955073543,2.42190051719,2.34621586848,2.31199481926,2.37181874187,2.37722771595,2.65262869616,2.6691102498,2.62055942451,2.71367919087,2.67976827408,2.73967190148,2.87618709879,2.7721624692,2.83590880729,2.7911350095,2.84893879608,2.86565913462,2.90024811738,2.8322044466,2.82941805411,2.76045521184,2.70188013898,2.03840692049,1.94830120598,2.02182198575,2.23166905655,2.1615729606,2.24872531388,2.10241386269,2.29320509615,2.26384441527,2.26750996196,2.303936088,2.41361846179,2.37707252943,1.90875338707,1.95595655075,1.92901330825,1.83546534023,2.03243368136,2.01590070473,1.97529270566,1.90533079744,1.9438479135,1.89037500464,2.09723093125,2.04788555354,1.76716510309,1.7291298522,1.80087834001,1.81960967938,2.40153022084,2.30123963043,2.37377892907,2.25851718091,2.28352285003,2.3535828001,2.47188814273,2.49270715319,2.80898082432,2.73504379482,2.90301308159,2.85188886736,2.90860999989,2.85252279355,2.77604984944,2.52136317084,2.44959865816,2.52610563539,2.56440648191,2.67157020606,2.62167380229,2.63610768812,2.70352415541,2.74581638835,2.76404602327,2.04688767691,2.02583284694,1.95021019719,1.89658566849,1.58242087088,1.4866802328,1.50796486821,2.65398403666,2.72585627979,2.61489001717,2.65291380695,2.72522423431,2.50120490955,2.51634381565,2.57535138731,2.54363202882,2.61738697179,2.63532378133,1.69222836947,1.70951450005,1.58906124658,1.65198422516,1.29906570126,1.36188767237,1.52091953754,1.52661420647,1.60172275027,1.65894284541,1.72528923208,1.72853225628,1.60531785766,1.66576274119,2.10400140077,2.04152250345,2.04338785672,2.10637653448,2.29853203625,2.17063946652,2.23295069772,2.17121634737,2.22505258658,2.28268309673,2.23259728417,2.29857886613,2.35802364453,2.35706947385,2.42808187992,2.47679762464,2.42832666098,2.49284579928,2.43231967279,2.47627567994,2.40798819235,2.35340011506,2.36164644085,2.00671592766,1.86299341406,1.81841740298,1.93590936383,1.96241176059,1.84449443007,1.91548262976,1.88067507903,1.83017660212,1.95698010726,1.97393122424,1.85200743874,1.91949728936,2.01111336224,2.05963698295,2.13356652828,2.15229400966,1.63456857211,1.65969615884,1.61225021852,1.56228273982,1.80218526663,1.77705877359,1.82351606924,1.89462772325,0.961462625729,1.0819399234,1.23257692957,1.26239527684,1.32899247386,1.83481884062,1.6837460359,1.73412697492,1.80432906942,1.95533773315,1.92975647925,2.03459881364,2.07913537369,2.04669394433,1.97655321466,1.15055872367,1.15898437802,1.21612011088,1.23637411174,1.29070201609,1.3025297183,1.34881002678,1.39675381982,1.36185801387,1.43868438896,1.51192523909,1.40551455491,1.38047611748,1.48856881816,1.5368552846,0.992609389552,1.15903868191,1.13524930359,1.0046267292,1.06604188405,0.983402093172,1.05637040399,1.10835553995,1.29393139849,1.32688893286,1.38246395085,1.36358955441,1.286419164,1.31098525486,1.33434908745,1.1927031582,1.26633357242,1.25204812978,1.29463623085,1.5520196676,1.5733984453,1.64696237717,1.60392783228,1.69877765328,1.67703126992,1.21410657803,1.18311943357,1.22081965242,1.32682419177,1.27760432116,1.24333165413,1.27008464341,1.22379325646,1.15987388664,0.738005358394,1.97441621546,1.99184776274,2.0406981732,2.10739709745,2.00034025294,2.03395595281,2.1162201287,2.14557551839,2.02963244323,2.0978837506,2.15457234525,2.22809188721,2.2655310499,2.22498661993,2.14931694648,2.11605961575,1.93010497631,2.00370050144,2.04278140928,2.00554909249,1.9301744245,1.89363304174,1.63891401331,1.59315882789,1.66689247473,1.705661728,1.56120064276,0.934467946038,0.926983555112,0.853579764781,0.789515869793,0.730288297305,0.736616648092,0.801289344544,0.859077171837,0.923512322743,0.440988308117,0.83710414257,1.32903080951,1.37545527265,1.35264457724,1.44737098683,1.53498759372,1.42507035777,1.34670077992,1.41706814085,1.45925647533,1.33941321731,1.30310564396,1.70833603919,1.63641137345,1.68053466768,1.75230352346,1.56498957651,1.48970914095,1.47128384792,1.4421020878,1.59441092223,1.54765331952,1.54551098221,1.5917413386,1.787686745,1.71346441122,1.66530575644,1.81349877995,1.73266012543,1.80811326927,1.82481581689,1.85462022554,1.62858069618,1.60096082881,1.64706287681,1.72037683596,1.74944763729,1.70366172982,1.28286877999,1.25746483005,1.35691083361,1.40479747162,1.18479361565,1.13731846367,1.09098645034,1.16183397069,1.21690960441,1.16360616699,0.880627519482,0.950992708503,1.83427243984,1.7633294369,1.7318307216,1.77302138179,2.00049504215,1.84936992271,2.09785956801,2.15711527483,2.01869981792,2.02851593563,2.1446051775,2.07572902673,1.66191211486,1.58864984776,1.59594676989,1.16440590846,1.03573409013,1.09813913336,1.16114573134,1.12203582005,0.985440185676,1.04146820254,1.10707699097,1.46686004129,1.4062600968,1.54133411741,1.53580675451,1.44198169669,1.45807670393,1.51172655704,1.51977268478,1.38689759395,1.3788038149,0.833188144973,0.902200665496,0.793668657484,0.774509934742,0.865402613687,0.915623230856,0.827025902625,0.827725997903,1.81134479045,1.81922507026,1.94680770624,1.8870822155,1.76355238712,1.64810567531,1.63825702399,1.69635800839,1.26380472954,1.19102218742,1.21740212291,1.16790983928,1.38618834603,1.4330307206,1.29082327102,1.31422944033,1.3426343838,1.41282797995,0.916252584528,0.799035579925,0.924070587068,0.867956246591,0.617635909589,0.665217979013,0.765412033996,0.741860305781,0.671692294579,0.621120317918,0.720893310093,0.65063583408,0.723540036063,0.723244613277,0.851223688189,0.790114052918,0.561610298256,0.694922524689,0.759553990129,0.758882531585,0.694504333493,0.625870840418,0.625605519318,0.57270696845,0.517965196254,0.704079040532,0.775029201873,0.665038187413,0.645532574026,0.738275051303,0.790091540424,1.09191463758,1.09581814792,0.40171840095,1.69445919849,1.72057474324,1.68577871083,1.6200030555,1.5071914793,1.58563605994,1.61903079298,1.57336625288,1.47066681126,1.57139561826,1.64304360448,1.53716877368,1.68053612311,1.96040626177,2.29735367536,2.39945842796,2.33480605412,2.44522868238,2.4111360434,2.32425740771,2.29337944765,1.7927663794,1.80735985257,1.87204406434,1.8643379815,1.81698830624,1.84148515643,2.53080345438,2.60574737603,2.59995358632,2.31387342058,2.40734715825,2.33177135404,2.28768844556,2.43673016597,2.38708576755,1.28256614727,1.33314969562,1.38115054599,1.35696770836,1.40430904837,1.45256385251,1.52793676096,1.5558347856,1.35366130035,1.28285527363,1.34299432903,0.184239200186,0.329634175677,0.234678575881,0.303517690576,0.273304718119,0.209891747473,0.296003687996,0.223477844216,0.378753803946,0.310877478377,0.30684855923,0.432848727098,0.375089540876,0.432693464701,0.249884225986,0.276925928793,0.124861033531,0.180185680966,0.415253930408,0.469268662045,0.10900759748,0.0365485471943,0.0763342388777,0.144460534664,0.62688832253,0.48223556573,0.369706413895,0.433762796463,0.868455665226,0.728457920349,0.708949442715,0.738034309498,0.754389170308,0.825310861056,0.563349896657,0.635114225934,0.659395193048,0.603357133938,0.5374220192,0.890610858096,0.843845931016,0.77511062923,0.870500165354,0.752840213261,0.801656435258,1.00583616637,1.07491375505,1.02840465229,0.951808797192,0.560495111752,0.50176110973,0.616096733248,0.530578997654,0.606348760051,0.496317835421,0.555341585507,0.396258324242,0.372159007575,0.622035370281,0.694109744354,1.38715439226,1.46477527772,1.49768553674,1.35145950245,1.39521426227,1.46368608605,1.24126575274,1.17180986582,1.24662429095,1.2808496089,1.24473055121,1.27826142911,1.28558652557,1.35338008255,1.39461449519,1.36020333047,2.47316265154,2.53937992891,2.38819030283,2.45777328724,2.50714107098,2.48126146217,2.4091529568,2.36499950183,2.52228147257,2.48615609872,2.51717641037,2.58922724383,2.47688888409,2.43046611961,2.37574876698,2.44806432432,2.33167037305,2.35851126582,2.50717683119,2.57458066682,2.44874356012,2.44661494604,2.57558480492,2.51032416282,2.56186842408,2.59067062165,2.48669009544,2.55245553912,2.43175649232,2.4980764772,2.53881692681,2.94294638155,3.07955138463,3.01111779059,2.95631880572,2.91372833093,2.84598930197,2.5395998011,2.5679238863,2.64017250619,2.58647001964,2.65235057225,2.75245636111,2.65517803002,2.72463499459,2.7784671603,2.67766632709,2.63300143911,2.11410424448,2.06995006151,2.0840502223,2.01204527666,1.92433588665,1.97468372387,1.85220234177,1.67699533751,1.60433665658,1.64326962616,1.69637660777,1.5697289803,1.55009134768,2.5612388216,2.61293476535,2.68421109573,2.57221498913,2.63630682488,2.63579630627,2.69629900359,2.97494217423,3.07641146821,3.00837758028,3.104486587,3.03030164815,2.98143878574,2.75775162724,2.69193353044,2.69284064246,1.9146682986,1.86251495018,2.00437934862,1.9892975384,1.88585297235,1.95312783523,1.70599441102,1.63325749491,1.25427446488,1.32503983653,1.33569059777,1.19688640478,1.21256602823,1.28050384768,2.10316546956,2.03594685949,2.14070815436,2.10133523769,2.12831286211,2.20038827013,2.19462875507,2.11824317028,2.0759601227,1.02468225544,1.04249662754,1.14130881014,1.08213750778,1.1576021965,1.1161843289,0.956592606151,0.891185512795,0.891229121969,1.01940359965,1.02092340972,0.958043195383,1.44605695185,1.3769784284,1.49343804208,1.46683664255,1.23968498433,1.27202859957,1.28891819459,1.36373972547,1.39233538435,1.3497974976,1.80321973068,1.78618665439,1.74288883623,1.67454059671,1.6541364946,1.70541283076,1.1615940847,1.1594246628,1.22889680389,1.28067091261,1.23271714096,1.2866697136,0.837469305315,0.885537762583,0.947492437212,1.16505389967,1.21315248301,0.92028945901,0.952342133954,1.06132779108,1.02325630892,1.17149720936,1.13437650087,1.03844313896,0.973279634444,1.08869975373,1.10112410201,1.01024079333,0.956966741696,0.834722873001,0.88597478222,0.808660894206,0.873758768994,1.60178018913,1.67242055116,1.83382922616,1.75859700679,1.70722067764,0.90498511185,0.834815966637,0.937033506053,0.901822703435,0.855055302831,0.741600424427,0.80869907878,0.537228737144,0.602593651044,0.414012389797,0.490285116712,0.528203926777,0.513571925341,0.581493304816,0.69696473426,0.631574247358,0.809506907084,0.855953474158,0.761528923548,0.832711630605,0.715858505158,0.740836158965,1.25870804077,1.11751067256,1.21903313971,1.14905490774,1.13418686701,1.1596684015,1.23075805398,1.18337854233,1.25635259988,1.27841865268,1.51947164032,1.66238250757,1.63660557523,1.56497517976,1.54324540861,1.61444388594,1.65000934382,1.57618654745,1.58281320787,1.54249836732,1.87877968886,1.79544222079,1.9102737089,1.86760597241,1.65880627156,1.69220427023,1.76606765866,1.77745751819,1.71131023636,1.37994589472,1.43035337082,1.40884132013,1.30677336883,1.16127916357,1.09733636572,1.25471181489,1.20006030025,1.24054093665,1.17152721717,1.0925092297,1.04140358529,0.971939367671,1.04208878598,0.972221403143,1.06564706243,0.924905289791,1.02108749938,0.950467450627,1.84796498293,1.88845682153,1.87775784384,1.95321668626,1.99718294133,1.96207615465,1.72104593238,1.83868555821,1.77186103773,1.71453342,1.84652196592,1.7861587099,1.07246511401,1.09524121194,1.0490998415,1.00171956333,0.952650373546,0.977616239692,1.48378159981,1.4177194504,1.36559856683,1.39768826509,1.47261104883,1.93363853007,1.9882912319,1.96058430834,1.88315036353,1.86621537424,0.741170274561,0.789766659872,0.92017093764,0.91424124371,0.851324376439,0.902516916083,0.962908701507,0.91443013626,0.983915219279,1.0388870541,1.02979369444,0.51913595537,0.447084360486,0.573050045411,0.561995534742,1.36816209359,1.40094007387,1.58029288635,1.50953343478,1.47411459373,1.5168592572,1.59188085479,1.61999041031,1.74663263723,1.88928960671,1.87615223484,1.82914430093,1.84788233682,1.77611020001,1.75552351783,1.7306470932,1.99181351619,2.04975781457,1.9760804431,1.94882380648,2.20491668232,2.0628173489,2.1630300817,2.09372093396,1.75162820379,1.89423334113,1.78605341529,1.85682813888,1.7474894998,1.78648288979,1.85820865427,1.99981366406,1.96598988289,1.99309838022,1.92826296479,2.04620918025,1.91218593237,1.93676881563,2.05278160143,1.98216865835,2.07661000933,2.02931218295,1.96027959417,2.53049234395,2.5428992254,2.45021962891,2.40669425706,2.47600365032,2.48259293905,1.17478447072,1.23811298794,1.26480259705,1.43146482988,1.48774969826,1.53542226823,1.50751648827,1.3838498226,1.41233872092,1.09673027516,0.242918262944,0.290964130236,0.29789528496,0.167024016301,0.345772952275,0.208035823495,0.489441382609,0.464884202305,0.638660502835,0.743111156163,0.761683874558,0.712579775106,0.593887984678,0.661680942938,0.531446919418,0.54397698185,0.672358828899,0.616769079835,0.303800209567,0.234090569062,0.182390213793,0.221859267166,0.32907456823,0.294988036348,0.246995650997,0.171620115615,0.735302627071,0.697623929603,0.700486241437,0.352074367588,0.280870995949,0.28958450821,0.84422685231,0.812523798274,0.917496688742,0.956472861046,0.924888396233,0.854390350301,1.04575950365,1.18457540201,1.16256788207,1.09352780731,1.14048098101,1.07079894308,0.643918387682,0.628775471599,0.714972952383,0.765388563449,0.685891670949,0.751233220095,0.42427689897,0.430423679776,0.502034596576,0.491532852166,0.556269876985,0.56081311978,0.684890406249,0.813643894801,0.810067605291,0.749111845953,0.593535645971,0.62101963185,0.4717619185,0.519908544525,0.630300976626,0.756383827961,0.688665736029,1.16992139502,1.06177123954,1.13314855632,1.13457273723,1.02488495778,1.06106446187,2.57738422355,2.6613984368,2.5946633352,2.44839185707,2.47316275239,2.37398668357,2.33115549895,2.35333465077,2.42023970316,3.04506816708,2.97300746682,3.03262359869,2.96189260759,2.84287125727,2.77825763708,2.9095500181,2.90589903399,2.75554341575,2.78069255042,2.84075386738,1.89621005983,1.96818097205,1.99614698567,1.95012063067,2.87037214228,2.80510038867,2.88844625845,2.75825382625,2.8251023867,2.76286494127,1.65699231203,1.51010737131,1.53699630961,1.60904354031,1.97544454027,2.01772227876,1.90153227161,1.87285395554,1.91893988375,1.98987115505,1.04202050948,1.0899658952,1.06386956671,0.989044279076,0.966149916537,0.939068791069,0.728984871729,0.803146931542,0.845022947368,0.949691682222,0.91259991329,0.839027007687,0.808349759643,0.922258877423,0.85483729421,1.07214566741,1.14759396845,1.0280794211,1.06219891445,1.17871729789,1.13722478518,0.895173415089,0.936811977655,0.880476672928,0.967028125198,1.50592162084,1.57412676262,1.61727504668,1.48018576241,1.52463161697,1.59344352567,1.6842230706,1.72877964561,1.78350256798,1.71178184187,1.91192094227,1.84849885788,1.79488755359,1.89342517189,1.82209207361,0.715974904262,0.642471196801,0.667065789948,0.614300387007,0.456605814746,0.344889643187,0.334107281228,0.394164948076,0.41739317328,0.470075916147,0.795618251309,0.829144266314,0.793860209285,0.723755919008,0.542675816227,0.509046157554,0.61613743074,0.644279050543,1.69078763421,1.80514618177,1.76434662676,1.77138095267,1.69708173053,1.65717723436,1.28427328013,1.21213032077,1.31609696169,1.33602321116,1.24465021584,1.1923417806,0.97631846333,1.03832466353,0.914494167364,1.07462954236,1.12899981004,1.11453239485,1.04526797212,0.814675631685,0.845913236305,0.917150448892,0.957822291308,0.954077971975,0.883920954005,0.833454269061,0.858080091727,0.975477797374,0.929800233624,0.799502647566,0.763741344901,0.74310927173,0.866790868595,0.835611367556,0.882770428549,0.430371901515,0.429710227769,0.492038251008,0.492094287458,0.360582628518,0.361144936965,1.77901157521,1.83739430455,1.73460568526,1.76277029354,2.2224228909,2.10387334871,2.07214388296,2.17649732809,2.11121770083,2.21864294782,2.18492328668,2.16913233304,2.09732802466,2.21400816574,2.18295731663,2.42370255621,2.32798930135,2.40344795302,1.12945629575,1.01987995373,1.06050371386,1.00415815485,1.16177495927,1.22392325529,1.16660169299,1.30984539984,1.26500955098,1.19327913481,1.30626619716,1.21205121523,1.23677930118,1.18938227222,1.33037903336,1.28340253861,0.338851609819,0.404288336402,0.292648181948,0.275596958506,0.366796636962,0.41645840733,0.109417678754,0.157635539968,0.226966533231,0.256453243699,0.160161172184,0.229786455716,0.398601655397,0.364693766391,0.46465793425,0.398426324772,0.583992853936,0.62587250447,0.509061416467,0.580945743251,0.520663457434,0.472181205604,0.505957470728,2.62467325665,2.70509096032,2.63136592941,2.59473733873,1.85130806788,1.73359033576,1.77967004244,1.7576546513,1.8296940184,1.87735144132,1.63137324417,1.67565695401,1.52920117325,1.55663362059,1.64388526052,1.57226201756,0.69613820301,0.645814780494,0.594481800257,0.621742246828,0.816172412353,0.864671222275,0.842531882267,0.770818882529,0.718322512862,0.741883689825,0.761005541058,0.832781317031,0.794868828585,0.740020254712,0.677220537581,0.600388937548,0.686985458415,0.714031450439,0.545798524496,0.560957235597,0.621612488133,1.88217336621,1.85182079054,1.95434696082,1.89213731685,2.35058036811,2.36092599671,2.28103751664,2.22796244593,2.24171104847,2.30528512215,1.18897956013,1.2389575982,1.1149040846,1.09278799174,1.21807535401,1.14606176396,1.12147792539,1.00624757863,1.07410894781,0.988513256188,1.04159329698,1.10660489467,0.473386697878,0.51287878882,0.515583308954,0.591150126351,0.624781012168,0.587553097818,2.74098434533,2.69617520304,2.84028534388,2.81580391482,2.78440850139,2.71639414855,0.988864517365,0.920222203081,0.864501986822,0.881568234128,0.952112521506,1.00382764653,2.10956792546,1.96444082074,2.06865814636,1.99643755188,2.00239136293,2.07515370213 }; const double THETA1796[NST1796] = { 3.11696720803,3.10394409469,4.39023560552,-1.47996102071,-1.50261725072,4.53780397933,2.92368667255,3.01548183309,2.02774669381,2.43913840621,1.6431567108,1.6806258982,1.75347738825,4.13934084989,4.26030305167,4.19385519434,2.50759607104,2.55555889384,2.53329064556,0.5041092846,0.716253056205,0.664232349476,0.543698835418,0.631696657453,-0.628940248171,0.675704520069,-1.11278715307,-1.10602889818,-1.46300610741,-1.37387066433,-1.14361409461,-1.18466438769,-0.961397494954,-0.920225572459,-0.602567111427,-0.60750493335,-0.972131052944,4.30676781216,4.45385847153,4.39022260989,3.92489628396,4.43601138882,-1.44079949178,-1.34473364758,4.67479176683,-1.52761438223,4.62104161492,4.49840341626,4.53905066014,4.48162584529,0.470807279253,0.629174615509,0.405209861567,0.269150288279,0.316542736561,0.268857302237,2.01883805256,1.10526514833,2.20649690837,1.85691156015,1.6530488156,1.76572080988,1.88773126948,2.58469644033,2.75818159908,2.41554768156,2.48896736705,3.03917379644,2.6670646452,2.84395096528,2.75584011586,1.85871986443,1.77655009591,1.788609347,1.74396641816,3.5334404844,3.63465677441,3.19032894296,3.14806433543,3.50044730199,3.48294703703,3.24387761448,3.18669337893,3.19954614299,3.84917463367,3.86380430893,3.85274824422,-0.593298359479,-0.592355574076,0.0595526512153,0.198975457347,-0.594471982184,-0.616911229541,-0.74655643152,-0.703599806994,-0.32943236255,-0.529691758185,-0.530387332172,-0.46452290929,-0.395442636697,-0.24740993869,-0.257116681859,0.126111301358,0.180722839472,-0.533710300542,-0.467633734934,-0.452829995679,-0.592590585973,-0.434282275303,-0.442778229229,-0.386234992005,-0.382652955997,0.213570323198,-1.27868639082,-1.56320891179,-1.54518874946,4.06112806996,4.03121391069,4.68352865054,4.61914767175,4.56321077222,4.56061190678,3.94717304501,3.9711473413,4.29164633518,4.28372836644,-1.54878996229,4.65389548521,3.15240685143,3.14086530791,2.8648195471,2.91381662195,2.83600353743,2.83580245668,2.98494963432,2.76566942477,2.47915514615,2.09963729794,2.53752284579,2.49604227844,2.42205385632,2.43650121669,2.39274191183,2.32161175866,2.43232942803,2.45924840781,2.35637943804,2.41062766778,2.58450705363,2.65277530061,2.7156329554,2.47388828711,2.5521697905,2.58839457167,2.55593025031,2.64126432365,2.68703422164,2.97903460319,3.03458955081,2.40291300204,2.49632167889,3.98430694245,3.83652118274,0.883785410768,1.57577058819,0.279220593823,0.622426595222,0.769743709558,0.744080059866,0.801581894418,0.648380097631,0.527485306951,0.593708118749,0.713487960603,0.767912849135,0.824535540422,0.744889612375,0.699342509255,1.19399412268,0.63657853055,0.771152975618,0.680356381203,0.724170803152,1.84270016608,-1.06908359912,-1.08790983877,-1.4736376954,-1.33674493581,-1.20916691518,-1.2964240076,-1.43206030532,-0.666331559308,-0.674570070752,-0.731957398379,-0.754261705815,-0.530406346273,-0.869645770747,-0.869570149249,-0.8533511522,-0.767354112435,-0.692780025383,-0.998989787458,-0.989399880722,-0.866375273084,0.163616245194,0.0937712006308,0.266635746658,0.297674249032,-0.351582659351,0.1817781513,0.577839615279,3.86156697227,3.85262141795,4.56659798067,4.65934749613,4.41091082921,4.50396744131,4.53566538649,4.23657665973,4.14874158517,4.1544155729,4.07960764459,4.00203175083,4.35990288415,4.21062726221,4.21862970236,4.2946712886,-1.18058910901,-1.3937039607,-1.37065850911,4.70852286388,4.63868614877,4.59461982832,4.57363759132,3.67191987711,3.70486160884,4.03256266757,4.53926609136,4.28172156808,3.97807725351,3.60280217705,3.29738876473,0.879203764477,0.659632456865,0.598973946005,0.570455281922,0.541488428608,0.522263675427,0.420444590184,0.380624775421,0.457533606485,0.430996500798,0.458931227821,0.284200665562,0.342518798111,0.393701077906,0.326686565105,0.469594071212,0.420121145492,0.410765780769,1.15715513953,1.6008956816,1.73294012193,1.55514545865,1.60719403901,1.53447616694,2.38303652697,2.02748677667,2.17630378858,2.26007388697,2.38994679319,2.68306753989,2.69079723292,2.62317266962,2.598167004,2.52650681956,2.54347382169,2.46860245296,2.4155394324,2.17105286442,2.04370161769,2.9571983196,2.85320255642,2.65805217288,2.55469045912,2.75923835288,2.75626025173,2.63899073172,2.53284538734,1.87014617086,1.79393362094,1.80318905743,1.94157386386,1.89649828634,1.74092012906,1.83739665902,1.88903393365,1.84867024245,1.7263619017,1.64095355672,1.70526810984,1.75998193062,3.4886400959,3.3771550786,3.5041190629,3.55510612647,3.37324183144,3.31397783794,3.47753448973,3.08387066844,3.06391312088,3.32558610272,3.38086488719,3.33456983978,3.23856720065,3.21834075865,3.17933631557,3.53703575341,3.64502231335,3.6619796832,3.60792444818,3.17396744358,3.31411906079,3.37070978353,3.41260789311,3.39765480021,3.32763408808,3.27034254429,3.36427125586,3.35805364977,3.9332336833,4.01578699248,3.94647862293,4.07112758592,3.89091437366,3.68101551885,3.73597484237,3.69793853016,3.76674294878,3.80720058815,3.82093585265,3.99244478999,4.13760825774,4.13301548335,4.06708410417,3.41658437241,3.40452190831,-1.31609382752,-1.26290615952,0.0688752185723,0.138742980195,0.120541836334,0.190204131215,-0.727251124159,-0.662650012155,-0.664148531697,-0.699820866827,0.00848741055833,0.0187052143494,0.139399233478,0.0557814498934,-0.0120156991934,-0.130299704269,-0.0372095992412,0.0297746374591,0.00199767892065,-0.338687823289,-0.407896990091,-0.27721679556,-0.41580271502,-0.315184855276,-0.254694506196,-0.194646561869,-0.20545324569,-0.123018139495,-0.0620473397403,-0.492650013368,-0.541446912863,-0.483297027879,0.111908104668,0.156624148111,0.170111043244,-1.53766386653,-1.04278942058,-1.38559090297,-1.51541508146,-1.42144190952,-1.39781840448,-1.44511137896,-1.49236950371,-1.53889899918,-1.47788372776,-1.34500041285,-1.35980453147,-1.42575122839,-1.46561270838,-1.39851604542,-1.12231520216,-1.10740754295,-1.15968678037,-1.22676551895,-1.03975545821,-1.02263584981,-0.955080195856,-0.658577131878,-0.510885154629,-0.586595540787,-0.517383146097,4.2762561986,4.34786841412,4.36405968649,4.30645843175,4.31526767164,3.91373836876,3.83164491113,-1.47935400087,4.41989452267,4.57963681975,4.33506264277,4.42754432216,4.36102583151,4.49643999938,4.49751426378,4.36619771715,4.43167476004,4.42625777768,4.35173531456,4.34669011599,4.42236149967,4.49965929887,4.50087134124,3.06004078327,3.07099892009,2.99137310438,3.01114718626,2.93336243777,2.94209963644,2.90156892058,2.90562610719,2.97723374988,3.04362216346,2.61376186282,2.14120779654,2.02333959025,1.98329380104,2.02175669294,1.98205516128,1.9024279626,1.90616240445,1.86533235513,2.60888043145,2.66454714431,2.7369060899,2.64819334802,2.77444131185,2.72398103454,2.37793700409,2.36565066937,2.41270366055,2.86420496594,3.20836591276,3.28555599027,2.48705032518,2.44137303573,2.25308778873,2.21918559974,2.72316774349,2.66431834953,2.681370736,2.80336283646,3.01941928164,2.85323198207,2.90934564957,2.78416624801,2.76426749282,1.91568641275,2.27519149355,2.30185585023,2.22394552235,2.1703169235,2.27926539958,2.25077422282,2.75365795152,2.87615887155,3.00719314997,2.5656284766,3.89226142163,3.69951106258,1.37274604013,1.36013448672,1.31420619098,1.37787352811,1.07581603898,1.01194573487,1.63667279634,1.66459721178,1.61202227618,1.26486661611,1.26223845976,1.19948480513,1.13847786046,1.32817429596,1.19493224764,1.49340894611,1.61318693872,1.58261982428,1.33776517938,1.42724535218,1.26883902613,1.28893276101,0.58441186803,0.632092603167,0.533306483196,0.606049533509,0.943816914402,1.2088429764,1.28944832833,1.29899684398,-1.26542623772,-1.2995025981,3.89192797693,4.63782220326,-1.42986935729,-1.07224634926,-1.02803055765,2.61162411257,2.51944675355,-0.183640411496,0.785416086843,0.938013728044,0.745747229569,0.91765112058,0.953321491535,0.851645473703,0.887004109234,1.35258289368,1.26683449803,1.00199058211,1.1059256916,1.68848018571,0.828111124457,0.921979677149,0.54946123301,0.812767938629,0.688961258467,0.853217973635,0.790600818522,-0.799097921033,-0.332358095412,0.494679276023,0.538174769695,0.647704983603,0.639316266978,0.699292124201,1.51171913314,1.44081497988,1.4378837985,1.51280429182,-1.29574810223,-1.40235641562,-1.2564811474,-1.2135956703,-1.41879003991,-1.47983994021,-1.28305324779,-1.32355272439,-1.15243686813,-1.25589006468,-1.03132456721,-1.12551247906,-1.18749235102,-1.15468583189,-1.06751486314,-1.00669449875,-1.4776915364,-1.47408608304,-1.43144992941,-1.56955036747,-1.55661597895,4.67829870334,4.68590736067,-1.48200887803,4.64000843117,4.70012963471,-1.48174869689,-1.42822493012,-0.364990931853,-0.203997801907,-0.784532119441,-0.79393672128,-0.703399407161,0.125067504785,0.226095779137,-0.241004209566,-0.0776268857319,0.0317820872515,-0.514971655334,-0.859097653855,-0.0496970383681,-0.0287273183247,-0.23139004552,-0.269972881554,0.865666866575,1.29627344813,0.847947098807,1.0972075252,0.427010593875,0.18832939196,0.129824093225,0.247751482274,3.71388235007,3.79583681879,3.7977565754,3.75643233721,3.7734549519,3.66573337916,3.69892117491,4.33938809431,4.24812471116,4.08254772268,4.1689886613,4.08398275692,4.17668783511,4.40604401091,4.34687149041,4.27352992371,4.38997071453,-1.31257922758,-1.23505746211,-1.36531315405,-1.34091687837,-1.21179045082,-1.26464091263,-1.0436533569,-1.10171220246,-1.29652121345,-1.15363385081,-1.17111815744,-1.24352142698,3.89097572596,3.99732516655,3.99119500178,3.91752509421,3.82747474927,3.80772520598,3.87296419576,3.75557511753,3.85809466337,3.90573369563,2.90921354981,2.71068744568,2.28423586887,2.46449769343,2.81005049064,0.776152322144,0.976621245401,0.987086068527,0.88136071656,0.739994357822,0.62772580838,0.483005637999,0.416796190754,0.708511711488,0.522818529101,0.298842528355,0.372866578856,0.387928677724,0.330549036786,0.437936297034,0.513929583719,0.448434771919,2.4938985958,2.51549847202,2.63139505741,2.76143974986,2.71061573937,2.97759908146,3.1044928108,3.15035809016,2.87681490497,2.88755638988,3.03911638654,1.67993360002,1.75804432543,1.7713206344,1.80027459565,1.97718901413,1.83499247361,1.80741668458,1.87530455804,1.91585127853,1.87717736442,1.91097564332,1.98730835213,1.98972514815,2.02715741506,2.15124400801,2.1049509619,2.02327577729,1.98185487549,2.03388696986,2.11480854344,1.98196422208,2.02648869573,2.26032911071,2.32240383248,2.16847338744,2.1330994398,1.98904285335,1.8851086467,1.85202393118,1.95047171072,2.03654582449,2.20647539543,2.1399963432,2.33057685177,2.36062148027,2.28871133313,2.19027056733,3.53867412314,2.95834339661,3.01996939112,2.96567108544,3.03629550887,3.09146270186,3.10035153545,3.57176948949,3.62495600779,3.5945701296,3.66700131629,3.70096191419,3.71991028954,3.1832311062,3.11714840127,3.12932529302,3.20966113297,3.45316652754,3.52231148588,3.57611666187,3.4398482444,3.35575590228,3.28340835756,3.22425781468,3.23682940005,3.32888166396,3.43566349173,3.23925550481,3.31336671696,3.33006728648,3.83104804558,3.78532516967,3.73360632799,3.75538987078,3.92523987411,3.99025009035,3.93276564362,4.00082664126,4.0726909949,4.06952594896,3.47741573745,3.54792047379,3.43489692886,3.57141925583,3.4582000026,3.52461624621,3.77778990157,3.7213314469,3.65349144931,3.48448035265,3.49496203967,3.60115075955,3.53857519174,3.61408193648,3.56220220405,3.14943539986,3.10929675115,3.04221755294,3.06869143659,3.0243656209,-0.873916286467,-0.829348903862,-0.871524847962,-1.04730660541,-1.19388918885,-1.14278807967,-1.07320996866,0.0893962876491,0.219655468686,0.148924848526,-0.0311831623967,-0.0417072612364,-0.174857677244,-0.112985649415,0.315203106504,0.248484992273,0.237158339118,0.371584255308,0.29415990887,0.362000313783,-0.931140183985,-0.855738620967,-0.797374628897,-0.920080717151,-0.961387230785,-0.311496222682,-0.387223558149,-0.45671508091,-0.445627900742,-0.348207002254,-0.0295276506541,0.0419812734123,-0.383793060553,-0.526062210403,-0.453835977636,-0.524415785998,-0.23271608136,-0.14887473599,-0.101176117165,-0.0839300300074,-0.301768031461,-0.291929875939,-0.369292446587,-0.450919835996,-0.451810308187,-0.380049458763,-0.186214452813,-0.177337516807,-0.243433544334,-0.316378951866,-0.319839383202,-0.255848705771,0.0410470773476,-0.357219109796,-0.366322441342,-0.30735913151,-0.287789692371,-0.735437059042,-0.826834940872,-0.971470674378,-1.02805125306,-0.978285059115,-0.865374594899,-0.816590914905,-0.871938502908,-1.44892352172,4.14349028759,4.32939524035,4.63245231378,4.69416442464,-1.52215486002,-0.902808796032,-0.790353267127,-0.715847104609,-0.720842741145,-0.835824621778,-0.780299181461,-0.842192306642,-0.791865285743,-1.08305672269,-1.06827055266,-0.81437034077,-0.827664423008,4.39638986738,4.37981953364,4.49858144483,4.43640582575,4.63926875871,4.59298422379,4.51688550693,4.47133095044,4.44352046419,4.4298297871,4.48852914218,4.51718174971,4.30796122428,4.32001667205,4.19529074096,4.26289837487,4.22575877911,4.15520000598,4.10251677784,4.11755111727,4.18574444789,4.24121402229,4.2300939203,4.15977617476,4.23962187165,4.18207930522,4.14691417086,4.20914478965,4.05286909147,4.07133529469,-1.29817065359,-1.35407892911,3.98688897515,4.01095078851,2.88686165457,2.87954496948,2.80929670179,2.74611635607,2.63129645238,2.61889432817,2.23398025035,2.28872116687,2.34306663368,2.26522841561,2.37503971833,2.39764933094,2.10303001,2.21226025003,2.13952876017,2.61498036398,2.54062798254,2.49494009849,2.53369117252,2.74646681417,2.68275465005,2.62711692013,2.66222544839,2.13120717658,2.08618464103,2.02655163156,2.10067404757,2.34106431039,2.20085033461,2.31391418509,2.24284637381,2.22671353854,2.29607073571,3.31461940539,3.27578913655,3.15179677995,3.25169072828,3.12556921873,3.18567494322,3.40984993629,3.60255008609,2.45041965486,2.36739777042,2.37149685947,2.32788457408,2.33247580623,2.25302254251,2.32627468847,2.3695404843,2.99053235255,2.978759244,2.84909411763,2.90592107892,2.94685945577,2.89247154909,2.86331251959,2.93208946228,2.80192994648,2.81628926128,2.35008764072,2.23551875198,2.25686190305,2.19785570649,3.00171766344,3.09911801137,2.98424167167,3.07776797206,2.6800438418,2.77317421579,2.89503973641,2.89108166864,2.38866802478,2.49791613322,2.39251420113,2.33796651453,3.63351782679,3.61373564144,3.55612905978,3.45477994075,3.3948992111,3.44306117614,3.56278361519,3.7623053044,3.86310421473,3.721253725,3.7593202056,3.90717919391,3.79646424394,3.93222223594,3.86064305931,3.59124657919,3.6675195782,3.02257643631,1.38976905596,1.45321088729,1.52293853573,1.52223174779,1.57209551131,1.58143749752,1.65074231636,1.69969035634,1.51168715206,0.94973393627,0.947608412391,0.885653198278,0.880626962086,0.732312738026,0.960759574355,0.699749015543,0.879345397477,0.7862532263,0.881193106625,0.70954585987,0.794753654236,1.46270945627,1.53612318007,1.55933674742,1.27801323164,1.33612110367,1.40745718139,1.31956245154,1.51911251564,1.37492118231,1.21803084595,1.06361300667,1.04975408782,1.12610575574,1.16501853782,1.24231082721,0.504848843992,0.352120070051,0.408651755945,0.477098146816,1.06740804378,1.00950988141,1.01345575591,1.07526539841,0.928253023362,0.8247181568,0.852009383583,3.93964080223,3.97827412514,3.67432745603,3.75351885807,-1.55497895939,4.5887931331,4.19429284021,4.24505628154,-0.932343070648,-0.873340413466,-0.626445695776,-0.802209613386,-0.522523333407,-0.623447229057,-0.480481681792,-0.21094911804,-0.32941438755,-0.631745503904,2.69493821707,2.5687855688,3.21838399509,1.17451083797,2.50361084661,2.22887727069,1.40045686278,1.25627170601,1.12357231771,1.10316953747,1.25346271343,1.22125683901,1.41150655242,1.50706396924,1.32468980144,1.33458544775,1.07874171325,1.09163738661,1.20570960227,1.29636923973,1.22130662056,1.08392519485,1.15820326906,1.13644569749,0.987914411318,1.03103512475,0.95729632106,2.13663164757,2.11198049078,1.81597254579,1.67212487014,-0.64345807321,-0.55472142577,-0.852916553622,-1.00787086205,-0.984462591211,-0.86349137823,-0.780204566391,-0.0147995823451,0.158814539327,0.523948855431,-0.256309279004,1.63639019264,1.63293471325,1.69126397737,1.70380019549,1.76704497199,1.75802012525,1.64635813541,1.79141305512,1.78236697508,1.7114301888,1.51144311207,1.57701491309,1.44573963462,1.57473136902,1.51089709929,1.44743140381,4.61639948096,4.66845525692,4.46377855776,4.49718002045,4.41150681595,4.2938605949,4.27658115165,4.3597373599,4.19323302993,4.08301372178,3.97149652212,3.95634214594,-0.595160727044,-0.669162385987,-0.454349583742,-0.466252959326,-0.537950991619,-0.626255348908,0.2009120258,0.259539935293,0.37837768551,0.264899729228,0.397304840028,0.44910638315,-0.389970133458,-0.262660440735,-0.374516574124,-0.0102063294203,0.0427765747676,0.0782001321385,-0.142574245876,0.00601955178813,0.421684421902,0.714312824246,0.424519998694,-1.4324860522,-1.32771859965,-0.627145434822,-0.756046804808,-0.741717642468,-0.514681272417,-0.578891727481,1.03473948486,1.28300408705,1.3468590693,1.22407648854,1.01545556984,1.13496108751,-0.90185931164,-0.964078182108,-0.82184505929,-0.807894704542,-1.13617781088,-1.08085431592,-1.11686876563,-1.20647720344,-1.19010262581,-1.32749245856,-1.27713665245,-1.30900853312,-1.24211553436,3.72100100052,3.82130232931,3.7812228692,3.58370819907,3.36593445775,3.52443037951,3.61686657209,2.85557666918,3.57012185993,3.2968947531,2.01297744112,2.0015212262,2.40050883426,2.9972613678,3.0902902311,3.27204738528,0.260346543239,0.201908952499,0.172136819246,0.244035676406,0.126077848959,0.112855706669,0.487452174627,0.495541317707,2.20219622953,2.17953960227,2.10843242252,2.14876802878,2.07113027778,2.05371738279,3.27572726885,3.26190959923,3.35427252348,3.41582931237,3.48796530522,3.51963616924,3.60810629216,3.62359173518,3.55161920218,3.29083900722,3.20070005731,3.31908020993,3.34728809064,3.2390539726,3.17816391503,3.4195917698,3.46100147795,3.55347782442,3.46951573604,3.5553384591,3.59718805818,3.28714513112,3.27137055758,3.22966873543,3.15938958136,3.11481853341,3.18343347501,3.0597577597,3.07377433276,3.14451139293,3.19898152722,3.94374922252,3.8773390351,3.99070690146,3.97586767749,3.90473101067,3.85346910171,3.77871511958,3.69756726033,3.80713700381,3.75601924226,3.64484088241,3.67428167995,2.9539216358,3.02162670288,3.00131703823,0.0411505772022,0.101175104279,-0.0774673712606,-0.155487577127,-0.368553405706,-0.301292276833,-0.302456080283,-0.367218884543,-0.450700628157,-0.470575799021,-0.577381318011,-0.499485099873,-0.616577408112,-0.558475645912,-0.511845033079,-0.582388513259,-0.712599102516,-0.677133667205,-0.227530574211,-0.237973915952,0.0702937261669,0.0890230343523,0.0318117366306,4.66846121645,4.67654616754,4.58288683413,4.50156634137,-1.42910948176,-1.49121782118,-1.509292626,-1.2272449256,-1.45287493696,-1.40154408397,-1.35929010452,-1.46448593581,4.66573759983,4.60892211461,4.6949603182,4.70887464996,4.23528119277,4.15405212626,4.03561562792,4.05806423923,4.11900372088,4.22281195226,4.6369316257,4.64771992392,4.56880173025,4.57223354759,-1.49135467806,-1.5671523463,4.70875811471,-1.42918185607,-1.44250007881,-1.51214207874,-0.915798988534,-0.942260394595,-0.87180457352,-0.858904011497,-0.985319562152,-0.998784536973,-0.744584541458,-0.733527863488,-0.608655607761,-0.666166789419,-0.649364403764,-0.769366530182,-0.721060927646,-0.78214878428,4.61958277999,4.55207763088,4.56680937658,4.64285962985,4.67666300812,4.11395759846,4.05764008838,3.98891817812,4.10132440831,-0.989967425925,-0.957689165588,-1.17185140731,-1.2226500105,-1.09452991764,-1.06747904876,-1.33533305942,-1.3981606359,-1.37924546645,4.1161511768,4.09849262968,4.19710717493,4.17008839269,4.26650696161,4.25745072654,2.75560005241,2.69614186442,2.82622437544,2.8335558603,2.76752076286,2.70084956396,2.13936793481,2.21307655319,2.25279665987,2.21684274982,2.13729671994,2.09974753088,2.7977103375,2.88293814215,2.93760338537,2.76954333477,2.8350477162,2.91781929627,1.98660672723,2.01553578759,1.96144874951,1.89202520336,1.90912923293,2.44427762411,2.49698385152,2.56981019029,2.56178750184,2.48365788546,1.88576574968,2.54395044806,2.64178729155,2.54090107085,2.49064363348,3.73809753769,3.68564439992,3.83045817427,3.86074276062,3.80300017561,3.7194923923,3.14013835617,3.16649156593,3.24224668426,3.37012259288,1.31848945548,1.38393359812,1.44983096898,1.44859744627,1.38427649309,1.32124521838,1.3228348912,1.3871501703,0.744246403886,0.735827938597,0.600064209507,0.538323724042,0.670066301537,0.675459244658,0.54668018102,0.613910751645,0.658878637532,0.507259707381,0.519905221714,0.592456852002,0.637860377623,0.653202234186,0.563615028426,0.574025395289,0.877978892483,0.874043457703,0.809245555403,0.806257839053,1.0106238182,0.943657214767,0.942710140398,0.801962119415,0.873297264978,1.52899897525,1.50445936044,1.46900807111,1.42563664477,1.29032650816,1.23905523893,1.22744545292,1.32064301333,1.38529397654,1.3668302057,1.71674634103,1.58651785039,1.75512268109,1.3455775614,1.39066392293,1.51659087871,0.465076084668,0.450659263448,0.366197270177,1.13244562279,1.25895944757,1.19788578754,1.13623401592,1.19164220024,1.25661671372,1.14224548684,0.0239781162741,0.45448097974,0.216359154494,0.0858884601664,2.64803757601,2.46120909621,2.08445691954,2.40161733295,2.02161872323,2.17148109297,2.06602095188,1.99110093928,2.39142148848,2.33087594291,2.32181108082,2.18498050931,2.21443683738,2.14104115218,3.25922149368,3.35309596791,3.10896124271,2.79024033499,3.03601741832,2.82585434496,1.84873166455,1.81369347188,1.69820230009,1.60304591923,1.80080803545,1.31615015709,1.38367517023,1.6440666017,1.59777339107,1.51159403373,1.59496456995,1.51343933926,1.43083816753,1.4264540289,1.96655219168,1.93166416542,2.01077348039,2.02976977244,1.86794042683,1.8836073242,-0.47844089008,-0.598310545222,-0.453529684208,-0.535199250422,-0.678893698822,-0.642404263683,0.450068924717,0.281311833234,0.230613627249,0.528071564573,0.456457396268,0.321710607899,0.467783918478,0.378705146279,0.482066731217,0.529701191525,-0.384766564051,-0.266818252516,-0.299064297547,-0.412668254677,0.276554077544,0.312468692375,0.352191888194,1.65259910229,1.58760284532,1.58355470982,1.72669889779,1.66529423725,1.73537920384,4.44473473768,4.64405934806,4.58482867205,-0.270130917236,-0.163097903373,-0.273352219729,-0.189899816775,-0.0902768168966,-0.0677744153504,-0.4511389988,-0.345725725006,-1.17050316526,-1.15759252611,-0.532175781396,-0.641332360876,-0.625778834415,-0.903105934498,-0.831157957069,-1.02012880904,-1.06542849017,-0.855470099794,-0.870216502126,-0.946471994039,-1.00495304291,3.18080736276,3.16586980735,3.47725010151,3.3372580041,3.63477844579,3.53014014793,0.621789534303,0.638919204901,0.570513537266,0.562761430185,3.46040820854,3.4016794987,3.44516268546,3.37075618469,3.31110372133,3.32678875268,-0.0135586615153,0.0517652598129,0.125602075505,0.140482614396,-0.0054408852545,0.0751364640118,-0.156536557824,-0.155881613433,-0.0719929255661,-0.310308921406,-0.234879815041,-0.240781554533,-0.333794095312,-0.398072520335,-0.415102105002,-0.0860340563008,-0.092979634873,-0.155751063764,-0.226072042445,-0.16546475819,-0.22894675777,0.2486923197,0.400955189181,0.342299781067,0.223326284778,-0.144074643224,-0.155530500961,-0.0935411895492,-0.0722355822052,-0.0111124873352,-0.0208866840842,-0.10494008234,-0.0416190385953,-0.18630700687,-0.177400871782,-0.0427003302502,0.00214885637961,-0.0523219337062,-0.12349109155,-0.124521920636,-1.38282168112,-1.35799606198,-1.16152883297,-1.24069677208,4.58839683513,4.36386964028,4.58732921793,4.68838631077,4.31122078684,4.42356303076,4.41150904662,4.49904190249,4.58860929436,4.58840638681,3.99486597046,4.12747214751,4.00298632858,4.11124519394,-0.687120258627,-0.639688357858,-0.698537342118,-0.570405881536,-0.560688014887,-0.618513595472,4.03059096618,4.01369289575,3.90418077469,3.97466681365,3.88421282647,3.9375344346,-0.964346059059,-1.00506760158,-1.01587440413,-1.25574298684,-1.19922398425,-1.1211381977,-1.09164943906,1.86565758451,1.77090420841,1.75750783184,1.83107608401,2.07517446342,2.10280401357,2.03602994484,1.94026014483,1.98688745268,1.9192993707,2.6441702932,2.8089623123,2.71087886089,2.69113998342,2.85015231232,2.79900952229,3.33123699837,3.67312933474,3.5757707123,3.42783456007,3.60528704725,3.4009611331,1.07580130334,1.20847164088,1.13972517439,1.20345438571,0.95468219346,0.724890728754,0.80031962414,0.720214551979,0.874018641118,0.796519117381,0.875019042206,1.18362283172,1.17132425076,1.11236383913,1.02961316491,1.56981255604,1.67977340828,1.68208433221,0.396194460186,0.282416038535,0.42030846813,0.367195799124,0.852635335599,0.878913890979,1.15758608382,1.18331418309,1.24387428081,1.23391819364,0.981554220372,1.09615243281,0.959918804181,1.01778950114,1.05523427364,1.11176401829,2.43318851517,2.3232918836,2.06870138515,2.31486005264,2.01275290141,2.13507121453,0.963795015983,1.35324472523,1.20559454229,0.914917274346,0.525372474674,0.631210804037,1.82017753667,1.66624234234,1.4429253752,1.48360769793,1.49827180904,1.60448501535,1.54186675026,-0.158659094231,0.0903053910204,-0.027516633673,-0.161439138973,4.33745991515,4.06900110655,4.07641697586,4.20224154985,-0.914407778921,-0.956543631298,-0.899478949794,-1.02797943357,-1.04414155398,-0.987754783672,0.68795649576,0.748789397178,0.761052270978,0.697246980175,0.81646035,0.819363899493,-0.0585387275581,0.158382054824,0.0661744897213,-0.0500744722343,0.0163775501669,0.0910765144051,0.182404734197,0.208699405128,0.131977968258,0.0301265155833,-1.30373994372,-1.33181455406,-1.13250076613,-1.19866555776,4.48886992694,4.49322183812,4.30477552594,4.40088473566,4.39191149448,4.26087958373,4.23837525287,1.1462132695,1.07715311306,1.15271700107,1.0110848546,1.41320036571,1.51398177223,1.38193686056,1.45069564479,1.54785543802,1.57910515662,0.173764345286,0.232532880427,0.187406454354,0.261893327684,0.306363668498,0.321868800495,0.996487395094,1.03810026685,1.05926500592,0.949673022159,0.886676681479,0.91194222197,1.81452024126,1.69756191336,1.94948511388,1.9321525938,1.81587142747,1.71416709763,4.22465435786,4.36599130616,4.45602278411,4.23933386343,4.60343014773,4.53668425745,-1.14418581263,-1.10997527039,-1.16857682587,-1.26375274179,-1.29102567062,-1.23073380244,1.02280377336,1.01352051793,1.09300226759,1.08619770409,0.944428132969,0.946805731377 };
Unknown
3D
febiosoftware/FEBio
FEBioMech/FEFiberIntegrationGeodesic.cpp
.cpp
4,412
154
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #include "stdafx.h" #include "FEFiberIntegrationGeodesic.h" #include <FECore/log.h> #ifndef SQR #define SQR(x) ((x)*(x)) #endif class FEFiberIntegrationGeodesic::Iterator : public FEFiberIntegrationSchemeIterator { public: Iterator(int nint, const double* cth, const double* cph, const double* sth, const double* sph, const double* wn) { m_nint = nint; m_cth = cth; m_cph = cph; m_sth = sth; m_sph = sph; m_wn = wn; n = -1; Next(); } bool IsValid() { return (n < m_nint); } // move to the next integration point bool Next() { n++; if (n < m_nint) { m_fiber.x = m_cth[n] * m_sph[n]; m_fiber.y = m_sth[n] * m_sph[n]; m_fiber.z = m_cph[n]; m_weight = m_wn[n]; return true; } else return false; } public: int n; int m_nint; const double* m_cth; const double* m_cph; const double* m_sth; const double* m_sph; const double* m_wn; }; //----------------------------------------------------------------------------- // FEFiberIntegrationGeodesic //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- // define the material parameters BEGIN_FECORE_CLASS(FEFiberIntegrationGeodesic, FEFiberIntegrationScheme) ADD_PARAMETER(m_nres, "resolution")->setEnums("low\0high\0"); END_FECORE_CLASS(); //----------------------------------------------------------------------------- void FEFiberIntegrationGeodesic::Serialize(DumpStream& ar) { FEFiberIntegrationScheme::Serialize(ar); if (ar.IsSaving() == false) { InitIntegrationRule(); } } //----------------------------------------------------------------------------- FEFiberIntegrationGeodesic::FEFiberIntegrationGeodesic(FEModel* pfem) : FEFiberIntegrationScheme(pfem) { m_nres = 0; } //----------------------------------------------------------------------------- FEFiberIntegrationGeodesic::~FEFiberIntegrationGeodesic() { } //----------------------------------------------------------------------------- bool FEFiberIntegrationGeodesic::Init() { if ((m_nres != 0) && (m_nres != 1)) { feLogError("resolution must be 0 (low) or 1 (high)."); return false; } // initialize integration rule data InitIntegrationRule(); // also initialize the parent class return FEFiberIntegrationScheme::Init(); } //----------------------------------------------------------------------------- void FEFiberIntegrationGeodesic::InitIntegrationRule() { // select the integration rule m_nint = (m_nres == 0? NSTL : NSTH ); const double* phi = (m_nres == 0? PHIL : PHIH ); const double* the = (m_nres == 0? THETAL: THETAH); const double* w = (m_nres == 0? AREAL : AREAH ); for (int n=0; n<m_nint; ++n) { m_cth[n] = cos(the[n]); m_sth[n] = sin(the[n]); m_cph[n] = cos(phi[n]); m_sph[n] = sin(phi[n]); m_w[n] = w[n]; } } //----------------------------------------------------------------------------- FEFiberIntegrationSchemeIterator* FEFiberIntegrationGeodesic::GetIterator(FEMaterialPoint* mp) { return new Iterator(m_nint, &m_cth[0], &m_cph[0], &m_sth[0], &m_sph[0], &m_w[0]); }
C++
3D
febiosoftware/FEBio
FEBioMech/FEHolmesMowUC.cpp
.cpp
3,668
111
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2022 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #include "stdafx.h" #include "FEHolmesMowUC.h" //----------------------------------------------------------------------------- // define the material parameters BEGIN_FECORE_CLASS(FEHolmesMowUC, FEUncoupledMaterial) ADD_PARAMETER(m_mu, FE_RANGE_GREATER(0.0), "mu")->setLongName("shear modulus"); ADD_PARAMETER(m_b, FE_RANGE_GREATER_OR_EQUAL(0.0), "beta")->setLongName("power exponent"); END_FECORE_CLASS(); //----------------------------------------------------------------------------- mat3ds FEHolmesMowUC::DevStress(FEMaterialPoint& mp) { FEElasticMaterialPoint& pt = *mp.ExtractData<FEElasticMaterialPoint>(); // calculate left Cauchy-Green tensor mat3ds bt = pt.DevLeftCauchyGreen(); // calculate invariants of B double I1 = bt.tr(); // Exponential term double eQ = exp(m_b*(I1-3)); // calculate stress mat3ds st = bt*(m_mu*eQ/pt.m_J); return st.dev(); } //----------------------------------------------------------------------------- tens4ds FEHolmesMowUC::DevTangent(FEMaterialPoint& mp) { FEElasticMaterialPoint& pt = *mp.ExtractData<FEElasticMaterialPoint>(); // calculate left Cauchy-Green tensor mat3ds bt = pt.DevLeftCauchyGreen(); // calculate invariants of B double I1 = bt.tr(); // Exponential term double eQ = exp(m_b*(I1-3)); // calculate stress mat3ds st = bt*(m_mu*eQ/pt.m_J); // calculate identity tensor mat3dd I(1); // calculate elasticity tensor tens4ds ct = dyad1s(bt)*(2*m_b*m_mu*eQ/pt.m_J); // This is the final value of the elasticity tensor tens4ds IxI = dyad1s(I); tens4ds I4 = dyad4s(I); ct += - 1./3.*(ddots(ct,IxI) - IxI*(ct.tr()/3.)) + 2./3.*((I4-IxI/3.)*st.tr()-dyad1s(st.dev(),I)); return ct; } //----------------------------------------------------------------------------- double FEHolmesMowUC::DevStrainEnergyDensity(FEMaterialPoint& mp) { FEElasticMaterialPoint& pt = *mp.ExtractData<FEElasticMaterialPoint>(); // calculate left Cauchy-Green tensor mat3ds bt = pt.DevLeftCauchyGreen(); // calculate invariants of B double I1 = bt.tr(); // Exponential term double eQ = exp(m_b*(I1-3)); // calculate strain energy density double sed = m_mu/(2*m_b)*(eQ-1); return sed; }
C++
3D
febiosoftware/FEBio
FEBioMech/ObjectDataRecord.h
.h
2,161
60
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #pragma once #include <FECore/FECoreBase.h> #include <FECore/DataRecord.h> #include "FERigidBody.h" //----------------------------------------------------------------------------- //! Base class for object log data (e.g. rigid bodies) class FEBIOMECH_API FELogObjectData : public FELogData { FECORE_SUPER_CLASS(FELOGOBJECTDATA_ID) FECORE_BASE_CLASS(FELogObjectData) public: FELogObjectData(FEModel* fem) : FELogData(fem) {} virtual ~FELogObjectData(){} virtual double value(FERigidBody& rb) = 0; }; //----------------------------------------------------------------------------- class FEBIOMECH_API ObjectDataRecord : public DataRecord { public: ObjectDataRecord(FEModel* pfem); double Evaluate(int item, int ndata) override; void SetData(const char* sz) override; void SelectAllItems() override; int Size() const override; private: vector<FELogObjectData*> m_Data; };
Unknown
3D
febiosoftware/FEBio
FEBioMech/FENeoHookean.cpp
.cpp
4,812
167
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #include "stdafx.h" #include "FENeoHookean.h" //----------------------------------------------------------------------------- // define the material parameters BEGIN_FECORE_CLASS(FENeoHookean, FEElasticMaterial) ADD_PARAMETER(m_E, FE_RANGE_GREATER(0.0), "E")->setUnits(UNIT_PRESSURE)->setLongName("Young's modulus"); ADD_PARAMETER(m_v, FE_RANGE_RIGHT_OPEN(-1, 0.5), "v")->setLongName("Poisson's ratio"); END_FECORE_CLASS(); //----------------------------------------------------------------------------- FENeoHookean::FENeoHookean(FEModel* pfem) : FEElasticMaterial(pfem) {} //----------------------------------------------------------------------------- mat3ds FENeoHookean::Stress(FEMaterialPoint& mp) { FEElasticMaterialPoint& pt = *mp.ExtractData<FEElasticMaterialPoint>(); double detF = pt.m_J; double detFi = 1.0/detF; double lndetF = log(detF); // get the material parameters double E = m_E(mp); double v = m_v(mp); // calculate left Cauchy-Green tensor mat3ds b = pt.LeftCauchyGreen(); // lame parameters double lam = v*E/((1+v)*(1-2*v)); double mu = 0.5*E/(1+v); // Identity mat3dd I(1); // calculate stress mat3ds s = (b - I)*(mu*detFi) + I*(lam*lndetF*detFi); return s; } //----------------------------------------------------------------------------- tens4ds FENeoHookean::Tangent(FEMaterialPoint& mp) { FEElasticMaterialPoint& pt = *mp.ExtractData<FEElasticMaterialPoint>(); // deformation gradient double detF = pt.m_J; // get the material parameters double E = m_E(mp); double v = m_v(mp); // lame parameters double lam = v*E/((1+v)*(1-2*v)); double mu = 0.5*E/(1+v); double lam1 = lam / detF; double mu1 = (mu - lam*log(detF)) / detF; mat3dd I(1); return dyad1s(I)*lam1 + dyad4s(I)*(2*mu1); } //----------------------------------------------------------------------------- double FENeoHookean::StrainEnergyDensity(FEMaterialPoint& mp) { FEElasticMaterialPoint& pt = *mp.ExtractData<FEElasticMaterialPoint>(); double J = pt.m_J; double lnJ = log(J); // get the material parameters double E = m_E(mp); double v = m_v(mp); // calculate left Cauchy-Green tensor mat3ds b = pt.LeftCauchyGreen(); double I1 = b.tr(); // lame parameters double lam = v*E/((1+v)*(1-2*v)); double mu = 0.5*E/(1+v); double sed = mu*((I1-3)/2.0 - lnJ)+lam*lnJ*lnJ/2.0; return sed; } //----------------------------------------------------------------------------- mat3ds FENeoHookean::PK2Stress(FEMaterialPoint& pt, const mat3ds ES) { // Identity mat3dd I(1); // calculate right Cauchy-Green tensor mat3ds C = I + ES*2; mat3ds Ci = C.inverse(); double detF = sqrt(C.det()); double lndetF = log(detF); // get the material parameters double E = m_E(pt); double v = m_v(pt); // lame parameters double lam = v*E/((1+v)*(1-2*v)); double mu = 0.5*E/(1+v); // calculate stress mat3ds S = (I - Ci)*mu + Ci*(lam*lndetF); return S; } //----------------------------------------------------------------------------- tens4dmm FENeoHookean::MaterialTangent(FEMaterialPoint& pt, const mat3ds ES) { // calculate right Cauchy-Green tensor mat3ds C = mat3dd(1) + ES*2; mat3ds Ci = C.inverse(); double J = sqrt(C.det()); // get the material parameters double E = m_E(pt); double v = m_v(pt); // lame parameters double lam = v*E/((1+v)*(1-2*v)); double mu = 0.5*E/(1+v); tens4dmm c = dyad1s(Ci)*lam + dyad4s(Ci)*(2*(mu-lam*log(J))); return c; }
C++
3D
febiosoftware/FEBio
FEBioMech/FERigidRevoluteJoint.cpp
.cpp
28,800
958
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #include "stdafx.h" #include "FERigidRevoluteJoint.h" #include "FERigidBody.h" #include "FECore/log.h" #include <FECore/FELinearSystem.h> //----------------------------------------------------------------------------- BEGIN_FECORE_CLASS(FERigidRevoluteJoint, FERigidConnector); ADD_PARAMETER(m_laugon, "laugon")->setLongName("Enforcement method")->setEnums("PENALTY\0AUGLAG\0LAGMULT\0"); ADD_PARAMETER(m_atol, "tolerance" ); ADD_PARAMETER(m_gtol, "gaptol" ); ADD_PARAMETER(m_qtol, "angtol" ); ADD_PARAMETER(m_eps , "force_penalty" ); ADD_PARAMETER(m_ups , "moment_penalty"); ADD_PARAMETER(m_cps , "force_damping" ); ADD_PARAMETER(m_rps , "moment_damping"); ADD_PARAMETER(m_q0 , "joint_origin" ); ADD_PARAMETER(m_e0[0], "rotation_axis" ); ADD_PARAMETER(m_e0[1], "transverse_axis"); ADD_PARAMETER(m_naugmin, "minaug" ); ADD_PARAMETER(m_naugmax, "maxaug" ); ADD_PARAMETER(m_bq , "prescribed_rotation"); ADD_PARAMETER(m_qp , "rotation" ); ADD_PARAMETER(m_Mp , "moment" ); ADD_PARAMETER(m_bautopen, "auto_penalty"); ADD_PARAMETER(m_torsion_stiffness, "torsion_stiffness"); END_FECORE_CLASS(); //----------------------------------------------------------------------------- FERigidRevoluteJoint::FERigidRevoluteJoint(FEModel* pfem) : FERigidConnector(pfem) { m_nID = m_ncount++; m_laugon = FECore::AUGLAG_METHOD; // for backward compatibility m_atol = 0; m_gtol = 0; m_qtol = 0; m_naugmin = 0; m_naugmax = 10; m_qp = 0; m_Mp = 0; m_bq = false; m_eps = m_ups = 1.0; m_cps = m_rps = 0.0; m_e0[0] = vec3d(0,0,1); m_e0[1] = vec3d(1,0,0); m_bautopen = false; } //----------------------------------------------------------------------------- FERigidRevoluteJoint::~FERigidRevoluteJoint() { } //----------------------------------------------------------------------------- //! initial position vec3d FERigidRevoluteJoint::InitialPosition() const { return m_q0; } //----------------------------------------------------------------------------- //! current position vec3d FERigidRevoluteJoint::Position() const { FERigidBody& RBa = *m_rbA; vec3d qa = m_qa0; RBa.GetRotation().RotateVector(qa); return RBa.m_rt + qa; } //----------------------------------------------------------------------------- //! current axis quatd FERigidRevoluteJoint::Orientation() const { quatd Q0(vec3d(0, 0, 1), m_e0[0]); FERigidBody& RBa = *m_rbA; return RBa.GetRotation()*Q0; } //----------------------------------------------------------------------------- //! TODO: This function is called twice: once in the Init and once in the Solve //! phase. Is that necessary? bool FERigidRevoluteJoint::Init() { if (m_bq && (m_Mp != 0)) { feLogError("Rotation and moment cannot be prescribed simultaneously in rigid connector %d (revolute joint)\n", m_nID+1); return false; } // initialize joint basis m_e0[0].unit(); m_e0[2] = m_e0[0] ^ m_e0[1]; m_e0[2].unit(); m_e0[1] = m_e0[2] ^ m_e0[0]; // reset force m_F = vec3d(0,0,0); m_L = vec3d(0,0,0); m_Fp = vec3d(0,0,0); m_M = vec3d(0,0,0); m_U = vec3d(0,0,0); m_Up = vec3d(0,0,0); // base class first if (FERigidConnector::Init() == false) return false; m_qa0 = m_q0 - m_rbA->m_r0; m_qb0 = m_q0 - m_rbB->m_r0; m_ea0[0] = m_e0[0]; m_ea0[1] = m_e0[1]; m_ea0[2] = m_e0[2]; m_eb0[0] = m_e0[0]; m_eb0[1] = m_e0[1]; m_eb0[2] = m_e0[2]; return true; } //----------------------------------------------------------------------------- void FERigidRevoluteJoint::Serialize(DumpStream& ar) { FERigidConnector::Serialize(ar); ar & m_qa0 & m_qb0; ar & m_L & m_U; ar & m_e0; ar & m_ea0; ar & m_eb0; ar & m_LM; } //----------------------------------------------------------------------------- //! \todo Why is this class not using the FESolver for assembly? void FERigidRevoluteJoint::LoadVector(FEGlobalVector& R, const FETimeInfo& tp) { vector<double> fa(6); vector<double> fb(6); vec3d eat[3], eap[3], ea[3]; vec3d ebt[3], ebp[3], eb[3]; FERigidBody& RBa = *m_rbA; FERigidBody& RBb = *m_rbB; double alpha = tp.alphaf; // body A vec3d ra = RBa.m_rt*alpha + RBa.m_rp*(1-alpha); vec3d zat = m_qa0; RBa.GetRotation().RotateVector(zat); vec3d zap = m_qa0; RBa.m_qp.RotateVector(zap); vec3d za = zat*alpha + zap*(1-alpha); eat[0] = m_ea0[0]; RBa.GetRotation().RotateVector(eat[0]); eat[1] = m_ea0[1]; RBa.GetRotation().RotateVector(eat[1]); eat[2] = m_ea0[2]; RBa.GetRotation().RotateVector(eat[2]); eap[0] = m_ea0[0]; RBa.m_qp.RotateVector(eap[0]); eap[1] = m_ea0[1]; RBa.m_qp.RotateVector(eap[1]); eap[2] = m_ea0[2]; RBa.m_qp.RotateVector(eap[2]); ea[0] = eat[0]*alpha + eap[0]*(1-alpha); ea[1] = eat[1]*alpha + eap[1]*(1-alpha); ea[2] = eat[2]*alpha + eap[2]*(1-alpha); // body b vec3d rb = RBb.m_rt*alpha + RBb.m_rp*(1-alpha); vec3d zbt = m_qb0; RBb.GetRotation().RotateVector(zbt); vec3d zbp = m_qb0; RBb.m_qp.RotateVector(zbp); vec3d zb = zbt*alpha + zbp*(1-alpha); ebt[0] = m_eb0[0]; RBb.GetRotation().RotateVector(ebt[0]); ebt[1] = m_eb0[1]; RBb.GetRotation().RotateVector(ebt[1]); ebt[2] = m_eb0[2]; RBb.GetRotation().RotateVector(ebt[2]); ebp[0] = m_eb0[0]; RBb.m_qp.RotateVector(ebp[0]); ebp[1] = m_eb0[1]; RBb.m_qp.RotateVector(ebp[1]); ebp[2] = m_eb0[2]; RBb.m_qp.RotateVector(ebp[2]); eb[0] = ebt[0]*alpha + ebp[0]*(1-alpha); eb[1] = ebt[1]*alpha + ebp[1]*(1-alpha); eb[2] = ebt[2]*alpha + ebp[2]*(1-alpha); if (m_laugon != FECore::LAGMULT_METHOD) { vec3d c = rb + zb - ra - za; m_F = m_L + c * m_eps; vec3d ksi; if (m_bq) { quatd q = (alpha * RBb.GetRotation() + (1 - alpha) * RBb.m_qp) * (alpha * RBa.GetRotation() + (1 - alpha) * RBa.m_qp).Inverse(); quatd a(m_qp, ea[0]); quatd r = a * q.Inverse(); r.MakeUnit(); ksi = r.GetVector() * r.GetAngle(); } else ksi = (ea[0] ^ eb[0]) / 2; m_M = m_U + ksi * m_ups + ea[0] * m_Mp; // add damping if (m_cps > 0) { // body A vec3d vat = RBa.m_vt + (RBa.m_wt ^ zat); vec3d vap = RBa.m_vp + (RBa.m_wp ^ zap); vec3d va = vat * alpha + vap * (1 - alpha); // body b vec3d vbt = RBb.m_vt + (RBb.m_wt ^ zbt); vec3d vbp = RBb.m_vp + (RBb.m_wp ^ zbp); vec3d vb = vbt * alpha + vbp * (1 - alpha); m_F += (vb - va)*m_cps; } if (m_rps > 0) { // body A vec3d wa = RBa.m_wt * alpha + RBa.m_wp * (1 - alpha); // body b vec3d wb = RBb.m_wt * alpha + RBb.m_wp * (1 - alpha); mat3ds P = m_bq ? mat3dd(1) : mat3dd(1) - dyad(ea[0]); m_M += P * (wb - wa) * m_rps; } fa[0] = m_F.x; fa[1] = m_F.y; fa[2] = m_F.z; fa[3] = za.y * m_F.z - za.z * m_F.y + m_M.x; fa[4] = za.z * m_F.x - za.x * m_F.z + m_M.y; fa[5] = za.x * m_F.y - za.y * m_F.x + m_M.z; fb[0] = -m_F.x; fb[1] = -m_F.y; fb[2] = -m_F.z; fb[3] = -zb.y * m_F.z + zb.z * m_F.y - m_M.x; fb[4] = -zb.z * m_F.x + zb.x * m_F.z - m_M.y; fb[5] = -zb.x * m_F.y + zb.y * m_F.x - m_M.z; for (int i = 0; i < 6; ++i) if (RBa.m_LM[i] >= 0) R[RBa.m_LM[i]] += fa[i]; for (int i = 0; i < 6; ++i) if (RBb.m_LM[i] >= 0) R[RBb.m_LM[i]] += fb[i]; } else { vec3d Ma = (za ^ m_F) + (ea[0] ^ m_M); vec3d Mb = (zb ^ m_F) + (eb[0] ^ m_M); fa[0] = -m_F.x; fa[1] = -m_F.y; fa[2] = -m_F.z; fa[3] = -Ma.x; fa[4] = -Ma.y; fa[5] = -Ma.z; fb[0] = m_F.x; fb[1] = m_F.y; fb[2] = m_F.z; fb[3] = Mb.x; fb[4] = Mb.y; fb[5] = Mb.z; for (int i = 0; i < 6; ++i) if (RBa.m_LM[i] >= 0) R[RBa.m_LM[i]] += fa[i]; for (int i = 0; i < 6; ++i) if (RBb.m_LM[i] >= 0) R[RBb.m_LM[i]] += fb[i]; // translational constraint vec3d c = rb + zb - ra - za; R[m_LM[0]] += c.x; R[m_LM[1]] += c.y; R[m_LM[2]] += c.z; // rotational constraint vec3d ksi1 = eb[0] - ea[0]; R[m_LM[3]] += ksi1.x; R[m_LM[4]] += ksi1.y; R[m_LM[5]] += ksi1.z; } if (m_torsion_stiffness != 0) { vec3d zbat = m_qb0; RBa.GetRotation().RotateVector(zbat); vec3d zbap = m_qb0; RBa.m_qp.RotateVector(zbap); vec3d zba = zbat * alpha + zbap * (1 - alpha); vec3d nb(zb); nb.unit(); vec3d nba(zba); nba.unit(); vec3d t = (nb ^ nba)*m_torsion_stiffness; double ma[3] = { -t.x, -t.y, -t.z }; double mb[3] = { t.x, t.y, t.z }; for (int i=0;i <3; ++i) { if (RBa.m_LM[3 + i] >= 0) R[RBa.m_LM[3 + i]] += ma[i]; if (RBb.m_LM[3 + i] >= 0) R[RBb.m_LM[3 + i]] += mb[i]; } } RBa.m_Fr -= vec3d(fa[0],fa[1],fa[2]); RBa.m_Mr -= vec3d(fa[3],fa[4],fa[5]); RBb.m_Fr -= vec3d(fb[0],fb[1],fb[2]); RBb.m_Mr -= vec3d(fb[3],fb[4],fb[5]); } //----------------------------------------------------------------------------- //! \todo Why is this class not using the FESolver for assembly? void FERigidRevoluteJoint::StiffnessMatrix(FELinearSystem& LS, const FETimeInfo& tp) { double alpha = tp.alphaf; double beta = tp.beta; double gamma = tp.gamma; // get time increment double dt = tp.timeIncrement; vec3d eat[3], eap[3], ea[3]; vec3d ebt[3], ebp[3], eb[3]; FERigidBody& RBa = *m_rbA; FERigidBody& RBb = *m_rbB; // body A quatd Qat = RBa.GetRotation(); quatd Qap = RBa.m_qp; vec3d rat = RBa.m_rt; vec3d rap = RBa.m_rp; vec3d ra = rat * alpha + rap * (1 - alpha); vec3d zat = Qat * m_qa0; vec3d zap = Qap * m_qa0; vec3d za = zat*alpha + zap*(1-alpha); eat[0] = m_ea0[0]; RBa.GetRotation().RotateVector(eat[0]); eat[1] = m_ea0[1]; RBa.GetRotation().RotateVector(eat[1]); eat[2] = m_ea0[2]; RBa.GetRotation().RotateVector(eat[2]); eap[0] = m_ea0[0]; RBa.m_qp.RotateVector(eap[0]); eap[1] = m_ea0[1]; RBa.m_qp.RotateVector(eap[1]); eap[2] = m_ea0[2]; RBa.m_qp.RotateVector(eap[2]); ea[0] = eat[0]*alpha + eap[0]*(1-alpha); ea[1] = eat[1]*alpha + eap[1]*(1-alpha); ea[2] = eat[2]*alpha + eap[2]*(1-alpha); mat3d zahat; zahat.skew(za); mat3d zathat; zathat.skew(zat); // body b quatd Qbt = RBb.GetRotation(); quatd Qbp = RBb.m_qp; vec3d rbt = RBb.m_rt; vec3d rbp = RBb.m_rp; vec3d rb = rbt * alpha + rbp * (1 - alpha); vec3d zbt = Qbt * m_qb0; vec3d zbp = Qbp * m_qb0; vec3d zb = zbt*alpha + zbp*(1-alpha); ebt[0] = m_eb0[0]; RBb.GetRotation().RotateVector(ebt[0]); ebt[1] = m_eb0[1]; RBb.GetRotation().RotateVector(ebt[1]); ebt[2] = m_eb0[2]; RBb.GetRotation().RotateVector(ebt[2]); ebp[0] = m_eb0[0]; RBb.m_qp.RotateVector(ebp[0]); ebp[1] = m_eb0[1]; RBb.m_qp.RotateVector(ebp[1]); ebp[2] = m_eb0[2]; RBb.m_qp.RotateVector(ebp[2]); eb[0] = ebt[0]*alpha + ebp[0]*(1-alpha); eb[1] = ebt[1]*alpha + ebp[1]*(1-alpha); eb[2] = ebt[2]*alpha + ebp[2]*(1-alpha); mat3d zbhat; zbhat.skew(zb); mat3d zbthat; zbthat.skew(zbt); mat3d eahat[3], ebhat[3], eathat[3], ebthat[3]; for (int j = 0; j < 3; ++j) { eahat[j] = skew(ea[j]); ebhat[j] = skew(eb[j]); eathat[j] = skew(eat[j]); ebthat[j] = skew(ebt[j]); } if (m_laugon != FECore::LAGMULT_METHOD) { vec3d c = rb + zb - ra - za; m_F = m_L + c * m_eps; mat3dd I(1); vec3d ksi; quatd q, a, r; if (m_bq) { q = (alpha * RBb.GetRotation() + (1 - alpha) * RBb.m_qp) * (alpha * RBa.GetRotation() + (1 - alpha) * RBa.m_qp).Inverse(); a = quatd(m_qp, ea[0]); r = a * q.Inverse(); r.MakeUnit(); ksi = r.GetVector() * r.GetAngle(); } else ksi = (ea[0] ^ eb[0]) / 2; m_M = m_U + ksi * m_ups + ea[0] * m_Mp; mat3d K, Wba, Wab; Wba = (ebhat[0] * eathat[0]) / 2; Wab = (eahat[0] * ebthat[0]) / 2; if (m_bq) { quatd qa = RBa.GetRotation() * (alpha * RBa.GetRotation() + (1 - alpha) * RBa.m_qp).Inverse(); quatd qb = RBb.GetRotation() * (alpha * RBb.GetRotation() + (1 - alpha) * RBb.m_qp).Inverse(); qa.MakeUnit(); qb.MakeUnit(); mat3d Qa = qa.RotationMatrix(); mat3d Qb = qb.RotationMatrix(); mat3d A = a.RotationMatrix(); mat3d R = r.RotationMatrix(); mat3dd I(1); Wba = A *(I * Qa.trace() - Qa) / 2; Wab = R *(I * Qb.trace() - Qb) / 2; } // add damping mat3ds A; mat3d Ba, Bb, Ca, Cb, W; A.zero(); Ba.zero(); Bb.zero(); Ca.zero(); Cb.zero(); W.zero(); if ((m_cps > 0) || (m_rps > 0)) { // body A vec3d vat = RBa.m_vt + (RBa.m_wt ^ zat); vec3d vap = RBa.m_vp + (RBa.m_wp ^ zap); vec3d va = vat * alpha + vap * (1 - alpha); quatd qai = RBa.GetRotation() * RBa.m_qp.Inverse(); qai.MakeUnit(); vec3d cai = qai.GetVector() * (2 * tan(qai.GetAngle() / 2)); mat3d Ta = I + skew(cai) / 2 + dyad(cai) / 4; vec3d wa = RBa.m_wt * alpha + RBa.m_wp * (1 - alpha); // body b vec3d vbt = RBb.m_vt + (RBb.m_wt ^ zbt); vec3d vbp = RBb.m_vp + (RBb.m_wp ^ zbp); vec3d vb = vbt * alpha + vbp * (1 - alpha); quatd qbi = RBb.GetRotation() * RBb.m_qp.Inverse(); qbi.MakeUnit(); vec3d cbi = qbi.GetVector() * (2 * tan(qbi.GetAngle() / 2)); mat3d Tb = I + skew(cbi) / 2 + dyad(cbi) / 4; vec3d wb = RBb.m_wt * alpha + RBb.m_wp * (1 - alpha); m_F += (vb - va)*m_cps; vec3d w = wb - wa; // angular damping along all directions if rotation is prescribed mat3ds P = m_bq ? I : I - dyad(ea[0]); m_M += P*w*m_rps; A = I*(gamma/beta/dt); Ba = zathat * Ta.transpose() * (gamma / beta / dt) + skew(RBa.m_wt) * zathat; Bb = zbthat * Tb.transpose() * (gamma / beta / dt) + skew(RBb.m_wt) * zbthat; Ca = P * Ta.transpose() * (gamma / beta / dt); Cb = P * Tb.transpose() * (gamma / beta / dt); W = (mat3dd(ea[0] * w) + (ea[0] & w)) * eathat[0]; } mat3d Fhat; Fhat.skew(m_F); mat3d Mhat; Mhat.skew(m_M); FEElementMatrix ke(12, 12); ke.zero(); // row 1 ke.set(0, 0, I * (m_eps) + A * (m_cps)); ke.set(0, 3, zathat * (-m_eps) + Ba * (-m_cps)); ke.set(0, 6, I * (-m_eps) + A * (-m_cps)); ke.set(0, 9, zbthat * (m_eps) + Bb * (m_cps)); // row 2 ke.set(3, 0, zahat* (m_eps) + zahat * A * (m_cps)); ke.set(3, 3, (zahat * zathat * m_eps + Fhat * zathat + Wba * m_ups) * (-1.0)); ke.set(3, 6, zahat * (-m_eps) + zahat * A * (-m_cps)); ke.set(3, 9, (zahat* zbthat* m_eps + Wab * m_ups)); if (m_cps) { ke.add(3, 3, eathat[0] * (m_Mp)+(zahat * Ba) * (-m_cps)); ke.add(3, 9, (zahat * Bb) * (m_cps)); } if (m_rps) { ke.add(3, 3, (W - Ca) * (m_rps)); ke.add(3, 9, Cb * (m_rps)); } // row 3 ke.set(6, 0, I* (-m_eps) + A * (-m_cps)); ke.set(6, 3, zathat * (m_eps) + Ba * (m_cps)); ke.set(6, 6, I * (m_eps) + A * (m_cps)); ke.set(6, 9, zbthat * (-m_eps) + Bb * (-m_cps)); // row 4 ke.set(9, 0, zbhat* (-m_eps) + zbhat * A * (-m_cps)); ke.set(9, 3, zbhat* zathat* m_eps + Wba * m_ups); ke.set(9, 6, zbhat* (m_eps) + zbhat * A * (m_cps)); ke.set(9, 9, (zbhat * zbthat * m_eps - Fhat * zbthat + Wab * m_ups) * (-1.0)); if (m_cps) { ke.add(9, 0, -eathat[0] * (m_Mp)+(zbhat * Ba) * (m_cps)); ke.add(9, 9, (zbhat * Bb) * (-m_cps)); } if (m_rps) { ke.add(9, 0, -(W - Ca) * (m_rps)); ke.add(9, 9, -Cb * (m_rps)); } ke *= alpha; vector<int> LM(12); for (int j = 0; j < 6; ++j) { LM[j] = RBa.m_LM[j]; LM[j + 6] = RBb.m_LM[j]; } ke.SetIndices(LM); LS.Assemble(ke); } else { FEElementMatrix ke; ke.resize(18, 18); ke.zero(); mat3dd I(1.0); // translation constraint mat3da Fhat(m_F); ke.sub( 3, 3, -Fhat * zahat); ke.sub( 9, 9, Fhat* zbhat); ke.sub( 0, 12, -I); ke.sub( 3, 12, -zahat); ke.sub( 6, 12, I); ke.sub( 9, 12, zbhat); ke.sub(12, 0, -I); ke.sub(12, 3, zahat); ke.sub(12, 6, I); ke.sub(12, 9, -zbhat); // rotational constraint 1 mat3da Mhat(m_M); ke.sub(3, 3, -Mhat*eahat[0]); ke.sub(9, 9, Mhat*ebhat[0]); ke.sub(3, 15, -eahat[0]); ke.sub(9, 15, ebhat[0]); ke.sub(15, 3, eahat[0]); ke.sub(15, 9, -ebhat[0]); vector<int> LM; UnpackLM(LM); ke.SetIndices(LM); LS.Assemble(ke); } if (m_torsion_stiffness != 0) { vec3d zbat = m_qb0; RBa.GetRotation().RotateVector(zbat); vec3d zbap = m_qb0; RBa.m_qp.RotateVector(zbap); vec3d zba = zbat * alpha + zbap * (1 - alpha); vec3d nb(zb); nb.unit(); vec3d nba(zba); nba.unit(); mat3d nbhat = skew(nb); mat3d nbahat = skew(nba); mat3d Kbba = nbhat * nbahat * m_torsion_stiffness; mat3d Kbab = nbahat * nbhat * m_torsion_stiffness; FEElementMatrix ke(12, 12); ke.zero(); ke.sub(3, 3, Kbba); ke.sub(3, 9, -Kbab); ke.sub(9, 3, -Kbba); ke.sub(9, 9, Kbab); ke *= alpha; vector<int> LM(12); for (int j = 0; j < 6; ++j) { LM[j ] = RBa.m_LM[j]; LM[j + 6] = RBb.m_LM[j]; } ke.SetIndices(LM); LS.Assemble(ke); } } //----------------------------------------------------------------------------- bool FERigidRevoluteJoint::Augment(int naug, const FETimeInfo& tp) { if (m_laugon != FECore::AUGLAG_METHOD) return true; vec3d ra, rb, qa, qb, c, ksi, Lm; vec3d za, zb; vec3d eat[3], eap[3], ea[3]; vec3d ebt[3], ebp[3], eb[3]; double normF0, normF1; vec3d Um; double normM0, normM1; bool bconv = true; FERigidBody& RBa = *m_rbA; FERigidBody& RBb = *m_rbB; double alpha = tp.alphaf; ra = RBa.m_rt*alpha + RBa.m_rp*(1-alpha); rb = RBb.m_rt*alpha + RBb.m_rp*(1-alpha); vec3d zat = m_qa0; RBa.GetRotation().RotateVector(zat); vec3d zap = m_qa0; RBa.m_qp.RotateVector(zap); za = zat*alpha + zap*(1-alpha); eat[0] = m_ea0[0]; RBa.GetRotation().RotateVector(eat[0]); eat[1] = m_ea0[1]; RBa.GetRotation().RotateVector(eat[1]); eat[2] = m_ea0[2]; RBa.GetRotation().RotateVector(eat[2]); eap[0] = m_ea0[0]; RBa.m_qp.RotateVector(eap[0]); eap[1] = m_ea0[1]; RBa.m_qp.RotateVector(eap[1]); eap[2] = m_ea0[2]; RBa.m_qp.RotateVector(eap[2]); ea[0] = eat[0]*alpha + eap[0]*(1-alpha); ea[1] = eat[1]*alpha + eap[1]*(1-alpha); ea[2] = eat[2]*alpha + eap[2]*(1-alpha); vec3d zbt = m_qb0; RBb.GetRotation().RotateVector(zbt); vec3d zbp = m_qb0; RBb.m_qp.RotateVector(zbp); zb = zbt*alpha + zbp*(1-alpha); ebt[0] = m_eb0[0]; RBb.GetRotation().RotateVector(ebt[0]); ebt[1] = m_eb0[1]; RBb.GetRotation().RotateVector(ebt[1]); ebt[2] = m_eb0[2]; RBb.GetRotation().RotateVector(ebt[2]); ebp[0] = m_eb0[0]; RBb.m_qp.RotateVector(ebp[0]); ebp[1] = m_eb0[1]; RBb.m_qp.RotateVector(ebp[1]); ebp[2] = m_eb0[2]; RBb.m_qp.RotateVector(ebp[2]); eb[0] = ebt[0]*alpha + ebp[0]*(1-alpha); eb[1] = ebt[1]*alpha + ebp[1]*(1-alpha); eb[2] = ebt[2]*alpha + ebp[2]*(1-alpha); c = rb + zb - ra - za; normF0 = sqrt(m_L*m_L); // calculate trial multiplier Lm = m_L + c*m_eps; normF1 = sqrt(Lm*Lm); if (m_bq) { quatd q = (alpha*RBb.GetRotation() + (1 - alpha)*RBb.m_qp)*(alpha*RBa.GetRotation() + (1 - alpha)*RBa.m_qp).Inverse(); quatd a(m_qp,ea[0]); quatd r = a*q.Inverse(); r.MakeUnit(); ksi = r.GetVector()*r.GetAngle(); } else ksi = (ea[0] ^ eb[0])/2; normM0 = sqrt(m_U*m_U); // calculate trial multiplier Um = m_U + ksi*m_ups; normM1 = sqrt(Um*Um); // check convergence of constraints feLog(" rigid connector # %d (revolute joint)\n", m_nID+1); feLog(" CURRENT REQUIRED\n"); double pctn = 0; double gap = c.norm(); double qap = ksi.norm(); if (fabs(normF1) > 1e-10) pctn = fabs((normF1 - normF0)/normF1); if (m_atol) feLog(" force : %15le %15le\n", pctn, m_atol); else feLog(" force : %15le ***\n", pctn); if (m_gtol) feLog(" gap : %15le %15le\n", gap, m_gtol); else feLog(" gap : %15le ***\n", gap); double qctn = 0; if (fabs(normM1) > 1e-10) qctn = fabs((normM1 - normM0)/normM1); if (m_atol) feLog(" moment: %15le %15le\n", qctn, m_atol); else feLog(" moment: %15le ***\n", qctn); if (m_qtol) feLog(" angle : %15le %15le\n", qap, m_qtol); else feLog(" angle : %15le ***\n", qap); if (m_atol && ((pctn >= m_atol) || (qctn >= m_atol))) bconv = false; if (m_gtol && (gap >= m_gtol)) bconv = false; if (m_qtol && (qap >= m_qtol)) bconv = false; if (naug < m_naugmin ) bconv = false; if (naug >= m_naugmax) bconv = true; if (!bconv) { // update multipliers m_L = Lm; m_U = Um; } // auto-penalty update (works only with gaptol and angtol) if (m_bautopen) { if (m_gtol && (gap > m_gtol)) { m_eps = fmax(gap / m_gtol, 100)*m_eps; feLog(" force_penalty : %15le\n", m_eps); } if (m_qtol && (qap > m_qtol)) { m_ups = fmax(qap / m_qtol, 100)*m_ups; feLog(" moment_penalty : %15le\n", m_ups); } } return bconv; } //----------------------------------------------------------------------------- void FERigidRevoluteJoint::Update() { if (m_laugon == FECore::LAGMULT_METHOD) return; vec3d ra, rb; vec3d za, zb; vec3d eat[3], eap[3], ea[3]; vec3d ebt[3], ebp[3], eb[3]; FERigidBody& RBa = *m_rbA; FERigidBody& RBb = *m_rbB; const FETimeInfo& tp = GetTimeInfo(); double alpha = tp.alphaf; ra = RBa.m_rt*alpha + RBa.m_rp*(1-alpha); rb = RBb.m_rt*alpha + RBb.m_rp*(1-alpha); vec3d zat = m_qa0; RBa.GetRotation().RotateVector(zat); vec3d zap = m_qa0; RBa.m_qp.RotateVector(zap); za = zat*alpha + zap*(1-alpha); eat[0] = m_ea0[0]; RBa.GetRotation().RotateVector(eat[0]); eat[1] = m_ea0[1]; RBa.GetRotation().RotateVector(eat[1]); eat[2] = m_ea0[2]; RBa.GetRotation().RotateVector(eat[2]); eap[0] = m_ea0[0]; RBa.m_qp.RotateVector(eap[0]); eap[1] = m_ea0[1]; RBa.m_qp.RotateVector(eap[1]); eap[2] = m_ea0[2]; RBa.m_qp.RotateVector(eap[2]); ea[0] = eat[0]*alpha + eap[0]*(1-alpha); ea[1] = eat[1]*alpha + eap[1]*(1-alpha); ea[2] = eat[2]*alpha + eap[2]*(1-alpha); vec3d zbt = m_qb0; RBb.GetRotation().RotateVector(zbt); vec3d zbp = m_qb0; RBb.m_qp.RotateVector(zbp); zb = zbt*alpha + zbp*(1-alpha); ebt[0] = m_eb0[0]; RBb.GetRotation().RotateVector(ebt[0]); ebt[1] = m_eb0[1]; RBb.GetRotation().RotateVector(ebt[1]); ebt[2] = m_eb0[2]; RBb.GetRotation().RotateVector(ebt[2]); ebp[0] = m_eb0[0]; RBb.m_qp.RotateVector(ebp[0]); ebp[1] = m_eb0[1]; RBb.m_qp.RotateVector(ebp[1]); ebp[2] = m_eb0[2]; RBb.m_qp.RotateVector(ebp[2]); eb[0] = ebt[0]*alpha + ebp[0]*(1-alpha); eb[1] = ebt[1]*alpha + ebp[1]*(1-alpha); eb[2] = ebt[2]*alpha + ebp[2]*(1-alpha); vec3d c = rb + zb - ra - za; m_F = m_L + c*m_eps; vec3d ksi; if (m_bq) { quatd q = (alpha*RBb.GetRotation() + (1 - alpha)*RBb.m_qp)*(alpha*RBa.GetRotation() + (1 - alpha)*RBa.m_qp).Inverse(); quatd a(m_qp,ea[0]); quatd r = a*q.Inverse(); r.MakeUnit(); ksi = r.GetVector()*r.GetAngle(); } else ksi = (ea[0] ^ eb[0])/2; m_M = m_U + ksi*m_ups + ea[0]*m_Mp; // add damping if (m_cps > 0) { // body A vec3d vat = RBa.m_vt + (RBa.m_wt ^ zat); vec3d vap = RBa.m_vp + (RBa.m_wp ^ zap); vec3d va = vat*alpha + vap*(1-alpha); // body b vec3d vbt = RBb.m_vt + (RBb.m_wt ^ zbt); vec3d vbp = RBb.m_vp + (RBb.m_wp ^ zbp); vec3d vb = vbt*alpha + vbp*(1-alpha); m_F += (vb - va)*m_cps; } if (m_rps > 0) { // body A vec3d wa = RBa.m_wt*alpha + RBa.m_wp*(1-alpha); // body b vec3d wb = RBb.m_wt*alpha + RBb.m_wp*(1-alpha); mat3ds P = m_bq ? mat3dd(1) : mat3dd(1) - dyad(ea[0]); m_M += P*(wb - wa)*m_rps; } } //----------------------------------------------------------------------------- void FERigidRevoluteJoint::Reset() { m_F = vec3d(0,0,0); m_L = vec3d(0,0,0); m_M = vec3d(0,0,0); m_U = vec3d(0,0,0); FERigidBody& RBa = *m_rbA; FERigidBody& RBb = *m_rbB; m_qa0 = m_q0 - RBa.m_r0; m_qb0 = m_q0 - RBb.m_r0; m_ea0[0] = m_e0[0]; m_ea0[1] = m_e0[1]; m_ea0[2] = m_e0[2]; m_eb0[0] = m_e0[0]; m_eb0[1] = m_e0[1]; m_eb0[2] = m_e0[2]; } //----------------------------------------------------------------------------- vec3d FERigidRevoluteJoint::RelativeTranslation(const bool global) { FERigidBody& RBa = *m_rbA; FERigidBody& RBb = *m_rbB; // body A vec3d ra = RBa.m_rt; vec3d za = m_qa0; RBa.GetRotation().RotateVector(za); // body B vec3d rb = RBb.m_rt; vec3d zb = m_qb0; RBb.GetRotation().RotateVector(zb); // relative translation in global coordinate system vec3d x = rb + zb - ra - za; if (global) return x; // evaluate local basis for body A vec3d ea[3]; ea[0] = m_ea0[0]; RBa.GetRotation().RotateVector(ea[0]); ea[1] = m_ea0[1]; RBa.GetRotation().RotateVector(ea[1]); ea[2] = m_ea0[2]; RBa.GetRotation().RotateVector(ea[2]); // project relative translation onto local basis vec3d y(x*ea[0], x*ea[1], x*ea[2]); return y; } //----------------------------------------------------------------------------- vec3d FERigidRevoluteJoint::RelativeRotation(const bool global) { FERigidBody& RBa = *m_rbA; FERigidBody& RBb = *m_rbB; // get relative rotation quatd Q = RBb.GetRotation()*RBa.GetRotation().Inverse(); Q.MakeUnit(); // relative rotation vector vec3d q = Q.GetRotationVector(); if (global) return q; // evaluate local basis for body A vec3d ea[3]; ea[0] = m_ea0[0]; RBa.GetRotation().RotateVector(ea[0]); ea[1] = m_ea0[1]; RBa.GetRotation().RotateVector(ea[1]); ea[2] = m_ea0[2]; RBa.GetRotation().RotateVector(ea[2]); // project relative rotation onto local basis vec3d y(q*ea[0], q*ea[1], q*ea[2]); return y; } // allocate equations int FERigidRevoluteJoint::InitEquations(int neq) { const int LMeq = 6; m_LM.resize(LMeq, -1); if (m_laugon == FECore::LAGMULT_METHOD) { for (int i = 0; i < LMeq; ++i) m_LM[i] = neq + i; return LMeq; } else return 0; } // Build the matrix profile void FERigidRevoluteJoint::BuildMatrixProfile(FEGlobalMatrix& M) { vector<int> lm; UnpackLM(lm); // add it to the pile M.build_add(lm); } void FERigidRevoluteJoint::UnpackLM(vector<int>& lm) { // add the dofs of rigid body A lm.resize(21); lm[0] = m_rbA->m_LM[0]; lm[1] = m_rbA->m_LM[1]; lm[2] = m_rbA->m_LM[2]; lm[3] = m_rbA->m_LM[3]; lm[4] = m_rbA->m_LM[4]; lm[5] = m_rbA->m_LM[5]; // add the dofs of rigid body B lm[ 6] = m_rbB->m_LM[0]; lm[ 7] = m_rbB->m_LM[1]; lm[ 8] = m_rbB->m_LM[2]; lm[ 9] = m_rbB->m_LM[3]; lm[10] = m_rbB->m_LM[4]; lm[11] = m_rbB->m_LM[5]; // add the LM equations if (m_laugon == FECore::LAGMULT_METHOD) { for (int i = 0; i < m_LM.size(); ++i) lm[12 + i] = m_LM[i]; } } void FERigidRevoluteJoint::PrepStep() { m_Fp = m_F; m_Up = m_M; } void FERigidRevoluteJoint::Update(const std::vector<double>& Ui, const std::vector<double>& ui) { if (m_laugon == FECore::LAGMULT_METHOD) { m_F.x = m_Fp.x + Ui[m_LM[0]] + ui[m_LM[0]]; m_F.y = m_Fp.y + Ui[m_LM[1]] + ui[m_LM[1]]; m_F.z = m_Fp.z + Ui[m_LM[2]] + ui[m_LM[2]]; m_M.x = m_Up.x + Ui[m_LM[3]] + ui[m_LM[3]]; m_M.y = m_Up.y + Ui[m_LM[4]] + ui[m_LM[4]]; m_M.z = m_Up.z + Ui[m_LM[5]] + ui[m_LM[5]]; } } void FERigidRevoluteJoint::UpdateIncrements(std::vector<double>& Ui, const std::vector<double>& ui) { if (m_laugon == FECore::LAGMULT_METHOD) { Ui[m_LM[0]] += ui[m_LM[0]]; Ui[m_LM[1]] += ui[m_LM[1]]; Ui[m_LM[2]] += ui[m_LM[2]]; Ui[m_LM[3]] += ui[m_LM[3]]; Ui[m_LM[4]] += ui[m_LM[4]]; Ui[m_LM[5]] += ui[m_LM[5]]; } }
C++
3D
febiosoftware/FEBio
FEBioMech/FESolidMaterial.cpp
.cpp
6,257
186
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #include "stdafx.h" #include "FESolidMaterial.h" #include "FEElasticMaterial.h" // Material parameters for FEElasticMaterial BEGIN_FECORE_CLASS(FESolidMaterial, FEMaterial) ADD_PARAMETER(m_density, "density")->setUnits(UNIT_DENSITY)->MakeTopLevel(true); END_FECORE_CLASS(); FESolidMaterial::FESolidMaterial(FEModel* pfem) : FEMaterial(pfem) { m_density = 1.0; } //! set the material density void FESolidMaterial::SetDensity(const double d) { m_density = d; } //! evaluate density double FESolidMaterial::Density(FEMaterialPoint& pt) { return m_density(pt); } tens4dmm FESolidMaterial::SolidTangent(FEMaterialPoint& mp) { return (UseSecantTangent() ? SecantTangent(mp) : Tangent(mp)); } //----------------------------------------------------------------------------- mat3ds FESolidMaterial::SecantStress(FEMaterialPoint& pt, bool PK2) { assert(false); return mat3ds(0.0); } //----------------------------------------------------------------------------- //! calculate the 2nd Piola-Kirchhoff stress at material point, using prescribed Lagrange strain //! needed for EAS analyses where the compatible strain (calculated from displacements) is enhanced mat3ds FESolidMaterial::PK2Stress(FEMaterialPoint& mp, const mat3ds E) { // Evaluate right Cauchy-Green tensor from E mat3ds C = mat3dd(1) + E*2; // Evaluate right stretch tensor U from C vec3d v[3]; double lam[3]; C.eigen2(lam, v); lam[0] = sqrt(lam[0]); lam[1] = sqrt(lam[1]); lam[2] = sqrt(lam[2]); mat3ds U = dyad(v[0])*lam[0] + dyad(v[1])*lam[1] + dyad(v[2])*lam[2]; double J = lam[0]*lam[1]*lam[2]; // temporarily replace F in material point with U FEElasticMaterialPoint& pt = *mp.ExtractData<FEElasticMaterialPoint>(); mat3d Fsafe = pt.m_F; double Jsafe = pt.m_J; pt.m_F = U; pt.m_J = J; // Evaluate Cauchy stress mat3ds s = Stress(mp); // Restore original F pt.m_F = Fsafe; pt.m_J = Jsafe; // Convert Cauchy stress to 2nd P-K stress mat3ds Ui = dyad(v[0])/lam[0] + dyad(v[1])/lam[1] + dyad(v[2])/lam[2]; mat3ds S = (Ui*s*Ui).sym()*J; return S; } //----------------------------------------------------------------------------- //! calculate material tangent stiffness at material point, using prescribed Lagrange strain //! needed for EAS analyses where the compatible strain (calculated from displacements) is enhanced tens4dmm FESolidMaterial::MaterialTangent(FEMaterialPoint& mp, const mat3ds E) { // Evaluate right Cauchy-Green tensor from E mat3ds C = mat3dd(1) + E*2; // Evaluate right stretch tensor U from C vec3d v[3]; double lam[3]; C.eigen2(lam, v); lam[0] = sqrt(lam[0]); lam[1] = sqrt(lam[1]); lam[2] = sqrt(lam[2]); mat3d U = dyad(v[0])*lam[0] + dyad(v[1])*lam[1] + dyad(v[2])*lam[2]; double J = lam[0]*lam[1]*lam[2]; // temporarily replace F in material point with U FEElasticMaterialPoint& pt = *mp.ExtractData<FEElasticMaterialPoint>(); mat3d Fsafe = pt.m_F; double Jsafe = pt.m_J; pt.m_F = U; pt.m_J = J; // Evaluate Cauchy stress tens4dmm c = SolidTangent(mp); // Restore original F pt.m_F = Fsafe; pt.m_J = Jsafe; // Convert spatial tangent to material tangent mat3d Ui = dyad(v[0])/lam[0] + dyad(v[1])/lam[1] + dyad(v[2])/lam[2]; tens4dmm Cm = c.pp(Ui)*J; return Cm; } //----------------------------------------------------------------------------- //! calculate spatial tangent stiffness at material point, using secant method tens4dmm FESolidMaterial::SecantTangent(FEMaterialPoint& mp, bool mat) { // extract the deformation gradient FEElasticMaterialPoint& pt = *mp.ExtractData<FEElasticMaterialPoint>(); mat3d F = pt.m_F; double J = pt.m_J; mat3ds E = pt.Strain(); mat3dd I(1); // calculate the 2nd P-K stress at the current deformation gradient mat3ds S = PK2Stress(mp,E); // create deformation gradient increment double eps = 1e-9; vec3d e[3]; e[0] = vec3d(1,0,0); e[1] = vec3d(0,1,0); e[2] = vec3d(0,0,1); tens4dmm C; for (int k=0; k<3; ++k) { for (int l=k; l<3; ++l) { // evaluate incremental stress mat3ds dE = dyads(e[k], e[l])*(eps/2); mat3ds dS = (PK2Stress(mp,E+dE) - S)/eps; // evaluate the secant modulus C(0,0,k,l) = C(0,0,l,k) = dS.xx(); C(1,1,k,l) = C(1,1,l,k) = dS.yy(); C(2,2,k,l) = C(2,2,l,k) = dS.zz(); C(0,1,k,l) = C(1,0,k,l) = C(0,1,l,k) = C(1,0,l,k) = dS.xy(); C(1,2,k,l) = C(2,1,k,l) = C(1,2,l,k) = C(2,1,l,k) = dS.yz(); C(2,0,k,l) = C(0,2,k,l) = C(2,0,l,k) = C(0,2,l,k) = dS.xz(); } } if (mat) return C; else { // push from material to spatial frame tens4dmm c = C.pp(F)/J; // return secant tangent return c; } }
C++
3D
febiosoftware/FEBio
FEBioMech/FEEFDMooneyRivlin.cpp
.cpp
2,841
74
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #include "stdafx.h" #include "FEEFDMooneyRivlin.h" // define the material parameters BEGIN_FECORE_CLASS(FEEFDMooneyRivlin, FEUncoupledMaterial) ADD_PARAMETER(m_MR.m_c1, "c1")->setUnits(UNIT_PRESSURE); ADD_PARAMETER(m_MR.m_c2, "c2")->setUnits(UNIT_PRESSURE); ADD_PARAMETER(m_EFD.m_beta, 3, "beta"); ADD_PARAMETER(m_EFD.m_ksi , 3, "ksi" )->setUnits(UNIT_PRESSURE); END_FECORE_CLASS(); //----------------------------------------------------------------------------- FEEFDMooneyRivlin::FEEFDMooneyRivlin(FEModel* pfem) : FEUncoupledMaterial(pfem), m_EFD(pfem), m_MR(pfem) { m_EFD.SetParent(this); m_MR.SetParent(this); } //----------------------------------------------------------------------------- bool FEEFDMooneyRivlin::Init() { if (FEUncoupledMaterial::Init() == false) return false; if (m_MR.Init() == false) return false; if (m_EFD.Init() == false) return false; return true; } //----------------------------------------------------------------------------- mat3ds FEEFDMooneyRivlin::DevStress(FEMaterialPoint& pt) { return m_MR.DevStress(pt) + m_EFD.DevStress(pt); } //----------------------------------------------------------------------------- tens4ds FEEFDMooneyRivlin::DevTangent(FEMaterialPoint& pt) { return m_MR.DevTangent(pt) + m_EFD.DevTangent(pt); } //----------------------------------------------------------------------------- //! calculate deviatoric strain energy density double FEEFDMooneyRivlin::DevStrainEnergyDensity(FEMaterialPoint& pt) { return m_MR.DevStrainEnergyDensity(pt) + m_EFD.DevStrainEnergyDensity(pt); }
C++
3D
febiosoftware/FEBio
FEBioFluid/FEFluidDomain3D.cpp
.cpp
24,396
786
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #include "stdafx.h" #include "FEFluidDomain3D.h" #include "FEFluidSolver.h" #include "FECore/log.h" #include "FECore/DOFS.h" #include <FECore/FEModel.h> #include <FECore/FEAnalysis.h> #include <FECore/sys.h> #include "FEBioFluid.h" #include <FECore/FELinearSystem.h> //----------------------------------------------------------------------------- //! constructor //! Some derived classes will pass 0 to the pmat, since the pmat variable will be //! to initialize another material. These derived classes will set the m_pMat variable as well. FEFluidDomain3D::FEFluidDomain3D(FEModel* pfem) : FESolidDomain(pfem), FEFluidDomain(pfem), m_dofW(pfem), m_dofAW(pfem), m_dof(pfem) { m_pMat = 0; m_btrans = true; if (pfem) { m_dofW.AddVariable(FEBioFluid::GetVariableName(FEBioFluid::RELATIVE_FLUID_VELOCITY)); m_dofAW.AddVariable(FEBioFluid::GetVariableName(FEBioFluid::RELATIVE_FLUID_ACCELERATION)); m_dofEF = pfem->GetDOFIndex(FEBioFluid::GetVariableName(FEBioFluid::FLUID_DILATATION), 0); m_dofAEF = pfem->GetDOFIndex(FEBioFluid::GetVariableName(FEBioFluid::FLUID_DILATATION_TDERIV), 0); FEDofList dofs(pfem); dofs.AddDofs(m_dofW); dofs.AddDof(m_dofEF); m_dof = dofs; } } //----------------------------------------------------------------------------- // \todo I don't think this is being used FEFluidDomain3D& FEFluidDomain3D::operator = (FEFluidDomain3D& d) { m_Elem = d.m_Elem; m_pMesh = d.m_pMesh; return (*this); } //----------------------------------------------------------------------------- //! serialize data to archive void FEFluidDomain3D::Serialize(DumpStream& ar) { FESolidDomain::Serialize(ar); if (ar.IsShallow()) return; ar & m_dofW & m_dofAW & m_dof; ar & m_dofEF & m_dofAEF; ar & m_pMat; } //----------------------------------------------------------------------------- // get total dof list const FEDofList& FEFluidDomain3D::GetDOFList() const { return m_dof; } //----------------------------------------------------------------------------- //! Assign material void FEFluidDomain3D::SetMaterial(FEMaterial* pmat) { FEDomain::SetMaterial(pmat); if (pmat) { m_pMat = dynamic_cast<FEFluid*>(pmat); assert(m_pMat); } else m_pMat = 0; } //----------------------------------------------------------------------------- //! Initialize element data void FEFluidDomain3D::PreSolveUpdate(const FETimeInfo& timeInfo) { const int NE = FEElement::MAX_NODES; vec3d x0[NE], r0, v; FEMesh& m = *GetMesh(); for (size_t i=0; i<m_Elem.size(); ++i) { FESolidElement& el = m_Elem[i]; int neln = el.Nodes(); for (int i=0; i<neln; ++i) { x0[i] = m.Node(el.m_node[i]).m_r0; } int n = el.GaussPoints(); for (int j=0; j<n; ++j) { FEMaterialPoint& mp = *el.GetMaterialPoint(j); FEFluidMaterialPoint& pt = *mp.ExtractData<FEFluidMaterialPoint>(); pt.m_r0 = el.Evaluate(x0, j); mp.m_rt = mp.m_r0; if (pt.m_ef <= -1) { throw NegativeJacobianDetected(); } mp.Update(timeInfo); } } } //----------------------------------------------------------------------------- void FEFluidDomain3D::InternalForces(FEGlobalVector& R) { int NE = (int)m_Elem.size(); #pragma omp parallel for shared (NE) for (int i=0; i<NE; ++i) { // element force vector vector<double> fe; vector<int> lm; // get the element FESolidElement& el = m_Elem[i]; // get the element force vector and initialize it to zero int ndof = 4*el.Nodes(); fe.assign(ndof, 0); // calculate internal force vector ElementInternalForce(el, fe); // get the element's LM vector UnpackLM(el, lm); // assemble element 'fe'-vector into global R vector R.Assemble(el.m_node, lm, fe); } } //----------------------------------------------------------------------------- //! calculates the internal equivalent nodal forces for solid elements void FEFluidDomain3D::ElementInternalForce(FESolidElement& el, vector<double>& fe) { int i, n; // jacobian matrix, inverse jacobian matrix and determinants double Ji[3][3], detJ; mat3ds sv; vec3d gradp; const double *H, *Gr, *Gs, *Gt; int nint = el.GaussPoints(); int neln = el.Nodes(); // gradient of shape functions vector<vec3d> gradN(neln); double* gw = el.GaussWeights(); // repeat for all integration points for (n=0; n<nint; ++n) { FEMaterialPoint& mp = *el.GetMaterialPoint(n); FEFluidMaterialPoint& pt = *(mp.ExtractData<FEFluidMaterialPoint>()); // calculate the jacobian detJ = invjac0(el, Ji, n)*gw[n]; vec3d g1(Ji[0][0],Ji[0][1],Ji[0][2]); vec3d g2(Ji[1][0],Ji[1][1],Ji[1][2]); vec3d g3(Ji[2][0],Ji[2][1],Ji[2][2]); // get the viscous stress tensor for this integration point sv = m_pMat->GetViscous()->Stress(mp); // get the gradient of the elastic pressure gradp = pt.m_gradef*m_pMat->Tangent_Pressure_Strain(mp); H = el.H(n); Gr = el.Gr(n); Gs = el.Gs(n); Gt = el.Gt(n); // evaluate spatial gradient of shape functions for (i=0; i<neln; ++i) { gradN[i] = g1*Gr[i] + g2*Gs[i] + g3*Gt[i]; } // Jdot/J double dJoJ = pt.m_efdot/(pt.m_ef+1); for (i=0; i<neln; ++i) { vec3d fs = sv*gradN[i] + gradp*H[i]; double fJ = dJoJ*H[i] + gradN[i]*pt.m_vft; // calculate internal force // the '-' sign is so that the internal forces get subtracted // from the global residual vector fe[4*i ] -= fs.x*detJ; fe[4*i+1] -= fs.y*detJ; fe[4*i+2] -= fs.z*detJ; fe[4*i+3] -= fJ*detJ; } } } //----------------------------------------------------------------------------- void FEFluidDomain3D::BodyForce(FEGlobalVector& R, FEBodyForce& BF) { int NE = (int)m_Elem.size(); for (int i=0; i<NE; ++i) { vector<double> fe; vector<int> lm; // get the element FESolidElement& el = m_Elem[i]; // get the element force vector and initialize it to zero int ndof = 4*el.Nodes(); fe.assign(ndof, 0); // apply body forces ElementBodyForce(BF, el, fe); // get the element's LM vector UnpackLM(el, lm); // assemble element 'fe'-vector into global R vector R.Assemble(el.m_node, lm, fe); } } //----------------------------------------------------------------------------- //! calculates the body forces void FEFluidDomain3D::ElementBodyForce(FEBodyForce& BF, FESolidElement& el, vector<double>& fe) { // jacobian double detJ; double *H; double* gw = el.GaussWeights(); vec3d f; // number of nodes int neln = el.Nodes(); // nodal coordinates vec3d r0[FEElement::MAX_NODES]; for (int i=0; i<neln; ++i) r0[i] = m_pMesh->Node(el.m_node[i]).m_r0; // loop over integration points int nint = el.GaussPoints(); for (int n=0; n<nint; ++n) { FEMaterialPoint& mp = *el.GetMaterialPoint(n); FEFluidMaterialPoint& pt = *mp.ExtractData<FEFluidMaterialPoint>(); double dens = m_pMat->Density(mp); pt.m_r0 = el.Evaluate(r0, n); detJ = detJ0(el, n)*gw[n]; // get the force f = BF.force(mp); H = el.H(n); for (int i=0; i<neln; ++i) { fe[4*i ] -= H[i]*dens*f.x*detJ; fe[4*i+1] -= H[i]*dens*f.y*detJ; fe[4*i+2] -= H[i]*dens*f.z*detJ; } } } //----------------------------------------------------------------------------- //! This function calculates the stiffness due to body forces void FEFluidDomain3D::ElementBodyForceStiffness(FEBodyForce& BF, FESolidElement &el, matrix &ke) { const FETimeInfo& tp = GetFEModel()->GetTime(); int neln = el.Nodes(); int ndof = ke.columns()/neln; // jacobian double detJ; double *H; double* gw = el.GaussWeights(); vec3d f, k; mat3d K, Kvv; // gradient of shape functions vec3d gradN; // loop over integration points int nint = el.GaussPoints(); for (int n=0; n<nint; ++n) { FEMaterialPoint& mp = *el.GetMaterialPoint(n); FEFluidMaterialPoint& pt = *mp.ExtractData<FEFluidMaterialPoint>(); // calculate the jacobian detJ = detJ0(el, n)*gw[n]*tp.alphaf; H = el.H(n); double dens = m_pMat->Density(mp); // get the force f = BF.force(mp); K = BF.stiffness(mp); H = el.H(n); for (int i=0; i<neln; ++i) { for (int j=0; j<neln; ++j) { k = f*(-H[i]*H[j]*dens/(pt.m_ef+1)*detJ); Kvv = K*(H[i]*H[j]*dens*detJ); ke[ndof*i ][ndof*j ] += Kvv(0,0); ke[ndof*i ][ndof*j+1] += Kvv(0,1); ke[ndof*i ][ndof*j+2] += Kvv(0,2); ke[ndof*i+1][ndof*j ] += Kvv(1,0); ke[ndof*i+1][ndof*j+1] += Kvv(1,1); ke[ndof*i+1][ndof*j+2] += Kvv(1,2); ke[ndof*i+2][ndof*j ] += Kvv(2,0); ke[ndof*i+2][ndof*j+1] += Kvv(2,1); ke[ndof*i+2][ndof*j+2] += Kvv(2,2); ke[ndof*i ][ndof*j+3] += k.x; ke[ndof*i+1][ndof*j+3] += k.y; ke[ndof*i+2][ndof*j+3] += k.z; } } } } //----------------------------------------------------------------------------- //! Calculates element material stiffness element matrix void FEFluidDomain3D::ElementStiffness(FESolidElement &el, matrix &ke) { const FETimeInfo& tp = GetFEModel()->GetTime(); int i, i4, j, j4, n; // Get the current element's data const int nint = el.GaussPoints(); const int neln = el.Nodes(); // gradient of shape functions vector<vec3d> gradN(neln); double dt = tp.timeIncrement; double ksi = tp.alpham/(tp.gamma*tp.alphaf); double *H, *Gr, *Gs, *Gt; // jacobian double Ji[3][3], detJ; // weights at gauss points const double *gw = el.GaussWeights(); // calculate element stiffness matrix for (n=0; n<nint; ++n) { // calculate jacobian detJ = invjac0(el, Ji, n)*gw[n]*tp.alphaf; vec3d g1(Ji[0][0],Ji[0][1],Ji[0][2]); vec3d g2(Ji[1][0],Ji[1][1],Ji[1][2]); vec3d g3(Ji[2][0],Ji[2][1],Ji[2][2]); H = el.H(n); Gr = el.Gr(n); Gs = el.Gs(n); Gt = el.Gt(n); // setup the material point // NOTE: deformation gradient and determinant have already been evaluated in the stress routine FEMaterialPoint& mp = *el.GetMaterialPoint(n); FEFluidMaterialPoint& pt = *(mp.ExtractData<FEFluidMaterialPoint>()); double Jf = 1 + pt.m_ef; // get the tangents mat3ds svJ = m_pMat->GetViscous()->Tangent_Strain(mp); tens4ds cv = m_pMat->Tangent_RateOfDeformation(mp); double dp = m_pMat->Tangent_Pressure_Strain(mp); double d2p = m_pMat->Tangent_Pressure_Strain_Strain(mp); // Jdot/J double dJoJ = pt.m_efdot/Jf; // evaluate spatial gradient of shape functions for (i=0; i<neln; ++i) gradN[i] = g1*Gr[i] + g2*Gs[i] + g3*Gt[i]; // evaluate stiffness matrix for (i=0, i4=0; i<neln; ++i, i4 += 4) { for (j=0, j4 = 0; j<neln; ++j, j4 += 4) { mat3d Kvv = vdotTdotv(gradN[i], cv, gradN[j]); vec3d kJv = (pt.m_gradef*(H[i]/Jf) + gradN[i])*H[j]; vec3d kvJ = (svJ*gradN[i])*H[j] + (gradN[j]*dp+pt.m_gradef*(H[j]*d2p))*H[i]; double kJJ = (H[j]*(ksi/dt - dJoJ) + gradN[j]*pt.m_vft)*H[i]/Jf; ke[i4 ][j4 ] += Kvv(0,0)*detJ; ke[i4 ][j4+1] += Kvv(0,1)*detJ; ke[i4 ][j4+2] += Kvv(0,2)*detJ; ke[i4 ][j4+3] += kvJ.x*detJ; ke[i4+1][j4 ] += Kvv(1,0)*detJ; ke[i4+1][j4+1] += Kvv(1,1)*detJ; ke[i4+1][j4+2] += Kvv(1,2)*detJ; ke[i4+1][j4+3] += kvJ.y*detJ; ke[i4+2][j4 ] += Kvv(2,0)*detJ; ke[i4+2][j4+1] += Kvv(2,1)*detJ; ke[i4+2][j4+2] += Kvv(2,2)*detJ; ke[i4+2][j4+3] += kvJ.z*detJ; ke[i4+3][j4 ] += kJv.x*detJ; ke[i4+3][j4+1] += kJv.y*detJ; ke[i4+3][j4+2] += kJv.z*detJ; ke[i4+3][j4+3] += kJJ*detJ; } } } } //----------------------------------------------------------------------------- void FEFluidDomain3D::StiffnessMatrix(FELinearSystem& LS) { // repeat over all solid elements int NE = (int)m_Elem.size(); #pragma omp parallel for shared (NE) for (int iel=0; iel<NE; ++iel) { FESolidElement& el = m_Elem[iel]; // element stiffness matrix FEElementMatrix ke(el); // create the element's stiffness matrix int ndof = 4*el.Nodes(); ke.resize(ndof, ndof); ke.zero(); // calculate material stiffness ElementStiffness(el, ke); // get the element's LM vector vector<int> lm; UnpackLM(el, lm); ke.SetIndices(lm); // assemble element matrix in global stiffness matrix LS.Assemble(ke); } } //----------------------------------------------------------------------------- void FEFluidDomain3D::MassMatrix(FELinearSystem& LS) { // repeat over all solid elements int NE = (int)m_Elem.size(); #pragma omp parallel for shared(NE) for (int iel=0; iel<NE; ++iel) { FESolidElement& el = m_Elem[iel]; // element stiffness matrix FEElementMatrix ke(el); // create the element's stiffness matrix int ndof = 4*el.Nodes(); ke.resize(ndof, ndof); ke.zero(); // calculate inertial stiffness ElementMassMatrix(el, ke); // get the element's LM vector vector<int> lm; UnpackLM(el, lm); ke.SetIndices(lm); // assemble element matrix in global stiffness matrix LS.Assemble(ke); } } //----------------------------------------------------------------------------- void FEFluidDomain3D::BodyForceStiffness(FELinearSystem& LS, FEBodyForce& bf) { // repeat over all solid elements int NE = (int)m_Elem.size(); for (int iel=0; iel<NE; ++iel) { FESolidElement& el = m_Elem[iel]; // element stiffness matrix FEElementMatrix ke(el); // create the element's stiffness matrix int ndof = 4*el.Nodes(); ke.resize(ndof, ndof); ke.zero(); // calculate inertial stiffness ElementBodyForceStiffness(bf, el, ke); // get the element's LM vector vector<int> lm; UnpackLM(el, lm); ke.SetIndices(lm); // assemble element matrix in global stiffness matrix LS.Assemble(ke); } } //----------------------------------------------------------------------------- //! calculates element inertial stiffness matrix void FEFluidDomain3D::ElementMassMatrix(FESolidElement& el, matrix& ke) { const FETimeInfo& tp = GetFEModel()->GetTime(); int i, i4, j, j4, n; // Get the current element's data const int nint = el.GaussPoints(); const int neln = el.Nodes(); // gradient of shape functions vector<vec3d> gradN(neln); double *H; double *Gr, *Gs, *Gt; // jacobian double Ji[3][3], detJ; // weights at gauss points const double *gw = el.GaussWeights(); double dt = tp.timeIncrement; double ksi = tp.alpham/(tp.gamma*tp.alphaf)*m_btrans; // calculate element stiffness matrix for (n=0; n<nint; ++n) { // calculate jacobian detJ = invjac0(el, Ji, n)*gw[n]*tp.alphaf; vec3d g1(Ji[0][0],Ji[0][1],Ji[0][2]); vec3d g2(Ji[1][0],Ji[1][1],Ji[1][2]); vec3d g3(Ji[2][0],Ji[2][1],Ji[2][2]); H = el.H(n); Gr = el.Gr(n); Gs = el.Gs(n); Gt = el.Gt(n); // setup the material point // NOTE: deformation gradient and determinant have already been evaluated in the stress routine FEMaterialPoint& mp = *el.GetMaterialPoint(n); FEFluidMaterialPoint& pt = *(mp.ExtractData<FEFluidMaterialPoint>()); double dens = m_pMat->Density(mp); // evaluate spatial gradient of shape functions for (i=0; i<neln; ++i) gradN[i] = g1*Gr[i] + g2*Gs[i] + g3*Gt[i]; // evaluate stiffness matrix for (i=0, i4=0; i<neln; ++i, i4 += 4) { for (j=0, j4 = 0; j<neln; ++j, j4 += 4) { mat3d Mv = ((mat3dd(ksi/dt) + pt.m_Lf)*H[j] + mat3dd(gradN[j]*pt.m_vft))*(H[i]*dens*detJ); vec3d mJ = pt.m_aft*(-H[i]*H[j]*dens/(pt.m_ef+1)*detJ); ke[i4 ][j4 ] += Mv(0,0); ke[i4 ][j4+1] += Mv(0,1); ke[i4 ][j4+2] += Mv(0,2); ke[i4 ][j4+3] += mJ.x; ke[i4+1][j4 ] += Mv(1,0); ke[i4+1][j4+1] += Mv(1,1); ke[i4+1][j4+2] += Mv(1,2); ke[i4+1][j4+3] += mJ.y; ke[i4+2][j4 ] += Mv(2,0); ke[i4+2][j4+1] += Mv(2,1); ke[i4+2][j4+2] += Mv(2,2); ke[i4+2][j4+3] += mJ.z; } } } } //----------------------------------------------------------------------------- void FEFluidDomain3D::Update(const FETimeInfo& tp) { bool berr = false; int NE = (int) m_Elem.size(); #pragma omp parallel for shared(NE, berr) for (int i=0; i<NE; ++i) { try { UpdateElementStress(i, tp); } catch (NegativeJacobian e) { #pragma omp critical { // reset the logfile mode berr = true; if (NegativeJacobian::DoOutput()) feLogError(e.what()); } } } if (berr) throw NegativeJacobianDetected(); } //----------------------------------------------------------------------------- //! Update element state data (mostly stresses, but some other stuff as well) void FEFluidDomain3D::UpdateElementStress(int iel, const FETimeInfo& tp) { double alphaf = tp.alphaf; double alpham = tp.alpham; // get the solid element FESolidElement& el = m_Elem[iel]; // get the number of integration points int nint = el.GaussPoints(); // number of nodes int neln = el.Nodes(); // nodal coordinates const int NELN = FEElement::MAX_NODES; vec3d vt[NELN], vp[NELN]; vec3d at[NELN], ap[NELN]; double et[NELN], ep[NELN]; double aet[NELN], aep[NELN]; for (int j=0; j<neln; ++j) { FENode& node = m_pMesh->Node(el.m_node[j]); vt[j] = node.get_vec3d(m_dofW[0], m_dofW[1], m_dofW[2]); vp[j] = node.get_vec3d_prev(m_dofW[0], m_dofW[1], m_dofW[2]); at[j] = node.get_vec3d(m_dofAW[0], m_dofAW[1], m_dofAW[2]); ap[j] = node.get_vec3d_prev(m_dofAW[0], m_dofAW[1], m_dofAW[2]); et[j] = node.get(m_dofEF); ep[j] = node.get_prev(m_dofEF); aet[j] = node.get(m_dofAEF); aep[j] = node.get_prev(m_dofAEF); } // loop over the integration points and update // velocity, velocity gradient, acceleration // stress and pressure at the integration point for (int n=0; n<nint; ++n) { FEMaterialPoint& mp = *el.GetMaterialPoint(n); FEFluidMaterialPoint& pt = *(mp.ExtractData<FEFluidMaterialPoint>()); // material point data pt.m_vft = el.Evaluate(vt, n)*alphaf + el.Evaluate(vp, n)*(1-alphaf); pt.m_Lf = gradient(el, vt, n)*alphaf + gradient(el, vp, n)*(1-alphaf); pt.m_aft = pt.m_Lf*pt.m_vft; if (m_btrans) pt.m_aft += el.Evaluate(at, n)*alpham + el.Evaluate(ap, n)*(1-alpham); pt.m_ef = el.Evaluate(et, n)*alphaf + el.Evaluate(ep, n)*(1-alphaf); pt.m_gradef = gradient(el, et, n)*alphaf + gradient(el, ep, n)*(1-alphaf); pt.m_efdot = pt.m_gradef*pt.m_vft; if (m_btrans) pt.m_efdot += el.Evaluate(aet, n)*alpham + el.Evaluate(aep, n)*(1-alpham); // calculate the stress at this material point pt.m_sf = m_pMat->Stress(mp); // calculate the fluid pressure pt.m_pf = m_pMat->Pressure(mp); } } //----------------------------------------------------------------------------- void FEFluidDomain3D::InertialForces(FEGlobalVector& R) { int NE = (int)m_Elem.size(); #pragma omp parallel for shared(NE) for (int i=0; i<NE; ++i) { // element force vector vector<double> fe; vector<int> lm; // get the element FESolidElement& el = m_Elem[i]; // get the element force vector and initialize it to zero int ndof = 4*el.Nodes(); fe.assign(ndof, 0); // calculate internal force vector ElementInertialForce(el, fe); // get the element's LM vector UnpackLM(el, lm); // assemble element 'fe'-vector into global R vector R.Assemble(el.m_node, lm, fe); } } //----------------------------------------------------------------------------- void FEFluidDomain3D::ElementInertialForce(FESolidElement& el, vector<double>& fe) { int i, n; // jacobian determinant double detJ; const double* H; int nint = el.GaussPoints(); int neln = el.Nodes(); double* gw = el.GaussWeights(); // repeat for all integration points for (n=0; n<nint; ++n) { FEMaterialPoint& mp = *el.GetMaterialPoint(n); FEFluidMaterialPoint& pt = *(mp.ExtractData<FEFluidMaterialPoint>()); double dens = m_pMat->Density(mp); // calculate the jacobian detJ = detJ0(el, n)*gw[n]; H = el.H(n); for (i=0; i<neln; ++i) { vec3d f = pt.m_aft*(dens*H[i]); // calculate internal force // the '-' sign is so that the internal forces get subtracted // from the global residual vector fe[4*i ] -= f.x*detJ; fe[4*i+1] -= f.y*detJ; fe[4*i+2] -= f.z*detJ; } } }
C++
3D
febiosoftware/FEBio
FEBioFluid/FEFluidSolutes.h
.h
7,536
177
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #pragma once #include <FEBioMech/FEElasticMaterial.h> #include "FEFluid.h" #include <FEBioMix/FESolute.h> #include <FEBioMix/FESoluteInterface.h> #include <FEBioMix/FEOsmoticCoefficient.h> #include <FEBioMix/FEChemicalReaction.h> #include <FECore/FEModelParam.h> //----------------------------------------------------------------------------- //! FSI material point class. // class FEBIOFLUID_API FEFluidSolutesMaterialPoint : public FEMaterialPointData { public: //! constructor FEFluidSolutesMaterialPoint(FEMaterialPointData* pt); //! create a shallow copy FEMaterialPointData* Copy(); //! data serialization void Serialize(DumpStream& ar); //! Data initialization void Init(); public: double Osmolarity() const; public: // solutes material data int m_nsol; //!< number of solutes vector<double> m_c; //!< effective solute concentration vector<double> m_ca; //!< actual solute concentration vector<vec3d> m_gradc; //!< spatial gradient of solute concentration vector<vec3d> m_j; //!< solute molar flux vector<double> m_cdot; //!< material time derivative of solute concentration following fluid double m_psi; //!< electric potential vec3d m_Ie; //!< current density double m_pe; //!< effective fluid pressure vector<double> m_k; //!< solute partition coefficient vector<double> m_dkdJ; //!< 1st deriv of m_k with strain (J) vector<double> m_dkdJJ; //!< 2nd deriv of m_k with strain (J) vector< vector<double> > m_dkdc; //!< 1st deriv of m_k with effective concentration vector< vector<double> > m_dkdJc; //!< cross deriv of m_k with J and c vector< vector< vector<double> > > m_dkdcc; // 2nd deriv of m_k with c }; //----------------------------------------------------------------------------- //! Base class for FluidFSI materials. class FEBIOFLUID_API FEFluidSolutes : public FEMaterial, public FESoluteInterface_T<FEFluidSolutesMaterialPoint> { public: FEFluidSolutes(FEModel* pfem); // returns a pointer to a new material point object FEMaterialPointData* CreateMaterialPointData() override; //! performs initialization bool Init() override; //! Serialization void Serialize(DumpStream& ar) override; public: FEFluid* Fluid() { return m_pFluid; } //! calculate solute molar flux vec3d SoluteFlux(const FEMaterialPoint& pt, const int sol); //! calculate diffusive solute molar flux vec3d SoluteDiffusiveFlux(const FEMaterialPoint& pt, const int sol); //! actual concentration (as opposed to effective concentration) double ConcentrationActual(const FEMaterialPoint& pt, const int sol); //! actual fluid pressure (as opposed to effective pressure) double PressureActual(const FEMaterialPoint& pt); //! partition coefficient double PartitionCoefficient(const FEMaterialPoint& pt, const int sol); //! partition coefficients and their derivatives void PartitionCoefficientFunctions(const FEMaterialPoint& mp, vector<double>& kappa, vector<double>& dkdJ, vector< vector<double> >& dkdc); //! electric potential double ElectricPotential(const FEMaterialPoint& pt, const bool eform=false); //! current density vec3d CurrentDensity(const FEMaterialPoint& pt); //! solute density double SoluteDensity(const int sol) { return m_pSolute[sol]->Density(); } //! solute molar mass double SoluteMolarMass(const int sol) { return m_pSolute[sol]->MolarMass(); } //! solute charge number int SoluteChargeNumber(const int sol) { return m_pSolute[sol]->ChargeNumber(); } //! Add a chemical reaction void AddChemicalReaction(FEChemicalReaction* pcr); // solute interface public: typedef FEFluidSolutesMaterialPoint SoluteMaterialPoint_t; int Solutes() override { return (int)m_pSolute.size(); } FESolute* GetSolute(int i) override { return m_pSolute[i]; } FEOsmoticCoefficient* GetOsmoticCoefficient() override { return m_pOsmC; } double GetEffectiveSoluteConcentration(FEMaterialPoint& mp, int soluteIndex) override; double GetActualSoluteConcentration(FEMaterialPoint& mp, int soluteIndex) override { return ConcentrationActual(mp, soluteIndex); } double GetFreeDiffusivity(FEMaterialPoint& mp, int soluteIndex) override; double GetPartitionCoefficient(FEMaterialPoint& mp, int soluteIndex) override; vec3d GetSoluteFlux(FEMaterialPoint& mp, int soluteIndex) override { return SoluteFlux(mp, soluteIndex); } double GetOsmolarity(const FEMaterialPoint& mp) override; double GetElectricPotential(const FEMaterialPoint& mp) override { return ElectricPotential(mp); } vec3d GetCurrentDensity(const FEMaterialPoint& mp) override { return CurrentDensity(mp); } double dkdc(const FEMaterialPoint& mp, int i, int j) override; public: FEChemicalReaction* GetReaction (int i) { return m_pReact[i]; } int Reactions () { return (int) m_pReact.size(); } public: double m_Rgas; //!< universal gas constant double m_Tabs; //!< absolute temperature double m_Fc; //!< Faraday's constant bool m_diffMtmSupp; //!< Toggle on or off diffusive mtm supply for fluid int m_zmin; //!< minimum charge number in mixture int m_ndeg; //!< polynomial degree of zeta in electroneutrality double m_penalty; //!< penalty for enforcing electroneutrality private: // material properties FEFluid* m_pFluid; //!< pointer to fluid material std::vector<FESolute*> m_pSolute; //!< pointer to solute materials FEOsmoticCoefficient* m_pOsmC; //!< pointer to osmotic coefficient material std::vector<FEChemicalReaction*> m_pReact; //!< pointer to chemical reactions DECLARE_FECORE_CLASS(); };
Unknown
3D
febiosoftware/FEBio
FEBioFluid/FEFluidSolutesDomainFactory.h
.h
1,614
39
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #pragma once #include <FECore/FECoreKernel.h> #include "febiofluid_api.h" //----------------------------------------------------------------------------- class FEBIOFLUID_API FEFluidSolutesDomainFactory : public FEDomainFactory { public: virtual FEDomain* CreateDomain(const FE_Element_Spec& spec, FEMesh* pm, FEMaterial* pmat); };
Unknown
3D
febiosoftware/FEBio
FEBioFluid/FEMultiphasicFSIPressure.h
.h
1,260
53
// // FEFluidSolutesPressure.hpp // FEBioFluid // // Created by Jay Shim on 12/10/20. // Copyright © 2020 febio.org. All rights reserved. // #pragma once #include <FECore/FESurfaceLoad.h> #include "FEMultiphasicFSI.h" //----------------------------------------------------------------------------- //! FEFluidResistanceBC is a fluid surface that has a normal //! pressure proportional to the flow rate (resistance). //! class FEBIOFLUID_API FEMultiphasicFSIPressure : public FESurfaceLoad { public: //! constructor FEMultiphasicFSIPressure(FEModel* pfem); //! calculate traction stiffness (there is none) void StiffnessMatrix(FELinearSystem& LS) override {} //! calculate load vector void LoadVector(FEGlobalVector& R) override; //! set the dilatation void Update() override; //! initialize bool Init() override; //! activate void Activate() override; //! serialization void Serialize(DumpStream& ar) override; private: double m_p; //!< prescribed fluid pressure private: FEMultiphasicFSI* m_pfs; //!< pointer to fluid-solutes material int m_dofEF; int m_dofC; DECLARE_FECORE_CLASS(); };
Unknown
3D
febiosoftware/FEBio
FEBioFluid/FEBiphasicFSIDomain.h
.h
3,202
81
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #pragma once #include "febiofluid_api.h" #include <vector> class FEModel; class FELinearSystem; class FEBodyForce; class FEGlobalVector; class FETimeInfo; //----------------------------------------------------------------------------- //! Abstract interface class for fluid-FSI domains. //! A fluid-FSI domain is used by the fluid-FSI solver. //! This interface defines the functions that have to be implemented by a //! fluid-FSI domain. There are basically two categories: residual functions //! that contribute to the global residual vector. And stiffness matrix //! function that calculate contributions to the global stiffness matrix. class FEBIOFLUID_API FEBiphasicFSIDomain { public: FEBiphasicFSIDomain(FEModel* pfem); virtual ~FEBiphasicFSIDomain(){} // --- R E S I D U A L --- //! calculate the internal forces virtual void InternalForces(FEGlobalVector& R) = 0; //! Calculate the body force vector virtual void BodyForce(FEGlobalVector& R, FEBodyForce& bf) = 0; //! calculate the interial forces (for dynamic problems) virtual void InertialForces(FEGlobalVector& R) = 0; // --- S T I F F N E S S M A T R I X --- //! Calculate global stiffness matrix (only contribution from internal force derivative) //! \todo maybe I should rename this the InternalStiffness matrix? virtual void StiffnessMatrix (FELinearSystem& LS) = 0; //! Calculate stiffness contribution of body forces virtual void BodyForceStiffness(FELinearSystem& LS, FEBodyForce& bf) = 0; //! calculate the mass matrix (for dynamic problems) virtual void MassMatrix(FELinearSystem& LS) = 0; //! transient analysis void SetTransientAnalysis() { m_btrans = true; } void SetSteadyStateAnalysis() { m_btrans = false; } protected: bool m_btrans; // flag for transient (true) or steady-state (false) analysis };
Unknown
3D
febiosoftware/FEBio
FEBioFluid/FEThermoFluidAnalysis.cpp
.cpp
1,692
38
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #include "FEThermoFluidAnalysis.h" BEGIN_FECORE_CLASS(FEThermoFluidAnalysis, FEAnalysis) // The analysis parameter is already defined in the FEAnalysis base class. // Here, we just need to set the enum values for the analysis parameter. FindParameterFromData(&m_nanalysis)->setEnums("STEADY-STATE\0DYNAMIC\0"); END_FECORE_CLASS() FEThermoFluidAnalysis::FEThermoFluidAnalysis(FEModel* fem) : FEAnalysis(fem) { }
C++
3D
febiosoftware/FEBio
FEBioFluid/FECentrifugalFluidBodyForce.h
.h
1,944
55
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #pragma once #include <FECore/FEMaterialPoint.h> #include <FEBioMech/FEBodyForce.h> #include "febiofluid_api.h" //----------------------------------------------------------------------------- //! This class defines a centrigufal force class FEBIOFLUID_API FECentrifugalFluidBodyForce : public FEBodyForce { public: FECentrifugalFluidBodyForce(FEModel* pfem); vec3d force(FEMaterialPoint& mp) override; double divforce(FEMaterialPoint& mp) override; mat3d stiffness(FEMaterialPoint& mp) override; public: vec3d n; // rotation axis vec3d c; // point on axis of rotation (e.g., center of rotation) double w; // angular speed DECLARE_FECORE_CLASS(); };
Unknown
3D
febiosoftware/FEBio
FEBioFluid/FEFluidFSIAnalysis.h
.h
1,549
43
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #pragma once #include <FECore/FEAnalysis.h> #include "febiofluid_api.h" class FEBIOFLUID_API FEFluidFSIAnalysis : public FEAnalysis { public: enum FluidFSIAnalysisType { STEADY_STATE, DYNAMIC }; public: FEFluidFSIAnalysis(FEModel* fem); DECLARE_FECORE_CLASS(); };
Unknown
3D
febiosoftware/FEBio
FEBioFluid/FEFixedFluidVelocity.h
.h
1,489
40
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2020 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #pragma once #include <FECore/FEFixedBC.h> class FEFixedFluidVelocity : public FEFixedBC { public: FEFixedFluidVelocity(FEModel* fem); bool Init() override; private: bool m_dof[3]; DECLARE_FECORE_CLASS(); };
Unknown
3D
febiosoftware/FEBio
FEBioFluid/FEElasticFluid.cpp
.cpp
10,738
299
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #include "stdafx.h" #include "FEElasticFluid.h" #include "FEThermoFluidMaterialPoint.h" #include "FEThermoFluid.h" //----------------------------------------------------------------------------- //! tangent of pressure with respect to strain J double FEElasticFluid::Tangent_Strain(FEMaterialPoint& mp) { double d = 1e-6; FEThermoFluidMaterialPoint& tf = *mp.ExtractData<FEThermoFluidMaterialPoint>(); FEFluidMaterialPoint& pf = *mp.ExtractData<FEFluidMaterialPoint>(); FEFluidMaterialPoint* fp = new FEFluidMaterialPoint(); FEThermoFluidMaterialPoint* ft = new FEThermoFluidMaterialPoint(fp); fp->m_ef = pf.m_ef+d; ft->m_T = tf.m_T; FEMaterialPoint tmp(ft); double pp = Pressure(tmp); fp->m_ef = pf.m_ef-d; double pm = Pressure(tmp); delete ft; double dpJ = (pp - pm)/(2*d); return dpJ; } //----------------------------------------------------------------------------- //! 2nd tangent of pressure with respect to strain J double FEElasticFluid::Tangent_Strain_Strain(FEMaterialPoint& mp) { double d = 1e-6; FEThermoFluidMaterialPoint& tf = *mp.ExtractData<FEThermoFluidMaterialPoint>(); FEFluidMaterialPoint& pf = *mp.ExtractData<FEFluidMaterialPoint>(); FEFluidMaterialPoint* fp = new FEFluidMaterialPoint(); FEThermoFluidMaterialPoint* ft = new FEThermoFluidMaterialPoint(fp); fp->m_ef = pf.m_ef+d; ft->m_T = tf.m_T; FEMaterialPoint tmp(ft); double dpp = Tangent_Strain(tmp); fp->m_ef = pf.m_ef-d; double dpm = Tangent_Strain(tmp); delete ft; double dpJ2 = (dpp - dpm)/(2*d); return dpJ2; } //----------------------------------------------------------------------------- //! tangent of pressure with respect to temperature T double FEElasticFluid::Tangent_Temperature(FEMaterialPoint& mp) { double Tr = GetGlobalConstant("T"); double d = 1e-6*Tr; FEThermoFluidMaterialPoint& tf = *mp.ExtractData<FEThermoFluidMaterialPoint>(); FEFluidMaterialPoint& pf = *mp.ExtractData<FEFluidMaterialPoint>(); FEFluidMaterialPoint* fp = new FEFluidMaterialPoint(); FEThermoFluidMaterialPoint* ft = new FEThermoFluidMaterialPoint(fp); fp->m_ef = pf.m_ef; ft->m_T = tf.m_T+d; FEMaterialPoint tmp(ft); double pp = Pressure(tmp); ft->m_T = tf.m_T-d; double pm = Pressure(tmp); delete ft; double dpT = (pp - pm)/(2*d); return dpT; } //----------------------------------------------------------------------------- //! 2nd tangent of pressure with respect to temperature T double FEElasticFluid::Tangent_Temperature_Temperature(FEMaterialPoint& mp) { double Tr = GetGlobalConstant("T"); double d = 1e-6*Tr; FEThermoFluidMaterialPoint& tf = *mp.ExtractData<FEThermoFluidMaterialPoint>(); FEFluidMaterialPoint& pf = *mp.ExtractData<FEFluidMaterialPoint>(); FEFluidMaterialPoint* fp = new FEFluidMaterialPoint(); FEThermoFluidMaterialPoint* ft = new FEThermoFluidMaterialPoint(fp); fp->m_ef = pf.m_ef; ft->m_T = tf.m_T+d; FEMaterialPoint tmp(ft); double dpp = Tangent_Temperature(tmp); ft->m_T = tf.m_T-d; double dpm = Tangent_Temperature(tmp); delete ft; double dpT2 = (dpp - dpm)/(2*d); return dpT2; } //----------------------------------------------------------------------------- //! tangent of pressure with respect to strain J and temperature T double FEElasticFluid::Tangent_Strain_Temperature(FEMaterialPoint& mp) { double Tr = GetGlobalConstant("T"); double dJ = 1e-6; double dT = 1e-6*Tr; FEThermoFluidMaterialPoint& tf = *mp.ExtractData<FEThermoFluidMaterialPoint>(); FEFluidMaterialPoint& pf = *mp.ExtractData<FEFluidMaterialPoint>(); FEFluidMaterialPoint* fp = new FEFluidMaterialPoint(); FEThermoFluidMaterialPoint* ft = new FEThermoFluidMaterialPoint(fp); fp->m_ef = pf.m_ef+dJ; ft->m_T = tf.m_T; FEMaterialPoint tmp(ft); double dpp = Tangent_Temperature(tmp); fp->m_ef = pf.m_ef-dJ; double dpm = Tangent_Temperature(tmp); delete ft; double dpTJ = (dpp - dpm)/(2*dJ); return dpTJ; } //----------------------------------------------------------------------------- //! tangent of isochoric specific heat capacity with respect to strain J double FEElasticFluid::Tangent_cv_Strain(FEMaterialPoint& mp) { double d = 1e-6; FEThermoFluidMaterialPoint& tf = *mp.ExtractData<FEThermoFluidMaterialPoint>(); FEFluidMaterialPoint& pf = *mp.ExtractData<FEFluidMaterialPoint>(); FEFluidMaterialPoint* fp = new FEFluidMaterialPoint(); FEThermoFluidMaterialPoint* ft = new FEThermoFluidMaterialPoint(fp); fp->m_ef = pf.m_ef+d; ft->m_T = tf.m_T; FEMaterialPoint tmp(ft); double cvp = IsochoricSpecificHeatCapacity(tmp); fp->m_ef = pf.m_ef-d; double cvm = IsochoricSpecificHeatCapacity(tmp); delete ft; double dcvJ = (cvp - cvm)/(2*d); return dcvJ; } //----------------------------------------------------------------------------- //! tangent of isochoric specific heat capacity with respect to temperature T double FEElasticFluid::Tangent_cv_Temperature(FEMaterialPoint& mp) { double Tr = GetGlobalConstant("T"); double d = 1e-6*Tr; FEThermoFluidMaterialPoint& tf = *mp.ExtractData<FEThermoFluidMaterialPoint>(); FEFluidMaterialPoint& pf = *mp.ExtractData<FEFluidMaterialPoint>(); FEFluidMaterialPoint* fp = new FEFluidMaterialPoint(); FEThermoFluidMaterialPoint* ft = new FEThermoFluidMaterialPoint(fp); fp->m_ef = pf.m_ef; ft->m_T = tf.m_T+d; FEMaterialPoint tmp(ft); double cvp = IsochoricSpecificHeatCapacity(tmp); ft->m_T = tf.m_T-d; double cvm = IsochoricSpecificHeatCapacity(tmp); delete ft; double dcvT = (cvp - cvm)/(2*d); return dcvT; } //----------------------------------------------------------------------------- //! specific internal energy double FEElasticFluid::SpecificInternalEnergy(FEMaterialPoint& mp) { double Tr = GetGlobalConstant("T"); FEThermoFluidMaterialPoint& tf = *mp.ExtractData<FEThermoFluidMaterialPoint>(); double T = tf.m_T + Tr; double u = SpecificFreeEnergy(mp) + T*SpecificEntropy(mp); return u; } //----------------------------------------------------------------------------- //! specific gauge enthalpy double FEElasticFluid::SpecificGaugeEnthalpy(FEMaterialPoint& mp) { FEThermoFluid* pMat = dynamic_cast<FEThermoFluid*>(GetParent()); double h = SpecificInternalEnergy(mp) + Pressure(mp)/pMat->Density(mp); return h; } //----------------------------------------------------------------------------- //! specific free enthalpy double FEElasticFluid::SpecificFreeEnthalpy(FEMaterialPoint& mp) { FEThermoFluid* pMat = dynamic_cast<FEThermoFluid*>(GetParent()); double g = SpecificFreeEnergy(mp) + Pressure(mp)/pMat->Density(mp); return g; } //----------------------------------------------------------------------------- //! pressure from state variables double FEElasticFluid::Pressure(const double ef, const double T) { FEFluidMaterialPoint* fp = new FEFluidMaterialPoint(); FEThermoFluidMaterialPoint* ft = new FEThermoFluidMaterialPoint(fp); fp->m_ef = ef; ft->m_T = T; FEMaterialPoint tmp(ft); double p = Pressure(tmp); return p; } //----------------------------------------------------------------------------- //! dp/dJ double FEElasticFluid::Tangent_Strain(const double ef, const double T) { FEFluidMaterialPoint* fp = new FEFluidMaterialPoint(); FEThermoFluidMaterialPoint* ft = new FEThermoFluidMaterialPoint(fp); fp->m_ef = ef; ft->m_T = T; FEMaterialPoint tmp(ft); double dpJ = Tangent_Strain(tmp); return dpJ; } //----------------------------------------------------------------------------- //! dp/dT double FEElasticFluid::Tangent_Temperature(const double ef, const double T) { FEFluidMaterialPoint* fp = new FEFluidMaterialPoint(); FEThermoFluidMaterialPoint* ft = new FEThermoFluidMaterialPoint(fp); fp->m_ef = ef; ft->m_T = T; FEMaterialPoint tmp(ft); double dpT = Tangent_Temperature(tmp); return dpT; } //----------------------------------------------------------------------------- //! d2p/dJ2 double FEElasticFluid::Tangent_Strain_Strain(const double ef, const double T) { FEFluidMaterialPoint* fp = new FEFluidMaterialPoint(); FEThermoFluidMaterialPoint* ft = new FEThermoFluidMaterialPoint(fp); fp->m_ef = ef; ft->m_T = T; FEMaterialPoint tmp(ft); double dpJ2 = Tangent_Strain_Strain(tmp); return dpJ2; } //----------------------------------------------------------------------------- //! d2p/dJdT double FEElasticFluid::Tangent_Strain_Temperature(const double ef, const double T) { FEFluidMaterialPoint* fp = new FEFluidMaterialPoint(); FEThermoFluidMaterialPoint* ft = new FEThermoFluidMaterialPoint(fp); fp->m_ef = ef; ft->m_T = T; FEMaterialPoint tmp(ft); double dpJT = Tangent_Strain_Temperature(tmp); return dpJT; } //----------------------------------------------------------------------------- //! d2p/dT2 double FEElasticFluid::Tangent_Temperature_Temperature(const double ef, const double T) { FEFluidMaterialPoint* fp = new FEFluidMaterialPoint(); FEThermoFluidMaterialPoint* ft = new FEThermoFluidMaterialPoint(fp); fp->m_ef = ef; ft->m_T = T; FEMaterialPoint tmp(ft); double dpT2 = Tangent_Temperature_Temperature(tmp); return dpT2; }
C++
3D
febiosoftware/FEBio
FEBioFluid/FEInitialFluidPressure.cpp
.cpp
5,509
164
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2020 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #include "FEInitialFluidPressure.h" #include "FEBioFluid.h" #include "FEFluid.h" #include <FECore/FEModel.h> #include <FECore/FEAnalysis.h> //============================================================================= BEGIN_FECORE_CLASS(FEInitialFluidPressure, FEInitialCondition) // material properties ADD_PARAMETER(m_Pdata, "value" )->setUnits(UNIT_PRESSURE); END_FECORE_CLASS(); //----------------------------------------------------------------------------- FEInitialFluidPressure::FEInitialFluidPressure(FEModel* fem) : FENodalIC(fem) { } //----------------------------------------------------------------------------- bool FEInitialFluidPressure::Init() { if (SetPDOF("ef") == false) return false; m_e.assign(m_nodeSet->Size(), 0.0); FEDofList dofs(GetFEModel()); if (dofs.AddVariable(FEBioFluid::GetVariableName(FEBioFluid::FLUID_DILATATION)) == false) return false; SetDOFList(dofs); return FENodalIC::Init(); } //----------------------------------------------------------------------------- void FEInitialFluidPressure::SetPDOF(int ndof) { m_dofEF = ndof; } //----------------------------------------------------------------------------- bool FEInitialFluidPressure::SetPDOF(const char* szdof) { FEModel* fem = GetFEModel(); int ndof = fem->GetDOFIndex(szdof); assert(ndof >= 0); if (ndof < 0) return false; SetPDOF(ndof); return true; } //----------------------------------------------------------------------------- void FEInitialFluidPressure::Activate() { // prescribe this dilatation at the nodes FEModel* fem = GetFEModel(); FENodeList nodeList = m_nodeSet->GetNodeList(); int N = nodeList.Size(); std::vector<vector<double>> efNodes(N, vector<double>()); FEMesh& mesh = *m_nodeSet->GetMesh(); // evaluate average prescribed pressure and temperature in each element // project them from int points to nodes for (int i=0; i<mesh.Elements(); ++i) { FEElement& el = *mesh.Element(i); // get material FEMaterial* pm = GetFEModel()->GetMaterial(el.GetMatID()); FEFluid* pfl = pm->ExtractProperty<FEFluid>(); if (pfl) { double efi[FEElement::MAX_INTPOINTS] = {0}; double efo[FEElement::MAX_NODES] = {0}; bool good = true; for (int j=0; j<el.GaussPoints(); ++j) { FEMaterialPoint* pt = el.GetMaterialPoint(j); good = good && pfl->Dilatation(0, m_Pdata(*pt), efi[j]); } // project dilatations from integration points to nodes el.project_to_nodes(efi, efo); if (good) { for (int j=0; j<el.Nodes(); ++j) efNodes[el.m_node[j]].push_back(efo[j]); } else { for (int j=0; j<el.Nodes(); ++j) { efo[j] = 0; efNodes[el.m_node[j]].push_back(efo[j]); } } } else break; } //For each node, average the nodal ef for (int i=0; i<nodeList.Size(); ++i) { double ef = 0; for (int j = 0; j < efNodes[i].size(); ++j) ef += efNodes[i][j]; ef /= efNodes[i].size(); // store value for now m_e[i] = ef; } FEStepComponent::Activate(); if (m_dofs.IsEmpty()) return; int dofs = (int)m_dofs.Size(); std::vector<double> val(dofs, 0.0); for (int i = 0; i<N; ++i) { FENode& node = *m_nodeSet->Node(i); // get the nodal values GetNodalValues(i, val); for (int j = 0; j < dofs; ++j) { node.set(m_dofs[j], val[j]); } } } //----------------------------------------------------------------------------- void FEInitialFluidPressure::GetNodalValues(int inode, std::vector<double>& values) { values[0] = m_e[inode]; } //----------------------------------------------------------------------------- void FEInitialFluidPressure::Serialize(DumpStream& ar) { FENodalIC::Serialize(ar); if (ar.IsLoading()) m_e.assign(m_nodeSet->Size(), 0.0); ar & m_e; if (ar.IsShallow()) return; ar & m_dofEF; }
C++
3D
febiosoftware/FEBio
FEBioFluid/FEFluidSolutesDomainFactory.cpp
.cpp
2,126
57
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #include "stdafx.h" #include "FEFluidSolutesDomainFactory.h" #include "FEFluidSolutes.h" #include "FEFluidDomain.h" #include <FECore/FESolidDomain.h> //----------------------------------------------------------------------------- FEDomain* FEFluidSolutesDomainFactory::CreateDomain(const FE_Element_Spec& spec, FEMesh* pm, FEMaterial* pmat) { FEModel* pfem = pmat->GetFEModel(); FE_Element_Class eclass = spec.eclass; FE_Element_Shape eshape = spec.eshape; const char* sztype = 0; if (dynamic_cast<FEFluidSolutes*>(pmat)) { // fluid elements if (eclass==FE_ELEM_SOLID) sztype = "fluid-solutes-3D"; else return 0; } if (sztype) { FEDomain* pd = fecore_new<FESolidDomain>(sztype, pfem); if (pd) pd->SetMaterial(pmat); return pd; } else return 0; }
C++
3D
febiosoftware/FEBio
FEBioFluid/FEPrescribedFluidDilatation.h
.h
1,489
37
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2020 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #pragma once #include <FECore/FEPrescribedDOF.h> class FEPrescribedFluidDilatation : public FEPrescribedDOF { public: FEPrescribedFluidDilatation(FEModel* fem); bool Init() override; DECLARE_FECORE_CLASS(); };
Unknown
3D
febiosoftware/FEBio
FEBioFluid/FEFluidRCRLoad.h
.h
3,050
84
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #pragma once #include <FECore/FESurfaceLoad.h> #include "FEFluidMaterial.h" //----------------------------------------------------------------------------- //! FEFluidRCRLoad is a fluid surface load that implements a 3-element Windkessel model //! class FEBIOFLUID_API FEFluidRCRLoad : public FESurfaceLoad { public: //! constructor FEFluidRCRLoad(FEModel* pfem); //! calculate traction stiffness (there is none) void StiffnessMatrix(FELinearSystem& LS) override {} //! calculate load vector void LoadVector(FEGlobalVector& R) override; //! set the dilatation void Update() override; //! evaluate flow rate double FlowRate(); //! initialize bool Init() override; //! activate void Activate() override; //! serialization void Serialize(DumpStream& ar) override; private: double m_R; //!< flow resistance double m_Rd; //!< distal resistance double m_p0; //!< initial fluid pressure double m_C; //!< capacitance double m_pd; //!< downstream pressure private: double m_pn; //!< fluid pressure at current time point double m_pp; //!< fluid pressure at previous time point double m_qn; //!< flow rate at current time point double m_qp; //!< flow rate at previous time point double m_pdn; //!< downstream fluid pressure at current time point double m_pdp; //!< downstream fluid pressure at previous time point double m_tp; //!< previous time FEFluidMaterial* m_pfluid; //!< pointer to fluid FEDofList m_dofW; int m_dofEF; DECLARE_FECORE_CLASS(); };
Unknown
3D
febiosoftware/FEBio
FEBioFluid/FEFluidFSISolver.h
.h
6,233
173
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #pragma once #include <FECore/FENewtonSolver.h> #include <FECore/FETimeInfo.h> #include <FECore/FEGlobalVector.h> #include <FEBioMech/FERigidSolver.h> #include <FECore/FEDofList.h> #include "febiofluid_api.h" //----------------------------------------------------------------------------- //! The FEFluidFSISolver class solves fluid-FSI problems //! It can deal with quasi-static and dynamic problems //! class FEBIOFLUID_API FEFluidFSISolver : public FENewtonSolver { public: //! constructor FEFluidFSISolver(FEModel* pfem); //! destructor ~FEFluidFSISolver(); //! serialize data to/from dump file void Serialize(DumpStream& ar) override; //! Initializes data structures bool Init() override; //! initialize the step bool InitStep(double time) override; //! Initialize linear equation system bool InitEquations() override; //! Generate warnings if needed void SolverWarnings(); //! preferred matrix type should be unsymmetric. Matrix_Type PreferredMatrixType() const override { return REAL_UNSYMMETRIC; }; public: //{ --- evaluation and update --- //! Perform an update void Update(vector<double>& ui) override; //! update nodal positions, velocities, accelerations, etc. void UpdateKinematics(vector<double>& ui); //! Update EAS void UpdateEAS(vector<double>& ui); void UpdateIncrementsEAS(vector<double>& ui, const bool binc); //! update DOF increments virtual void UpdateIncrements(vector<double>& Ui, vector<double>& ui, bool emap); //} //{ --- Solution functions --- //! prepares the data for the first QN iteration void PrepStep() override; //! Performs a Newton-Raphson iteration bool Quasin() override; //{ --- Stiffness matrix routines --- //! calculates the global stiffness matrix bool StiffnessMatrix() override; //! contact stiffness void ContactStiffness(FELinearSystem& LS); //! calculates stiffness contributon of nonlinear constraints void NonLinearConstraintStiffness(FELinearSystem& LS, const FETimeInfo& tp); //{ --- Residual routines --- //! Calculate the contact forces void ContactForces(FEGlobalVector& R); //! Calculates residual bool Residual(vector<double>& R) override; //! Calculate nonlinear constraint forces void NonLinearConstraintForces(FEGlobalVector& R, const FETimeInfo& tp); protected: void GetDisplacementData(vector<double>& xi, vector<double>& ui); void GetVelocityData(vector<double>& vi, vector<double>& ui); void GetDilatationData(vector<double>& ei, vector<double>& ui); public: // convergence tolerances double m_Dtol; //!< displacement tolerance double m_Vtol; //!< velocity tolerance double m_Ftol; //!< dilatation tolerance double m_minJf; //!< minimum allowable compression ratio public: // equation numbers int m_nreq; //!< start of rigid body equations int m_ndeq; //!< number of equations related to displacement dofs int m_nveq; //!< number of equations related to velocity dofs int m_nfeq; //!< number of equations related to dilatation dofs public: vector<double> m_Fn; //!< concentrated nodal force vector vector<double> m_Fr; //!< nodal reaction forces vector<double> m_di; //!< displacement increment vector vector<double> m_Di; //!< Total displacement vector for iteration vector<double> m_vi; //!< velocity increment vector vector<double> m_Vi; //!< Total velocity vector for iteration vector<double> m_fi; //!< dilatation increment vector vector<double> m_Fi; //!< Total dilatation vector for iteration // generalized alpha method double m_rhoi; //!< spectral radius (rho infinity) double m_alphaf; //!< alpha step for Y={v,e} double m_alpham; //!< alpha step for Ydot={∂v/∂t,∂e/∂t} double m_beta; //!< beta double m_gamma; //!< gamma int m_pred; //!< predictor method int m_order; //!< generalized-alpha integration order protected: FEDofList m_dofU; // solid displacement FEDofList m_dofV; // solid velocity FEDofList m_dofSU; // shell displacement FEDofList m_dofSV; // shell velocity FEDofList m_dofSA; // shell acceleration FEDofList m_dofQ; // rotation FEDofList m_dofRQ; // rigid rotation FEDofList m_dofVF; // fluid velocity FEDofList m_dofAF; // material time derivative of fluid velocity FEDofList m_dofW; // fluid velocity relative to solid FEDofList m_dofAW; // material time derivative of fluid velocity relative to solid FEDofList m_dofEF; // fluid dilatation int m_dofAEF; // material time derivative of fluid dilatation protected: FERigidSolverNew m_rigidSolver; // declare the parameter list DECLARE_FECORE_CLASS(); };
Unknown
3D
febiosoftware/FEBio
FEBioFluid/FEFixedFluidTemperature.cpp
.cpp
1,593
42
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2020 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #include "stdafx.h" #include "FEFixedFluidTemperature.h" BEGIN_FECORE_CLASS(FEFixedFluidTemperature, FEFixedBC) END_FECORE_CLASS(); FEFixedFluidTemperature::FEFixedFluidTemperature(FEModel* fem) : FEFixedBC(fem) { } bool FEFixedFluidTemperature::Init() { SetDOFList(GetDOFIndex("T")); return FEFixedBC::Init(); }
C++
3D
febiosoftware/FEBio
FEBioFluid/FENewtonianFluid.cpp
.cpp
4,052
122
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #include "stdafx.h" #include "FENewtonianFluid.h" #include "FEFluid.h" #include "FEBiphasicFSI.h" #include "FEThermoFluid.h" #include <FECore/log.h> // define the material parameters BEGIN_FECORE_CLASS(FENewtonianFluid, FEViscousFluid) ADD_PARAMETER(m_kappa, FE_RANGE_GREATER_OR_EQUAL(0.0), "kappa")->setUnits(UNIT_VISCOSITY)->setLongName("bulk viscosity"); ADD_PARAMETER(m_mu , FE_RANGE_GREATER_OR_EQUAL(0.0), "mu" )->setUnits(UNIT_VISCOSITY)->setLongName("shear viscosity"); END_FECORE_CLASS(); //----------------------------------------------------------------------------- //! Constructor. FENewtonianFluid::FENewtonianFluid(FEModel* pfem) : FEViscousFluid(pfem) { m_kappa = 0; m_mu = 0; } //----------------------------------------------------------------------------- //! initialization bool FENewtonianFluid::Init() { return FEViscousFluid::Init(); } //----------------------------------------------------------------------------- void FENewtonianFluid::Serialize(DumpStream& ar) { FEViscousFluid::Serialize(ar); if (ar.IsShallow()) return; } //----------------------------------------------------------------------------- //! viscous stress mat3ds FENewtonianFluid::Stress(FEMaterialPoint& pt) { FEFluidMaterialPoint& vt = *pt.ExtractData<FEFluidMaterialPoint>(); mat3ds D = vt.RateOfDeformation(); double mu = ShearViscosity(pt); double kappa = BulkViscosity(pt); mat3ds s = mat3dd(1.0)*(D.tr()*(kappa - 2.*mu/3.)) + D*(2*mu); return s; } //----------------------------------------------------------------------------- //! tangent of stress with respect to strain J mat3ds FENewtonianFluid::Tangent_Strain(FEMaterialPoint& mp) { return mat3ds(0,0,0,0,0,0); } //----------------------------------------------------------------------------- //! tangent of stress with respect to rate of deformation tensor D tens4ds FENewtonianFluid::Tangent_RateOfDeformation(FEMaterialPoint& mp) { mat3dd I(1.0); double mu = ShearViscosity(mp); double kappa = BulkViscosity(mp); tens4ds c = dyad1s(I)*(kappa - 2.*mu/3.) + dyad4s(I)*(2*mu); return c; } //----------------------------------------------------------------------------- //! tangent of stress with respect to temperature T mat3ds FENewtonianFluid::Tangent_Temperature(FEMaterialPoint& mp) { return mat3ds(0); } //----------------------------------------------------------------------------- //! dynamic shear viscosity double FENewtonianFluid::ShearViscosity(FEMaterialPoint& mp) { return m_mu; } //----------------------------------------------------------------------------- //! bulk viscosity double FENewtonianFluid::BulkViscosity(FEMaterialPoint& mp) { return m_kappa; }
C++
3D
febiosoftware/FEBio
FEBioFluid/FEFluidFSIDomainFactory.h
.h
1,607
39
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #pragma once #include <FECore/FECoreKernel.h> #include "febiofluid_api.h" //----------------------------------------------------------------------------- class FEBIOFLUID_API FEFluidFSIDomainFactory : public FEDomainFactory { public: virtual FEDomain* CreateDomain(const FE_Element_Spec& spec, FEMesh* pm, FEMaterial* pmat); };
Unknown
3D
febiosoftware/FEBio
FEBioFluid/FEBackFlowFSIStabilization.h
.h
2,279
66
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #pragma once #include <FECore/FESurfaceLoad.h> #include "febiofluid_api.h" //----------------------------------------------------------------------------- //! Backflow stabilization prescribes a normal traction that opposes //! backflow on a boundary surface. class FEBIOFLUID_API FEBackFlowFSIStabilization : public FESurfaceLoad { public: //! constructor FEBackFlowFSIStabilization(FEModel* pfem); //! calculate pressure stiffness void StiffnessMatrix(FELinearSystem& LS) override; //! calculate residual void LoadVector(FEGlobalVector& R) override; //! serialize data void Serialize(DumpStream& ar) override; //! initialization bool Init() override; protected: vec3d FluidVelocity(FESurfaceMaterialPoint& mp, double alpha); protected: double m_beta; //!< backflow stabilization coefficient // degrees of freedom FEDofList m_dofU; FEDofList m_dofW; DECLARE_FECORE_CLASS(); };
Unknown
3D
febiosoftware/FEBio
FEBioFluid/FEFluidThermalConductivity.cpp
.cpp
1,317
30
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #include "FEFluidThermalConductivity.h"
C++
3D
febiosoftware/FEBio
FEBioFluid/FEFluidThermalConductivity.h
.h
2,166
54
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #pragma once #include <FECore/FEMaterial.h> #include "FEThermoFluidMaterialPoint.h" //----------------------------------------------------------------------------- //! Base class for fluid thermal conductivity materials. class FEBIOFLUID_API FEFluidThermalConductivity : public FEMaterialProperty { public: FEFluidThermalConductivity(FEModel* pfem) : FEMaterialProperty(pfem) {} virtual ~FEFluidThermalConductivity() {} public: //! calculate thermal conductivity at material point virtual double ThermalConductivity(FEMaterialPoint& pt) = 0; //! tangent of thermal conductivity with respect to strain J virtual double Tangent_Strain(FEMaterialPoint& mp) = 0; //! tangent of thermal conductivity with respect to temperature T virtual double Tangent_Temperature(FEMaterialPoint& mp) = 0; FECORE_BASE_CLASS(FEFluidThermalConductivity) };
Unknown
3D
febiosoftware/FEBio
FEBioFluid/febiofluid_api.h
.h
1,541
44
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #pragma once #ifdef WIN32 #ifdef FECORE_DLL #ifdef febiofluid_EXPORTS #define FEBIOFLUID_API __declspec(dllexport) #else #define FEBIOFLUID_API __declspec(dllimport) #endif #else #define FEBIOFLUID_API #endif #else #define FEBIOFLUID_API #endif
Unknown
3D
febiosoftware/FEBio
FEBioFluid/FEBioFluid.h
.h
1,766
51
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #pragma once #include "febiofluid_api.h" //----------------------------------------------------------------------------- //! The FEBioFluid module //! The FEBioFluid module adds fluid capabilities to FEBio. //! namespace FEBioFluid { FEBIOFLUID_API void InitModule(); enum FLUID_VARIABLE { DISPLACEMENT, RELATIVE_FLUID_VELOCITY, FLUID_DILATATION, RELATIVE_FLUID_ACCELERATION, FLUID_DILATATION_TDERIV, }; FEBIOFLUID_API const char* GetVariableName(FLUID_VARIABLE var); }
Unknown
3D
febiosoftware/FEBio
FEBioFluid/FEBioFSI.h
.h
1,732
54
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #pragma once #include "febiofluid_api.h" namespace FEBioFSI { FEBIOFLUID_API void InitModule(); enum FSI_VARIABLE { DISPLACEMENT, VELOCITY, ROTATION, SHELL_DISPLACEMENT, SHELL_VELOCITY, SHELL_ACCELERATION, RIGID_ROTATION, RELATIVE_FLUID_VELOCITY, RELATIVE_FLUID_ACCELERATION, FLUID_VELOCITY, FLUID_ACCELERATION, FLUID_DILATATION, FLUID_DILATATION_TDERIV }; FEBIOFLUID_API const char* GetVariableName(FSI_VARIABLE var); }
Unknown
3D
febiosoftware/FEBio
FEBioFluid/FEFSIErosionVolumeRatio.cpp
.cpp
9,106
261
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #include "stdafx.h" #include "FEFSIErosionVolumeRatio.h" #include "FEFluidFSIDomain3D.h" #include <FECore/FEModel.h> #include <FECore/FEMesh.h> #include <FECore/FEDomain.h> #include <FECore/log.h> #include "FEBioMech/FEElasticMaterial.h" #include <FECore/FELinearConstraintManager.h> #include <algorithm> BEGIN_FECORE_CLASS(FEFSIErosionVolumeRatio, FEMeshAdaptor) ADD_PARAMETER(m_minJ, FE_RANGE_GREATER(0.0), "min_volume_ratio"); ADD_PARAMETER(m_maxElems, "max_elems"); ADD_PARAMETER(m_maxIters, "max_iters"); ADD_PARAMETER(m_metric , "metric"); END_FECORE_CLASS(); FEFSIErosionVolumeRatio::FEFSIErosionVolumeRatio(FEModel* fem) : FEMeshAdaptor(fem) { m_minJ = 0.0; m_maxElems = 0; m_maxIters = -1; m_metric = 0; } bool FEFSIErosionVolumeRatio::Apply(int iteration) { FEModel& fem = *GetFEModel(); FEMesh& mesh = fem.GetMesh(); if ((m_maxIters >= 0) && (iteration >= m_maxIters)) { feLog("Max iterations reached."); return false; } int deactiveElems = 0; int activeElems = 0; map<int, bool> melem; for (int i = 0; i < mesh.Domains(); ++i) { FEDomain& dom = mesh.Domain(i); FEFluidFSIDomain* fsidom = dynamic_cast<FEFluidFSIDomain*>(&dom); if (fsidom) { int NE = dom.Elements(); for (int j = 0; j < NE; ++j) { FEElement& el = dom.ElementRef(j); if (el.isActive()) { bool bdeactivate = false; int nint = el.GaussPoints(); double elemVal = 0; for (int n = 0; n < nint; ++n) { FEMaterialPoint* mp = el.GetMaterialPoint(n); FEElasticMaterialPoint* ep = mp->ExtractData<FEElasticMaterialPoint>(); if (ep) { mat3ds C = ep->RightCauchyGreen(); switch (m_metric) { case 0: elemVal = ep->m_J; break; case 1: { double lam[3]; C.eigen(lam); elemVal = sqrt(lam[2]); } break; default: break; } if (elemVal <= m_minJ) { bdeactivate = true; break; } } } if (bdeactivate) { melem[el.GetID()] = true; deactiveElems++; } } // if an element is inactive, check whether we need to activate it again else { // nodal coordinates const int NELN = FEElement::MAX_NODES; vec3d r[NELN]; FESolidElement* sel = dynamic_cast<FESolidElement*>(&el); if (sel) { FEFluidFSIDomain3D* fsi3D = dynamic_cast<FEFluidFSIDomain3D*>(fsidom); fsi3D->GetCurrentNodalCoordinates(*sel, r); int nint = el.GaussPoints(); double minJ = 1; for (int n = 0; n < nint; ++n) { FEMaterialPoint* mp = el.GetMaterialPoint(n); FEElasticMaterialPoint* ep = mp->ExtractData<FEElasticMaterialPoint>(); // get the deformation gradient and determinant at intermediate time double Jt; mat3d Ft, Fp; Jt = fsi3D->defgrad(*sel, Ft, n, r); ep->m_J = Jt; ep->m_F = Ft; mat3ds C = ep->RightCauchyGreen(); switch (m_metric) { case 0: minJ = min(ep->m_J,minJ); break; case 1: { double lam[3]; C.eigen(lam); minJ = min(sqrt(lam[2]),minJ); } break; default: break; } } if (minJ > m_minJ) { melem[el.GetID()] = false; activeElems++; } } } } } } if ((deactiveElems == 0) && (activeElems == 0)) { feLog("Nothing to do."); return false; } int melems = melem.size(); if (melems > m_maxElems) melems = m_maxElems; int nel = 0; for (std::map<int,bool>::iterator it=melem.begin(); it!=melem.end(); ++it) { FEElement* pe = mesh.FindElementFromID(it->first); assert(pe); if (it->second) { pe->setInactive(); if (++nel > m_maxElems) break; } else { pe->setActive(); } } // if any nodes were orphaned, we need to deactivate them as well int NN = mesh.Nodes(); vector<int> tag(NN, 0); for (int i = 0; i < mesh.Domains(); ++i) { FEDomain& dom = mesh.Domain(i); int NE = dom.Elements(); for (int j = 0; j < NE; ++j) { FEElement& el = dom.ElementRef(j); if (el.isActive()) { int neln = el.Nodes(); for (int n = 0; n < neln; ++n) tag[el.m_node[n]] = 1; } } } for (int i = 0; i < NN; ++i) { FENode& node = mesh.Node(i); if (tag[i] == 0) { node.SetFlags(FENode::EXCLUDE); int ndofs = node.dofs(); for (int j = 0; j < ndofs; ++j) node.set_inactive(j); } } // remove any linear constraints of exclude nodes FELinearConstraintManager& LCM = fem.GetLinearConstraintManager(); for (int j = 0; j < LCM.LinearConstraints();) { FELinearConstraint& lc = LCM.LinearConstraint(j); if (mesh.Node(lc.GetParentNode()).HasFlags(FENode::EXCLUDE)) { LCM.RemoveLinearConstraint(j); } else ++j; } // also remove any linear constraints that have excluded child nodes for (int j = 0; j < LCM.LinearConstraints();) { FELinearConstraint& lc = LCM.LinearConstraint(j); bool del = false; int n = lc.Size(); for (int k = 0; k < n; ++k) { if (mesh.Node(lc.GetChildDof(k).node).HasFlags(FENode::EXCLUDE)) { del = true; break; } } if (del) LCM.RemoveLinearConstraint(j); else ++j; } // reactivate the linear constraints LCM.Activate(); // feLog("Deactivate elements: %d\n", elems); // return (elems == 0); feLog("Deactivate elements: %d\n", melems); feLog("Reactivate elements: %d\n", activeElems); return (melems != 0); }
C++
3D
febiosoftware/FEBio
FEBioFluid/FEFluidRCRBC.h
.h
3,301
90
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #pragma once #include <FECore/FEPrescribedBC.h> #include "FEFluidMaterial.h" //----------------------------------------------------------------------------- //! FEFluidRCRBC is a fluid surface load that implements a 3-element Windkessel model //! class FEBIOFLUID_API FEFluidRCRBC : public FEPrescribedSurface { public: //! constructor FEFluidRCRBC(FEModel* pfem); //! set the dilatation void Update() override; void UpdateModel() override; //! evaluate flow rate double FlowRate(); //! initialize bool Init() override; //! serialization void Serialize(DumpStream& ar) override; public: void PrepStep(std::vector<double>& ui, bool brel) override; // return the value for node i, dof j void GetNodalValues(int nodelid, std::vector<double>& val) override; // copy data from another class void CopyFrom(FEBoundaryCondition* pbc) override; private: //! set the dilatation void UpdateDilatation(); private: double m_R; //!< flow resistance double m_Rd; //!< distal resistance double m_p0; //!< initial fluid pressure double m_C; //!< capacitance double m_pd; //!< downstream pressure private: double m_pn; //!< fluid pressure at current time point double m_pp; //!< fluid pressure at previous time point double m_qn; //!< flow rate at current time point double m_qp; //!< flow rate at previous time point double m_pdn; //!< downstream fluid pressure at current time point double m_pdp; //!< downstream fluid pressure at previous time point double m_tp; //!< previous time double m_e; FEFluidMaterial* m_pfluid; //!< pointer to fluid FESurface* m_psurf; //!< pointer to surface FEDofList m_dofW; int m_dofEF; DECLARE_FECORE_CLASS(); };
Unknown
3D
febiosoftware/FEBio
FEBioFluid/FETiedFluidInterface.h
.h
5,747
158
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #pragma once #include <FEBioMech/FEContactInterface.h> #include <FEBioMech/FEContactSurface.h> #include "FEFluidMaterial.h" //----------------------------------------------------------------------------- class FEBIOFLUID_API FETiedFluidSurface : public FEContactSurface { public: //! Integration point data class Data : public FEContactMaterialPoint { public: Data(); void Serialize(DumpStream& ar) override; public: vec3d m_Gap; //!< initial gap in reference configuration vec3d m_vg; //!< tangential velocity gap function at integration points vec3d m_nu; //!< normal at integration points vec2d m_rs; //!< natural coordinates of projection of integration point vec3d m_Lmd; //!< lagrange multipliers for tangential velocity vec3d m_tv; //!< viscous tangential traction double m_Lmp; //!< lagrange multipliers for fluid pressures double m_epst; //!< viscous traction penalty factor double m_epsn; //!< normal velocity penalty factor double m_pg; //!< pressure "gap" double m_vn; //!< normal fluid velocity gap }; //! constructor FETiedFluidSurface(FEModel* pfem); //! initialization bool Init() override; //! Unpack surface element data void UnpackLM(FEElement& el, vector<int>& lm) override; //! create material point data FEMaterialPoint* CreateMaterialPoint() override; public: void GetVelocityGap (int nface, vec3d& vg); void GetPressureGap (int nface, double& pg); void GetViscousTraction (int nface, vec3d& tv); void GetNormalVelocity (int nface, double& vn); public: FEDofList m_dofWE; }; //----------------------------------------------------------------------------- class FEBIOFLUID_API FETiedFluidInterface : public FEContactInterface { public: //! constructor FETiedFluidInterface(FEModel* pfem); //! destructor ~FETiedFluidInterface(); //! initialization bool Init() override; //! interface activation void Activate() override; //! serialize data to archive void Serialize(DumpStream& ar) override; //! return the primary and secondary surfaces FESurface* GetPrimarySurface() override { return &m_ss; } FESurface* GetSecondarySurface() override { return &m_ms; } //! return integration rule class bool UseNodalIntegration() override { return false; } //! build the matrix profile for use in the stiffness matrix void BuildMatrixProfile(FEGlobalMatrix& K) override; public: //! calculate contact forces void LoadVector(FEGlobalVector& R, const FETimeInfo& tp) override; //! calculate contact stiffness void StiffnessMatrix(FELinearSystem& LS, const FETimeInfo& tp) override; //! calculate Lagrangian augmentations bool Augment(int naug, const FETimeInfo& tp) override; //! update void Update() override; protected: void InitialProjection(FETiedFluidSurface& ss, FETiedFluidSurface& ms); void ProjectSurface(FETiedFluidSurface& ss, FETiedFluidSurface& ms); //! calculate penalty factor void CalcAutoPressurePenalty(FETiedFluidSurface& s); double AutoPressurePenalty(FESurfaceElement& el, FETiedFluidSurface& s); public: FETiedFluidSurface m_ss; //!< primary surface FETiedFluidSurface m_ms; //!< secondary surface bool m_btwo_pass; //!< two-pass flag double m_atol; //!< augmentation tolerance double m_gtol; //!< gap tolerance double m_ptol; //!< pressure gap tolerance double m_stol; //!< search tolerance double m_srad; //!< contact search radius int m_naugmax; //!< maximum nr of augmentations int m_naugmin; //!< minimum nr of augmentations double m_epst; //!< tangential viscous traction penalty factor double m_epsn; //!< normal fluid velocity penalty factor bool m_bautopen; //!< use autopenalty factor bool m_bfreedofs; //!< flag to free constrained/fixed DOFS on secondary surface FEFluidMaterial* m_pfluid; //!< fluid pointer FEDofList m_dofWE; DECLARE_FECORE_CLASS(); };
Unknown
3D
febiosoftware/FEBio
FEBioFluid/FEFixedFluidAngularVelocity.cpp
.cpp
2,104
52
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2020 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #include "stdafx.h" #include "FEFixedFluidAngularVelocity.h" BEGIN_FECORE_CLASS(FEFixedFluidAngularVelocity, FEFixedBC) ADD_PARAMETER(m_dof[0], "gx_dof")->setLongName("x-angular-velocity"); ADD_PARAMETER(m_dof[1], "gy_dof")->setLongName("y-angular-velocity"); ADD_PARAMETER(m_dof[2], "gz_dof")->setLongName("z-angular-velocity"); END_FECORE_CLASS(); FEFixedFluidAngularVelocity::FEFixedFluidAngularVelocity(FEModel* fem) : FEFixedBC(fem) { m_dof[0] = false; m_dof[1] = false; m_dof[2] = false; } bool FEFixedFluidAngularVelocity::Init() { vector<int> dofs; if (m_dof[0]) dofs.push_back(GetDOFIndex("gx")); if (m_dof[1]) dofs.push_back(GetDOFIndex("gy")); if (m_dof[2]) dofs.push_back(GetDOFIndex("gz")); SetDOFList(dofs); return FEFixedBC::Init(); }
C++
3D
febiosoftware/FEBio
FEBioFluid/FEBiphasicFSITraction.cpp
.cpp
12,644
350
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2020 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #include "stdafx.h" #include "FEBiphasicFSITraction.h" #include "FECore/FEModel.h" #include "FEFluid.h" #include "FEBiphasicFSI.h" #include "FEBioFSI.h" //----------------------------------------------------------------------------- // Parameter block for pressure loads BEGIN_FECORE_CLASS(FEBiphasicFSITraction, FESurfaceLoad) ADD_PARAMETER(m_bshellb , "shell_bottom"); END_FECORE_CLASS() //----------------------------------------------------------------------------- //! constructor FEBiphasicFSITraction::FEBiphasicFSITraction(FEModel* pfem) : FESurfaceLoad(pfem), m_dofU(pfem), m_dofSU(pfem), m_dofW(pfem) { m_bshellb = false; // get the degrees of freedom // TODO: Can this be done in Init, since there is no error checking if (pfem) { m_dofU.AddVariable(FEBioFSI::GetVariableName(FEBioFSI::DISPLACEMENT)); m_dofSU.AddVariable(FEBioFSI::GetVariableName(FEBioFSI::SHELL_DISPLACEMENT)); m_dofW.AddVariable(FEBioFSI::GetVariableName(FEBioFSI::RELATIVE_FLUID_VELOCITY)); m_dofEF = pfem->GetDOFIndex(FEBioFSI::GetVariableName(FEBioFSI::FLUID_DILATATION), 0); m_dof.Clear(); m_dof.AddDofs(m_dofU); m_dof.AddDofs(m_dofSU); m_dof.AddDofs(m_dofW); m_dof.AddDof(m_dofEF); } } //----------------------------------------------------------------------------- //! initialize bool FEBiphasicFSITraction::Init() { FESurface& surf = GetSurface(); surf.SetShellBottom(m_bshellb); surf.SetInterfaceStatus(true); if (FESurfaceLoad::Init() == false) return false; // get the list of fluid-FSI elements connected to this interface FEModel* fem = GetFEModel(); int NF = surf.Elements(); m_elem.resize(NF); m_s.resize(NF, 1); for (int j = 0; j<NF; ++j) { bool bself = false; FESurfaceElement& el = surf.Element(j); // extract the first of two elements on this interface m_elem[j] = el.m_elem[0].pe; if (el.m_elem[1].pe == nullptr) bself = true; // get its material and check if FEBiphasicFSI FEMaterial* pm = fem->GetMaterial(m_elem[j]->GetMatID()); FEBiphasicFSI* pfsi = dynamic_cast<FEBiphasicFSI*>(pm); if (pfsi) { double s = m_psurf->FacePointing(el, *m_elem[j]); m_s[j] = bself ? -s : s; if (m_s[j] == 0) return false; } else if (!bself) { // extract the second of two elements on this interface m_elem[j] = el.m_elem[1].pe; pm = fem->GetMaterial(m_elem[j]->GetMatID()); pfsi = dynamic_cast<FEBiphasicFSI*>(pm); if (pfsi == nullptr) return false; m_s[j] = m_psurf->FacePointing(el, *m_elem[j]); if (m_s[j] == 0) return false; } else return false; } // TODO: Deal with the case when the surface is a shell domain separating two FSI domains // that use different fluid bulk moduli return true; } //----------------------------------------------------------------------------- double FEBiphasicFSITraction::GetFluidDilatation(FESurfaceMaterialPoint& mp, double alpha) { double ef = 0; FESurfaceElement& el = *mp.SurfaceElement(); double* H = el.H(mp.m_index); int neln = el.Nodes(); for (int j = 0; j < neln; ++j) { FENode& node = m_psurf->Node(el.m_lnode[j]); double ej = node.get(m_dofEF)*alpha + node.get_prev(m_dofEF)*(1.0 - alpha); ef += ej*H[j]; } return ef; } //----------------------------------------------------------------------------- mat3ds FEBiphasicFSITraction::GetFluidStress(FESurfaceMaterialPoint& pt) { FEModel* fem = GetFEModel(); FESurfaceElement& face = *pt.SurfaceElement(); int iel = face.m_lid; // Get the fluid stress from the fluid-FSI element mat3ds sv(mat3dd(0)); FEElement* pe = m_elem[iel]; int nint = pe->GaussPoints(); FEBiphasicFSI* pfsi = dynamic_cast<FEBiphasicFSI*>(fem->GetMaterial(pe->GetMatID())); for (int n = 0; n<nint; ++n) { FEMaterialPoint& mp = *pe->GetMaterialPoint(n); sv += pfsi->Fluid()->GetViscous()->Stress(mp); } sv /= nint; return sv; } //----------------------------------------------------------------------------- void FEBiphasicFSITraction::LoadVector(FEGlobalVector& R) { const FETimeInfo& tp = GetTimeInfo(); // If surface is bottom of shell, we should take shell displacement dofs (i.e. m_dofSU). FEDofList dof = m_bshellb ? m_dofSU : m_dofU; m_psurf->LoadVector(R, dof, false, [&](FESurfaceMaterialPoint& mp, const FESurfaceDofShape& dof_a, vector<double>& fa) { // get the surface element FESurfaceElement& el = *mp.SurfaceElement(); int iel = el.m_lid; FEBiphasicFSI* pfsi = dynamic_cast<FEBiphasicFSI*>(GetFEModel()->GetMaterial(m_elem[iel]->GetMatID())); // nodal coordinates vec3d rt[FEElement::MAX_NODES]; m_psurf->GetNodalCoordinates(el, tp.alphaf, rt); // evaluate covariant basis vectors at integration point vec3d gr = el.eval_deriv1(rt, mp.m_index)*m_s[iel]; vec3d gs = el.eval_deriv2(rt, mp.m_index); vec3d gt = gr ^ gs; // Get the fluid stress at integration point // necessarily using the attached solid element mat3ds sv = GetFluidStress(mp); // fluid dilatation at integration point // only from surface element double ef = GetFluidDilatation(mp, tp.alphaf); double p = pfsi->Fluid()->Pressure(ef); // evaluate traction vec3d f = gt*p - sv*gt; double H = dof_a.shape; fa[0] = H * f.x; fa[1] = H * f.y; fa[2] = H * f.z; }); } //----------------------------------------------------------------------------- void FEBiphasicFSITraction::StiffnessMatrix(FELinearSystem& LS) { const FETimeInfo& tp = GetTimeInfo(); FEModel* fem = GetFEModel(); FESurface* ps = &GetSurface(); // build dof list // TODO: If surface is bottom of shell, we should take shell displacement dofs (i.e. m_dofSU). FEDofList dofs(fem); if (!m_bshellb) dofs.AddDofs(m_dofU); else dofs.AddDofs(m_dofSU); dofs.AddDofs(m_dofW); dofs.AddDof(m_dofEF); // evaluate stiffness m_psurf->LoadStiffness(LS, dofs, dofs, [&](FESurfaceMaterialPoint& mp, const FESurfaceDofShape& dof_a, const FESurfaceDofShape& dof_b, matrix& Kab) { FESurfaceElement& el = *mp.SurfaceElement(); int iel = el.m_lid; int neln = el.Nodes(); double dt = tp.timeIncrement; double alpha = tp.alphaf; double a = tp.gamma / (tp.beta*dt); vector<vec3d> gradN(neln); // nodal coordinates vec3d rt[FEElement::MAX_NODES]; ps->GetNodalCoordinates(el, tp.alphaf, rt); // Get the fluid stress and its tangents from the fluid-FSI element mat3ds sv(mat3dd(0)), svJ(mat3dd(0)); tens4ds cv; cv.zero(); mat3d Ls; Ls.zero(); mat3d Dw; Dw.zero(); double phif=0.0; double phis=0.0; double J=0.0; vec3d gradphif = vec3d(0.0); vec3d gradJ = vec3d(0.0); FEElement* pe = m_elem[iel]; int pint = pe->GaussPoints(); FEBiphasicFSI* pfsi = dynamic_cast<FEBiphasicFSI*>(fem->GetMaterial(pe->GetMatID())); for (int n = 0; n<pint; ++n) { FEMaterialPoint& mp = *pe->GetMaterialPoint(n); FEElasticMaterialPoint& ep = *(mp.ExtractData<FEElasticMaterialPoint>()); FEBiphasicFSIMaterialPoint& ft = *(mp.ExtractData<FEBiphasicFSIMaterialPoint>()); sv += pfsi->Fluid()->GetViscous()->Stress(mp); svJ += pfsi->Fluid()->GetViscous()->Tangent_Strain(mp); cv += pfsi->Fluid()->Tangent_RateOfDeformation(mp); Ls += ep.m_L; phif += pfsi->Porosity(mp); phis += pfsi->SolidVolumeFrac(mp); gradphif += pfsi->gradPorosity(mp); gradJ += ft.m_gradJ; Dw += ft.m_Lw.sym(); J += ep.m_J; } sv /= pint; svJ /= pint; cv /= pint; Ls /= pint; phif /= pint; phis /=pint; gradphif /=pint; gradJ /=pint; Dw /=pint; J /=pint; mat3d M = mat3dd(a) - Ls; double* N = el.H (mp.m_index); double* Gr = el.Gr(mp.m_index); double* Gs = el.Gs(mp.m_index); // evaluate fluid dilatation double ef = GetFluidDilatation(mp, tp.alphaf); // covariant basis vectors vec3d gr = el.eval_deriv1(rt, mp.m_index)*m_s[iel]; vec3d gs = el.eval_deriv2(rt, mp.m_index); vec3d gt = gr ^ gs; // evaluate fluid pressure double p = pfsi->Fluid()->Pressure(ef); vec3d f = gt*pfsi->Fluid()->GetElastic()->Tangent_Strain(ef, 0); //TODO include second order gradgrad term for surface vec3d gcnt[2], gcntp[2]; ps->ContraBaseVectors(el, mp.m_index, gcnt); ps->ContraBaseVectorsP(el, mp.m_index, gcntp); for (int i = 0; i<neln; ++i) gradN[i] = ((gcnt[0] * alpha + gcntp[0] * (1 - alpha))*(Gr[i]*m_s[iel]) + (gcnt[1] * alpha + gcntp[1] * (1 - alpha))*Gs[i]); // calculate stiffness component int i = dof_a.index; int j = dof_b.index; vec3d v = gr*Gs[j] - gs*Gr[j]; mat3d A; A.skew(v); mat3d Kv1 = vdotTdotv(gt, cv, gradN[j]); mat3d Kv2 = vdotTdotv(gt, cv, gradN[j]); mat3d Kw = vdotTdotv(gt, cv, (gradN[j]-gradphif*N[j]/phif)/phif); mat3d Kuu = (sv*A + Kv1*(-Dw*phis/(phif*phif)+M) + Kv2*((gradphif&gradN[j])*2.0*phis/(phif*phif*phif)+(gradN[j]&gradphif)/(phif*phif)) - Kv2*(-gradJ&gradN[j])/J*phis/(phif*phif) - ((sv*gt)&gradN[j])*phis/phif)*N[i] - A*(N[i] * p); Kuu *= -alpha; mat3d Kuw = Kw*N[i]; Kuw *= -alpha; vec3d kuJ = svJ*gt*(N[i] * N[j]) - f*(N[i] * N[j]); kuJ *= -alpha; Kab.zero(); Kab.sub(0, 0, Kuu); Kab.sub(0, 3, Kuw); Kab[0][6] -= kuJ.x; Kab[1][6] -= kuJ.y; Kab[2][6] -= kuJ.z; }); } //----------------------------------------------------------------------------- void FEBiphasicFSITraction::Serialize(DumpStream& ar) { FESurfaceLoad::Serialize(ar); ar & m_s; if (ar.IsShallow() == false) { if (ar.IsSaving()) { int NE = (int)m_elem.size(); ar << NE; for (int i = 0; i < NE; ++i) { FEElement* pe = m_elem[i]; int nid = (pe ? pe->GetID() : -1); ar << nid; } } else { FEMesh& mesh = ar.GetFEModel().GetMesh(); int NE, nid; ar >> NE; m_elem.resize(NE, nullptr); for (int i = 0; i < NE; ++i) { ar >> nid; if (nid != -1) { FEElement* pe = mesh.FindElementFromID(nid); assert(pe); m_elem[i] = pe; } } } } }
C++
3D
febiosoftware/FEBio
FEBioFluid/FEPrescribedFluidDilatation.cpp
.cpp
1,977
47
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2020 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #include "stdafx.h" #include "FEPrescribedFluidDilatation.h" //======================================================================================= // NOTE: I'm setting FEBoundaryCondition is the base class since I don't want to pull // in the parameters of FEPrescribedDOF. BEGIN_FECORE_CLASS(FEPrescribedFluidDilatation, FEBoundaryCondition) ADD_PARAMETER(m_scale, "value")->SetFlags(FE_PARAM_ADDLC | FE_PARAM_VOLATILE); ADD_PARAMETER(m_brelative, "relative"); END_FECORE_CLASS(); FEPrescribedFluidDilatation::FEPrescribedFluidDilatation(FEModel* fem) : FEPrescribedDOF(fem) { } bool FEPrescribedFluidDilatation::Init() { SetDOF(GetDOFIndex("ef")); return FEPrescribedDOF::Init(); }
C++
3D
febiosoftware/FEBio
FEBioFluid/FEFluidSolutesNaturalFlux.h
.h
2,504
74
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2020 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #pragma once #include <FECore/FESurfaceLoad.h> #include "febiofluid_api.h" #include "FEFluidSolutes.h" //----------------------------------------------------------------------------- //! Backflow stabilization prescribes a normal traction that opposes //! backflow on a boundary surface. class FEBIOFLUID_API FEFluidSolutesNaturalFlux : public FESurfaceLoad { public: //! constructor FEFluidSolutesNaturalFlux(FEModel* pfem); //! Initialization bool Init() override; //! serialization void Serialize(DumpStream& ar) override; //! Set the surface to apply the load to void SetSurface(FESurface* ps) override; void SetSolute(int isol) { m_isol = isol; } //! calculate flux stiffness void StiffnessMatrix(FELinearSystem& LS) override; //! calculate residual void LoadVector(FEGlobalVector& R) override; //! update void Update() override; protected: int m_isol; //!< solute index bool m_bup; //!< flag to call Update function // degrees of freedom FEDofList m_dofW; FEDofList m_dofEF; FEDofList m_dofC; DECLARE_FECORE_CLASS(); };
Unknown
3D
febiosoftware/FEBio
FEBioFluid/FEPrescribedFluidTemperature.h
.h
1,494
37
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2020 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #pragma once #include <FECore/FEPrescribedDOF.h> class FEPrescribedFluidTemperature : public FEPrescribedDOF { public: FEPrescribedFluidTemperature(FEModel* fem); bool Init() override; DECLARE_FECORE_CLASS(); };
Unknown
3D
febiosoftware/FEBio
FEBioFluid/FEMultiphasicFSIPressureBC.cpp
.cpp
7,132
185
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2020 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #include "stdafx.h" #include "FEMultiphasicFSIPressureBC.h" #include "FEMultiphasicFSI.h" #include "FEBioMultiphasicFSI.h" #include <FECore/FEModel.h> //============================================================================= BEGIN_FECORE_CLASS(FEMultiphasicFSIPressureBC, FEPrescribedSurface) ADD_PARAMETER(m_p, "pressure")->setUnits("P")->setLongName("fluid pressure"); END_FECORE_CLASS(); //----------------------------------------------------------------------------- //! constructor FEMultiphasicFSIPressureBC::FEMultiphasicFSIPressureBC(FEModel* pfem) : FEPrescribedSurface(pfem) { m_p = 0; m_dofEF = -1; m_dofC = -1; m_Rgas = 0; m_Tabs = 0; } //----------------------------------------------------------------------------- //! initialize bool FEMultiphasicFSIPressureBC::Init() { m_dofEF = GetDOFIndex(FEBioMultiphasicFSI::GetVariableName(FEBioMultiphasicFSI::FLUID_DILATATION), 0); m_dofC = GetDOFIndex(FEBioMultiphasicFSI::GetVariableName(FEBioMultiphasicFSI::FLUID_CONCENTRATION), 0); SetDOFList(m_dofEF); if (FEPrescribedSurface::Init() == false) return false; m_Rgas = GetFEModel()->GetGlobalConstant("R"); m_Tabs = GetFEModel()->GetGlobalConstant("T"); m_e.assign(GetSurface()->Nodes(), 0.0); return true; } //----------------------------------------------------------------------------- //! Evaluate and prescribe the resistance pressure void FEMultiphasicFSIPressureBC::Update() { // prescribe this dilatation at the nodes FESurface* ps = GetSurface(); int N = ps->Nodes(); std::vector<vector<double>> efNodes(N, vector<double>()); std::vector<vector<double>> caNodes(N, vector<double>()); //Project sum of all ca and osc values from int points to nodes on surface //All values put into map, including duplicates for (int i=0; i<ps->Elements(); ++i) { FESurfaceElement& el = ps->Element(i); // evaluate average prescribed pressure on this face double p = 0; for (int j=0; j<el.GaussPoints(); ++j) { FEMaterialPoint* pt = el.GetMaterialPoint(j); p += m_p(*pt); } p /= el.GaussPoints(); FEElement* e = el.m_elem[0].pe; FEMaterial* pm = GetFEModel()->GetMaterial(e->GetMatID()); FEFluid* pfl = pm->ExtractProperty<FEFluid>(); FESoluteInterface* psi = pm->ExtractProperty<FESoluteInterface>(); FESolidElement* se = dynamic_cast<FESolidElement*>(e); if (se) { double efo[FEElement::MAX_NODES] = {0}; if (psi) { const int nsol = psi->Solutes(); std::vector<double> kappa(nsol,0); double osc = 0; const int nint = se->GaussPoints(); // get the average osmotic coefficient and partition coefficients in the solid element for (int j=0; j<nint; ++j) { FEMaterialPoint* pt = se->GetMaterialPoint(j); osc += psi->GetOsmoticCoefficient()->OsmoticCoefficient(*pt); for (int k=0; k<nsol; ++k) kappa[k] += psi->GetPartitionCoefficient(*pt, k); } osc /= nint; for (int k=0; k<nsol; ++k) kappa[k] /= nint; // loop over face nodes for (int j=0; j<el.Nodes(); ++j) { double osm = 0; FENode& node = ps->Node(el.m_lnode[j]); // calculate osmolarity at this node, using nodal effective solute concentrations for (int k=0; k<nsol; ++k) osm += node.get(m_dofC+psi->GetSolute(k)->GetSoluteID()-1)*kappa[k]; // evaluate dilatation at this node bool good = pfl->Dilatation(0, p - m_Rgas*m_Tabs*osc*osm, efo[j]); assert(good); } } else { // loop over face nodes for (int j=0; j<el.Nodes(); ++j) { FENode& node = ps->Node(el.m_lnode[j]); // evaluate dilatation at this node bool good = pfl->Dilatation(0, p, efo[j]); assert(good); } } // only keep the dilatations at the nodes of the surface face for (int j=0; j<el.Nodes(); ++j) efNodes[el.m_lnode[j]].push_back(efo[j]); } //If no solid element, insert all 0s else { for (int j=0; j<el.Nodes(); ++j) efNodes[el.m_lnode[j]].push_back(0); } } //For each node, average the nodal ef for (int i=0; i<ps->Nodes(); ++i) { double ef = 0; for (int j = 0; j < efNodes[i].size(); ++j) ef += efNodes[i][j]; ef /= efNodes[i].size(); // store value for now m_e[i] = ef; } FEPrescribedSurface::Update(); } //----------------------------------------------------------------------------- // return the value for node i, dof j void FEMultiphasicFSIPressureBC::GetNodalValues(int nodelid, std::vector<double>& val) { val[0] = m_e[nodelid]; } //----------------------------------------------------------------------------- // copy data from another class void FEMultiphasicFSIPressureBC::CopyFrom(FEBoundaryCondition* pbc) { // TODO: implement this assert(false); } //----------------------------------------------------------------------------- //! serialization void FEMultiphasicFSIPressureBC::Serialize(DumpStream& ar) { FEPrescribedSurface::Serialize(ar); if (ar.IsLoading()) { m_e.assign(GetSurface()->Nodes(), 0.0); } ar & m_e; if (ar.IsShallow()) return; ar & m_Rgas & m_Tabs; ar & m_dofEF & m_dofC; }
C++
3D
febiosoftware/FEBio
FEBioFluid/FEFluidFSIDomain.h
.h
3,177
82
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #pragma once #include "febiofluid_api.h" class FEModel; class FELinearSystem; class FEBodyForce; class FEGlobalVector; class FETimeInfo; //----------------------------------------------------------------------------- //! Abstract interface class for fluid-FSI domains. //! A fluid-FSI domain is used by the fluid-FSI solver. //! This interface defines the functions that have to be implemented by a //! fluid-FSI domain. There are basically two categories: residual functions //! that contribute to the global residual vector. And stiffness matrix //! function that calculate contributions to the global stiffness matrix. class FEBIOFLUID_API FEFluidFSIDomain { public: FEFluidFSIDomain(FEModel* pfem); virtual ~FEFluidFSIDomain(){} // --- R E S I D U A L --- //! calculate the internal forces virtual void InternalForces(FEGlobalVector& R) = 0; //! Calculate the body force vector virtual void BodyForce(FEGlobalVector& R, FEBodyForce& bf) = 0; //! calculate the interial forces (for dynamic problems) virtual void InertialForces(FEGlobalVector& R) = 0; // --- S T I F F N E S S M A T R I X --- //! Calculate global stiffness matrix (only contribution from internal force derivative) //! \todo maybe I should rename this the InternalStiffness matrix? virtual void StiffnessMatrix (FELinearSystem& LS) = 0; //! Calculate stiffness contribution of body forces virtual void BodyForceStiffness(FELinearSystem& LS, FEBodyForce& bf) = 0; //! calculate the mass matrix (for dynamic problems) virtual void MassMatrix(FELinearSystem& LS) = 0; //! transient analysis void SetTransientAnalysis() { m_btrans = true; } void SetSteadyStateAnalysis() { m_btrans = false; } protected: bool m_btrans; // flag for transient (true) or steady-state (false) analysis };
Unknown
3D
febiosoftware/FEBio
FEBioFluid/FESolutesDomain.cpp
.cpp
17,701
571
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #include "stdafx.h" #include "FESolutesDomain.h" #include "FECore/log.h" #include "FECore/DOFS.h" #include <FECore/FEModel.h> #include <FECore/FEAnalysis.h> #include <FECore/sys.h> #include "FEBioFluidSolutes.h" #include <FECore/FELinearSystem.h> //----------------------------------------------------------------------------- //! constructor //! Some derived classes will pass 0 to the pmat, since the pmat variable will be //! to initialize another material. These derived classes will set the m_pMat variable as well. FESolutesDomain::FESolutesDomain(FEModel* pfem) : FESolidDomain(pfem), m_dof(pfem) { m_pMat = 0; m_btrans = true; m_dofC = pfem->GetDOFIndex(FEBioFluidSolutes::GetVariableName(FEBioFluidSolutes::FLUID_CONCENTRATION), 0); m_dofAC = pfem->GetDOFIndex(FEBioFluidSolutes::GetVariableName(FEBioFluidSolutes::FLUID_CONCENTRATION_TDERIV), 0); // list the degrees of freedom // (This allows the FEDomain base class to handle several tasks such as UnpackLM) // vector<int> dof; // SetDOFList(dof); } //----------------------------------------------------------------------------- //! get the total dofs const FEDofList& FESolutesDomain::GetDOFList() const { return m_dof; } //----------------------------------------------------------------------------- //! Assign material void FESolutesDomain::SetMaterial(FEMaterial* pmat) { FEDomain::SetMaterial(pmat); if (pmat) { m_pMat = dynamic_cast<FESolutesMaterial*>(pmat); assert(m_pMat); } else m_pMat = 0; } //----------------------------------------------------------------------------- bool FESolutesDomain::Init() { // initialize base class if (FESolidDomain::Init() == false) return false; const int nsol = m_pMat->Solutes(); // set the active degrees of freedom list m_dof.Clear(); for (int i = 0; i<nsol; ++i) { int m = m_pMat->GetSolute(i)->GetSoluteDOF(); m_dof.AddDof(m_dofC + m); } return true; } //----------------------------------------------------------------------------- void FESolutesDomain::Reset() { // reset base class FESolidDomain::Reset(); const int nsol = m_pMat->Solutes(); for (int i = 0; i<(int)m_Elem.size(); ++i) { // get the solid element FESolidElement& el = m_Elem[i]; // get the number of integration points int nint = el.GaussPoints(); // loop over the integration points for (int n = 0; n<nint; ++n) { FEMaterialPoint& mp = *el.GetMaterialPoint(n); FESolutesMaterial::Point& ps = *(mp.ExtractData<FESolutesMaterial::Point>()); // initialize solutes ps.m_nsol = nsol; ps.m_c.assign(nsol,0); ps.m_ca.assign(nsol,0); ps.m_cdot.assign(nsol,0); ps.m_gradc.assign(nsol,vec3d(0,0,0)); ps.m_j.assign(nsol,vec3d(0,0,0)); ps.m_k.assign(nsol, 0); ps.m_dkdJ.assign(nsol, 0); ps.m_dkdc.resize(nsol, vector<double>(nsol,0)); for (int j=0; j<m_pMat->Reactions(); ++j) m_pMat->GetReaction(j)->ResetElementData(mp); } } } //----------------------------------------------------------------------------- void FESolutesDomain::Serialize(DumpStream& ar) { FESolidDomain::Serialize(ar); if (ar.IsShallow()) return; ar & m_pMat; ar & m_dofC & m_dofAC; ar & m_dof; } //----------------------------------------------------------------------------- void FESolutesDomain::Activate() { const int nsol = m_pMat->Solutes(); for (int i = 0; i<Nodes(); ++i) { FENode& node = Node(i); if (node.HasFlags(FENode::EXCLUDE) == false) { for (int isol = 0; isol<nsol; ++isol) node.set_active(m_dofC + m_pMat->GetSolute(isol)->GetSoluteDOF()); } } } //----------------------------------------------------------------------------- void FESolutesDomain::InitMaterialPoints() { const int nsol = m_pMat->Solutes(); FEMesh& m = *GetMesh(); const int NE = FEElement::MAX_NODES; vector< vector<double> > c0(nsol, vector<double>(NE)); vector<int> sid(nsol); for (int j = 0; j<nsol; ++j) sid[j] = m_pMat->GetSolute(j)->GetSoluteDOF(); for (int j = 0; j<(int)m_Elem.size(); ++j) { // get the solid element FESolidElement& el = m_Elem[j]; // get the number of nodes int neln = el.Nodes(); // get initial values of fluid pressure and solute concentrations for (int i = 0; i<neln; ++i) { FENode& ni = m.Node(el.m_node[i]); for (int isol = 0; isol<nsol; ++isol) c0[isol][i] = ni.get(m_dofC + sid[isol]); } // get the number of integration points int nint = el.GaussPoints(); // loop over the integration points for (int n = 0; n<nint; ++n) { FEMaterialPoint& mp = *el.GetMaterialPoint(n); FESolutesMaterial::Point& ps = *(mp.ExtractData<FESolutesMaterial::Point>()); // initialize solutes ps.m_nsol = nsol; // initialize effective solute concentrations for (int isol = 0; isol<nsol; ++isol) { ps.m_c[isol] = el.Evaluate(c0[isol], n); ps.m_ca[isol] = m_pMat->ConcentrationActual(mp, isol); ps.m_gradc[isol] = gradient(el, c0[isol], n); } for (int isol = 0; isol<nsol; ++isol) ps.m_j[isol] = m_pMat->SoluteFlux(mp, isol); } } } //----------------------------------------------------------------------------- //! Initialize element data void FESolutesDomain::PreSolveUpdate(const FETimeInfo& timeInfo) { const int NE = FEElement::MAX_NODES; vec3d x0[NE], r0, v; FEMesh& m = *GetMesh(); for (size_t i = 0; i<m_Elem.size(); ++i) { FESolidElement& el = m_Elem[i]; int neln = el.Nodes(); for (int i = 0; i<neln; ++i) { x0[i] = m.Node(el.m_node[i]).m_r0; } int n = el.GaussPoints(); for (int j = 0; j<n; ++j) { FEMaterialPoint& mp = *el.GetMaterialPoint(j); mp.m_r0 = el.Evaluate(x0, j); // reset chemical reaction element data for (int j=0; j<m_pMat->Reactions(); ++j) m_pMat->GetReaction(j)->InitializeElementData(mp); mp.Update(timeInfo); } } } //----------------------------------------------------------------------------- void FESolutesDomain::InternalForces(FEGlobalVector& R) { int NE = (int)m_Elem.size(); #pragma omp parallel for shared (NE) for (int i = 0; i<NE; ++i) { // element force vector vector<double> fe; vector<int> lm; // get the element FESolidElement& el = m_Elem[i]; // get the element force vector and initialize it to zero int nsol = m_pMat->Solutes(); int ndof = nsol*el.Nodes(); fe.assign(ndof, 0); // calculate internal force vector ElementInternalForce(el, fe); // get the element's LM vector UnpackLM(el, lm); // assemble element 'fe'-vector into global R vector R.Assemble(el.m_node, lm, fe); } } //----------------------------------------------------------------------------- //! calculates the internal equivalent nodal forces for solid elements void FESolutesDomain::ElementInternalForce(FESolidElement& el, vector<double>& fe) { const FETimeInfo& tp = GetFEModel()->GetTime(); // jacobian matrix, inverse jacobian matrix and determinants double Ji[3][3]; // get the time step size double dt = tp.timeIncrement; // number of solutes const int nsol = m_pMat->Solutes(); const int nreact = m_pMat->Reactions(); // gradient of shape functions int neln = el.Nodes(); vector<vec3d> gradN(neln); // repeat for all integration points int nint = el.GaussPoints(); double* gw = el.GaussWeights(); for (int n = 0; n<nint; ++n) { FEMaterialPoint& mp = *el.GetMaterialPoint(n); FESolutesMaterial::Point& spt = *(mp.ExtractData<FESolutesMaterial::Point>()); // calculate the jacobian double detJ = invjac0(el, Ji, n)*gw[n]; vec3d g1(Ji[0][0], Ji[0][1], Ji[0][2]); vec3d g2(Ji[1][0], Ji[1][1], Ji[1][2]); vec3d g3(Ji[2][0], Ji[2][1], Ji[2][2]); double* H = el.H(n); double* Gr = el.Gr(n); double* Gs = el.Gs(n); double* Gt = el.Gt(n); // evaluate spatial gradient of shape functions for (int i = 0; i<neln; ++i) { gradN[i] = g1*Gr[i] + g2*Gs[i] + g3*Gt[i]; } vector<double> kappa(spt.m_k); double osmc; osmc = m_pMat->GetOsmoticCoefficient()->OsmoticCoefficient(mp); // Miscellaneous constants double R = m_pMat->m_Rgas; double T = m_pMat->m_Tabs; // evaluate the chat vector<double> chat(nsol,0); double phiwhat = 0; // chemical reactions for (int i=0; i<nreact; ++i) { FEChemicalReaction* pri = m_pMat->GetReaction(i); double zhat = pri->ReactionSupply(mp); phiwhat += pri->m_Vbar*zhat; for (int isol=0; isol<nsol; ++isol) { chat[isol] += zhat*pri->m_v[isol]; } } for (int i = 0; i<neln; ++i) { // calculate internal force // the '-' sign is so that the internal forces get subtracted // from the global residual vector for (int isol = 0; isol<nsol; ++isol) fe[nsol*i + isol] -= (spt.m_j[isol]*gradN[i] - H[i]*(spt.m_cdot[isol]*kappa[isol] - chat[isol]))*detJ; } } } //----------------------------------------------------------------------------- //! Calculates element material stiffness element matrix void FESolutesDomain::ElementStiffness(FESolidElement &el, matrix &ke) { const FETimeInfo& tp = GetFEModel()->GetTime(); // Get the current element's data const int nint = el.GaussPoints(); const int neln = el.Nodes(); const int nsol = m_pMat->Solutes(); const int nreact = m_pMat->Reactions(); // gradient of shape functions vector<vec3d> gradN(neln); double dt = tp.timeIncrement; double ksi = tp.alpham / (tp.gamma*tp.alphaf); // jacobian double Ji[3][3]; // weights at gauss points const double *gw = el.GaussWeights(); // calculate element stiffness matrix for (int n = 0; n<nint; ++n) { // calculate jacobian double detJ = invjac0(el, Ji, n)*gw[n]; vec3d g1(Ji[0][0], Ji[0][1], Ji[0][2]); vec3d g2(Ji[1][0], Ji[1][1], Ji[1][2]); vec3d g3(Ji[2][0], Ji[2][1], Ji[2][2]); double* H = el.H(n); double* Gr = el.Gr(n); double* Gs = el.Gs(n); double* Gt = el.Gt(n); // setup the material point // NOTE: deformation gradient and determinant have already been evaluated in the stress routine FEMaterialPoint& mp = *el.GetMaterialPoint(n); FESolutesMaterial::Point& spt = *(mp.ExtractData<FESolutesMaterial::Point>()); double R = m_pMat->m_Rgas; double T = m_pMat->m_Tabs; double osmc; osmc = m_pMat->GetOsmoticCoefficient()->OsmoticCoefficient(mp); double dodJ = m_pMat->GetOsmoticCoefficient()->Tangent_OsmoticCoefficient_Strain(mp); vector<double> dodc(nsol); for (int isol=0; isol<nsol; ++isol) dodc[isol] = m_pMat->GetOsmoticCoefficient()->Tangent_OsmoticCoefficient_Concentration(mp,isol); // evaluate the chat vector<vector<double>> dchatdc(nsol,vector<double>(nsol,0)); vector<double> dphiwhatdc(nsol,0); // chemical reactions for (int i=0; i<nreact; ++i) { for (int isol = 0; isol < nsol; ++isol){ dphiwhatdc[isol] += m_pMat->GetReaction(i)->m_Vbar *m_pMat->GetReaction(i)->Tangent_ReactionSupply_Concentration(mp,isol); for (int jsol = 0; jsol < nsol; ++jsol){ dchatdc[isol][jsol] += m_pMat->GetReaction(i)->m_v[isol] *m_pMat->GetReaction(i)->Tangent_ReactionSupply_Concentration(mp,jsol); } } } // evaluate spatial gradient of shape functions for (int i = 0; i<neln; ++i) gradN[i] = g1*Gr[i] + g2*Gs[i] + g3*Gt[i]; // evaluate stiffness matrix for (int i = 0; i<neln; ++i) { for (int j = 0; j<neln; ++j) { for (int isol = 0; isol<nsol; ++isol) { for(int jsol=0; jsol<nsol; ++jsol){ double kcc = 0; double d0p = m_pMat->GetSolute(isol)->m_pDiff->Tangent_Free_Diffusivity_Concentration(mp, jsol); double d0 = m_pMat->GetSolute(isol)->m_pDiff->Free_Diffusivity(mp); double kappa = spt.m_k[isol]; if (isol == jsol) //TODO: add partition coeff terms kcc = -(ksi/dt*m_btrans*kappa-dchatdc[isol][jsol])*H[i]*H[j]-gradN[i]*spt.m_gradc[isol]*H[j]*d0p+gradN[i]*(-gradN[j]*d0+spt.m_vft*H[j]); else kcc = H[i]*H[j]*dchatdc[isol][jsol] + (-gradN[i]*spt.m_gradc[isol]*d0p)*H[j]; ke[i*nsol + isol][j*nsol + jsol] += kcc*detJ; } } } } } } //----------------------------------------------------------------------------- void FESolutesDomain::StiffnessMatrix(FELinearSystem& LS) { // repeat over all solid elements int NE = (int)m_Elem.size(); #pragma omp parallel for shared (NE) for (int iel = 0; iel<NE; ++iel) { FESolidElement& el = m_Elem[iel]; // element stiffness matrix FEElementMatrix ke(el); // create the element's stiffness matrix int nsol = m_pMat->Solutes(); int ndof = nsol*el.Nodes(); ke.resize(ndof, ndof); ke.zero(); // calculate material stiffness ElementStiffness(el, ke); // get the element's LM vector vector<int> lm; UnpackLM(el, lm); ke.SetIndices(lm); // assemble element matrix in global stiffness matrix LS.Assemble(ke); } } //----------------------------------------------------------------------------- void FESolutesDomain::Update(const FETimeInfo& tp) { bool berr = false; int NE = (int)m_Elem.size(); #pragma omp parallel for shared(NE, berr) for (int i = 0; i<NE; ++i) { try { UpdateElementStress(i, tp); } catch (NegativeJacobian e) { #pragma omp critical { // reset the logfile mode berr = true; if (NegativeJacobian::DoOutput()) feLogError(e.what()); } } } if (berr) throw NegativeJacobianDetected(); } //----------------------------------------------------------------------------- //! Update element state data (mostly stresses, but some other stuff as well) void FESolutesDomain::UpdateElementStress(int iel, const FETimeInfo& tp) { // time constants double alphaf = tp.alphaf; double alpham = tp.alpham; // get the solid element FESolidElement& el = m_Elem[iel]; // number of nodes int neln = el.Nodes(); // number of solutes const int nsol = m_pMat->Solutes(); // nodal coordinates const int NELN = FEElement::MAX_NODES; vector< vector<double> > ct(nsol, vector<double>(NELN)); vector< vector<double> > cp(nsol, vector<double>(NELN)); vector< vector<double> > act(nsol, vector<double>(NELN)); vector< vector<double> > acp(nsol, vector<double>(NELN)); vector<int> sid(nsol); for (int j = 0; j<nsol; ++j) sid[j] = m_pMat->GetSolute(j)->GetSoluteDOF(); for (int j = 0; j<neln; ++j) { FENode& node = m_pMesh->Node(el.m_node[j]); for (int k = 0; k<nsol; ++k) { ct[k][j] = node.get(m_dofC + sid[k]); cp[k][j] = node.get_prev(m_dofC + sid[k]); act[k][j] = node.get(m_dofAC + sid[k]); acp[k][j] = node.get_prev(m_dofAC + sid[k]); } } // loop over the integration points and update // velocity, velocity gradient, acceleration // stress and pressure at the integration point int nint = el.GaussPoints(); for (int n = 0; n<nint; ++n) { FEMaterialPoint& mp = *el.GetMaterialPoint(n); FESolutesMaterial::Point& spt = *(mp.ExtractData<FESolutesMaterial::Point>()); // material point data for (int isol = 0; isol < nsol; ++isol) { spt.m_c[isol] = el.Evaluate(ct[isol], n)*alphaf + el.Evaluate(cp[isol], n)*(1 - alphaf); spt.m_gradc[isol] = gradient(el, ct[isol], n)*alphaf + gradient(el, cp[isol], n)*(1 - alphaf); spt.m_cdot[isol] = 0.0; if (m_btrans) spt.m_cdot[isol] += el.Evaluate(act[isol], n)*alpham + el.Evaluate(acp[isol], n)*(1-alpham); } m_pMat->PartitionCoefficientFunctions(mp, spt.m_k, spt.m_dkdJ, spt.m_dkdc); double R = m_pMat->m_Rgas; double T = m_pMat->m_Tabs; // calculate the solute flux for (int isol = 0; isol < nsol; ++isol){ spt.m_j[isol] = m_pMat->SoluteFlux(mp, isol); spt.m_ca[isol] = m_pMat->ConcentrationActual(mp, isol); } // update chemical reaction element data for (int j=0; j<m_pMat->Reactions(); ++j) m_pMat->GetReaction(j)->UpdateElementData(mp); } }
C++
3D
febiosoftware/FEBio
FEBioFluid/FEPolarFluidDomain3D.cpp
.cpp
33,985
1,039
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2022 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #include "stdafx.h" #include "FEPolarFluidDomain3D.h" #include "FEPolarFluidMaterialPoint.h" #include "FEFluidSolver.h" #include "FECore/log.h" #include "FECore/DOFS.h" #include <FECore/FEModel.h> #include <FECore/FEAnalysis.h> #include <FECore/sys.h> #include "FEBioPolarFluid.h" #include <FECore/FELinearSystem.h> #include "FEBodyMoment.h" //----------------------------------------------------------------------------- //! constructor //! Some derived classes will pass 0 to the pmat, since the pmat variable will be //! to initialize another material. These derived classes will set the m_pMat variable as well. FEPolarFluidDomain3D::FEPolarFluidDomain3D(FEModel* pfem) : FESolidDomain(pfem), FEPolarFluidDomain(pfem), m_dofW(pfem), m_dofAW(pfem), m_dofG(pfem), m_dofAG(pfem), m_dof(pfem) { m_pMat = 0; m_btrans = true; if (pfem) { m_dofW.AddVariable(FEBioPolarFluid::GetVariableName(FEBioPolarFluid::RELATIVE_FLUID_VELOCITY)); m_dofAW.AddVariable(FEBioPolarFluid::GetVariableName(FEBioPolarFluid::RELATIVE_FLUID_ACCELERATION)); m_dofG.AddVariable(FEBioPolarFluid::GetVariableName(FEBioPolarFluid::FLUID_ANGULAR_VELOCITY)); m_dofAG.AddVariable(FEBioPolarFluid::GetVariableName(FEBioPolarFluid::FLUID_ANGULAR_ACCELERATION)); m_dofEF = pfem->GetDOFIndex(FEBioPolarFluid::GetVariableName(FEBioPolarFluid::FLUID_DILATATION), 0); m_dofAEF = pfem->GetDOFIndex(FEBioPolarFluid::GetVariableName(FEBioPolarFluid::FLUID_DILATATION_TDERIV), 0); FEDofList dofs(pfem); dofs.AddDofs(m_dofW); dofs.AddDofs(m_dofG); dofs.AddDof(m_dofEF); m_dof = dofs; } } //----------------------------------------------------------------------------- // \todo I don't think this is being used FEPolarFluidDomain3D& FEPolarFluidDomain3D::operator = (FEPolarFluidDomain3D& d) { m_Elem = d.m_Elem; m_pMesh = d.m_pMesh; return (*this); } //----------------------------------------------------------------------------- void FEPolarFluidDomain3D::Serialize(DumpStream& ar) { FESolidDomain::Serialize(ar); if (ar.IsShallow()) return; ar & m_pMat; ar & m_dofW & m_dofAW; ar & m_dofG & m_dofAG; ar & m_dof; ar & m_dofEF & m_dofAEF; } //----------------------------------------------------------------------------- // get total dof list const FEDofList& FEPolarFluidDomain3D::GetDOFList() const { return m_dof; } //----------------------------------------------------------------------------- //! Assign material void FEPolarFluidDomain3D::SetMaterial(FEMaterial* pmat) { FEDomain::SetMaterial(pmat); if (pmat) { m_pMat = dynamic_cast<FEPolarFluid*>(pmat); assert(m_pMat); } else m_pMat = 0; } //----------------------------------------------------------------------------- //! Initialize element data void FEPolarFluidDomain3D::PreSolveUpdate(const FETimeInfo& timeInfo) { const int NE = FEElement::MAX_NODES; vec3d x0[NE], r0, v; FEMesh& m = *GetMesh(); for (size_t i=0; i<m_Elem.size(); ++i) { FESolidElement& el = m_Elem[i]; int neln = el.Nodes(); for (int i=0; i<neln; ++i) { x0[i] = m.Node(el.m_node[i]).m_r0; } int n = el.GaussPoints(); for (int j=0; j<n; ++j) { FEMaterialPoint& mp = *el.GetMaterialPoint(j); FEFluidMaterialPoint& pt = *mp.ExtractData<FEFluidMaterialPoint>(); pt.m_r0 = el.Evaluate(x0, j); if (pt.m_ef <= -1) { throw NegativeJacobianDetected(); } mp.Update(timeInfo); } } } //----------------------------------------------------------------------------- void FEPolarFluidDomain3D::InternalForces(FEGlobalVector& R) { int NE = (int)m_Elem.size(); #pragma omp parallel for shared (NE) for (int i=0; i<NE; ++i) { // element force vector vector<double> fe; vector<int> lm; // get the element FESolidElement& el = m_Elem[i]; // get the element force vector and initialize it to zero int ndof = 7*el.Nodes(); fe.assign(ndof, 0); // calculate internal force vector ElementInternalForce(el, fe); // get the element's LM vector UnpackLM(el, lm); // assemble element 'fe'-vector into global R vector R.Assemble(el.m_node, lm, fe); } } //----------------------------------------------------------------------------- //! calculates the internal equivalent nodal forces for solid elements void FEPolarFluidDomain3D::ElementInternalForce(FESolidElement& el, vector<double>& fe) { int i, n; // jacobian matrix, inverse jacobian matrix and determinants double Ji[3][3], detJ; const double *H, *Gr, *Gs, *Gt; int nint = el.GaussPoints(); int neln = el.Nodes(); // gradient of shape functions vector<vec3d> gradN(neln); double* gw = el.GaussWeights(); FEViscousFluid* Viscous = m_pMat->GetViscous(); FEViscousPolarFluid* ViscPol = m_pMat->GetViscousPolar(); // repeat for all integration points for (n=0; n<nint; ++n) { FEMaterialPoint& mp = *el.GetMaterialPoint(n); FEFluidMaterialPoint& pt = *(mp.ExtractData<FEFluidMaterialPoint>()); // calculate the jacobian detJ = invjac0(el, Ji, n)*gw[n]; vec3d g1(Ji[0][0],Ji[0][1],Ji[0][2]); vec3d g2(Ji[1][0],Ji[1][1],Ji[1][2]); vec3d g3(Ji[2][0],Ji[2][1],Ji[2][2]); // get the viscous stress tensor for this integration point vec3d th = ViscPol->SkewStressDualVector(mp); mat3d sva = mat3da(th); mat3d sv = sva + Viscous->Stress(mp); mat3d M = ViscPol->CoupleStress(mp); // get the gradient of the elastic pressure vec3d gradp = pt.m_gradef*m_pMat->Tangent_Pressure_Strain(mp); H = el.H(n); Gr = el.Gr(n); Gs = el.Gs(n); Gt = el.Gt(n); // evaluate spatial gradient of shape functions for (i=0; i<neln; ++i) { gradN[i] = g1*Gr[i] + g2*Gs[i] + g3*Gt[i]; } // Jdot/J double dJoJ = pt.m_efdot/(pt.m_ef+1); for (i=0; i<neln; ++i) { vec3d fv = sv*gradN[i] + gradp*H[i]; vec3d fg = M*gradN[i] - th*(2*H[i]); double fJ = dJoJ*H[i] + gradN[i]*pt.m_vft; // calculate internal force // the '-' sign is so that the internal forces get subtracted // from the global residual vector fe[7*i ] -= fv.x*detJ; fe[7*i+1] -= fv.y*detJ; fe[7*i+2] -= fv.z*detJ; fe[7*i+3] -= fg.x*detJ; fe[7*i+4] -= fg.y*detJ; fe[7*i+5] -= fg.z*detJ; fe[7*i+6] -= fJ*detJ; } } } //----------------------------------------------------------------------------- void FEPolarFluidDomain3D::BodyForce(FEGlobalVector& R, FEBodyForce& BF) { int NE = (int)m_Elem.size(); for (int i=0; i<NE; ++i) { vector<double> fe; vector<int> lm; // get the element FESolidElement& el = m_Elem[i]; // get the element force vector and initialize it to zero int ndof = 7*el.Nodes(); fe.assign(ndof, 0); // apply body forces ElementBodyForce(BF, el, fe); // get the element's LM vector UnpackLM(el, lm); // assemble element 'fe'-vector into global R vector R.Assemble(el.m_node, lm, fe); } } //----------------------------------------------------------------------------- //! calculates the body forces void FEPolarFluidDomain3D::ElementBodyForce(FEBodyForce& BF, FESolidElement& el, vector<double>& fe) { // jacobian double detJ; double *H; double* gw = el.GaussWeights(); vec3d f; // number of nodes int neln = el.Nodes(); // nodal coordinates vec3d r0[FEElement::MAX_NODES]; for (int i=0; i<neln; ++i) r0[i] = m_pMesh->Node(el.m_node[i]).m_r0; // loop over integration points int nint = el.GaussPoints(); for (int n=0; n<nint; ++n) { FEMaterialPoint& mp = *el.GetMaterialPoint(n); FEFluidMaterialPoint& pt = *mp.ExtractData<FEFluidMaterialPoint>(); double dens = m_pMat->Density(mp); pt.m_r0 = el.Evaluate(r0, n); detJ = detJ0(el, n)*gw[n]; // get the force f = BF.force(mp); H = el.H(n); for (int i=0; i<neln; ++i) { fe[7*i ] -= H[i]*dens*f.x*detJ; fe[7*i+1] -= H[i]*dens*f.y*detJ; fe[7*i+2] -= H[i]*dens*f.z*detJ; } } } //----------------------------------------------------------------------------- //! This function calculates the stiffness due to body forces void FEPolarFluidDomain3D::ElementBodyForceStiffness(FEBodyForce& BF, FESolidElement &el, matrix &ke) { const FETimeInfo& tp = GetFEModel()->GetTime(); int neln = el.Nodes(); // jacobian double detJ; double *H; double* gw = el.GaussWeights(); vec3d f, k; // gradient of shape functions vec3d gradN; // loop over integration points int nint = el.GaussPoints(); for (int n=0; n<nint; ++n) { FEMaterialPoint& mp = *el.GetMaterialPoint(n); FEFluidMaterialPoint& pt = *mp.ExtractData<FEFluidMaterialPoint>(); // calculate the jacobian detJ = detJ0(el, n)*gw[n]*tp.alphaf; H = el.H(n); double dens = m_pMat->Density(mp); // get the force f = BF.force(mp); H = el.H(n); for (int i=0; i<neln; ++i) { for (int j=0; j<neln; ++j) { k = f*(-H[i]*H[j]*dens/(pt.m_ef+1)*detJ); ke[7*i ][7*j+6] += k.x; ke[7*i+1][7*j+6] += k.y; ke[7*i+2][7*j+6] += k.z; } } } } //----------------------------------------------------------------------------- void FEPolarFluidDomain3D::BodyMoment(FEGlobalVector& R, FEBodyMoment& bm) { int NE = (int)m_Elem.size(); for (int i=0; i<NE; ++i) { vector<double> fe; vector<int> lm; // get the element FESolidElement& el = m_Elem[i]; // get the element force vector and initialize it to zero int ndof = 7*el.Nodes(); fe.assign(ndof, 0); // apply body forces ElementBodyMoment(bm, el, fe); // get the element's LM vector UnpackLM(el, lm); // assemble element 'fe'-vector into global R vector R.Assemble(el.m_node, lm, fe); } } //----------------------------------------------------------------------------- //! calculates the body forces void FEPolarFluidDomain3D::ElementBodyMoment(FEBodyMoment& bm, FESolidElement& el, vector<double>& fe) { // jacobian double detJ; double *H; double* gw = el.GaussWeights(); vec3d m; // number of nodes int neln = el.Nodes(); // nodal coordinates vec3d r0[FEElement::MAX_NODES]; for (int i=0; i<neln; ++i) r0[i] = m_pMesh->Node(el.m_node[i]).m_r0; // loop over integration points int nint = el.GaussPoints(); for (int n=0; n<nint; ++n) { FEMaterialPoint& mp = *el.GetMaterialPoint(n); FEFluidMaterialPoint& pt = *mp.ExtractData<FEFluidMaterialPoint>(); double dens = m_pMat->Density(mp); pt.m_r0 = el.Evaluate(r0, n); detJ = detJ0(el, n)*gw[n]; // get the moment m = bm.moment(mp); H = el.H(n); for (int i=0; i<neln; ++i) { fe[7*i+3] -= H[i]*dens*m.x*detJ; fe[7*i+4] -= H[i]*dens*m.y*detJ; fe[7*i+5] -= H[i]*dens*m.z*detJ; } } } //----------------------------------------------------------------------------- //! This function calculates the stiffness due to body moments void FEPolarFluidDomain3D::ElementBodyMomentStiffness(FEBodyMoment& bm, FESolidElement &el, matrix &ke) { const FETimeInfo& tp = GetFEModel()->GetTime(); int neln = el.Nodes(); // jacobian double detJ; double *H; double* gw = el.GaussWeights(); vec3d m, k; // gradient of shape functions vec3d gradN; // loop over integration points int nint = el.GaussPoints(); for (int n=0; n<nint; ++n) { FEMaterialPoint& mp = *el.GetMaterialPoint(n); FEFluidMaterialPoint& pt = *mp.ExtractData<FEFluidMaterialPoint>(); // calculate the jacobian detJ = detJ0(el, n)*gw[n]*tp.alphaf; H = el.H(n); double dens = m_pMat->Density(mp); // get the force m = bm.moment(mp); H = el.H(n); for (int i=0; i<neln; ++i) { for (int j=0; j<neln; ++j) { k = m*(-H[i]*H[j]*dens/(pt.m_ef+1)*detJ); ke[7*i+3][7*j+6] += k.x; ke[7*i+4][7*j+6] += k.y; ke[7*i+5][7*j+6] += k.z; } } } } //----------------------------------------------------------------------------- //! Calculates element material stiffness element matrix void FEPolarFluidDomain3D::ElementStiffness(FESolidElement &el, matrix &ke) { const FETimeInfo& tp = GetFEModel()->GetTime(); int i, i7, j, j7, n; // Get the current element's data const int nint = el.GaussPoints(); const int neln = el.Nodes(); // gradient of shape functions vector<vec3d> gradN(neln); double dt = tp.timeIncrement; double ksi = tp.alpham/(tp.gamma*tp.alphaf); double *H, *Gr, *Gs, *Gt; // jacobian double Ji[3][3], detJ; // weights at gauss points const double *gw = el.GaussWeights(); FEViscousFluid* Viscous = m_pMat->GetViscous(); FEViscousPolarFluid* ViscPol = m_pMat->GetViscousPolar(); // calculate element stiffness matrix for (n=0; n<nint; ++n) { // calculate jacobian detJ = invjac0(el, Ji, n)*gw[n]*tp.alphaf; vec3d g1(Ji[0][0],Ji[0][1],Ji[0][2]); vec3d g2(Ji[1][0],Ji[1][1],Ji[1][2]); vec3d g3(Ji[2][0],Ji[2][1],Ji[2][2]); H = el.H(n); Gr = el.Gr(n); Gs = el.Gs(n); Gt = el.Gt(n); // setup the material point // NOTE: deformation gradient and determinant have already been evaluated in the stress routine FEMaterialPoint& mp = *el.GetMaterialPoint(n); FEFluidMaterialPoint& pt = *(mp.ExtractData<FEFluidMaterialPoint>()); double Jf = 1 + pt.m_ef; // get the tangents mat3d svJ = Viscous->Tangent_Strain(mp) + ViscPol->SkewTangent_Strain(mp); vec3d thJ = ViscPol->SkewTangent_Strain(mp).vec(); tens4ds cvs = m_pMat->Tangent_RateOfDeformation(mp); mat3d cva = ViscPol->SkewTangent_RateOfRotation(mp); tens4d m = ViscPol->CoupleTangent_RateOfRotation(mp); mat3d mJ = ViscPol->CoupleTangent_Strain(mp); double dp = m_pMat->Tangent_Pressure_Strain(mp); double d2p = m_pMat->Tangent_Pressure_Strain_Strain(mp); // Jdot/J double dJoJ = pt.m_efdot/Jf; // evaluate spatial gradient of shape functions for (i=0; i<neln; ++i) gradN[i] = g1*Gr[i] + g2*Gs[i] + g3*Gt[i]; // evaluate stiffness matrix for (i=0, i7=0; i<neln; ++i, i7 += 7) { for (j=0, j7 = 0; j<neln; ++j, j7 += 7) { mat3da gNa(gradN[i]), gNb(gradN[j]); mat3d Kvv = vdotTdotv(gradN[i], cvs, gradN[j]) + gNa*cva*gNb/2; mat3d Kgv = cva*gNb*H[i]; vec3d kJv = (pt.m_gradef*(H[i]/Jf) + gradN[i])*H[j]; mat3d Kvg = -gNa*cva*H[j]; //! TODO: There may be a mistake in vdotTdotv when using tens4d object, evaluates as b.T.a instead of a.T.b // mat3d Kgg = vdotTdotv(gradN[i], m, gradN[j])-cva*(2*H[i]*H[j]); mat3d Kgg = vdotTdotv(gradN[j], m, gradN[i])-cva*(2*H[i]*H[j]); vec3d kvJ = (svJ*gradN[i])*H[j] + (gradN[j]*dp+pt.m_gradef*(H[j]*d2p))*H[i]; vec3d kgJ = mJ*gradN[i]*H[j] - thJ*(2*H[i]*H[j]); double kJJ = (H[j]*(ksi/dt - dJoJ) + gradN[j]*pt.m_vft)*H[i]/Jf; ke[i7 ][j7 ] += Kvv(0,0)*detJ; ke[i7 ][j7+1] += Kvv(0,1)*detJ; ke[i7 ][j7+2] += Kvv(0,2)*detJ; ke[i7 ][j7+3] += Kvg(0,0)*detJ; ke[i7 ][j7+4] += Kvg(0,1)*detJ; ke[i7 ][j7+5] += Kvg(0,2)*detJ; ke[i7 ][j7+6] += kvJ.x*detJ; ke[i7+1][j7 ] += Kvv(1,0)*detJ; ke[i7+1][j7+1] += Kvv(1,1)*detJ; ke[i7+1][j7+2] += Kvv(1,2)*detJ; ke[i7+1][j7+3] += Kvg(1,0)*detJ; ke[i7+1][j7+4] += Kvg(1,1)*detJ; ke[i7+1][j7+5] += Kvg(1,2)*detJ; ke[i7+1][j7+6] += kvJ.y*detJ; ke[i7+2][j7 ] += Kvv(2,0)*detJ; ke[i7+2][j7+1] += Kvv(2,1)*detJ; ke[i7+2][j7+2] += Kvv(2,2)*detJ; ke[i7+2][j7+3] += Kvg(2,0)*detJ; ke[i7+2][j7+4] += Kvg(2,1)*detJ; ke[i7+2][j7+5] += Kvg(2,2)*detJ; ke[i7+2][j7+6] += kvJ.z*detJ; ke[i7+3][j7 ] += Kgv(0,0)*detJ; ke[i7+3][j7+1] += Kgv(0,1)*detJ; ke[i7+3][j7+2] += Kgv(0,2)*detJ; ke[i7+3][j7+3] += Kgg(0,0)*detJ; ke[i7+3][j7+4] += Kgg(0,1)*detJ; ke[i7+3][j7+5] += Kgg(0,2)*detJ; ke[i7+3][j7+6] += kgJ.x*detJ; ke[i7+4][j7 ] += Kgv(1,0)*detJ; ke[i7+4][j7+1] += Kgv(1,1)*detJ; ke[i7+4][j7+2] += Kgv(1,2)*detJ; ke[i7+4][j7+3] += Kgg(1,0)*detJ; ke[i7+4][j7+4] += Kgg(1,1)*detJ; ke[i7+4][j7+5] += Kgg(1,2)*detJ; ke[i7+4][j7+6] += kgJ.y*detJ; ke[i7+5][j7 ] += Kgv(2,0)*detJ; ke[i7+5][j7+1] += Kgv(2,1)*detJ; ke[i7+5][j7+2] += Kgv(2,2)*detJ; ke[i7+5][j7+3] += Kgg(2,0)*detJ; ke[i7+5][j7+4] += Kgg(2,1)*detJ; ke[i7+5][j7+5] += Kgg(2,2)*detJ; ke[i7+5][j7+6] += kgJ.z*detJ; ke[i7+6][j7 ] += kJv.x*detJ; ke[i7+6][j7+1] += kJv.y*detJ; ke[i7+6][j7+2] += kJv.z*detJ; ke[i7+6][j7+6] += kJJ*detJ; } } } } //----------------------------------------------------------------------------- void FEPolarFluidDomain3D::StiffnessMatrix(FELinearSystem& LS) { // repeat over all solid elements int NE = (int)m_Elem.size(); #pragma omp parallel for shared (NE) for (int iel=0; iel<NE; ++iel) { FESolidElement& el = m_Elem[iel]; // element stiffness matrix FEElementMatrix ke(el); // create the element's stiffness matrix int ndof = 7*el.Nodes(); ke.resize(ndof, ndof); ke.zero(); // calculate material stiffness ElementStiffness(el, ke); // get the element's LM vector vector<int> lm; UnpackLM(el, lm); ke.SetIndices(lm); // assemble element matrix in global stiffness matrix LS.Assemble(ke); } } //----------------------------------------------------------------------------- void FEPolarFluidDomain3D::MassMatrix(FELinearSystem& LS) { // repeat over all solid elements int NE = (int)m_Elem.size(); #pragma omp parallel for shared (NE) for (int iel=0; iel<NE; ++iel) { FESolidElement& el = m_Elem[iel]; // element stiffness matrix FEElementMatrix ke(el); // create the element's stiffness matrix int ndof = 7*el.Nodes(); ke.resize(ndof, ndof); ke.zero(); // calculate inertial stiffness ElementMassMatrix(el, ke); // get the element's LM vector vector<int> lm; UnpackLM(el, lm); ke.SetIndices(lm); // assemble element matrix in global stiffness matrix LS.Assemble(ke); } } //----------------------------------------------------------------------------- void FEPolarFluidDomain3D::BodyForceStiffness(FELinearSystem& LS, FEBodyForce& bf) { // repeat over all solid elements int NE = (int)m_Elem.size(); #pragma omp parallel for shared (NE) for (int iel=0; iel<NE; ++iel) { FESolidElement& el = m_Elem[iel]; // element stiffness matrix FEElementMatrix ke(el); // create the element's stiffness matrix int ndof = 7*el.Nodes(); ke.resize(ndof, ndof); ke.zero(); // calculate inertial stiffness ElementBodyForceStiffness(bf, el, ke); // get the element's LM vector vector<int> lm; UnpackLM(el, lm); ke.SetIndices(lm); // assemble element matrix in global stiffness matrix LS.Assemble(ke); } } //----------------------------------------------------------------------------- void FEPolarFluidDomain3D::BodyMomentStiffness(FELinearSystem& LS, FEBodyMoment& bm) { // repeat over all solid elements int NE = (int)m_Elem.size(); for (int iel=0; iel<NE; ++iel) { FESolidElement& el = m_Elem[iel]; // element stiffness matrix FEElementMatrix ke(el); // create the element's stiffness matrix int ndof = 7*el.Nodes(); ke.resize(ndof, ndof); ke.zero(); // calculate inertial stiffness ElementBodyMomentStiffness(bm, el, ke); // get the element's LM vector vector<int> lm; UnpackLM(el, lm); ke.SetIndices(lm); // assemble element matrix in global stiffness matrix LS.Assemble(ke); } } //----------------------------------------------------------------------------- //! calculates element inertial stiffness matrix void FEPolarFluidDomain3D::ElementMassMatrix(FESolidElement& el, matrix& ke) { const FETimeInfo& tp = GetFEModel()->GetTime(); int i, i7, j, j7, n; // Get the current element's data const int nint = el.GaussPoints(); const int neln = el.Nodes(); // gradient of shape functions vector<vec3d> gradN(neln); double *H; double *Gr, *Gs, *Gt; // jacobian double Ji[3][3], detJ; // weights at gauss points const double *gw = el.GaussWeights(); double dt = tp.timeIncrement; double ksi = tp.alpham/(tp.gamma*tp.alphaf)*m_btrans; // calculate element stiffness matrix for (n=0; n<nint; ++n) { // calculate jacobian detJ = invjac0(el, Ji, n)*gw[n]*tp.alphaf; vec3d g1(Ji[0][0],Ji[0][1],Ji[0][2]); vec3d g2(Ji[1][0],Ji[1][1],Ji[1][2]); vec3d g3(Ji[2][0],Ji[2][1],Ji[2][2]); H = el.H(n); Gr = el.Gr(n); Gs = el.Gs(n); Gt = el.Gt(n); // setup the material point // NOTE: deformation gradient and determinant have already been evaluated in the stress routine FEMaterialPoint& mp = *el.GetMaterialPoint(n); FEFluidMaterialPoint& pt = *(mp.ExtractData<FEFluidMaterialPoint>()); FEPolarFluidMaterialPoint& pf = *(mp.ExtractData<FEPolarFluidMaterialPoint>()); double dens = m_pMat->Density(mp); double kg = m_pMat->m_kg; double moi = dens*kg*kg; double J = 1+pt.m_ef; // evaluate spatial gradient of shape functions for (i=0; i<neln; ++i) gradN[i] = g1*Gr[i] + g2*Gs[i] + g3*Gt[i]; // evaluate stiffness matrix for (i=0, i7=0; i<neln; ++i, i7 += 7) { for (j=0, j7 = 0; j<neln; ++j, j7 += 7) { mat3d Mv = ((mat3dd(ksi/dt) + pt.m_Lf)*H[j] + mat3dd(gradN[j]*pt.m_vft))*(H[i]*dens*detJ); mat3d Jgg = mat3dd(ksi/dt*H[j] + gradN[j]*pt.m_vft)*(H[i]*moi*detJ); mat3d Jgv = pf.m_Psi*(H[i]*H[j]*moi*detJ); vec3d mJ = pt.m_aft*(-H[i]*H[j]*dens/J*detJ); vec3d jJ = pf.m_gfdot*(-H[i]*H[j]*moi/J*detJ); ke[i7 ][j7 ] += Mv(0,0); ke[i7 ][j7+1] += Mv(0,1); ke[i7 ][j7+2] += Mv(0,2); ke[i7 ][j7+6] += mJ.x; ke[i7+1][j7 ] += Mv(1,0); ke[i7+1][j7+1] += Mv(1,1); ke[i7+1][j7+2] += Mv(1,2); ke[i7+1][j7+6] += mJ.y; ke[i7+2][j7 ] += Mv(2,0); ke[i7+2][j7+1] += Mv(2,1); ke[i7+2][j7+2] += Mv(2,2); ke[i7+2][j7+6] += mJ.z; ke[i7+3][j7 ] += Jgv(0,0); ke[i7+3][j7+1] += Jgv(0,1); ke[i7+3][j7+2] += Jgv(0,2); ke[i7+3][j7+3] += Jgg(0,0); ke[i7+3][j7+4] += Jgg(0,1); ke[i7+3][j7+5] += Jgg(0,2); ke[i7+3][j7+6] += jJ.x; ke[i7+4][j7 ] += Jgv(1,0); ke[i7+4][j7+1] += Jgv(1,1); ke[i7+4][j7+2] += Jgv(1,2); ke[i7+4][j7+3] += Jgg(1,0); ke[i7+4][j7+4] += Jgg(1,1); ke[i7+4][j7+5] += Jgg(1,2); ke[i7+4][j7+6] += jJ.y; ke[i7+5][j7 ] += Jgv(2,0); ke[i7+5][j7+1] += Jgv(2,1); ke[i7+5][j7+2] += Jgv(2,2); ke[i7+5][j7+3] += Jgg(2,0); ke[i7+5][j7+4] += Jgg(2,1); ke[i7+5][j7+5] += Jgg(2,2); ke[i7+5][j7+6] += jJ.z; } } } } //----------------------------------------------------------------------------- void FEPolarFluidDomain3D::Update(const FETimeInfo& tp) { bool berr = false; int NE = (int) m_Elem.size(); #pragma omp parallel for shared(NE, berr) for (int i=0; i<NE; ++i) { try { UpdateElementStress(i, tp); } catch (NegativeJacobian e) { #pragma omp critical { // reset the logfile mode berr = true; if (NegativeJacobian::DoOutput()) feLogError(e.what()); } } } if (berr) throw NegativeJacobianDetected(); } //----------------------------------------------------------------------------- //! Update element state data (mostly stresses, but some other stuff as well) void FEPolarFluidDomain3D::UpdateElementStress(int iel, const FETimeInfo& tp) { double alphaf = tp.alphaf; double alpham = tp.alpham; // get the solid element FESolidElement& el = m_Elem[iel]; // get the number of integration points int nint = el.GaussPoints(); // number of nodes int neln = el.Nodes(); // nodal coordinates const int NELN = FEElement::MAX_NODES; vec3d vt[NELN], vp[NELN]; vec3d at[NELN], ap[NELN]; vec3d gt[NELN], gp[NELN]; vec3d agt[NELN], agp[NELN]; double et[NELN], ep[NELN]; double aet[NELN], aep[NELN]; for (int j=0; j<neln; ++j) { FENode& node = m_pMesh->Node(el.m_node[j]); vt[j] = node.get_vec3d(m_dofW[0], m_dofW[1], m_dofW[2]); vp[j] = node.get_vec3d_prev(m_dofW[0], m_dofW[1], m_dofW[2]); at[j] = node.get_vec3d(m_dofAW[0], m_dofAW[1], m_dofAW[2]); ap[j] = node.get_vec3d_prev(m_dofAW[0], m_dofAW[1], m_dofAW[2]); gt[j] = node.get_vec3d(m_dofG[0], m_dofG[1], m_dofG[2]); gp[j] = node.get_vec3d_prev(m_dofG[0], m_dofG[1], m_dofG[2]); agt[j] = node.get_vec3d(m_dofAG[0], m_dofAG[1], m_dofAG[2]); agp[j] = node.get_vec3d_prev(m_dofAG[0], m_dofAG[1], m_dofAG[2]); et[j] = node.get(m_dofEF); ep[j] = node.get_prev(m_dofEF); aet[j] = node.get(m_dofAEF); aep[j] = node.get_prev(m_dofAEF); } // loop over the integration points and update // velocity, velocity gradient, acceleration // stress and pressure at the integration point for (int n=0; n<nint; ++n) { FEMaterialPoint& mp = *el.GetMaterialPoint(n); FEFluidMaterialPoint& pt = *(mp.ExtractData<FEFluidMaterialPoint>()); FEPolarFluidMaterialPoint& pf = *(mp.ExtractData<FEPolarFluidMaterialPoint>()); // material point data pt.m_vft = el.Evaluate(vt, n)*alphaf + el.Evaluate(vp, n)*(1-alphaf); pt.m_Lf = gradient(el, vt, n)*alphaf + gradient(el, vp, n)*(1-alphaf); pt.m_aft = pt.m_Lf*pt.m_vft; if (m_btrans) pt.m_aft += el.Evaluate(at, n)*alpham + el.Evaluate(ap, n)*(1-alpham); pf.m_gf = el.Evaluate(gt, n)*alphaf + el.Evaluate(gp, n)*(1-alphaf); pf.m_Psi = gradient(el, gt, n)*alphaf + gradient(el, gp, n)*(1-alphaf); pf.m_gfdot = pf.m_Psi*pt.m_vft; if (m_btrans) pf.m_gfdot += el.Evaluate(agt, n)*alpham + el.Evaluate(agp, n)*(1-alpham); pt.m_ef = el.Evaluate(et, n)*alphaf + el.Evaluate(ep, n)*(1-alphaf); pt.m_gradef = gradient(el, et, n)*alphaf + gradient(el, ep, n)*(1-alphaf); pt.m_efdot = pt.m_gradef*pt.m_vft; if (m_btrans) pt.m_efdot += el.Evaluate(aet, n)*alpham + el.Evaluate(aep, n)*(1-alpham); // calculate the stress at this material point pt.m_sf = m_pMat->Stress(mp); pf.m_sfa = m_pMat->GetViscousPolar()->SkewStress(mp); // calculate the fluid pressure pt.m_pf = m_pMat->Pressure(mp); } } //----------------------------------------------------------------------------- void FEPolarFluidDomain3D::InertialForces(FEGlobalVector& R) { int NE = (int)m_Elem.size(); #pragma omp parallel for shared (NE) for (int i=0; i<NE; ++i) { // element force vector vector<double> fe; vector<int> lm; // get the element FESolidElement& el = m_Elem[i]; // get the element force vector and initialize it to zero int ndof = 7*el.Nodes(); fe.assign(ndof, 0); // calculate internal force vector ElementInertialForce(el, fe); // get the element's LM vector UnpackLM(el, lm); // assemble element 'fe'-vector into global R vector R.Assemble(el.m_node, lm, fe); } } //----------------------------------------------------------------------------- void FEPolarFluidDomain3D::ElementInertialForce(FESolidElement& el, vector<double>& fe) { int i, n; // jacobian determinant double detJ; const double* H; int nint = el.GaussPoints(); int neln = el.Nodes(); double* gw = el.GaussWeights(); // repeat for all integration points for (n=0; n<nint; ++n) { FEMaterialPoint& mp = *el.GetMaterialPoint(n); FEFluidMaterialPoint& pt = *(mp.ExtractData<FEFluidMaterialPoint>()); FEPolarFluidMaterialPoint& pf = *(mp.ExtractData<FEPolarFluidMaterialPoint>()); double dens = m_pMat->Density(mp); double kg = m_pMat->m_kg; // calculate the jacobian detJ = detJ0(el, n)*gw[n]; H = el.H(n); for (i=0; i<neln; ++i) { vec3d fv = pt.m_aft*(dens*H[i]); vec3d fg = pf.m_gfdot*(dens*kg*kg*H[i]); // calculate internal force // the '-' sign is so that the internal forces get subtracted // from the global residual vector fe[7*i ] -= fv.x*detJ; fe[7*i+1] -= fv.y*detJ; fe[7*i+2] -= fv.z*detJ; fe[7*i+3] -= fg.x*detJ; fe[7*i+4] -= fg.y*detJ; fe[7*i+5] -= fg.z*detJ; } } }
C++
3D
febiosoftware/FEBio
FEBioFluid/FENewtonianRealVapor.h
.h
3,472
87
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #pragma once #include "FEViscousFluid.h" #include <FECore/FEFunction1D.h> //----------------------------------------------------------------------------- // This class evaluates the viscous stress in a Newtonian viscous real vapor class FEBIOFLUID_API FENewtonianRealVapor : public FEViscousFluid { public: enum { MAX_NVC = 4 }; public: //! constructor FENewtonianRealVapor(FEModel* pfem); //! initialization bool Init() override; //! Serialization void Serialize(DumpStream& ar) override; //! viscous stress mat3ds Stress(FEMaterialPoint& pt) override; //! tangent of stress with respect to strain J mat3ds Tangent_Strain(FEMaterialPoint& mp) override; //! tangent of stress with respect to rate of deformation tensor D tens4ds Tangent_RateOfDeformation(FEMaterialPoint& mp) override; //! tangent of stress with respect to temperature mat3ds Tangent_Temperature(FEMaterialPoint& mp) override; //! dynamic viscosity double ShearViscosity(FEMaterialPoint& mp) override; double TangentShearViscosityTemperature(FEMaterialPoint& mp); double TangentShearViscosityStrain(FEMaterialPoint& mp); //! bulk viscosity double BulkViscosity(FEMaterialPoint& mp) override; double TangentBulkViscosityTemperature(FEMaterialPoint& mp); double TangentBulkViscosityStrain(FEMaterialPoint& mp); public: double m_kappa; //!< bulk viscosity double m_mu; //!< shear viscosity double m_Tr; //!< referential temperature double m_Tc; //!< normalized critical temperature (Tc/Tr) double m_alpha; //!< exponent alpha used for calculating temperature map int m_nvc; //!< number of virial coefficients for isochoric specific heat capacity FEFunction1D* m_esat; //!< dilatation on saturation curve FEFunction1D* m_musat; //!< normalized shear viscosity vs normalized temperature on saturation curve FEFunction1D* m_C[MAX_NVC]; //!< non-dimensional pressure coefficient (multiply by m_Pr to get actual value) // declare parameter list DECLARE_FECORE_CLASS(); };
Unknown
3D
febiosoftware/FEBio
FEBioFluid/FEThermoFluidSolver.cpp
.cpp
42,935
1,287
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #include "stdafx.h" #include "FEBioThermoFluid.h" #include "FEFluidHeatSupply.h" #include "FEFluidResistanceBC.h" #include "FEBackFlowStabilization.h" #include "FEFluidNormalVelocity.h" #include "FEFluidVelocity.h" #include "FEFluidRotationalVelocity.h" #include "FETiedFluidInterface.h" #include "FEThermoFluidSolver.h" #include "FEThermoFluidDomain3D.h" #include "FEFluidDomain.h" #include <assert.h> #include "FEFluidResidualVector.h" #include <FEBioMech/FEResidualVector.h> #include <FECore/FEModel.h> #include <FECore/log.h> #include <FECore/DOFS.h> #include <FECore/FEGlobalMatrix.h> #include <FECore/sys.h> #include <FEBioMech/FEBodyForce.h> #include <FECore/FEBoundaryCondition.h> #include <FECore/FENodalLoad.h> #include <FECore/FESurfaceLoad.h> #include <FECore/FEModelLoad.h> #include <FECore/FEAnalysis.h> #include <FECore/FELinearConstraintManager.h> #include <FECore/FELinearSystem.h> #include <FECore/FENLConstraint.h> #include "FEThermoFluidAnalysis.h" //----------------------------------------------------------------------------- // define the parameter list BEGIN_FECORE_CLASS(FEThermoFluidSolver, FENewtonSolver) ADD_PARAMETER(m_Vtol , "vtol" ); ADD_PARAMETER(m_Ftol , "ftol" ); ADD_PARAMETER(m_Ttol , "ttol" ); ADD_PARAMETER(m_Etol, FE_RANGE_GREATER_OR_EQUAL(0.0), "etol"); ADD_PARAMETER(m_Rtol, FE_RANGE_GREATER_OR_EQUAL(0.0), "rtol"); ADD_PARAMETER(m_rhoi , "rhoi" ); ADD_PARAMETER(m_pred , "predictor" ); ADD_PARAMETER(m_minJf, "min_volume_ratio"); ADD_PARAMETER(m_minT , "min_abs_temperature"); ADD_PARAMETER(m_solve_strategy, "solve_strategy")->setEnums("coupled\0sequential\0"); ADD_PARAMETER(m_Tmin , "min_T_drop"); ADD_PARAMETER(m_Tmax , "min_T_rise"); ADD_PARAMETER(m_Tnum , "min_T_num"); END_FECORE_CLASS(); //----------------------------------------------------------------------------- //! FEThermoFluidSolver Construction // FEThermoFluidSolver::FEThermoFluidSolver(FEModel* pfem) : FENewtonSolver(pfem), m_dofW(pfem), m_dofAW(pfem), m_dofEF(pfem), m_dofT(pfem) { // default values m_Rtol = 0.001; m_Etol = 0.01; m_Vtol = 0.001; m_Ftol = 0.001; m_Ttol = 0.001; m_Rmin = 1.0e-20; m_Rmax = 0; // not used if zero m_minJf = 0; // not used if zero m_minT = 0; // not used if zero m_Tmin = 0; // not used if zero m_Tmax = 0; // not used if zero m_Tnum = 1; m_nveq = 0; m_ndeq = 0; m_nteq = 0; m_niter = 0; // assume non-symmetric stiffness m_msymm = REAL_UNSYMMETRIC; m_solve_strategy = SOLVE_COUPLED; m_rhoi = 0; m_pred = 0; m_sudden_T_change = false; // Preferred strategy is Broyden's method SetDefaultStrategy(QN_BROYDEN); // turn off checking for a zero diagonal CheckZeroDiagonal(false); // get the dof indices // TODO: Can this be done in Init, since there is no error checking if (pfem) { m_dofW.AddVariable(FEBioThermoFluid::GetVariableName(FEBioThermoFluid::RELATIVE_FLUID_VELOCITY)); m_dofAW.AddVariable(FEBioThermoFluid::GetVariableName(FEBioThermoFluid::RELATIVE_FLUID_ACCELERATION)); m_dofEF.AddVariable(FEBioThermoFluid::GetVariableName(FEBioThermoFluid::FLUID_DILATATION)); m_dofAEF = pfem->GetDOFIndex(FEBioThermoFluid::GetVariableName(FEBioThermoFluid::FLUID_DILATATION_TDERIV), 0); m_dofT.AddVariable(FEBioThermoFluid::GetVariableName(FEBioThermoFluid::TEMPERATURE)); m_dofAT = pfem->GetDOFIndex(FEBioThermoFluid::GetVariableName(FEBioThermoFluid::TEMPERATURE_TDERIV), 0); } } //----------------------------------------------------------------------------- FEThermoFluidSolver::~FEThermoFluidSolver() { } //----------------------------------------------------------------------------- //! Allocates and initializes the data structures used by the FEThermoFluidSolver // bool FEThermoFluidSolver::Init() { // initialize base class if (FENewtonSolver::Init() == false) return false; // check parameters if (m_Vtol < 0.0) { feLogError("vtol must be nonnegative."); return false; } if (m_Ftol < 0.0) { feLogError("dtol must be nonnegative."); return false; } if (m_Ttol < 0.0) { feLogError("ttol must be nonnegative."); return false; } if (m_Etol < 0.0) { feLogError("etol must be nonnegative."); return false; } if (m_Rtol < 0.0) { feLogError("rtol must be nonnegative."); return false; } if (m_rhoi == -1) { m_alphaf = m_alpham = m_gammaf = 1.0; } else if ((m_rhoi >= 0) && (m_rhoi <= 1)) { m_alphaf = 1.0/(1+m_rhoi); m_alpham = (3-m_rhoi)/(1+m_rhoi)/2; m_gammaf = 0.5 + m_alpham - m_alphaf; } else { feLogError("rhoi must be -1 or between 0 and 1."); return false; } // allocate vectors int neq = m_neq; m_Fr.assign(neq, 0); m_Ui.assign(neq, 0); m_Ut.assign(neq, 0); m_vi.assign(m_nveq,0); m_Vi.assign(m_nveq,0); m_di.assign(m_ndeq,0); m_Di.assign(m_ndeq,0); m_ti.assign(m_nteq,0); m_Ti.assign(m_nteq,0); // we need to fill the total DOF vector m_Ut // TODO: I need to find an easier way to do this FEModel& fem = *GetFEModel(); FEMesh& mesh = fem.GetMesh(); gather(m_Ut, mesh, m_dofW[0]); gather(m_Ut, mesh, m_dofW[1]); gather(m_Ut, mesh, m_dofW[2]); gather(m_Ut, mesh, m_dofEF[0]); gather(m_Ut, mesh, m_dofT[0]); // set flag for transient or steady-state analyses FEAnalysis* pstep = fem.GetCurrentStep(); for (int i = 0; i<mesh.Domains(); ++i) { FEDomain& dom = mesh.Domain(i); if (dom.IsActive()) { FEFluidDomain* fdom = dynamic_cast<FEFluidDomain*>(&dom); if (pstep->m_nanalysis == FEThermoFluidAnalysis::STEADY_STATE) fdom->SetSteadyStateAnalysis(); else fdom->SetTransientAnalysis(); } } return true; } //----------------------------------------------------------------------------- //! Initialize equations bool FEThermoFluidSolver::InitEquations() { // Add the solution variables AddSolutionVariable(&m_dofW , 1, "velocity" , m_Vtol); AddSolutionVariable(&m_dofEF, 1, "dilatation" , m_Ftol); AddSolutionVariable(&m_dofT , 1, "temperature", m_Ttol); // base class initialization if (FENewtonSolver::InitEquations() == false) return false; // determined the nr of velocity and dilatation equations FEMesh& mesh = GetFEModel()->GetMesh(); m_nveq = m_ndeq = m_nteq = 0; for (int i=0; i<mesh.Nodes(); ++i) { FENode& n = mesh.Node(i); if (n.m_ID[m_dofW[0]] != -1) m_nveq++; if (n.m_ID[m_dofW[1]] != -1) m_nveq++; if (n.m_ID[m_dofW[2]] != -1) m_nveq++; if (n.m_ID[m_dofEF[0]] != -1) m_ndeq++; if (n.m_ID[m_dofT[0]] != -1) m_nteq++; } // check that we are using a block scheme for sequential solves if ((m_solve_strategy == SOLVE_SEQUENTIAL) && (m_eq_scheme != EQUATION_SCHEME::BLOCK)) { feLogWarning("You need a block solver when using the sequential solve strategy."); return false; } // Next, we add any Lagrange Multipliers FEModel& fem = *GetFEModel(); for (int i = 0; i < fem.NonlinearConstraints(); ++i) { FENLConstraint* lmc = fem.NonlinearConstraint(i); if (lmc->IsActive()) { m_neq += lmc->InitEquations(m_neq); } } for (int i = 0; i < fem.SurfacePairConstraints(); ++i) { FESurfacePairConstraint* spc = fem.SurfacePairConstraint(i); if (spc->IsActive()) { m_neq += spc->InitEquations(m_neq); } } if (m_eq_scheme == EQUATION_SCHEME::BLOCK) { // repartition the equations so that we only have two partitions, // one for the fluid-dilatation, and one for the temperature. // fluid equations is all the rest int nfeq = m_neq - m_nteq; // create the new partitions // Note that this assumes that the temperature equations are always last! vector<int> p = { nfeq, m_nteq }; SetPartitions(p); } return true; } //----------------------------------------------------------------------------- //! Initialize equations bool FEThermoFluidSolver::InitEquations2() { // Add the solution variables AddSolutionVariable(&m_dofW , 1, "velocity" , m_Vtol); AddSolutionVariable(&m_dofEF, 1, "dilatation" , m_Ftol); AddSolutionVariable(&m_dofT , 1, "temperature", m_Ttol); // base class initialization if (FENewtonSolver::InitEquations2() == false) return false; // determined the nr of velocity and dilatation equations FEMesh& mesh = GetFEModel()->GetMesh(); m_nveq = m_ndeq = m_nteq = 0; for (int i=0; i<mesh.Nodes(); ++i) { FENode& n = mesh.Node(i); if (n.m_ID[m_dofW[0]] != -1) m_nveq++; if (n.m_ID[m_dofW[1]] != -1) m_nveq++; if (n.m_ID[m_dofW[2]] != -1) m_nveq++; if (n.m_ID[m_dofEF[0]] != -1) m_ndeq++; if (n.m_ID[m_dofT[0]] != -1) m_nteq++; } // Next, we add any Lagrange Multipliers FEModel& fem = *GetFEModel(); for (int i = 0; i < fem.NonlinearConstraints(); ++i) { FENLConstraint* lmc = fem.NonlinearConstraint(i); if (lmc->IsActive()) { m_neq += lmc->InitEquations(m_neq); } } for (int i = 0; i < fem.SurfacePairConstraints(); ++i) { FESurfacePairConstraint* spc = fem.SurfacePairConstraint(i); if (spc->IsActive()) { m_neq += spc->InitEquations(m_neq); } } return true; } //----------------------------------------------------------------------------- void FEThermoFluidSolver::GetVelocityData(vector<double> &vi, vector<double> &ui) { FEModel& fem = *GetFEModel(); int N = fem.GetMesh().Nodes(), nid, m = 0; zero(vi); for (int i=0; i<N; ++i) { FENode& n = fem.GetMesh().Node(i); nid = n.m_ID[m_dofW[0]]; if (nid != -1) { nid = (nid < -1 ? -nid-2 : nid); vi[m++] = ui[nid]; assert(m <= (int) vi.size()); } nid = n.m_ID[m_dofW[1]]; if (nid != -1) { nid = (nid < -1 ? -nid-2 : nid); vi[m++] = ui[nid]; assert(m <= (int) vi.size()); } nid = n.m_ID[m_dofW[2]]; if (nid != -1) { nid = (nid < -1 ? -nid-2 : nid); vi[m++] = ui[nid]; assert(m <= (int) vi.size()); } } } //----------------------------------------------------------------------------- void FEThermoFluidSolver::GetDilatationData(vector<double> &ei, vector<double> &ui) { FEModel& fem = *GetFEModel(); int N = fem.GetMesh().Nodes(), nid, m = 0; zero(ei); for (int i=0; i<N; ++i) { FENode& n = fem.GetMesh().Node(i); nid = n.m_ID[m_dofEF[0]]; if (nid != -1) { nid = (nid < -1 ? -nid-2 : nid); ei[m++] = ui[nid]; assert(m <= (int) ei.size()); } } } //----------------------------------------------------------------------------- void FEThermoFluidSolver::GetTemperatureData(vector<double> &ti, vector<double> &ui) { FEModel& fem = *GetFEModel(); int N = fem.GetMesh().Nodes(), nid, m = 0; zero(ti); for (int i=0; i<N; ++i) { FENode& n = fem.GetMesh().Node(i); nid = n.m_ID[m_dofT[0]]; if (nid != -1) { nid = (nid < -1 ? -nid-2 : nid); ti[m++] = ui[nid]; assert(m <= (int) ti.size()); } } } //----------------------------------------------------------------------------- //! Update the kinematics of the model, such as nodal positions, velocities, //! accelerations, etc. void FEThermoFluidSolver::UpdateKinematics(vector<double>& ui) { // get the mesh FEModel& fem = *GetFEModel(); FEMesh& mesh = fem.GetMesh(); // update nodes vector<double> U(m_Ut.size()); for (size_t i=0; i<m_Ut.size(); ++i) U[i] = ui[i] + m_Ui[i] + m_Ut[i]; scatter(U, mesh, m_dofW[0]); scatter(U, mesh, m_dofW[1]); scatter(U, mesh, m_dofW[2]); scatter(U, mesh, m_dofEF[0]); // scatter(U, mesh, m_dofT[0]); // update temperature data int nssd = 0, nssr = 0; for (int i=0; i<mesh.Nodes(); ++i) { FENode& node = mesh.Node(i); // update nodal temperature int n = node.m_ID[m_dofT[0]]; // Force the temperature to remain positive if (n >= 0) { double Tt = 0 + m_Ut[n] + m_Ui[n] + ui[n]; double Tp = node.get_prev(m_dofT[0]); if ((m_Tmin > 0) && (node.get_bc(m_dofT[0]) == DOF_OPEN) && (Tp - Tt >= m_Tmin)) nssd++; if ((m_Tmax > 0) && (node.get_bc(m_dofT[0]) == DOF_OPEN) && (Tt - Tp >= m_Tmax)) nssr++; node.set(m_dofT[0], Tt); } } if (nssd >= m_Tnum) m_sudden_T_change = true; if (nssr >= m_Tnum) m_sudden_T_change = true; // force dilatations to remain greater than -1 if (m_minJf > 0) { const int NN = mesh.Nodes(); for (int i=0; i<NN; ++i) { FENode& node = mesh.Node(i); if (node.get(m_dofEF[0]) <= -1.0) node.set(m_dofEF[0], m_minJf - 1.0); } } // force absolute temperature to remain greater than 0 double Tr = fem.GetGlobalConstant("T"); if (m_minT > 0) { const int NN = mesh.Nodes(); for (int i=0; i<NN; ++i) { FENode& node = mesh.Node(i); if (node.get(m_dofT[0]) <= -Tr) node.set(m_dofT[0], m_minT - Tr); } } // make sure the prescribed velocities are fulfilled int nvel = fem.BoundaryConditions(); for (int i=0; i<nvel; ++i) { FEBoundaryCondition& bc = *fem.BoundaryCondition(i); if (bc.IsActive() && HasActiveDofs(bc.GetDofList())) bc.Update(); } // enforce the linear constraints // TODO: do we really have to do this? Shouldn't the algorithm // already guarantee that the linear constraints are satisfied? FELinearConstraintManager& LCM = fem.GetLinearConstraintManager(); if (LCM.LinearConstraints() > 0) { LCM.Update(); } // update time derivatives of velocity and dilatation // for dynamic simulations FEAnalysis* pstep = fem.GetCurrentStep(); if (pstep->m_nanalysis == FEThermoFluidAnalysis::DYNAMIC) { int N = mesh.Nodes(); double dt = fem.GetTime().timeIncrement; double cgi = 1 - 1.0/m_gammaf; for (int i=0; i<N; ++i) { FENode& n = mesh.Node(i); // velocity time derivative vec3d vft = n.get_vec3d(m_dofW[0], m_dofW[1], m_dofW[2]); vec3d vfp = n.get_vec3d_prev(m_dofW[0], m_dofW[1], m_dofW[2]); vec3d aft = n.get_vec3d(m_dofAW[0], m_dofAW[1], m_dofAW[2]); vec3d afp = n.get_vec3d_prev(m_dofAW[0], m_dofAW[1], m_dofAW[2]); aft = afp*cgi + (vft - vfp)/(m_gammaf*dt); n.set_vec3d(m_dofAW[0], m_dofAW[1], m_dofAW[2], aft); // dilatation time derivative double eft = n.get(m_dofEF[0]); double efp = n.get_prev(m_dofEF[0]); double aefp = n.get_prev(m_dofAEF); double aeft = aefp*cgi + (eft - efp)/(m_gammaf*dt); n.set(m_dofAEF, aeft); // temperature time derivative double Tt = n.get(m_dofT[0]); double Tp = n.get_prev(m_dofT[0]); double aTp = n.get_prev(m_dofAT); double aTt = aTp*cgi + (Tt - Tp)/(m_gammaf*dt); n.set(m_dofAT, aTt); } } // update nonlinear constraints (needed for updating Lagrange Multiplier) for (int i = 0; i < fem.NonlinearConstraints(); ++i) { FENLConstraint* nlc = fem.NonlinearConstraint(i); if (nlc->IsActive()) nlc->Update(m_Ui, ui); } for (int i = 0; i < fem.SurfacePairConstraints(); ++i) { FESurfacePairConstraint* spc = fem.SurfacePairConstraint(i); if (spc->IsActive()) spc->Update(m_Ui, ui); } } //----------------------------------------------------------------------------- void FEThermoFluidSolver::Update2(const vector<double>& ui) { // get the mesh FEModel& fem = *GetFEModel(); FEMesh& mesh = fem.GetMesh(); // update nodes vector<double> U(m_Ut.size()); for (size_t i = 0; i<m_Ut.size(); ++i) U[i] = ui[i] + m_Ui[i] + m_Ut[i]; scatter(U, mesh, m_dofW[0]); scatter(U, mesh, m_dofW[1]); scatter(U, mesh, m_dofW[2]); scatter(U, mesh, m_dofEF[0]); scatter(U, mesh, m_dofT[0]); // Update the prescribed nodes for (int i = 0; i<mesh.Nodes(); ++i) { FENode& node = mesh.Node(i); if (node.m_rid == -1) { vec3d dv(0, 0, 0); for (int j = 0; j < node.m_ID.size(); ++j) { int nj = -node.m_ID[j] - 2; if (nj >= 0) node.set(j, node.get(j) + ui[nj]); } } } // update model state GetFEModel()->Update(); } //----------------------------------------------------------------------------- //! Updates the current state of the model void FEThermoFluidSolver::Update(vector<double>& ui) { FEModel& fem = *GetFEModel(); FETimeInfo& tp = fem.GetTime(); tp.currentIteration = m_niter; // update kinematics UpdateKinematics(ui); // update model state // GetFEModel()->Update(); UpdateModel(); } //----------------------------------------------------------------------------- //! Update DOF increments void FEThermoFluidSolver::UpdateIncrements(vector<double>& Ui, vector<double>& ui, bool emap) { FEModel& fem = *GetFEModel(); // get the mesh FEMesh& mesh = fem.GetMesh(); // extract the velocity and dilatation increments GetVelocityData(m_vi, ui); GetDilatationData(m_di, ui); GetTemperatureData(m_ti, ui); // update all degrees of freedom for (int i=0; i<m_neq; ++i) Ui[i] += ui[i]; // update velocities for (int i = 0; i<m_nveq; ++i) m_Vi[i] += m_vi[i]; // update dilatations for (int i = 0; i<m_ndeq; ++i) m_Di[i] += m_di[i]; // update temperatures for (int i = 0; i<m_nteq; ++i) m_Ti[i] += m_ti[i]; for (int i = 0; i < fem.NonlinearConstraints(); ++i) { FENLConstraint* plc = fem.NonlinearConstraint(i); if (plc && plc->IsActive()) plc->UpdateIncrements(Ui, ui); } for (int i = 0; i < fem.SurfacePairConstraints(); ++i) { FESurfacePairConstraint* psc = fem.SurfacePairConstraint(i); if (psc && psc->IsActive()) psc->UpdateIncrements(Ui, ui); } // TODO: This is a hack! // The problem is that I only want to call the domain's IncrementalUpdate during // the quasi-Newtoon loop. However, this function is also called after the loop // converges. The emap parameter is used here to detect wether we are inside the // loop (emap == false), or not (emap == true). if (emap == false) { for (int i = 0; i < mesh.Domains(); ++i) { FEDomain& dom = mesh.Domain(i); dom.IncrementalUpdate(ui, true); } } } //----------------------------------------------------------------------------- //! Update nonlinear constraints void FEThermoFluidSolver::UpdateConstraints() { FEModel& fem = *GetFEModel(); FETimeInfo& tp = fem.GetTime(); tp.currentIteration = m_niter; // Update all nonlinear constraints for (int i = 0; i<fem.NonlinearConstraints(); ++i) { FENLConstraint* pci = fem.NonlinearConstraint(i); if (pci->IsActive()) pci->Update(); } } //----------------------------------------------------------------------------- bool FEThermoFluidSolver::InitStep(double time) { FEModel& fem = *GetFEModel(); // set time integration parameters FETimeInfo& tp = fem.GetTime(); tp.alphaf = m_alphaf; tp.alpham = m_alpham; tp.gamma = m_gammaf; // evaluate load curve values at current (or intermediate) time double t = tp.currentTime; double dt = tp.timeIncrement; double ta = (t > 0) ? t - (1-m_alphaf)*dt : m_alphaf*dt; return FESolver::InitStep(ta); } //----------------------------------------------------------------------------- //! Prepares the data for the first BFGS-iteration. void FEThermoFluidSolver::PrepStep() { FEModel& fem = *GetFEModel(); FETimeInfo& tp = fem.GetTime(); double dt = tp.timeIncrement; tp.currentIteration = m_niter; // zero total DOFs zero(m_Ui); zero(m_Vi); zero(m_Di); zero(m_Ti); // store previous mesh state // we need them for strain and acceleration calculations FEMesh& mesh = fem.GetMesh(); for (int i=0; i<mesh.Nodes(); ++i) { FENode& ni = mesh.Node(i); ni.m_rp = ni.m_rt = ni.m_r0; ni.UpdateValues(); switch (m_pred) { case 0: { // initial guess at start of new time step (default) vec3d afp = ni.get_vec3d_prev(m_dofAW[0], m_dofAW[1], m_dofAW[2]); ni.set_vec3d(m_dofAW[0], m_dofAW[1], m_dofAW[2], afp*(m_gammaf-1)/m_gammaf); ni.set(m_dofAEF, ni.get_prev(m_dofAEF)*(m_gammaf-1)/m_gammaf); ni.set(m_dofAT, ni.get_prev(m_dofAT)*(m_gammaf-1)/m_gammaf); } break; case 1: { // initial guess at start of new time step (Zero Ydot) ni.set_vec3d(m_dofAW[0], m_dofAW[1], m_dofAW[2], vec3d(0,0,0)); ni.set(m_dofAEF, 0); ni.set(m_dofAT, 0); vec3d vfp = ni.get_vec3d_prev(m_dofW[0], m_dofW[1], m_dofW[2]); vec3d afp = ni.get_vec3d_prev(m_dofAW[0], m_dofAW[1], m_dofAW[2]); ni.set_vec3d(m_dofW[0], m_dofW[1], m_dofW[2], vfp + afp*dt*(1-m_gammaf)*m_alphaf); ni.set(m_dofEF[0], ni.get_prev(m_dofEF[0]) + ni.get_prev(m_dofAEF)*dt*(1-m_gammaf)*m_alphaf); ni.set(m_dofT[0] , ni.get_prev(m_dofT[0]) + ni.get_prev(m_dofAT )*dt*(1-m_gammaf)*m_alphaf); } break; case 2: { // initial guess at start of new time step (Same Ydot) vec3d afp = ni.get_vec3d_prev(m_dofAW[0], m_dofAW[1], m_dofAW[2]); ni.set_vec3d(m_dofAW[0], m_dofAW[1], m_dofAW[2], afp); ni.set(m_dofAEF, ni.get_prev(m_dofAEF)); ni.set(m_dofAT, ni.get_prev(m_dofAT)); vec3d vfp = ni.get_vec3d_prev(m_dofW[0], m_dofW[1], m_dofW[2]); ni.set_vec3d(m_dofW[0], m_dofW[1], m_dofW[2], vfp + afp*dt); ni.set(m_dofEF[0], ni.get_prev(m_dofEF[0]) + ni.get_prev(m_dofAEF)*dt); ni.set(m_dofT[0] , ni.get_prev(m_dofT[0]) + ni.get_prev(m_dofAT)*dt); } break; default: break; } } // apply prescribed velocities // we save the prescribed velocity increments in the ui vector vector<double>& ui = m_ui; zero(ui); int nbc = fem.BoundaryConditions(); for (int i=0; i<nbc; ++i) { FEBoundaryCondition& bc = *fem.BoundaryCondition(i); if (bc.IsActive() && HasActiveDofs(bc.GetDofList())) bc.PrepStep(ui); } // do the linear constraints fem.GetLinearConstraintManager().PrepStep(); // initialize material point data // NOTE: do this before the stresses are updated // TODO: does it matter if the stresses are updated before // the material point data is initialized // update domain data for (int i=0; i<mesh.Domains(); ++i) mesh.Domain(i).PreSolveUpdate(tp); // update model state UpdateModel(); for (int i = 0; i < fem.NonlinearConstraints(); ++i) { FENLConstraint* plc = fem.NonlinearConstraint(i); if (plc && plc->IsActive()) plc->PrepStep(); } for (int i = 0; i < fem.SurfacePairConstraints(); ++i) { FESurfacePairConstraint* psc = fem.SurfacePairConstraint(i); if (psc && psc->IsActive()) psc->PrepStep(); } // apply prescribed DOFs for specialized surface loads int nsl = fem.ModelLoads(); for (int i = 0; i < nsl; ++i) { FEModelLoad& pml = *fem.ModelLoad(i); if (pml.IsActive()) pml.PrepStep(); } // see if we need to do contact augmentations m_baugment = false; for (int i = 0; i<fem.SurfacePairConstraints(); ++i) { FEContactInterface& ci = dynamic_cast<FEContactInterface&>(*fem.SurfacePairConstraint(i)); if (ci.IsActive() && (ci.m_laugon == FECore::AUGLAG_METHOD)) m_baugment = true; } // see if we have to do nonlinear constraint augmentations if (fem.NonlinearConstraints() != 0) m_baugment = true; } //----------------------------------------------------------------------------- bool FEThermoFluidSolver::Quasin() { FEModel& fem = *GetFEModel(); // convergence norms double normR1; // residual norm double normE1; // energy norm double normV; // velocity norm double normv; // velocity increment norm double normRi = 0; // initial residual norm double normVi = 0; // initial velocity norm double normEi = 0; // initial energy norm double normEm = 0; // max energy norm double normDi = 0; // initial dilatation norm double normD; // current dilatation norm double normd; // incremement dilatation norm double normTi = 0; // initial temperature norm double normT; // current temperature norm double normt; // incremement temperature norm // prepare for the first iteration const FETimeInfo& tp = fem.GetTime(); PrepStep(); // Init QN method if (QNInit() == false) return false; // this flag indicates whether the velocity has converged for a sequential solve // (This is not used for a coupled solve.) bool vel_converged = false; // loop until converged or when max nr of reformations reached bool bconv = false; // convergence flag do { feLog(" %d\n", m_niter+1); // assume we'll converge. bconv = true; // for sequential solve, we set one of the residual components to zero if (m_solve_strategy == SOLVE_SEQUENTIAL) { int veq = m_neq - m_nteq; if (vel_converged == false) { // zero the solute residual for (int i = veq; i < m_neq; ++i) m_R0[i] = 0.0; } else { // zero the velocity residual for (int i = 0; i < veq; ++i) m_R0[i] = 0.0; } } // solve the equations SolveEquations(m_ui, m_R0); // do the line search double s = DoLineSearch(); // for sequential solve, we set one of the residual components to zero if (m_solve_strategy == SOLVE_SEQUENTIAL) { int veq = m_neq - m_nteq; if (vel_converged == false) { // zero the solute residual for (int i = veq; i < m_neq; ++i) m_R1[i] = 0.0; // zero the solute solution for (int i = veq; i < m_neq; ++i) m_ui[i] = 0.0; } else { // zero the velocity residual for (int i = 0; i < veq; ++i) m_R1[i] = 0.0; } } // set initial convergence norms if (m_niter == 0) { normRi = fabs(m_R0*m_R0); normEi = fabs(m_ui*m_R0); normVi = fabs(m_vi*m_vi); normDi = fabs(m_di*m_di); normTi = fabs(m_ti*m_ti); normEm = normEi; } // calculate actual increment // NOTE: We don't apply the line search directly to m_ui since we need the unscaled search direction for the QN update below int neq = (int)m_Ui.size(); vector<double> ui(m_ui); for (int i = 0; i<neq; ++i) ui[i] *= s; // update other increments (e.g., Lagrange multipliers) UpdateIncrements(m_Ui, ui, false); // calculate the norms normR1 = m_R1*m_R1; normv = m_vi*m_vi; normV = m_Vi*m_Vi; normd = m_di*m_di; normD = m_Di*m_Di; normt = m_ti*m_ti; normT = m_Ti*m_Ti; normE1 = fabs(m_ui*m_R1); // check for nans if (ISNAN(normR1)) throw NANInResidualDetected(); // check residual norm if ((m_Rtol > 0) && (normR1 > m_Rtol*normRi)) bconv = false; // check velocity norm if ((m_Vtol > 0) && (normv > (m_Vtol*m_Vtol)*normV )) bconv = false; // check dilatation norm if ((m_Ftol > 0) && (normd > (m_Ftol*m_Ftol)*normD )) bconv = false; // check temperature norm if ((m_Ttol > 0) && (normt > (m_Ttol*m_Ttol)*normT )) bconv = false; // check energy norm if ((m_Etol > 0) && (normE1 > m_Etol*normEi)) bconv = false; // check linestep size if ((m_lineSearch->m_LStol > 0) && (s < m_lineSearch->m_LSmin)) bconv = false; // check energy divergence if (normE1 > normEm) bconv = false; // print convergence summary feLog(" Nonlinear solution status: time= %lg\n", tp.currentTime); feLog("\tstiffness updates = %d\n", m_qnstrategy->m_nups); feLog("\tright hand side evaluations = %d\n", m_nrhs); feLog("\tstiffness matrix reformations = %d\n", m_nref); if (m_lineSearch->m_LStol > 0) feLog("\tstep from line search = %lf\n", s); feLog("\tconvergence norms : INITIAL CURRENT REQUIRED\n"); feLog("\t residual %15le %15le %15le \n", normRi, normR1, m_Rtol*normRi); feLog("\t energy %15le %15le %15le \n", normEi, normE1, m_Etol*normEi); feLog("\t velocity %15le %15le %15le \n", normVi, normv ,(m_Vtol*m_Vtol)*normV ); feLog("\t dilatation %15le %15le %15le \n", normDi, normd ,(m_Ftol*m_Ftol)*normD ); feLog("\t temperature %15le %15le %15le \n", normTi, normt ,(m_Ttol*m_Ttol)*normT ); // see if we may have a small residual if ((bconv == false) && (normR1 < m_Rmin)) { // check for almost zero-residual on the first iteration // this might be an indication that there is no force on the system feLogWarning("No force acting on the system."); bconv = true; } // see if we have exceeded the max residual if ((bconv == false) && (m_Rmax > 0) && (normR1 >= m_Rmax)) { // doesn't look like we're getting anywhere, so let's retry the time step throw MaxResidualError(); } // check if we have converged. // If not, calculate the BFGS update vectors if (bconv == false) { if (s < m_lineSearch->m_LSmin) { // check for zero linestep size feLogWarning("Zero linestep size. Stiffness matrix will now be reformed"); QNForceReform(true); } else if ((normE1 > normEm) && m_bdivreform) { // check for diverging feLogWarning("Problem is diverging. Stiffness matrix will now be reformed"); normEm = normE1; normEi = normE1; normRi = normR1; normVi = normv; normDi = normd; normTi = normt; QNForceReform(true); } // Do the QN update (This may also do a stiffness reformation if necessary) bool bret = QNUpdate(); // something went wrong with the update, so we'll need to break if (bret == false) break; } else if (m_baugment) { // Do augmentations bconv = DoAugmentations(); } if (bconv && (m_solve_strategy == SOLVE_SEQUENTIAL)) { if (vel_converged == false) { vel_converged = true; bconv = false; m_qnstrategy->m_nups = 0; m_niter = -1; Residual(m_R0); feLog("\n*** Velocity converged. Now solving for temperature.\n"); } } // check for sudden temperature change if (bconv && m_sudden_T_change) { m_sudden_T_change = false; throw ConcentrationChangeDetected(); } else m_sudden_T_change = false; // increase iteration number m_niter++; // do minor iterations callbacks fem.DoCallback(CB_MINOR_ITERS); } while (bconv == false); // if converged we update the total velocities if (bconv) { UpdateIncrements(m_Ut, m_Ui, true); zero(m_Ui); zero(m_Di); zero(m_Vi); zero(m_Ti); } return bconv; } //----------------------------------------------------------------------------- //! Calculates global stiffness matrix. bool FEThermoFluidSolver::StiffnessMatrix(FELinearSystem& LS) { FEModel& fem = *GetFEModel(); const FETimeInfo& tp = fem.GetTime(); // get the mesh FEMesh& mesh = fem.GetMesh(); // calculate the stiffness matrix for each domain for (int i=0; i<mesh.Domains(); ++i) { FEFluidDomain& dom = dynamic_cast<FEFluidDomain&>(mesh.Domain(i)); dom.StiffnessMatrix(LS); } // calculate the body force stiffness matrix for each domain int NML = fem.ModelLoads(); for (int j = 0; j<NML; ++j) { FEModelLoad* pml = fem.ModelLoad(j); FEBodyForce* pbf = dynamic_cast<FEBodyForce*>(pml); FEFluidHeatSupply* phs = dynamic_cast<FEFluidHeatSupply*>(pml); if (pbf && pbf->IsActive()) { for (int i = 0; i<pbf->Domains(); ++i) { FEFluidDomain& dom = dynamic_cast<FEFluidDomain&>(*pbf->Domain(i)); dom.BodyForceStiffness(LS, *pbf); } } else if (phs && phs->IsActive()) { for (int i = 0; i<phs->Domains(); ++i) { FEThermoFluidDomain3D* tdom = dynamic_cast<FEThermoFluidDomain3D*>(phs->Domain(i)); if (tdom) tdom->HeatSupplyStiffness(LS, *phs); } } } // calculate contact stiffness ContactStiffness(LS); // calculate stiffness matrix due to model loads int nsl = fem.ModelLoads(); for (int i=0; i<nsl; ++i) { FEModelLoad* pml = fem.ModelLoad(i); if (pml->IsActive()) pml->StiffnessMatrix(LS); } // Add mass matrix // loop over all domains for (int i=0; i<mesh.Domains(); ++i) { FEFluidDomain& dom = dynamic_cast<FEFluidDomain&>(mesh.Domain(i)); dom.MassMatrix(LS); } // calculate nonlinear constraint stiffness // note that this is the contribution of the // constraints enforced with augmented lagrangian NonLinearConstraintStiffness(LS, tp); return true; } //----------------------------------------------------------------------------- //! Calculate the stiffness contribution due to nonlinear constraints void FEThermoFluidSolver::NonLinearConstraintStiffness(FELinearSystem& LS, const FETimeInfo& tp) { FEModel& fem = *GetFEModel(); int N = fem.NonlinearConstraints(); for (int i=0; i<N; ++i) { FENLConstraint* plc = fem.NonlinearConstraint(i); if (plc->IsActive()) plc->StiffnessMatrix(LS, tp); } } //----------------------------------------------------------------------------- //! This function calculates the contact stiffness matrix void FEThermoFluidSolver::ContactStiffness(FELinearSystem& LS) { FEModel& fem = *GetFEModel(); const FETimeInfo& tp = fem.GetTime(); for (int i = 0; i<fem.SurfacePairConstraints(); ++i) { FEContactInterface* pci = dynamic_cast<FEContactInterface*>(fem.SurfacePairConstraint(i)); if (pci->IsActive()) pci->StiffnessMatrix(LS, tp); } } //----------------------------------------------------------------------------- //! Calculates the contact forces void FEThermoFluidSolver::ContactForces(FEGlobalVector& R) { FEModel& fem = *GetFEModel(); const FETimeInfo& tp = fem.GetTime(); for (int i = 0; i<fem.SurfacePairConstraints(); ++i) { FEContactInterface* pci = dynamic_cast<FEContactInterface*>(fem.SurfacePairConstraint(i)); if (pci->IsActive()) pci->LoadVector(R, tp); } } //----------------------------------------------------------------------------- //! calculates the residual vector //! Note that the concentrated nodal forces are not calculated here. //! This is because they do not depend on the geometry //! so we only calculate them once (in Quasin) and then add them here. bool FEThermoFluidSolver::Residual(vector<double>& R) { FEModel& fem = *GetFEModel(); // get the time information const FETimeInfo& tp = fem.GetTime(); // initialize residual with concentrated nodal loads zero(R); // zero nodal reaction forces zero(m_Fr); // setup the global vector // FEFluidResidualVector RHS(fem, R, m_Fr); FEResidualVector RHS(fem, R, m_Fr); // get the mesh FEMesh& mesh = fem.GetMesh(); // calculate the internal (stress) forces for (int i=0; i<mesh.Domains(); ++i) { FEFluidDomain& dom = dynamic_cast<FEFluidDomain&>(mesh.Domain(i)); dom.InternalForces(RHS); } // calculate the model loads for (int j = 0; j<fem.ModelLoads(); ++j) { FEModelLoad* pml = fem.ModelLoad(j); FEBodyForce* pbf = dynamic_cast<FEBodyForce*>(pml); FEFluidHeatSupply* phs = dynamic_cast<FEFluidHeatSupply*>(pml); if (pbf && pbf->IsActive()) { for (int i = 0; i<pbf->Domains(); ++i) { FEFluidDomain* fdom = dynamic_cast<FEFluidDomain*>(pbf->Domain(i)); fdom->BodyForce(RHS, *pbf); } } else if (phs && phs->IsActive()) { for (int i = 0; i<phs->Domains(); ++i) { FEThermoFluidDomain3D* tdom = dynamic_cast<FEThermoFluidDomain3D*>(phs->Domain(i)); if (tdom) tdom->HeatSupply(RHS, *phs); } } } // calculate inertial forces for (int i=0; i<mesh.Domains(); ++i) { FEFluidDomain& fdom = dynamic_cast<FEFluidDomain&>(mesh.Domain(i)); fdom.InertialForces(RHS); } // calculate contact forces ContactForces(RHS); // calculate nonlinear constraint forces // note that these are the linear constraints // enforced using the augmented lagrangian NonLinearConstraintForces(RHS, tp); // add model loads int NML = fem.ModelLoads(); for (int i=0; i<NML; ++i) { FEModelLoad& mli = *fem.ModelLoad(i); if (mli.IsActive()) { mli.LoadVector(RHS); } } // set the nodal reaction forces // TODO: Is this a good place to do this? for (int i=0; i<mesh.Nodes(); ++i) { FENode& node = mesh.Node(i); node.set_load(m_dofW[0], 0); node.set_load(m_dofW[1], 0); node.set_load(m_dofW[2], 0); int n; if ((n = -node.m_ID[m_dofW[0]] - 2) >= 0) node.set_load(m_dofW[0], -m_Fr[n]); if ((n = -node.m_ID[m_dofW[1]] - 2) >= 0) node.set_load(m_dofW[1], -m_Fr[n]); if ((n = -node.m_ID[m_dofW[2]] - 2) >= 0) node.set_load(m_dofW[2], -m_Fr[n]); } // increase RHS counter m_nrhs++; return true; } //----------------------------------------------------------------------------- //! calculate the nonlinear constraint forces void FEThermoFluidSolver::NonLinearConstraintForces(FEGlobalVector& R, const FETimeInfo& tp) { FEModel& fem = *GetFEModel(); int N = fem.NonlinearConstraints(); for (int i=0; i<N; ++i) { FENLConstraint* plc = fem.NonlinearConstraint(i); if (plc->IsActive()) plc->LoadVector(R, tp); } } //----------------------------------------------------------------------------- //! Serialization void FEThermoFluidSolver::Serialize(DumpStream& ar) { FENewtonSolver::Serialize(ar); ar & m_nrhs; ar & m_niter; ar & m_nref & m_ntotref; ar & m_nveq & m_ndeq & m_nteq; ar & m_Fr & m_Ui &m_Ut; ar & m_Vi & m_Di & m_Ti; if (ar.IsLoading()) { m_Fr.assign(m_neq, 0); m_Vi.assign(m_nveq,0); m_Di.assign(m_ndeq,0); m_Ti.assign(m_nteq,0); } if (ar.IsShallow()) return; ar & m_rhoi & m_alphaf & m_alpham; ar & m_gammaf; ar & m_pred; ar & m_dofW & m_dofEF & m_dofAEF & m_dofT & m_dofAT; }
C++
3D
febiosoftware/FEBio
FEBioFluid/FEFluidPressureLoad.cpp
.cpp
3,985
120
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2020 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #include "stdafx.h" #include "FEFluidPressureLoad.h" #include "FECore/FECoreKernel.h" #include "FEBioFluid.h" #include <FECore/FEModel.h> //----------------------------------------------------------------------------- BEGIN_FECORE_CLASS(FEFluidPressureLoad, FESurfaceLoad) ADD_PARAMETER(m_p0 , "pressure"); END_FECORE_CLASS(); //----------------------------------------------------------------------------- FEFluidPressureLoad::FEFluidPressureLoad(FEModel* pfem) : FESurfaceLoad(pfem) { m_pfluid = nullptr; m_p0 = 0; m_dofEF = pfem->GetDOFIndex(FEBioFluid::GetVariableName(FEBioFluid::FLUID_DILATATION), 0); m_dof.Clear(); m_dof.AddDof(m_dofEF); } //----------------------------------------------------------------------------- bool FEFluidPressureLoad::Init() { if (FESurfaceLoad::Init() == false) return false; // get fluid from first surface element // assuming the entire surface bounds the same fluid FESurfaceElement& el = m_psurf->Element(0); FEElement* pe = el.m_elem[0].pe; if (pe == nullptr) return false; // get the material FEMaterial* pm = GetFEModel()->GetMaterial(pe->GetMatID()); m_pfluid = pm->ExtractProperty<FEFluidMaterial>(); if (m_pfluid == nullptr) return false; return true; } //----------------------------------------------------------------------------- //! Activate the degrees of freedom for this BC void FEFluidPressureLoad::Activate() { FESurface* ps = &GetSurface(); for (int i=0; i<ps->Nodes(); ++i) { FENode& node = ps->Node(i); // mark node as having prescribed DOF node.set_bc(m_dofEF, DOF_PRESCRIBED); } FESurfaceLoad::Activate(); } //----------------------------------------------------------------------------- //! Evaluate and prescribe the resistance pressure void FEFluidPressureLoad::Update() { // prescribe this dilatation at the nodes FESurface* ps = &GetSurface(); for (int i=0; i<ps->Nodes(); ++i) { if (ps->Node(i).m_ID[m_dofEF] < -1) { FENode& node = ps->Node(i); // calculate the dilatation double e = node.get(m_dofEF); bool good = m_pfluid->Dilatation(0,m_p0,e); assert(good); // set node as having prescribed DOF node.set(m_dofEF, e); } } GetFEModel()->SetMeshUpdateFlag(true); } //----------------------------------------------------------------------------- //! serialization void FEFluidPressureLoad::Serialize(DumpStream& ar) { FESurfaceLoad::Serialize(ar); if (ar.IsShallow()) return; ar & m_dofEF; ar & m_pfluid; }
C++
3D
febiosoftware/FEBio
FEBioFluid/FEThermoFluid.h
.h
4,467
112
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #pragma once #include <FEBioMech/FEBodyForce.h> #include "FEFluidMaterial.h" #include "FEElasticFluid.h" #include "FEFluidThermalConductivity.h" #include "FEFluidMaterialPoint.h" #include "FEThermoFluidMaterialPoint.h" //----------------------------------------------------------------------------- //! Base class for fluid materials. class FEBIOFLUID_API FEThermoFluid : public FEFluidMaterial { public: FEThermoFluid(FEModel* pfem); // returns a pointer to a new material point object FEMaterialPointData* CreateMaterialPointData() override; //! Serialization void Serialize(DumpStream& ar) override; public: //! calculate stress at material point mat3ds Stress(FEMaterialPoint& pt) override; //! tangent of stress with respect to strain J mat3ds Tangent_Strain(FEMaterialPoint& mp) override; //! tangent of stress with respect to temperature T mat3ds Tangent_Temperature(FEMaterialPoint& mp); //! Elastic pressure double Pressure(FEMaterialPoint& mp) override { return m_pElastic->Pressure(mp); } //! tangent of elastic pressure with respect to strain J double Tangent_Pressure_Strain(FEMaterialPoint& mp) override { return m_pElastic->Tangent_Strain(mp); } //! 2nd tangent of elastic pressure with respect to strain J double Tangent_Pressure_Strain_Strain(FEMaterialPoint& mp) override { return m_pElastic->Tangent_Strain_Strain(mp); } //! tangent of elastic pressure with respect to temperature T double Tangent_Pressure_Temperature(FEMaterialPoint& mp) { return m_pElastic->Tangent_Temperature(mp); } //! 2nd tangent of elastic pressure with respect to temperature T double Tangent_Pressure_Temperature_Temperature(FEMaterialPoint& mp) { return m_pElastic->Tangent_Temperature_Temperature(mp); } //! tangent of elastic pressure with respect to strain J and temperature T double Tangent_Pressure_Strain_Temperature(FEMaterialPoint& mp) { return m_pElastic->Tangent_Strain_Temperature(mp); } public: //! bulk modulus double BulkModulus(FEMaterialPoint& mp) override; //! heat flux vec3d HeatFlux(FEMaterialPoint& mp); //! strain energy density double StrainEnergyDensity(FEMaterialPoint& mp) override; //! invert pressure-dilatation relation bool Dilatation(const double T, const double p, double& e) override { return GetElastic()->Dilatation(T,p,e); } //! fluid pressure from state variables double Pressure(const double ef, const double T) override { return GetElastic()->Pressure(ef, T); }; //! evaluate temperature double Temperature(FEMaterialPoint& mp) override; public: //! return elastic part FEElasticFluid* GetElastic() { return m_pElastic; } //! return thermal conductivity part FEFluidThermalConductivity* GetConduct() { return m_pConduct; } private: // material properties FEElasticFluid* m_pElastic; //!< pointer to elastic part of fluid material FEFluidThermalConductivity* m_pConduct; //!< pointer to fluid thermal conductivity material // declare parameter list DECLARE_FECORE_CLASS(); };
Unknown
3D
febiosoftware/FEBio
FEBioFluid/FEThermoFluidPressureLoad.h
.h
3,367
99
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #pragma once #include "FEThermoFluid.h" #include <FECore/FESurfaceConstraint.h> #include "febiofluid_api.h" //----------------------------------------------------------------------------- //! The FEConstraintNormalFlow class implements a fluid surface with zero //! tangential velocity as a linear constraint. class FEBIOFLUID_API FEThermoFluidPressureLoad : public FESurfaceConstraint { public: //! constructor FEThermoFluidPressureLoad(FEModel* pfem); //! destructor ~FEThermoFluidPressureLoad() {} //! calculate traction stiffness (there is none for this load) void StiffnessMatrix(FELinearSystem& LS, const FETimeInfo& tp) override; //! calculate load vector (there is none for this load) void LoadVector(FEGlobalVector& R, const FETimeInfo& tp) override; //! initialize bool Init() override; // allocate equations int InitEquations(int neq) override; //! serialization void Serialize(DumpStream& ar) override; //! augmentation bool Augment(int naug, const FETimeInfo& tp) override; // return the surface FESurface* GetSurface() override { return &m_surf; } protected: void UnpackLM(vector<int>& lm, int n); // Build the matrix profile void BuildMatrixProfile(FEGlobalMatrix& M) override; void Update(const std::vector<double>& Ui, const std::vector<double>& ui) override; void UpdateIncrements(std::vector<double>& Ui, const std::vector<double>& ui) override; void PrepStep() override; protected: int m_dofT; int m_dofEF; vector<int> m_EQ; vector<double> m_Lm, m_Lmp; FESurface m_surf; vector<double> m_pn; //!< prescribed fluid pressure at nodes FEThermoFluid* m_pfluid; //!< pointer to thermo-fluid material public: FEParamDouble m_p; // prescribed pressure int m_laugon; double m_tol; double m_eps; int m_naugmin; int m_naugmax; DECLARE_FECORE_CLASS(); };
Unknown
3D
febiosoftware/FEBio
FEBioFluid/FEThermoFluidDomain3D.h
.h
4,902
142
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #pragma once #include <FECore/FESolidDomain.h> #include "FEFluidDomain.h" #include "FEThermoFluid.h" #include "FEFluidHeatSupply.h" //----------------------------------------------------------------------------- //! domain described by 3D volumetric elements //! class FEBIOFLUID_API FEThermoFluidDomain3D : public virtual FESolidDomain, public FEFluidDomain { public: //! constructor FEThermoFluidDomain3D(FEModel* pfem); ~FEThermoFluidDomain3D() {} //! assignment operator FEThermoFluidDomain3D& operator = (FEThermoFluidDomain3D& d); //! initialize bool Init() override; //! serialize void Serialize(DumpStream& ar) override; //! initialize elements void PreSolveUpdate(const FETimeInfo& timeInfo) override; public: // overrides from FEDomain //! get the material FEMaterial* GetMaterial() override { return m_pMat; } //! set the material void SetMaterial(FEMaterial* pm) override; // get total dof list const FEDofList& GetDOFList() const override; public: // overrides from FEElasticDomain // update stresses void Update(const FETimeInfo& tp) override; // update the element stress void UpdateElementStress(int iel, const FETimeInfo& tp); //! internal stress forces void InternalForces(FEGlobalVector& R) override; //! body forces void BodyForce(FEGlobalVector& R, FEBodyForce& BF) override; //! Calculate the heat supply void HeatSupply(FEGlobalVector& R, FEFluidHeatSupply& r); //! inertial forces for dynamic problems void InertialForces(FEGlobalVector& R) override; //! calculates the global stiffness matrix for this domain void StiffnessMatrix(FELinearSystem& LS) override; //! Calculate stiffness contribution of heat supplies void HeatSupplyStiffness(FELinearSystem& LS, FEFluidHeatSupply& bf); //! calculates inertial stiffness void MassMatrix(FELinearSystem& LS) override; //! body force stiffness void BodyForceStiffness(FELinearSystem& LS, FEBodyForce& bf) override; public: // --- S T I F F N E S S --- //! calculates the solid element stiffness matrix void ElementStiffness(FESolidElement& el, matrix& ke); //! calculates the solid element mass matrix void ElementMassMatrix(FESolidElement& el, matrix& ke); //! calculates the stiffness matrix due to body forces void ElementBodyForceStiffness(FEBodyForce& bf, FESolidElement& el, matrix& ke); //! calculates the stiffness matrix due to heat supplies void ElementHeatSupplyStiffness(FEFluidHeatSupply& bf, FESolidElement& el, matrix& ke); // --- R E S I D U A L --- //! Calculates the internal stress vector for solid elements void ElementInternalForce(FESolidElement& el, vector<double>& fe); //! Calculates external body forces for solid elements void ElementBodyForce(FEBodyForce& BF, FESolidElement& elem, vector<double>& fe); //! Calculates external supplies for solid elements void ElementHeatSupply(FEFluidHeatSupply& BF, FESolidElement& elem, vector<double>& fe); //! Calculates the inertial force vector for solid elements void ElementInertialForce(FESolidElement& el, vector<double>& fe); protected: FEThermoFluid* m_pMat; double m_Tr; // referential absolute temperature protected: FEDofList m_dofW; FEDofList m_dofAW; FEDofList m_dof; int m_dofEF; int m_dofAEF; int m_dofT; int m_dofAT; };
Unknown
3D
febiosoftware/FEBio
FEBioFluid/FEBiphasicFSIDomain3D.cpp
.cpp
45,453
1,117
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #include "stdafx.h" #include "FEBiphasicFSIDomain3D.h" #include <FECore/log.h> #include <FECore/FEModel.h> #include "FEBioFSI.h" #include "FEFluidFSI.h" #include <FECore/FELinearSystem.h> //----------------------------------------------------------------------------- //! constructor //! Some derived classes will pass 0 to the pmat, since the pmat variable will be //! to initialize another material. These derived classes will set the m_pMat variable as well. FEBiphasicFSIDomain3D::FEBiphasicFSIDomain3D(FEModel* pfem) : FESolidDomain(pfem), FEBiphasicFSIDomain(pfem), m_dofU(pfem), m_dofV(pfem), m_dofW(pfem), m_dofAW(pfem), m_dofSU(pfem), m_dofR(pfem), m_dof(pfem) { m_pMat = 0; m_btrans = true; m_sseps = 0; // TODO: Can this be done in Init, since there is no error checking if (pfem) { m_dofU.AddVariable(FEBioFSI::GetVariableName(FEBioFSI::DISPLACEMENT)); m_dofV.AddVariable(FEBioFSI::GetVariableName(FEBioFSI::VELOCITY)); m_dofW.AddVariable(FEBioFSI::GetVariableName(FEBioFSI::RELATIVE_FLUID_VELOCITY)); m_dofAW.AddVariable(FEBioFSI::GetVariableName(FEBioFSI::RELATIVE_FLUID_ACCELERATION)); m_dofSU.AddVariable(FEBioFSI::GetVariableName(FEBioFSI::SHELL_DISPLACEMENT)); m_dofR.AddVariable(FEBioFSI::GetVariableName(FEBioFSI::RIGID_ROTATION)); m_dofEF = pfem->GetDOFIndex(FEBioFSI::GetVariableName(FEBioFSI::FLUID_DILATATION), 0); m_dofAEF = pfem->GetDOFIndex(FEBioFSI::GetVariableName(FEBioFSI::FLUID_DILATATION_TDERIV), 0); } } //----------------------------------------------------------------------------- // \todo I don't think this is being used FEBiphasicFSIDomain3D& FEBiphasicFSIDomain3D::operator = (FEBiphasicFSIDomain3D& d) { m_Elem = d.m_Elem; m_pMesh = d.m_pMesh; return (*this); } //----------------------------------------------------------------------------- // get the total dof const FEDofList& FEBiphasicFSIDomain3D::GetDOFList() const { return m_dof; } //----------------------------------------------------------------------------- //! Assign material void FEBiphasicFSIDomain3D::SetMaterial(FEMaterial* pmat) { FEDomain::SetMaterial(pmat); if (pmat) { m_pMat = dynamic_cast<FEBiphasicFSI*>(pmat); assert(m_pMat); } else m_pMat = 0; } //----------------------------------------------------------------------------- void FEBiphasicFSIDomain3D::Activate() { for (int i=0; i<Nodes(); ++i) { FENode& node = Node(i); if (node.HasFlags(FENode::EXCLUDE) == false) { if (node.m_rid < 0) { node.set_active(m_dofU[0]); node.set_active(m_dofU[1]); node.set_active(m_dofU[2]); } node.set_active(m_dofW[0]); node.set_active(m_dofW[1]); node.set_active(m_dofW[2]); node.set_active(m_dofEF); } } } //----------------------------------------------------------------------------- void FEBiphasicFSIDomain3D::Reset() { // reset base class data FESolidDomain::Reset(); // initialize all element data ForEachMaterialPoint([=](FEMaterialPoint& mp) { FEBiphasicFSIMaterialPoint& pt = *(mp.ExtractData<FEBiphasicFSIMaterialPoint>()); // initialize referential solid volume fraction pt.m_phi0 = m_pMat->m_phi0(mp); }); } //----------------------------------------------------------------------------- //! Initialize element data void FEBiphasicFSIDomain3D::PreSolveUpdate(const FETimeInfo& timeInfo) { const int NE = FEElement::MAX_NODES; vec3d x0[NE], xt[NE], r0, rt, v; FEMesh& m = *GetMesh(); for (size_t i=0; i<m_Elem.size(); ++i) { FESolidElement& el = m_Elem[i]; if (el.isActive()) { int neln = el.Nodes(); for (int i=0; i<neln; ++i) { x0[i] = m.Node(el.m_node[i]).m_r0; xt[i] = m.Node(el.m_node[i]).m_rt; } int n = el.GaussPoints(); for (int j=0; j<n; ++j) { r0 = el.Evaluate(x0, j); rt = el.Evaluate(xt, j); FEMaterialPoint& mp = *el.GetMaterialPoint(j); FEElasticMaterialPoint& et = *mp.ExtractData<FEElasticMaterialPoint>(); FEFluidMaterialPoint& pt = *mp.ExtractData<FEFluidMaterialPoint>(); et.m_Wp = et.m_Wt; if ((pt.m_ef <= -1) || (et.m_J <= 0)) { throw NegativeJacobianDetected(); } mp.Update(timeInfo); } } } } //----------------------------------------------------------------------------- //! Unpack the element LM data. void FEBiphasicFSIDomain3D::UnpackLM(FEElement& el, vector<int>& lm) { int N = el.Nodes(); lm.resize(N*10); for (int i=0; i<N; ++i) { FENode& node = m_pMesh->Node(el.m_node[i]); vector<int>& id = node.m_ID; // first the displacement dofs lm[7*i ] = id[m_dofU[0]]; lm[7*i+1] = id[m_dofU[1]]; lm[7*i+2] = id[m_dofU[2]]; lm[7*i+3] = id[m_dofW[0]]; lm[7*i+4] = id[m_dofW[1]]; lm[7*i+5] = id[m_dofW[2]]; lm[7*i+6] = id[m_dofEF]; // rigid rotational dofs lm[7*N + 3*i ] = id[m_dofR[0]]; lm[7*N + 3*i+1] = id[m_dofR[1]]; lm[7*N + 3*i+2] = id[m_dofR[2]]; } // substitute interface dofs for solid-shell interfaces FESolidElement& sel = static_cast<FESolidElement&>(el); for (int i = 0; i<sel.m_bitfc.size(); ++i) { if (sel.m_bitfc[i]) { FENode& node = m_pMesh->Node(el.m_node[i]); vector<int>& id = node.m_ID; // first the displacement dofs lm[7*i ] = id[m_dofSU[0]]; lm[7*i+1] = id[m_dofSU[1]]; lm[7*i+2] = id[m_dofSU[2]]; } } } //----------------------------------------------------------------------------- void FEBiphasicFSIDomain3D::InternalForces(FEGlobalVector& R) { int NE = (int)m_Elem.size(); #pragma omp parallel for shared (NE) for (int i=0; i<NE; ++i) { // element force vector vector<double> fe; vector<int> lm; // get the element FESolidElement& el = m_Elem[i]; if (el.isActive()) { // get the element force vector and initialize it to zero int ndof = 7*el.Nodes(); fe.assign(ndof, 0); // calculate internal force vector ElementInternalForce(el, fe); // get the element's LM vector UnpackLM(el, lm); // assemble element 'fe'-vector into global R vector R.Assemble(el.m_node, lm, fe); } } } //----------------------------------------------------------------------------- //! calculates the internal equivalent nodal forces for solid elements void FEBiphasicFSIDomain3D::ElementInternalForce(FESolidElement& el, vector<double>& fe) { const FETimeInfo& tp = GetFEModel()->GetTime(); int i, n; // jacobian matrix, inverse jacobian matrix and determinants double Ji[3][3], detJ; mat3ds sv, se, pi; vec3d gradp, divTe; mat3ds km1; const double *H, *Gr, *Gs, *Gt; int nint = el.GaussPoints(); int neln = el.Nodes(); // gradient of shape functions vector<vec3d> gradN(neln); double* gw = el.GaussWeights(); // repeat for all integration points for (n=0; n<nint; ++n) { FEMaterialPoint& mp = *el.GetMaterialPoint(n); FEFluidMaterialPoint& pt = *(mp.ExtractData<FEFluidMaterialPoint>()); FEElasticMaterialPoint& et = *(mp.ExtractData<FEElasticMaterialPoint>()); FEFSIMaterialPoint& ft = *(mp.ExtractData<FEFSIMaterialPoint>()); FEBiphasicFSIMaterialPoint& bt = *(mp.ExtractData<FEBiphasicFSIMaterialPoint>()); // calculate the jacobian detJ = invjact(el, Ji, n, tp.alphaf)*gw[n]; vec3d g1(Ji[0][0],Ji[0][1],Ji[0][2]); vec3d g2(Ji[1][0],Ji[1][1],Ji[1][2]); vec3d g3(Ji[2][0],Ji[2][1],Ji[2][2]); // get the viscous stress tensor for this integration point sv = m_pMat->Fluid()->GetViscous()->Stress(mp); se = m_pMat->Solid()->Stress(mp); // get the gradient of the elastic pressure gradp = pt.m_gradef*m_pMat->Fluid()->Tangent_Pressure_Strain(mp); // get inverse of permeability tensor km1 = m_pMat->InvPermeability(mp); //get pI pi = mat3dd(m_pMat->Fluid()->Pressure(mp)); // get fluid supply (if present) double phifhat = 0; if (m_pMat->FluidSupply()) phifhat = m_pMat->FluidSupply()->Supply(mp); H = el.H(n); Gr = el.Gr(n); Gs = el.Gs(n); Gt = el.Gt(n); // evaluate spatial gradient of shape functions for (i=0; i<neln; ++i) { gradN[i] = g1*Gr[i] + g2*Gs[i] + g3*Gt[i]; } // Jfdot wrt fluid double phif = m_pMat->Porosity(mp); double phis = m_pMat->SolidVolumeFrac(mp); double dJfdotf = pt.m_efdot + pt.m_gradef*ft.m_w/phif; double Jf = 1 + pt.m_ef; // Jsdot/Js double dJsoJ = ft.m_Jdot/et.m_J; for (i=0; i<neln; ++i) { vec3d fs = ((se-sv*phis)*gradN[i] + (sv*bt.m_gradJ/(phif*et.m_J)*phis - km1*ft.m_w)*H[i])*detJ; vec3d ff = (sv*gradN[i] + (gradp + km1*ft.m_w - sv*bt.m_gradJ*phis/(phif*et.m_J))*H[i])*detJ; double fJ = (H[i]*(dJfdotf*phif/Jf - dJsoJ + phifhat) + gradN[i]*ft.m_w)*detJ; // calculate internal force // the '-' sign is so that the internal forces get subtracted // from the global residual vector fe[7*i ] -= fs.x; fe[7*i+1] -= fs.y; fe[7*i+2] -= fs.z; fe[7*i+3] -= ff.x; fe[7*i+4] -= ff.y; fe[7*i+5] -= ff.z; fe[7*i+6] -= fJ; } } } //----------------------------------------------------------------------------- void FEBiphasicFSIDomain3D::BodyForce(FEGlobalVector& R, FEBodyForce& BF) { int NE = (int)m_Elem.size(); for (int i=0; i<NE; ++i) { // get the element FESolidElement& el = m_Elem[i]; if (el.isActive()) { vector<double> fe; vector<int> lm; // get the element force vector and initialize it to zero int ndof = 7*el.Nodes(); fe.assign(ndof, 0); // apply body forces ElementBodyForce(BF, el, fe); // get the element's LM vector UnpackLM(el, lm); // assemble element 'fe'-vector into global R vector R.Assemble(el.m_node, lm, fe); } } } //----------------------------------------------------------------------------- //! calculates the body forces void FEBiphasicFSIDomain3D::ElementBodyForce(FEBodyForce& BF, FESolidElement& el, vector<double>& fe) { const FETimeInfo& tp = GetFEModel()->GetTime(); // jacobian double detJ; double *H; double* gw = el.GaussWeights(); vec3d ff, f; // number of nodes int neln = el.Nodes(); // loop over integration points int nint = el.GaussPoints(); for (int n=0; n<nint; ++n) { FEMaterialPoint& mp = *el.GetMaterialPoint(n); double densTs = m_pMat->TrueSolidDensity(mp); double densTf = m_pMat->TrueFluidDensity(mp); detJ = detJt(el, n, tp.alphaf)*gw[n]; // get the force double phis = m_pMat->SolidVolumeFrac(mp); f = BF.force(mp)*((-densTf+densTs)*phis*detJ); ff = BF.force(mp)*(densTf*detJ); H = el.H(n); for (int i=0; i<neln; ++i) { fe[7*i+0] -= H[i]*f.x; fe[7*i+1] -= H[i]*f.y; fe[7*i+2] -= H[i]*f.z; fe[7*i+3] -= H[i]*ff.x; fe[7*i+4] -= H[i]*ff.y; fe[7*i+5] -= H[i]*ff.z; } } } //----------------------------------------------------------------------------- //! This function calculates the stiffness due to body forces //! For now, we assume that the body force is constant void FEBiphasicFSIDomain3D::ElementBodyForceStiffness(FEBodyForce& BF, FESolidElement &el, matrix &ke) { const FETimeInfo& tp = GetFEModel()->GetTime(); int neln = el.Nodes(); int ndof = ke.columns()/neln; // jacobian double Ji[3][3], detJ; double *H, *Gr, *Gs, *Gt; double* gw = el.GaussWeights(); vec3d f, ff, fs, ffs, kwJ, kuJ; mat3d Kwu, Kuu; // gradient of shape functions vector<vec3d> gradN(neln); // loop over integration points int nint = el.GaussPoints(); for (int n=0; n<nint; ++n) { FEMaterialPoint& mp = *el.GetMaterialPoint(n); FEFluidMaterialPoint& pt = *mp.ExtractData<FEFluidMaterialPoint>(); double Jf = 1 + pt.m_ef; // calculate the jacobian detJ = invjact(el, Ji, n, tp.alphaf)*gw[n]*tp.alphaf; vec3d g1(Ji[0][0],Ji[0][1],Ji[0][2]); vec3d g2(Ji[1][0],Ji[1][1],Ji[1][2]); vec3d g3(Ji[2][0],Ji[2][1],Ji[2][2]); H = el.H(n); double densf = m_pMat->FluidDensity(mp); double densTf = m_pMat->TrueFluidDensity(mp); double denss = m_pMat->SolidDensity(mp); double densTs = m_pMat->TrueSolidDensity(mp); // get the force ff = BF.force(mp)*(densTf*detJ); f = BF.force(mp)*(densf*detJ); fs = BF.force(mp)*(densTs*detJ); double phif = m_pMat->Porosity(mp); double phis = m_pMat->SolidVolumeFrac(mp); ffs = BF.force(mp)*((phis/phif*(densf+denss) - densTf*phis + denss)*detJ); H = el.H(n); Gr = el.Gr(n); Gs = el.Gs(n); Gt = el.Gt(n); // evaluate spatial gradient of shape functions for (int i=0; i<neln; ++i) gradN[i] = g1*Gr[i] + g2*Gs[i] + g3*Gt[i]; for (int i=0; i<neln; ++i) { for (int j=0; j<neln; ++j) { kwJ = ff*(-H[i]*H[j]/Jf); kuJ = ff*(H[i]*H[j]*phis/Jf); Kwu = (ff & gradN[j])*H[i]; Kuu = mat3d(0.0); ke[ndof*i+0][ndof*j ] += Kuu(0,0); ke[ndof*i+0][ndof*j+1] += Kuu(0,1); ke[ndof*i+0][ndof*j+2] += Kuu(0,2); ke[ndof*i+1][ndof*j ] += Kuu(1,0); ke[ndof*i+1][ndof*j+1] += Kuu(1,1); ke[ndof*i+1][ndof*j+2] += Kuu(1,2); ke[ndof*i+2][ndof*j ] += Kuu(2,0); ke[ndof*i+2][ndof*j+1] += Kuu(2,1); ke[ndof*i+2][ndof*j+2] += Kuu(2,2); ke[ndof*i+3][ndof*j ] += Kwu(0,0); ke[ndof*i+3][ndof*j+1] += Kwu(0,1); ke[ndof*i+3][ndof*j+2] += Kwu(0,2); ke[ndof*i+4][ndof*j ] += Kwu(1,0); ke[ndof*i+4][ndof*j+1] += Kwu(1,1); ke[ndof*i+4][ndof*j+2] += Kwu(1,2); ke[ndof*i+5][ndof*j ] += Kwu(2,0); ke[ndof*i+5][ndof*j+1] += Kwu(2,1); ke[ndof*i+5][ndof*j+2] += Kwu(2,2); ke[ndof*i+0][ndof*j+6] += kuJ.x; ke[ndof*i+1][ndof*j+6] += kuJ.y; ke[ndof*i+2][ndof*j+6] += kuJ.z; ke[ndof*i+3][ndof*j+6] += kwJ.x; ke[ndof*i+4][ndof*j+6] += kwJ.y; ke[ndof*i+5][ndof*j+6] += kwJ.z; } } } } //----------------------------------------------------------------------------- //! Calculates element material stiffness element matrix void FEBiphasicFSIDomain3D::ElementStiffness(FESolidElement &el, matrix &ke) { const FETimeInfo& tp = GetFEModel()->GetTime(); int i, i7, j, j7, n; // Get the current element's data const int nint = el.GaussPoints(); const int neln = el.Nodes(); // gradient of shape functions vector<vec3d> gradN(neln); vector<mat3d> gradgradN(neln); double dt = tp.timeIncrement; double a = tp.gamma/(tp.beta*dt); double c = tp.alpham/(tp.alphaf*tp.gamma*dt); double dtrans = m_btrans ? 1 : m_sseps; double *H, *Gr, *Gs, *Gt; vec3d g[3], dg[3][3]; // jacobian double Ji[3][3], detJ; // weights at gauss points const double *gw = el.GaussWeights(); // calculate element stiffness matrix for (n=0; n<nint; ++n) { // calculate jacobian detJ = invjact(el, Ji, n, tp.alphaf)*gw[n]*tp.alphaf; ContraBaseVectors(el, n, g, tp.alphaf); ContraBaseVectorDerivatives(el, n, dg, tp.alphaf); vec3d g1(Ji[0][0],Ji[0][1],Ji[0][2]); vec3d g2(Ji[1][0],Ji[1][1],Ji[1][2]); vec3d g3(Ji[2][0],Ji[2][1],Ji[2][2]); H = el.H(n); Gr = el.Gr(n); Gs = el.Gs(n); Gt = el.Gt(n); // get the shape function derivatives double* Grr = el.Grr(n); double* Grs = el.Grs(n); double* Grt = el.Grt(n); double* Gsr = el.Gsr(n); double* Gss = el.Gss(n); double* Gst = el.Gst(n); double* Gtr = el.Gtr(n); double* Gts = el.Gts(n); double* Gtt = el.Gtt(n); // setup the material point // NOTE: deformation gradient and determinant have already been evaluated in the stress routine FEMaterialPoint& mp = *el.GetMaterialPoint(n); FEElasticMaterialPoint& et = *(mp.ExtractData<FEElasticMaterialPoint>()); FEFluidMaterialPoint& pt = *(mp.ExtractData<FEFluidMaterialPoint>()); FEFSIMaterialPoint& fpt = *(mp.ExtractData<FEFSIMaterialPoint>()); FEBiphasicFSIMaterialPoint& bpt = *(mp.ExtractData<FEBiphasicFSIMaterialPoint>()); double Jf = 1 + pt.m_ef; // get the tangents mat3ds se = m_pMat->Solid()->Stress(mp); tens4ds cs = m_pMat->Solid()->Tangent(mp); mat3ds sv = m_pMat->Fluid()->GetViscous()->Stress(mp); mat3ds svJ = m_pMat->Fluid()->GetViscous()->Tangent_Strain(mp); tens4ds cv = m_pMat->Fluid()->Tangent_RateOfDeformation(mp); double dp = m_pMat->Fluid()->Tangent_Pressure_Strain(mp); double d2p = m_pMat->Fluid()->Tangent_Pressure_Strain_Strain(mp); vec3d gradp = pt.m_gradef*dp; // Jsdot/Js = div(vs) double dJsoJ = fpt.m_Jdot/et.m_J; mat3ds km1 = m_pMat->InvPermeability(mp); //Include dependence of permeability on displacement tens4dmm K = m_pMat->Permeability_Tangent(mp); // include contributions from fluid supply (if present) double phifhat = 0; mat3d dphifhatdE(mat3dd(0)); double dphifhatdef = 0; mat3ds dphifhatdD(0); if (m_pMat->FluidSupply()) { phifhat = m_pMat->FluidSupply()->Supply(mp); dphifhatdE = m_pMat->FluidSupply()->Tangent_Supply_Strain(mp); dphifhatdef = m_pMat->FluidSupply()->Tangent_Supply_Dilatation(mp); dphifhatdD = m_pMat->FluidSupply()->Tangent_Supply_RateOfDeformation(mp); } // evaluate spatial gradient of shape functions for (i=0; i<neln; ++i) gradN[i] = g1*Gr[i] + g2*Gs[i] + g3*Gt[i]; // evaluate spatial gradgrad of shape functions for (i=0; i<neln; ++i) { gradgradN[i] = (((dg[0][0] & g[0]) + (dg[0][1] & g[1]) + (dg[0][2] & g[2]))*Gr[i] + ((dg[1][0] & g[0]) + (dg[1][1] & g[1]) + (dg[1][2] & g[2]))*Gs[i] + ((dg[2][0] & g[0]) + (dg[2][1] & g[1]) + (dg[2][2] & g[2]))*Gt[i] + (g[0] & g[0])*Grr[i] + (g[0] & g[1])*Gsr[i] + (g[0] & g[2])*Gtr[i] + (g[1] & g[0])*Grs[i] + (g[1] & g[1])*Gss[i] + (g[1] & g[2] )*Gts[i] + (g[2] & g[0])*Grt[i] + (g[2] & g[1])*Gst[i] + (g[2] & g[2])*Gtt[i]); } double phif = m_pMat->Porosity(mp); double phis = m_pMat->SolidVolumeFrac(mp); vec3d gradphif = m_pMat->gradPorosity(mp); // evaluate stiffness matrix for (i=0, i7=0; i<neln; ++i, i7 += 7) { for (j=0, j7 = 0; j<neln; ++j, j7 += 7) { mat3d M = mat3dd(a*dtrans) - et.m_L; tens4d km1km1 = dyad2(km1,km1); tens4d Kfull = tens4d(K); mat3d Kuu = (sv*((gradN[j]&gradN[i])*phis) - (-((sv*gradN[i])&gradN[j])*phis/phif + vdotTdotv(gradN[i], cv, gradN[j])*(-bpt.m_Lw.sym()*phis/(phif*phif) + M))*phis - vdotTdotv(gradN[i], cv, fpt.m_w*phis/(phif*phif)) * ((gradphif&gradN[j])*2.0*phis/phif + (gradN[j]&gradphif)) + vdotTdotv(gradN[i], cv, fpt.m_w*phis*phis/(phif*phif)) * ((-bpt.m_gradJ&gradN[j])/et.m_J + gradgradN[j]) + mat3dd((se*gradN[i])*gradN[j]) + vdotTdotv(gradN[i], cs, gradN[j]) - (((sv*bpt.m_gradJ)*phis/(et.m_J*phif*phif))&gradN[j])*H[i] + (-((sv*bpt.m_gradJ)&gradN[j])*phis/phif + vdotTdotv(bpt.m_gradJ, cv, gradN[j])*(-bpt.m_Lw.sym()*phis/(phif*phif) + M))*phis/(phif*et.m_J)*H[i] + vdotTdotv(bpt.m_gradJ, cv, fpt.m_w*phis/(phif*phif*phif*et.m_J)*H[i]) * ((gradphif&gradN[j])*2.0*phis/phif + (gradN[j]&gradphif)) - vdotTdotv(bpt.m_gradJ, cv, fpt.m_w*phis*phis/(phif*phif*phif*et.m_J)*H[i]) * ((-bpt.m_gradJ&gradN[j])/et.m_J + gradgradN[j]) + sv*((bpt.m_gradJ&gradN[j]) - (gradN[j]&bpt.m_gradJ) + gradgradN[j]*et.m_J)*H[i]*phis/(phif*et.m_J) + (-((km1*fpt.m_w)&gradN[j])*2.0 + (gradN[j]&(km1*fpt.m_w)) + km1*(gradN[j]*fpt.m_w) + ddot(ddot(km1km1,Kfull),mat3dd(gradN[j]*fpt.m_w)))*H[i])*detJ; //mixture 3 adjusted viscous stress mat3d Kuw = (vdotTdotv(gradN[i], cv, (gradphif*H[j]/phif-gradN[j]))*phis/phif + vdotTdotv((-gradphif*H[j]/phif + gradN[j]), cv, bpt.m_gradJ)*H[i]*phis/(phif*phif*et.m_J) - km1*H[i]*H[j])*detJ; //mixture 3 adjusted stress vec3d kuJ = ((-svJ*gradN[i])*H[j]*phis + svJ*bpt.m_gradJ*H[j]*H[i]*phis/(phif*et.m_J))*detJ; //mixture 3 adjusted stress mat3d Kwu = (((gradp&gradN[j])-(gradN[j]&gradp))*H[i] + sv*((bpt.m_gradJ&gradN[j])*(phis/phif)+(gradN[j]&bpt.m_gradJ) - gradgradN[j]*et.m_J)*(phis*H[i]/(et.m_J*phif)) - (-((sv*bpt.m_gradJ)&gradN[j])*phis/phif + vdotTdotv(bpt.m_gradJ, cv, gradN[j])*(-bpt.m_Lw.sym()*phis/(phif*phif) + M))*H[i]*phis/(phif*et.m_J) - vdotTdotv(bpt.m_gradJ*H[i]*phis/(et.m_J*phif*phif*phif), cv, fpt.m_w) * ((gradphif&gradN[j])*2.0*phis/phif + (gradN[j]&gradphif)) + vdotTdotv(bpt.m_gradJ*H[i]*phis*phis/(et.m_J*phif*phif*phif), cv, fpt.m_w) * (-(bpt.m_gradJ&gradN[j])/et.m_J + gradgradN[j]) + sv*((gradN[i]&gradN[j])-(gradN[j]&gradN[i])) + (-((sv*gradN[i])&gradN[j])*phis/phif + vdotTdotv(gradN[i], cv, gradN[j])*(-bpt.m_Lw.sym()*phis/(phif*phif) + M)) + vdotTdotv(gradN[i], cv, fpt.m_w/(phif*phif)) * ((gradphif&gradN[j])*2.0*phis/phif + (gradN[j]&gradphif)) + vdotTdotv(gradN[i], cv, fpt.m_w*phis/(phif*phif)) * ((bpt.m_gradJ&gradN[j])/et.m_J - gradgradN[j]) + (((km1*fpt.m_w)&gradN[j])*2.0 - (gradN[j]&(km1*fpt.m_w)) - km1*(gradN[j]*fpt.m_w) - ddot(ddot(km1km1,Kfull),mat3dd(gradN[j]*fpt.m_w)))*H[i])*detJ; //fluid adjusted visc stress mat3d Kww = ((vdotTdotv(bpt.m_gradJ, cv, (gradphif*H[j]/phif-gradN[j]))*phis/(phif*phif*et.m_J) + km1*H[j])*H[i] + vdotTdotv(gradN[i], cv, (-gradphif*H[j]/phif+gradN[j]))/phif)*detJ; //fluid adjusted visc stress vec3d kwJ = ((svJ*gradN[i])*H[j] +(gradN[j]*dp+(pt.m_gradef*d2p - svJ*bpt.m_gradJ*phis/(phif*et.m_J))*H[j])*H[i])*detJ; //fluid adjusted visc stress vec3d kJu = (((gradN[j]&fpt.m_w) - mat3dd(gradN[j]*fpt.m_w)) * gradN[i] + ((gradN[j]*pt.m_efdot + ((gradN[j]&fpt.m_w) - mat3dd(gradN[j]*fpt.m_w))*pt.m_gradef)/Jf - gradN[j]*(dJsoJ + a*dtrans) + et.m_L.transpose()*gradN[j]*dtrans + (dphifhatdE+mat3dd(phifhat))*gradN[j])*H[i])*detJ; vec3d kJw = ((pt.m_gradef*(H[i]/Jf) + gradN[i])*H[j] + dphifhatdD*(gradN[j]-gradphif*(H[j]/phif))*(H[i]/phif))*detJ; double kJJ = (((c*phif*dtrans - (pt.m_efdot*phif + pt.m_gradef*fpt.m_w)/Jf)*H[j] + gradN[j]*fpt.m_w)*H[i]/Jf +H[i]*H[j]*dphifhatdef)*detJ; ke[i7 ][j7 ] += Kuu(0,0); ke[i7 ][j7+1] += Kuu(0,1); ke[i7 ][j7+2] += Kuu(0,2); ke[i7+1][j7 ] += Kuu(1,0); ke[i7+1][j7+1] += Kuu(1,1); ke[i7+1][j7+2] += Kuu(1,2); ke[i7+2][j7 ] += Kuu(2,0); ke[i7+2][j7+1] += Kuu(2,1); ke[i7+2][j7+2] += Kuu(2,2); ke[i7 ][j7+3] += Kuw(0,0); ke[i7 ][j7+4] += Kuw(0,1); ke[i7 ][j7+5] += Kuw(0,2); ke[i7+1][j7+3] += Kuw(1,0); ke[i7+1][j7+4] += Kuw(1,1); ke[i7+1][j7+5] += Kuw(1,2); ke[i7+2][j7+3] += Kuw(2,0); ke[i7+2][j7+4] += Kuw(2,1); ke[i7+2][j7+5] += Kuw(2,2); ke[i7+3][j7 ] += Kwu(0,0); ke[i7+3][j7+1] += Kwu(0,1); ke[i7+3][j7+2] += Kwu(0,2); ke[i7+4][j7 ] += Kwu(1,0); ke[i7+4][j7+1] += Kwu(1,1); ke[i7+4][j7+2] += Kwu(1,2); ke[i7+5][j7 ] += Kwu(2,0); ke[i7+5][j7+1] += Kwu(2,1); ke[i7+5][j7+2] += Kwu(2,2); ke[i7+3][j7+3] += Kww(0,0); ke[i7+3][j7+4] += Kww(0,1); ke[i7+3][j7+5] += Kww(0,2); ke[i7+4][j7+3] += Kww(1,0); ke[i7+4][j7+4] += Kww(1,1); ke[i7+4][j7+5] += Kww(1,2); ke[i7+5][j7+3] += Kww(2,0); ke[i7+5][j7+4] += Kww(2,1); ke[i7+5][j7+5] += Kww(2,2); ke[i7+0][j7+6] += kuJ.x; ke[i7+1][j7+6] += kuJ.y; ke[i7+2][j7+6] += kuJ.z; ke[i7+3][j7+6] += kwJ.x; ke[i7+4][j7+6] += kwJ.y; ke[i7+5][j7+6] += kwJ.z; ke[i7+6][j7 ] += kJu.x; ke[i7+6][j7+1] += kJu.y; ke[i7+6][j7+2] += kJu.z; ke[i7+6][j7+3] += kJw.x; ke[i7+6][j7+4] += kJw.y; ke[i7+6][j7+5] += kJw.z; ke[i7+6][j7+6] += kJJ; } } } } //----------------------------------------------------------------------------- void FEBiphasicFSIDomain3D::StiffnessMatrix(FELinearSystem& LS) { // repeat over all solid elements int NE = (int)m_Elem.size(); #pragma omp parallel for shared (NE) for (int iel=0; iel<NE; ++iel) { FESolidElement& el = m_Elem[iel]; if (el.isActive()) { // element stiffness matrix FEElementMatrix ke(el); // create the element's stiffness matrix int ndof = 7*el.Nodes(); ke.resize(ndof, ndof); ke.zero(); // calculate material stiffness ElementStiffness(el, ke); // get the element's LM vector vector<int> lm; UnpackLM(el, lm); ke.SetIndices(lm); // assemble element matrix in global stiffness matrix LS.Assemble(ke); } } } //----------------------------------------------------------------------------- void FEBiphasicFSIDomain3D::MassMatrix(FELinearSystem& LS) { // repeat over all solid elements int NE = (int)m_Elem.size(); #pragma omp parallel for shared (NE) for (int iel=0; iel<NE; ++iel) { FESolidElement& el = m_Elem[iel]; if (el.isActive()) { FEElementMatrix ke(el); // create the element's stiffness matrix int ndof = 7*el.Nodes(); ke.resize(ndof, ndof); ke.zero(); // calculate inertial stiffness ElementMassMatrix(el, ke); // get the element's LM vector vector<int> lm; UnpackLM(el, lm); ke.SetIndices(lm); // assemble element matrix in global stiffness matrix LS.Assemble(ke); } } } //----------------------------------------------------------------------------- void FEBiphasicFSIDomain3D::BodyForceStiffness(FELinearSystem& LS, FEBodyForce& bf) { FEBiphasicFSI* pme = dynamic_cast<FEBiphasicFSI*>(GetMaterial()); assert(pme); // repeat over all solid elements int NE = (int)m_Elem.size(); for (int iel=0; iel<NE; ++iel) { FESolidElement& el = m_Elem[iel]; if (el.isActive()) { // element stiffness matrix FEElementMatrix ke(el); // create the element's stiffness matrix int ndof = 7*el.Nodes(); ke.resize(ndof, ndof); ke.zero(); // calculate inertial stiffness ElementBodyForceStiffness(bf, el, ke); // get the element's LM vector vector<int> lm; UnpackLM(el, lm); ke.SetIndices(lm); // assemble element matrix in global stiffness matrix LS.Assemble(ke); } } } //----------------------------------------------------------------------------- //! calculates element inertial stiffness matrix void FEBiphasicFSIDomain3D::ElementMassMatrix(FESolidElement& el, matrix& ke) { const FETimeInfo& tp = GetFEModel()->GetTime(); int i, i7, j, j7, n; // Get the current element's data const int nint = el.GaussPoints(); const int neln = el.Nodes(); double dtrans = m_btrans ? 1 : m_sseps; // gradient of shape functions vector<vec3d> gradN(neln); vector<mat3d> gradgradN(neln); double *H; double *Gr, *Gs, *Gt; vec3d g[3], dg[3][3]; // jacobian double Ji[3][3], detJ; // weights at gauss points const double *gw = el.GaussWeights(); double dt = tp.timeIncrement; double a = tp.gamma/(tp.beta*dt); double b = tp.alpham/(tp.alphaf*tp.beta*dt*dt); double c = tp.alpham/(tp.alphaf*tp.gamma*dt); // calculate element stiffness matrix for (n=0; n<nint; ++n) { // calculate jacobian detJ = invjact(el, Ji, n, tp.alphaf)*gw[n]*tp.alphaf; ContraBaseVectors(el, n, g, tp.alphaf); ContraBaseVectorDerivatives(el, n, dg, tp.alphaf); vec3d g1(Ji[0][0],Ji[0][1],Ji[0][2]); vec3d g2(Ji[1][0],Ji[1][1],Ji[1][2]); vec3d g3(Ji[2][0],Ji[2][1],Ji[2][2]); H = el.H(n); Gr = el.Gr(n); Gs = el.Gs(n); Gt = el.Gt(n); // get the shape function derivatives double* Grr = el.Grr(n); double* Grs = el.Grs(n); double* Grt = el.Grt(n); double* Gsr = el.Gsr(n); double* Gss = el.Gss(n); double* Gst = el.Gst(n); double* Gtr = el.Gtr(n); double* Gts = el.Gts(n); double* Gtt = el.Gtt(n); // setup the material point // NOTE: deformation gradient and determinant have already been evaluated in the stress routine FEMaterialPoint& mp = *el.GetMaterialPoint(n); FEElasticMaterialPoint& et = *(mp.ExtractData<FEElasticMaterialPoint>()); FEFluidMaterialPoint& pt = *(mp.ExtractData<FEFluidMaterialPoint>()); FEFSIMaterialPoint& fpt = *(mp.ExtractData<FEFSIMaterialPoint>()); FEBiphasicFSIMaterialPoint& bpt = *(mp.ExtractData<FEBiphasicFSIMaterialPoint>()); double Jf = 1 + pt.m_ef; double denss = m_pMat->SolidDensity(mp); double densTf = m_pMat->TrueFluidDensity(mp); // Jsdot/Js = div(vs) double dJsoJ = fpt.m_Jdot/et.m_J; // evaluate spatial gradient of shape functions for (i=0; i<neln; ++i) gradN[i] = g1*Gr[i] + g2*Gs[i] + g3*Gt[i]; // evaluate spatial gradgrad of shape functions for (i=0; i<neln; ++i) { gradgradN[i] = (((dg[0][0] & g[0]) + (dg[0][1] & g[1]) + (dg[0][2] & g[2]))*Gr[i] + ((dg[1][0] & g[0]) + (dg[1][1] & g[1]) + (dg[1][2] & g[2]))*Gs[i] + ((dg[2][0] & g[0]) + (dg[2][1] & g[1]) + (dg[2][2] & g[2]))*Gt[i] + (g[0] & g[0])*Grr[i] + (g[0] & g[1])*Gsr[i] + (g[0] & g[2])*Gtr[i] + (g[1] & g[0])*Grs[i] + (g[1] & g[1])*Gss[i] + (g[1] & g[2] )*Gts[i] + (g[2] & g[0])*Grt[i] + (g[2] & g[1])*Gst[i] + (g[2] & g[2])*Gtt[i]); } double phif = m_pMat->Porosity(mp); double phis = m_pMat->SolidVolumeFrac(mp); vec3d gradphif = m_pMat->gradPorosity(mp); // evaluate stiffness matrix for (i=0, i7=0; i<neln; ++i, i7 += 7) { for (j=0, j7 = 0; j<neln; ++j, j7 += 7) { mat3d Kuu = ((mat3dd(b*H[j]*dtrans))*denss*H[i] + (((et.m_a*phis)&gradN[j]) + mat3dd(b*phif*H[j]*dtrans) - ((fpt.m_w&gradN[j]) * (-1.0/phif*dJsoJ + a*dtrans) - (fpt.m_w&(et.m_L.transpose()*gradN[j]*dtrans)))*phis/phif + mat3dd(gradN[j]*fpt.m_w*a*dtrans) - ((bpt.m_Lw*fpt.m_w)&gradN[j])*phis/(phif*phif) + ((fpt.m_w&gradN[j])*((gradphif*2.0/phif + bpt.m_gradJ/et.m_J)*fpt.m_w) - (fpt.m_w&(gradgradN[j].transpose()*fpt.m_w)))*phis/(phif*phif) - pt.m_Lf*(mat3dd(gradN[j]*fpt.m_w)) - (pt.m_aft&gradN[j])*phis)*(-H[i]*densTf*phis/phif))*detJ; //mixture 2 mat3d Kuw = ((mat3dd(c*dtrans-phis/phif*dJsoJ-(gradphif*fpt.m_w)/(phif*phif))+pt.m_Lf)*H[j] + mat3dd(gradN[j]*fpt.m_w)/phif)*(-H[i]*densTf/phif*phis*detJ); //mixture 2 vec3d kuJ = pt.m_aft*(densTf/Jf*H[i]*H[j]*phis*detJ); //mixture 2 mat3d Kwu = (((et.m_a&gradN[j])*phis + mat3dd(b*phif*H[j]*dtrans) - ((fpt.m_w&gradN[j]) * (-1.0/phif*dJsoJ + a*dtrans) - (fpt.m_w&(et.m_L.transpose()*gradN[j]*dtrans)))*phis/phif + mat3dd(gradN[j]*fpt.m_w*a*dtrans) - ((bpt.m_Lw*fpt.m_w)&gradN[j])*phis/(phif*phif) + ((fpt.m_w&gradN[j])*((gradphif*2.0/phif + bpt.m_gradJ/et.m_J)*fpt.m_w) - (fpt.m_w&(gradgradN[j].transpose()*fpt.m_w)))*phis/(phif*phif) - pt.m_Lf*mat3dd(gradN[j]*fpt.m_w))*(H[i]*densTf/phif) + (pt.m_aft&gradN[j])*H[i]*densTf*(1.0-phis/phif))*detJ; mat3d Kww = ((mat3dd(c*dtrans-phis/phif*dJsoJ-(gradphif*fpt.m_w)/(phif*phif))+pt.m_Lf)*H[j] + mat3dd(gradN[j]*fpt.m_w)/phif)*(H[i]*densTf/phif*detJ); vec3d kwJ = pt.m_aft*(-densTf/Jf*H[i]*H[j]*detJ); ke[i7+0][j7 ] += Kuu(0,0); ke[i7+0][j7+1] += Kuu(0,1); ke[i7+0][j7+2] += Kuu(0,2); ke[i7+1][j7 ] += Kuu(1,0); ke[i7+1][j7+1] += Kuu(1,1); ke[i7+1][j7+2] += Kuu(1,2); ke[i7+2][j7 ] += Kuu(2,0); ke[i7+2][j7+1] += Kuu(2,1); ke[i7+2][j7+2] += Kuu(2,2); ke[i7+0][j7+3] += Kuw(0,0); ke[i7+0][j7+4] += Kuw(0,1); ke[i7+0][j7+5] += Kuw(0,2); ke[i7+1][j7+3] += Kuw(1,0); ke[i7+1][j7+4] += Kuw(1,1); ke[i7+1][j7+5] += Kuw(1,2); ke[i7+2][j7+3] += Kuw(2,0); ke[i7+2][j7+4] += Kuw(2,1); ke[i7+2][j7+5] += Kuw(2,2); ke[i7+3][j7 ] += Kwu(0,0); ke[i7+3][j7+1] += Kwu(0,1); ke[i7+3][j7+2] += Kwu(0,2); ke[i7+4][j7 ] += Kwu(1,0); ke[i7+4][j7+1] += Kwu(1,1); ke[i7+4][j7+2] += Kwu(1,2); ke[i7+5][j7 ] += Kwu(2,0); ke[i7+5][j7+1] += Kwu(2,1); ke[i7+5][j7+2] += Kwu(2,2); ke[i7+3][j7+3] += Kww(0,0); ke[i7+3][j7+4] += Kww(0,1); ke[i7+3][j7+5] += Kww(0,2); ke[i7+4][j7+3] += Kww(1,0); ke[i7+4][j7+4] += Kww(1,1); ke[i7+4][j7+5] += Kww(1,2); ke[i7+5][j7+3] += Kww(2,0); ke[i7+5][j7+4] += Kww(2,1); ke[i7+5][j7+5] += Kww(2,2); ke[i7+0][j7+6] += kuJ.x; ke[i7+1][j7+6] += kuJ.y; ke[i7+2][j7+6] += kuJ.z; ke[i7+3][j7+6] += kwJ.x; ke[i7+4][j7+6] += kwJ.y; ke[i7+5][j7+6] += kwJ.z; } } } } //----------------------------------------------------------------------------- void FEBiphasicFSIDomain3D::Update(const FETimeInfo& tp) { bool berr = false; int NE = (int) m_Elem.size(); #pragma omp parallel for shared(NE, berr) for (int i=0; i<NE; ++i) { try { FESolidElement& el = Element(i); if (el.isActive()) { UpdateElementStress(i, tp); } } catch (NegativeJacobian e) { #pragma omp critical { // reset the logfile mode berr = true; if (e.DoOutput()) feLogError(e.what()); } } } if (berr) throw NegativeJacobianDetected(); } //----------------------------------------------------------------------------- //! Update element state data (mostly stresses, but some other stuff as well) void FEBiphasicFSIDomain3D::UpdateElementStress(int iel, const FETimeInfo& tp) { double alphaf = tp.alphaf; double alpham = tp.alpham; double dt = GetFEModel()->GetTime().timeIncrement; double dtrans = m_btrans ? 1 : m_sseps; // get the solid element FESolidElement& el = m_Elem[iel]; // get the number of integration points int nint = el.GaussPoints(); // number of nodes int neln = el.Nodes(); // nodal coordinates const int NELN = FEElement::MAX_NODES; vec3d r0[NELN], r[NELN]; vec3d vs[NELN]; vec3d a[NELN]; vec3d w[NELN]; vec3d aw[NELN]; double e[NELN]; double ae[NELN]; for (int j=0; j<neln; ++j) { FENode& node = m_pMesh->Node(el.m_node[j]); r0[j] = node.m_r0; r[j] = node.m_rt*alphaf + node.m_rp*(1-alphaf); vs[j] = node.get_vec3d(m_dofV[0], m_dofV[1], m_dofV[2])*alphaf + node.m_vp*(1-alphaf); w[j] = node.get_vec3d(m_dofW[0], m_dofW[1], m_dofW[2])*alphaf + node.get_vec3d_prev(m_dofW[0], m_dofW[1], m_dofW[2])*(1-alphaf); e[j] = node.get(m_dofEF)*alphaf + node.get_prev(m_dofEF)*(1-alphaf); a[j] = node.m_at*alpham + node.m_ap*(1-alpham); aw[j] = node.get_vec3d(m_dofAW[0], m_dofAW[1], m_dofAW[2])*alpham + node.get_vec3d_prev(m_dofAW[0], m_dofAW[1], m_dofAW[2])*(1-alpham); ae[j] = node.get(m_dofAEF)*alpham + node.get_prev(m_dofAEF)*(1-alpham); } // loop over the integration points and update // velocity, velocity gradient, acceleration // stress and pressure at the integration point for (int n=0; n<nint; ++n) { FEMaterialPoint& mp = *el.GetMaterialPoint(n); FEFluidMaterialPoint& pt = *(mp.ExtractData<FEFluidMaterialPoint>()); FEElasticMaterialPoint& ept = *(mp.ExtractData<FEElasticMaterialPoint>()); FEFSIMaterialPoint& ft = *(mp.ExtractData<FEFSIMaterialPoint>()); FEBiphasicFSIMaterialPoint& bt = *(mp.ExtractData<FEBiphasicFSIMaterialPoint>()); // elastic material point data mp.m_r0 = el.Evaluate(r0, n); mp.m_rt = el.Evaluate(r, n); mat3d Ft, Fp; double Jt, Jp; Jt = defgrad(el, Ft, n); Jp = defgradp(el, Fp, n); ept.m_F = Ft*alphaf + Fp*(1 - alphaf); ept.m_J = ept.m_F.det(); mat3d Fi = ept.m_F.inverse(); ept.m_L = (Ft - Fp)*Fi*(dtrans / dt); ept.m_v = m_btrans ? el.Evaluate(vs, n) : vec3d(0, 0, 0); ept.m_a = m_btrans ? el.Evaluate(a, n) : vec3d(0, 0, 0); //NOTE: Made these new function. Converts from GradJ to gradJ vec3d GradJ = FESolidDomain::GradJ(el,n); vec3d GradJp = FESolidDomain::GradJp(el, n); //calculate gradJ gradphif bt.m_gradJ = Fi.transpose()*(GradJ*alphaf + GradJp*(1-alphaf)); // FSI material point data ft.m_w = el.Evaluate(w, n); ft.m_Jdot = (Jt - Jp) / dt*dtrans; ft.m_aw = el.Evaluate(aw, n)*dtrans; // fluid material point data bt.m_phi0 = m_pMat->SolidReferentialVolumeFraction(mp); double phif = m_pMat->Porosity(mp); double phis = m_pMat->SolidVolumeFrac(mp); vec3d gradphif = m_pMat->gradPorosity(mp); pt.m_efdot = el.Evaluate(ae, n)*dtrans; pt.m_vft = ept.m_v + ft.m_w/phif; mat3d Gradw = Gradient(el, w, n); bt.m_Lw = Gradw*Fi; pt.m_Lf = ept.m_L + bt.m_Lw/phif - (ft.m_w & gradphif)/(phif*phif); pt.m_ef = el.Evaluate(e, n); vec3d GradJf = Gradient(el, e, n); pt.m_gradef = Fi.transpose()*GradJf; // fluid acceleration pt.m_aft = (ft.m_aw + ept.m_a*phif - ft.m_w*ft.m_Jdot*phis/phif/ept.m_J + pt.m_Lf*ft.m_w)/phif; // calculate the fluid stress at this material point pt.m_sf = m_pMat->Fluid()->Stress(mp); // calculate the solid stress at this material point ft.m_ss = m_pMat->Solid()->Stress(mp) - m_pMat->Fluid()->GetViscous()->Stress(mp)*phis; // calculate the mixture stress at this material point ept.m_s = ft.m_ss + pt.m_sf; // calculate the fluid pressure pt.m_pf = m_pMat->Fluid()->Pressure(mp); } } //----------------------------------------------------------------------------- void FEBiphasicFSIDomain3D::InertialForces(FEGlobalVector& R) { int NE = (int)m_Elem.size(); #pragma omp parallel for shared (NE) for (int i=0; i<NE; ++i) { // get the element FESolidElement& el = m_Elem[i]; if (el.isActive()) { // element force vector vector<double> fe; vector<int> lm; // get the element force vector and initialize it to zero int ndof = 7*el.Nodes(); fe.assign(ndof, 0); // calculate internal force vector ElementInertialForce(el, fe); // get the element's LM vector UnpackLM(el, lm); // assemble element 'fe'-vector into global R vector R.Assemble(el.m_node, lm, fe); } } } //----------------------------------------------------------------------------- void FEBiphasicFSIDomain3D::ElementInertialForce(FESolidElement& el, vector<double>& fe) { const FETimeInfo& tp = GetFEModel()->GetTime(); int i, n; // jacobian determinant double detJ; const double* H; int nint = el.GaussPoints(); int neln = el.Nodes(); double* gw = el.GaussWeights(); // repeat for all integration points for (n=0; n<nint; ++n) { FEMaterialPoint& mp = *el.GetMaterialPoint(n); FEFluidMaterialPoint& pt = *(mp.ExtractData<FEFluidMaterialPoint>()); FEElasticMaterialPoint& ept = *(mp.ExtractData<FEElasticMaterialPoint>()); double densTf = m_pMat->TrueFluidDensity(mp); double densTs = m_pMat->TrueSolidDensity(mp); double phis = m_pMat->SolidVolumeFrac(mp); // calculate the jacobian detJ = detJt(el, n, tp.alphaf)*gw[n]; H = el.H(n); for (i=0; i<neln; ++i) { vec3d f = pt.m_aft*(densTf*H[i]*detJ); vec3d fs = (-pt.m_aft*densTf + ept.m_a*densTs)*H[i]*phis*detJ; //mixture 2 // calculate internal force // the '-' sign is so that the internal forces get subtracted // from the global residual vector fe[7*i+0] -= fs.x; fe[7*i+1] -= fs.y; fe[7*i+2] -= fs.z; fe[7*i+3] -= f.x; fe[7*i+4] -= f.y; fe[7*i+5] -= f.z; } } } //----------------------------------------------------------------------------- void FEBiphasicFSIDomain3D::Serialize(DumpStream& ar) { FESolidDomain::Serialize(ar); ar & m_sseps & m_btrans; }
C++
3D
febiosoftware/FEBio
FEBioFluid/FESolutesDomain.h
.h
3,196
107
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #pragma once #include <FECore/FESolidDomain.h> #include "FESolutesMaterial.h" #include "febiofluid_api.h" //----------------------------------------------------------------------------- //! domain described by 3D volumetric elements //! class FEBIOFLUID_API FESolutesDomain : public virtual FESolidDomain { public: //! constructor FESolutesDomain(FEModel* pfem); ~FESolutesDomain() {} //! initialize elements void PreSolveUpdate(const FETimeInfo& timeInfo) override; void SetSteadyStateAnalysis() { m_btrans = false; } void SetTransientAnalysis() { m_btrans = true; } public: // overrides from FEDomain //! get the material FEMaterial* GetMaterial() override { return m_pMat; } //! set the material void SetMaterial(FEMaterial* pm) override; //! get the total dofs const FEDofList& GetDOFList() const override; public: // overrides from FEElasticDomain //! initialize class bool Init() override; //! serialize data to archive void Serialize(DumpStream& ar) override; //! Reset data void Reset() override; //! activate void Activate() override; //! initialize material points in the domain void InitMaterialPoints() override; // update stresses void Update(const FETimeInfo& tp) override; // update the element stress void UpdateElementStress(int iel, const FETimeInfo& tp); //! internal stress forces void InternalForces(FEGlobalVector& R); //! calculates the global stiffness matrix for this domain void StiffnessMatrix(FELinearSystem& LS); public: // --- S T I F F N E S S --- //! calculates the solid element stiffness matrix void ElementStiffness(FESolidElement& el, matrix& ke); // --- R E S I D U A L --- //! Calculates the internal stress vector for solid elements void ElementInternalForce(FESolidElement& el, vector<double>& fe); protected: bool m_btrans; int m_dofC; int m_dofAC; FEDofList m_dof; FESolutesMaterial* m_pMat; };
Unknown
3D
febiosoftware/FEBio
FEBioFluid/FEConstraintNormalFlow.cpp
.cpp
6,175
135
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #include "stdafx.h" #include "FEConstraintNormalFlow.h" #include "FECore/FECoreKernel.h" #include <FECore/FEMesh.h> BEGIN_FECORE_CLASS(FEConstraintNormalFlow, FESurfaceConstraint) ADD_PARAMETER(m_lc.m_laugon, "laugon"); ADD_PARAMETER(m_lc.m_tol, "tol"); ADD_PARAMETER(m_lc.m_eps, "penalty"); ADD_PARAMETER(m_lc.m_rhs, "rhs"); ADD_PARAMETER(m_lc.m_naugmin, "minaug"); ADD_PARAMETER(m_lc.m_naugmax, "maxaug"); END_FECORE_CLASS(); //----------------------------------------------------------------------------- FEConstraintNormalFlow::FEConstraintNormalFlow(FEModel* pfem) : FESurfaceConstraint(pfem), m_surf(pfem), m_lc(pfem) { m_binit = false; } //----------------------------------------------------------------------------- //! Initializes data structures. void FEConstraintNormalFlow::Activate() { // don't forget to call base class FESurfaceConstraint::Activate(); if (m_binit == false) { m_surf.UpdateNodeNormals(); // get the dof indices int dof_wx = GetDOFIndex("wx"); int dof_wy = GetDOFIndex("wy"); int dof_wz = GetDOFIndex("wz"); // create linear constraints // for a surface with zero tangential velocity the constraints // on (vx, vy, vz) are // (1-nx^2)*vx - nx*ny*vy - nx*nz*vz = 0 // -nx*ny*vx + (1-ny^2)*vy - ny*nz*vz = 0 // -nx*nz*vx - ny*nz*vy + (1-nz^2)*vz = 0 for (int i=0; i<m_surf.Nodes(); ++i) { FENode& node = m_surf.Node(i); if ((node.HasFlags(FENode::EXCLUDE) == false) && (node.m_rid == -1)) { vec3d nn = m_surf.NodeNormal(i); // (1-nx^2)*vx - nx*ny*vy - nx*nz*vz = 0 FEAugLagLinearConstraint* pLC0 = fecore_alloc(FEAugLagLinearConstraint, GetFEModel()); pLC0->AddDOF(node.GetID(), dof_wx, 1.0 - nn.x * nn.x); pLC0->AddDOF(node.GetID(), dof_wy, - nn.x * nn.y); pLC0->AddDOF(node.GetID(), dof_wz, - nn.x * nn.z); // add the linear constraint to the system if ((pLC0->m_dof[0]->m_val != 0) || (pLC0->m_dof[1]->m_val != 0) || (pLC0->m_dof[2]->m_val != 0)) m_lc.add(pLC0); // -nx*ny*vx + (1-ny^2)*vy - ny*nz*vz = 0 FEAugLagLinearConstraint* pLC1 = fecore_alloc(FEAugLagLinearConstraint, GetFEModel()); pLC1->AddDOF(node.GetID(), dof_wx, -nn.y * nn.x); pLC1->AddDOF(node.GetID(), dof_wy, 1.0 -nn.y * nn.y); pLC1->AddDOF(node.GetID(), dof_wz, -nn.y * nn.z); // add the linear constraint to the system if ((pLC1->m_dof[0]->m_val != 0) || (pLC1->m_dof[1]->m_val != 0) || (pLC1->m_dof[2]->m_val != 0)) m_lc.add(pLC1); // -nx*nz*vx - ny*nz*vy + (1-nz^2)*vz = 0 FEAugLagLinearConstraint* pLC2 = fecore_alloc(FEAugLagLinearConstraint, GetFEModel()); pLC2->AddDOF(node.GetID(), dof_wx, -nn.z * nn.x); pLC2->AddDOF(node.GetID(), dof_wy, -nn.z * nn.y); pLC2->AddDOF(node.GetID(), dof_wz, 1.0-nn.z * nn.z); // add the linear constraint to the system if ((pLC2->m_dof[0]->m_val != 0) || (pLC2->m_dof[1]->m_val != 0) || (pLC2->m_dof[2]->m_val != 0)) m_lc.add(pLC2); } } m_lc.Init(); m_lc.Activate(); m_binit = true; } } //----------------------------------------------------------------------------- bool FEConstraintNormalFlow::Init() { // initialize surface return m_surf.Init(); } //----------------------------------------------------------------------------- void FEConstraintNormalFlow::Serialize(DumpStream& ar) { FESurfaceConstraint::Serialize(ar); m_lc.Serialize(ar); if (ar.IsShallow()) return; ar & m_surf; } //----------------------------------------------------------------------------- void FEConstraintNormalFlow::LoadVector(FEGlobalVector& R, const FETimeInfo& tp) { m_lc.LoadVector(R, tp); } void FEConstraintNormalFlow::StiffnessMatrix(FELinearSystem& LS, const FETimeInfo& tp) { m_lc.StiffnessMatrix(LS, tp); } bool FEConstraintNormalFlow::Augment(int naug, const FETimeInfo& tp) { return m_lc.Augment(naug, tp); } void FEConstraintNormalFlow::BuildMatrixProfile(FEGlobalMatrix& M) { m_lc.BuildMatrixProfile(M); } int FEConstraintNormalFlow::InitEquations(int neq) { return m_lc.InitEquations(neq); } void FEConstraintNormalFlow::Update(const std::vector<double>& Ui, const std::vector<double>& ui) { m_lc.Update(Ui, ui); } void FEConstraintNormalFlow::UpdateIncrements(std::vector<double>& Ui, const std::vector<double>& ui) { m_lc.UpdateIncrements(Ui, ui); } void FEConstraintNormalFlow::PrepStep() { m_lc.PrepStep(); }
C++
3D
febiosoftware/FEBio
FEBioFluid/FEFluidResidualVector.cpp
.cpp
2,886
90
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #include "stdafx.h" #include "FEFluidResidualVector.h" #include "FECore/DOFS.h" #include "FECore/FEModel.h" #include <FECore/FELinearConstraintManager.h> using namespace std; //----------------------------------------------------------------------------- FEFluidResidualVector::FEFluidResidualVector(FEModel& fem, vector<double>& R, vector<double>& Fr) : FEGlobalVector(fem, R, Fr) { } //----------------------------------------------------------------------------- FEFluidResidualVector::~FEFluidResidualVector() { } //----------------------------------------------------------------------------- void FEFluidResidualVector::Assemble(vector<int>& en, vector<int>& elm, vector<double>& fe) { vector<double>& R = m_R; int i, I; vec3d a, d; //#pragma omp critical { // assemble the element residual into the global residual int ndof = (int)fe.size(); for (i=0; i<ndof; ++i) { I = elm[i]; if ( I >= 0){ #pragma omp atomic R[I] += fe[i]; } // TODO: Find another way to store reaction forces else if (-I-2 >= 0){ #pragma omp atomic m_Fr[-I-2] -= fe[i]; } } int ndn = ndof / (int)en.size(); // if there are linear constraints we need to apply them // process linear constraints FELinearConstraintManager& LCM = m_fem.GetLinearConstraintManager(); if (LCM.LinearConstraints()) { LCM.AssembleResidual(R, en, elm, fe); } } }
C++