// calculate properties for give state const char *BistableIsotropic::CurrentProperties(short newState,int np) { double K; const char *err=NULL; // find properties for state if(newState==INITIAL_STATE) { K=K0; G=G0; aI=a0; betaI=beta0; diffusionCon=diff0; kCond=kCond0; } else { K=Kd; G=Gd; aI=ad; betaI=betad; diffusionCon=diffd; kCond=kCondd; } // analysis properties this state E=9.*K*G/(G + 3.*K); nu=(3.*K-2.*G)/(6.*K+2.*G); if(DbleEqual(E,0.0)) return "State with zero modulus is not supported."; err=SetAnalysisProps(np,E,E,E,nu,nu,nu,G,G,G, 1.e-6*aI,1.e-6*aI,1.e-6*aI,betaI*concSaturation,betaI*concSaturation,betaI*concSaturation); return err; }
// calculate properties used in analyses const char *Orthotropic::VerifyAndLoadProperties(int np) { // finish input if(!read[NUXY_PROP]) { nuxy=nuyx*Ex/Ey; read[NUXY_PROP]=1; } else if(!read[NUYX_PROP]) { nuyx=nuxy*Ey/Ex; read[NUYX_PROP]=1; } else return "nuxy and nuyx both given. Only one is allowed"; if(!read[NUXZ_PROP]) { nuxz=nuzx*Ex/Ez; read[NUXZ_PROP]=1; } else if(!read[NUZX_PROP]) { nuzx=nuxz*Ez/Ex; read[NUZX_PROP]=1; } else return "nuxz and nuzx both given. Only one is allowed"; if(!read[NUYZ_PROP]) { nuyz=nuzy*Ey/Ez; read[NUYZ_PROP]=1; } else if(!read[NUZY_PROP]) { nuzy=nuyz*Ez/Ey; read[NUZY_PROP]=1; } else return "nuyz and nuzy both given. Only one is allowed"; int i; for(i=0;i<ORTHO_PROPS;i++) { if(!read[i]) return "A required material property is missing"; } #ifdef MPM_CODE // make conductivty specific (N mm^3/(sec-K-g)) kCondz /= rho; #endif // set properties const char *err=SetAnalysisProps(np,Ex,Ey,Ez,nuxy,nuxz,nuyz, Gxy,Gxz,Gyz,1.e-6*ax,1.e-6*ay,1.e-6*az, betax*concSaturation,betay*concSaturation,betaz*concSaturation); if(err!=NULL) return err; // load elastic properties with constant values FillUnrotatedElasticProperties(&pr,np); // superclass call (but skip over TransIsotropic) return MaterialBase::VerifyAndLoadProperties(np); }