MechSys  1.0
Computing library for simulations in continuum and discrete mechanics
/home/dorival/mechsys/lib/models/unsatflow.h
Go to the documentation of this file.
00001 /************************************************************************
00002  * MechSys - Open Library for Mechanical Systems                        *
00003  * Copyright (C) 2005 Dorival M. Pedroso, Raul Durand                   *
00004  *                                                                      *
00005  * This program is free software: you can redistribute it and/or modify *
00006  * it under the terms of the GNU General Public License as published by *
00007  * the Free Software Foundation, either version 3 of the License, or    *
00008  * any later version.                                                   *
00009  *                                                                      *
00010  * This program is distributed in the hope that it will be useful,      *
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the         *
00013  * GNU General Public License for more details.                         *
00014  *                                                                      *
00015  * You should have received a copy of the GNU General Public License    *
00016  * along with this program. If not, see <http://www.gnu.org/licenses/>  *
00017  ************************************************************************/
00018 
00019 #ifndef MECHSYS_UNSATFLOW_H
00020 #define MECHSYS_UNSATFLOW_H
00021 
00022 // Std Lib
00023 #include <fstream>
00024 #include <sstream>
00025 
00026 // MechSys
00027 #include<mechsys/util/numstreams.h>
00028 #include<mechsys/models/model.h>
00029 #include<mechsys/models/unsatflowstate.h>
00030 #include<mechsys/linalg/matvec.h>
00031 #include<mechsys/numerical/odesolver.h>
00032 
00033 class UnsatFlow : public Model
00034 {
00035 public:
00036     // enums
00037     enum WRC_t { BC_t, ZI_t, HZ_t, PW_t }; 
00038 
00039     // Constructor
00040     UnsatFlow (int NDim, SDPair const & Prms, Model const * EquilibMdl=NULL);
00041 
00042     // Methods
00043     void   InitIvs   (SDPair const & Ini, State * Sta) const;                  
00044     void   Update    (double Dpw, double DEv, UnsatFlowState * Sta);           
00045     void   TgVars    (UnsatFlowState const * Sta) const;                       
00046     void   TgVars    (UnsatFlowState const * Sta, Vec_t const & Ww, double & Cpw, double & Cvs, Vec_t & fwd) const;
00047     void   TgIncs    (UnsatFlowState const * Sta, double Dpw, double DEv, double & DSw, double & Dchi) const;
00048     double FindSw    (double pc);                                              
00049     double Findpc    (double Sw);                                              
00050     double rw        (double Sw) const;                                        
00051     void   GenCurve  (Array<double> pcs, char const * Filekey, size_t Np=100); 
00052     void   Stiffness (State const * Sta, UnsatFlowState const * FSta, Mat_t & D) const; 
00053     void   RateAndUpdate (size_t Idx, Vec_t const & d, double dpwdt, double dt, UnsatFlowState * FSta, EquilibState * Sta) const;
00054 
00055     // Pointer to equilib model
00056     Model const * EMdl;
00057 
00058     // Data
00059     Mat_t  kwsatI; 
00060     Mat_t  kwsatb; 
00061     double akw;    
00062     WRC_t  WRC;    
00063     String Name;   
00064     double Cw;     
00065 
00066     // SWRC parameters
00067     double bc_lam, bc_sb,  bc_wr;                      
00068     double zi_del, zi_bet, zi_gam, zi_a, zi_b, zi_alp; 
00069     double hz_a,   hz_b,   hz_A,   hz_B;               
00070     double ld,  xRd, yR, xRw, bd, bw, b1;              
00071 
00072     // Derived constants
00073     double y0, c1d, c2d, c3d, c1w, c2w, c3w; // Pedroso and Williams (PW)
00074 
00075     // Read-write variables (scratchpad)
00076     mutable double c, C, chi, Cpc, Ceps;
00077 
00078 #define HMSTRESSUPDATE_DECLARE
00079     #include <mechsys/models/hmstressupdate.h>
00080     mutable HMStressUpdate HMSUp;
00081 #undef HMSTRESSUPDATE_DECLARE
00082 
00083 private:
00084     double _Cpc  (bool Drying, double pc, double Sw) const;
00085     double _Ceps (bool Drying, double pc, double Sw) const;
00086 
00087     double _RK_pc, _RK_Dev, _RK_Dpc, _RK_Sw, _RK_DSw;
00088     int _RK_func_Sw (double t, double const Sw[], double dSwdt[]);
00089     int _RK_func_pc (double t, double const pc[], double dpcdt[]);
00090 };
00091 
00092 
00094 
00095 
00096 #define HMSTRESSUPDATE_IMPLEMENT
00097   #include <mechsys/models/hmstressupdate.h>
00098 #undef HMSTRESSUPDATE_IMPLEMENT
00099 
00100 
00101 inline UnsatFlow::UnsatFlow (int NDim, SDPair const & Prms, Model const * EquilibMdl)
00102     : Model (NDim,Prms,/*niv*/0,"UnsatFlow"), EMdl(EquilibMdl), WRC(PW_t), Name("Pedroso-Williams")
00103 {
00104     // parameters
00105     if (Prms.HasKey("BC")) WRC = BC_t;
00106     if (Prms.HasKey("ZI")) WRC = ZI_t;
00107     if (Prms.HasKey("HZ")) WRC = HZ_t;
00108     if (Prms.HasKey("PW")) WRC = PW_t;
00109     switch (WRC)
00110     {
00111         case BC_t:
00112         {
00113             Name   = "Brooks-Corey";
00114             akw    = Prms("akw");
00115             bc_lam = (Prms.HasKey("bc_lam") ? Prms("bc_lam") : 0.8 );
00116             bc_sb  = (Prms.HasKey("bc_sb" ) ? Prms("bc_sb" ) : 1.8 );
00117             bc_wr  = (Prms.HasKey("bc_wr" ) ? Prms("bc_wr" ) : 0.01);
00118             if (Prms.HasKey("bc_sbb")) bc_sb = exp(Prms("bc_sbb"))-1.0;
00119             break;
00120         }
00121         case ZI_t:
00122         {
00123             Name   = "Zienkiewicz";
00124             zi_del = (Prms.HasKey("zi_del") ? Prms("zi_del") : 0.0842);
00125             zi_bet = (Prms.HasKey("zi_bet") ? Prms("zi_bet") : 0.7   );
00126             zi_gam = (Prms.HasKey("zi_gam") ? Prms("zi_gam") : 2.0   );
00127             zi_a   = (Prms.HasKey("zi_a"  ) ? Prms("zi_a"  ) : 5.0   );
00128             zi_b   = (Prms.HasKey("zi_b"  ) ? Prms("zi_b"  ) : 4.0   );
00129             zi_alp = (Prms.HasKey("zi_alp") ? Prms("zi_alp") : 0.9   );
00130             break;
00131         }
00132         case HZ_t:
00133         {
00134             Name = "Huang-Zienkiewicz";
00135             hz_a = (Prms.HasKey("hz_a"  ) ? Prms("hz_a"  ) : 0.10152);
00136             hz_b = (Prms.HasKey("hz_b"  ) ? Prms("hz_b"  ) : 2.4279 );
00137             hz_A = (Prms.HasKey("hz_A"  ) ? Prms("hz_A"  ) : 2.207  );
00138             hz_B = (Prms.HasKey("hz_B"  ) ? Prms("hz_B"  ) : 1.0121 );
00139             break;
00140         }
00141         case PW_t:
00142         {
00143             Name = "Pedroso-Williams";
00144             akw  = Prms("akw");
00145             ld   = (Prms.HasKey("ld" ) ? Prms("ld" ) : 2.8);
00146             xRd  = (Prms.HasKey("xRd") ? Prms("xRd") : 0.88);
00147             yR   = (Prms.HasKey("yR" ) ? Prms("yR" ) : 0.04);
00148             xRw  = (Prms.HasKey("xRw") ? Prms("xRw") : 0.7);
00149             bd   = (Prms.HasKey("bd" ) ? Prms("bd" ) : 3.0);
00150             bw   = (Prms.HasKey("bw" ) ? Prms("bw" ) : 5.0);
00151             b1   = (Prms.HasKey("b1" ) ? Prms("b1" ) : 1.8);
00152 
00153             // derived constants
00154             y0  = 1.0; // saturation for pc=0
00155             c1d = bd * ld;
00156             c2d = exp(bd * yR);
00157             c3d = exp(bd * (y0 + ld * xRd)) - c2d * exp(c1d * xRd);
00158             c1w = -bw * ld;
00159             c2w = exp(-bw * y0);
00160             c3w = exp(-bw * ld * xRw) - c2w * exp(c1w * xRw);
00161         }
00162     }
00163 
00164     // saturated conductivity matrix
00165     Mat_t kwsat(NDim, NDim);
00166     kwsatb.change_dim (NDim, NDim);
00167     GamW = Prms("gamW");
00168     double m = Prms("kwsat") / GamW;
00169     if (NDim==3) kwsat  =  Prms("kwsat"), 0., 0.,   0., Prms("kwsat"), 0.,   0., 0., Prms("kwsat");
00170     else         kwsat  =  Prms("kwsat"), 0.,   0., Prms("kwsat");
00171     if (NDim==3) kwsatb =  m, 0., 0.,   0., m, 0.,   0., 0., m;
00172     else         kwsatb =  m, 0.,   0., m;
00173     Inv (kwsat, kwsatI);
00174 
00175     // compressibility of water
00176     Cw = Prms("cw");
00177 
00178     // stress update
00179     HMSUp.SetModel (EquilibMdl, this);
00180 }
00181 
00182 inline void UnsatFlow::InitIvs (SDPair const & Ini, State * Sta) const
00183 {
00184     SDPair ini(Ini);
00185     UnsatFlowState * sta = static_cast<UnsatFlowState*>(Sta);
00186     double pc, Sw;
00187     if (Ini.HasKey("pw"))
00188     {
00189         pc = -Ini("pw");
00190         Sw = const_cast<UnsatFlow*>(this)->FindSw(pc);
00191     }
00192     else if (Ini.HasKey("Sw"))
00193     {
00194         Sw = Ini("Sw");
00195         pc = const_cast<UnsatFlow*>(this)->Findpc(Sw);
00196     }
00197     else throw new Fatal("UnsatFlow::InitIvs: Either 'pw' or 'Sw' must be given in 'inis' dictionary in order to initialize WRC");
00198     ini.Set   ("n",   Prms("por"));
00199     ini.Set   ("pc",  pc);
00200     ini.Set   ("Sw",  Sw);
00201     ini.Set   ("RhoW", Prms("gamW")/Prms("grav"));
00202     ini.Set   ("RhoS", Prms("rhoS"));
00203     sta->Init (ini);
00204 }
00205 
00206 inline void UnsatFlow::Update (double Dpw, double DEv, UnsatFlowState * Sta)
00207 {
00208     // set variables for _RK_func
00209     _RK_pc  =  Sta->pc;
00210     _RK_Dev =  DEv;
00211     _RK_Dpc = -Dpw;
00212 
00213     // solve ODE
00214     Numerical::ODESolver<UnsatFlow> ode(this, &UnsatFlow::_RK_func_Sw, /*neq*/1, "RKF45", /*stol*/1.e-6);
00215     ode.t    = 0.0;
00216     ode.Y[0] = Sta->Sw;
00217     ode.Evolve (/*tf*/1.0);
00218 
00219     // set new state
00220     Sta->Sw     = ode.Y[0];
00221     Sta->pc    += (-Dpw);
00222     Sta->n     += DEv;
00223     Sta->Drying = (_RK_Dpc>0.0); // drying/wetting ?
00224 }
00225 
00226 inline void UnsatFlow::TgVars (UnsatFlowState const * Sta) const
00227 {
00228     Cpc  = _Cpc  (Sta->Drying, Sta->pc, Sta->Sw);
00229     Ceps = _Ceps (Sta->Drying, Sta->pc, Sta->Sw);
00230     c   = Sta->Sw + Sta->n * Ceps;
00231     C   = -Sta->n * Cpc;
00232     chi = Sta->Sw;
00233 }
00234 
00235 inline void UnsatFlow::TgVars (UnsatFlowState const * Sta, Vec_t const & Ww, double & Cpw, double & Cvs, Vec_t & fwd) const
00236 {
00237     double gamw = Grav * Sta->RhoW;
00238     double nw   = Sta->n * Sta->Sw;
00239     double Cn   = 0.0; // == dSwdn
00240 
00241     Cpw = nw * Cw  -  Sta->n * Sta->RhoW * _Cpc(Sta->Drying, Sta->pc, Sta->Sw);
00242     Cvs = Sta->n * Sta->RhoW * Cn * (1.0-Sta->n)  +  Sta->Sw * Sta->RhoW;
00243     fwd = (-nw*nw*gamw/rw(Sta->Sw)) * kwsatI * Ww;
00244 }
00245 
00246 inline void UnsatFlow::RateAndUpdate (size_t Idx, Vec_t const & d, double dpwdt, double dt, UnsatFlowState * FSta, EquilibState * Sta) const
00247 {
00248     // alloc vectors
00249     if (FSta->dndt.Size()<1)
00250     {
00251         FSta->dndt   .Resize (2);
00252         FSta->dSwdt  .Resize (2);
00253         FSta->dRhoWdt.Resize (2);
00254     }
00255     if (Sta->dSigdt.Size()<1)
00256     {
00257         Sta->dSigdt.Resize (2);
00258         for (size_t i=0; i<2; ++i) Sta->dSigdt[i].change_dim (NCps);
00259     }
00260 
00261     // rate
00262     Cpc = _Cpc (FSta->Drying, FSta->pc, FSta->Sw);
00263     double Cn = 0.0; // == dSwdn
00264     double pw = -FSta->pc;
00265     Mat_t  D;
00266     EMdl->Stiffness (Sta, D);
00267     FSta->dndt   [Idx] = (1.0-FSta->n)*Tra(d);
00268     FSta->dSwdt  [Idx] = -Cpc*dpwdt + Cn*FSta->dndt[Idx];
00269     FSta->dRhoWdt[Idx] = Cw*dpwdt;
00270     Sta ->dSigdt [Idx] = D*d - (dpwdt*FSta->Sw + pw*FSta->dSwdt[Idx])*I;
00271 
00272     //std::cout << "dpwdt = " << dpwdt << std::endl;
00273     //std::cout << "Cpc = " << Cpc << std::endl;
00274     //std::cout << "dSwdt = " << FSta->dSwdt[Idx] << std::endl;
00275 
00276     // update
00277     if (Idx==0) // Forward-Euler
00278     {
00279         FSta->n    += FSta->dndt   [0]*dt;
00280         FSta->Sw   += FSta->dSwdt  [0]*dt;
00281         FSta->RhoW += FSta->dRhoWdt[0]*dt;
00282         Sta ->Sig  += Sta ->dSigdt [0]*dt;
00283     }
00284     else if (Idx==1) // Modified-Euler
00285     {
00286         FSta->n    += (0.5*dt)*(FSta->dndt   [0] + FSta->dndt   [1]);
00287         FSta->Sw   += (0.5*dt)*(FSta->dSwdt  [0] + FSta->dSwdt  [1]);
00288         FSta->RhoW += (0.5*dt)*(FSta->dRhoWdt[0] + FSta->dRhoWdt[1]);
00289         Sta ->Sig  += (0.5*dt)*(Sta ->dSigdt [0] + Sta ->dSigdt [1]);
00290     }
00291     else throw new Fatal("UnsatFlow::RateAndUpdate: Idx==%zd is invalid (0=FE, 1=ME)",Idx);
00292     FSta->pc     += (-dpwdt)*dt;
00293     FSta->Drying  = (dpwdt<0 ? true : false);
00294     Sta ->Eps    += d*dt;
00295 }
00296 
00297 inline void UnsatFlow::TgIncs (UnsatFlowState const * Sta, double Dpw, double DEv, double & DSw, double & Dchi) const
00298 {
00299     TgVars (Sta);
00300     DSw  = Ceps*DEv + Cpc*(-Dpw);
00301     Dchi = DSw;
00302 }
00303 
00304 inline double UnsatFlow::FindSw (double pc)
00305 {
00306     if (pc>0.0) // water unsaturated
00307     {
00308         // set variables for _RK_func
00309         _RK_Dev = 0.0;
00310         _RK_pc  = 0.0;
00311         _RK_Dpc = pc;
00312 
00313         // solve ODE
00314         Numerical::ODESolver<UnsatFlow> ode(this, &UnsatFlow::_RK_func_Sw, /*neq*/1, "RKF45", /*stol*/1.e-6);
00315         ode.t    = 0.0;
00316         ode.Y[0] = 1.0; // initial Sw
00317         ode.Evolve (/*tf*/1.0);
00318 
00319         // final Sw
00320         return ode.Y[0];
00321     }
00322     else return 1.0; // water saturated
00323 }
00324 
00325 inline double UnsatFlow::Findpc (double Sw)
00326 {
00327     if (Sw<1.0) // water unsaturated
00328     {
00329         // set variables for _RK_func_pc
00330         _RK_Dev = 0.0;
00331         _RK_Sw  = 1.0;
00332         _RK_DSw = Sw-1.0;
00333 
00334         // solve ODE
00335         Numerical::ODESolver<UnsatFlow> ode(this, &UnsatFlow::_RK_func_pc, /*neq*/1, "RKF45", /*stol*/1.e-6);
00336         ode.t    = 0.0;
00337         ode.Y[0] = 0.0; // initial pc
00338         ode.Evolve (/*tf*/1.0);
00339 
00340         // final pc
00341         return ode.Y[0];
00342     }
00343     else return 0.0; // water saturated
00344 }
00345 
00346 inline double UnsatFlow::rw (double Sw) const
00347 {
00348     if (Sw<1.0)
00349     {
00350         if (Sw>0.0)
00351         {
00352             switch (WRC)
00353             {
00354                 case BC_t: { return pow(Sw,akw); }
00355                 case ZI_t:
00356                 {
00357                     if (Sw>zi_del)
00358                     {
00359                         double hc = pow((1.0-Sw)/(Sw-zi_del), 1.0/zi_gam)/zi_bet; // m
00360                         return pow(1.0+pow(zi_a*hc, zi_b), -zi_alp);
00361                     }
00362                     else return 0.0;
00363                 }
00364                 case HZ_t:
00365                 {
00366                     double res = 1.0 - hz_A*pow(1.0-Sw, hz_B);
00367                     return (res<0.0 ? 0.0 : res);
00368                 }
00369                 case PW_t: { return pow(Sw,akw); }
00370                 default: throw new Fatal("UnsatFlow::rw: WRC is invalid");
00371             }
00372         }
00373         else return 0.0;
00374     }
00375     else return 1.0;
00376 }
00377 
00378 inline double UnsatFlow::_Cpc (bool Drying, double pc, double Sw) const
00379 {
00380     if (pc>0.0 && Sw>0.0)
00381     {
00382         switch (WRC)
00383         {
00384             case BC_t:
00385             {
00386                 if (pc>bc_sb && Sw>bc_wr) return -bc_lam*pow(bc_sb/pc,bc_lam)*(1.0-bc_wr)/pc;
00387                 else return 0.0;
00388             }
00389             case ZI_t:
00390             {
00391                 double hc = pc/GamW; // m
00392                 double K  = pow(zi_bet*hc, zi_gam);
00393                 return -(1.0/GamW)*(zi_gam*K*(1.0-zi_del))/(hc*pow(K+1.0,2.0));
00394             }
00395             case HZ_t:
00396             {
00397                 return -(hz_a*hz_b*pow(pc/GamW,hz_b))/pc;
00398             }
00399             case PW_t:
00400             {
00401                 double x   = log(1.0+pc);
00402                 double y   = Sw;
00403                 double lb  = 0.0;
00404                 if (Drying)
00405                 {
00406                     double Dd  = (y-yR>0.0 ? y-yR : 0.0);
00407                     double ldb = ld * (1.0 - exp(-bd * Dd));
00408                     double yd  = -ld * x + log(c3d + c2d * exp(c1d * x)) / bd;
00409                     double D   = (yd-y>0.0 ? yd-y : 0.0);
00410                     double yb  = y/y0;
00411                     double b2  = bw;
00412                     double b2b = b2 * sqrt((yb>0.0 ? yb : 0.0));  // b2b = b2
00413                            lb  = ldb * exp(-b2b * D);
00414                 }
00415                 else
00416                 {
00417                     double Dw  = (y0-y>0.0 ? y0-y : 0.0);
00418                     double lwb = ld * (1.0 - exp(-bw * Dw));
00419                     double yw  = -ld * x - log(c3w + c2w * exp(c1w * x)) / bw;
00420                     double D   = (y-yw>0.0 ? y-yw : 0.0);
00421                            lb  = lwb * exp(-b1 * D);
00422                 }
00423                 return -lb/(1.0+pc);
00424             }
00425             default: throw new Fatal("UnsatFlow::_Cpc: WRC is invalid");
00426         }
00427     }
00428     else return 0.0;
00429 }
00430 
00431 inline double UnsatFlow::_Ceps (bool Drying, double pc, double Sw) const
00432 {
00433     return 0.0;
00434 }
00435 
00436 inline int UnsatFlow::_RK_func_Sw (double t, double const Y[], double dYdt[])
00437 {
00438     double pc  = _RK_pc + t*_RK_Dpc;
00439     double Sw  = Y[0];
00440     bool   dry = (_RK_Dpc>0.0);
00441     Cpc     = _Cpc  (dry, pc, Sw);
00442     Ceps    = _Ceps (dry, pc, Sw);
00443     dYdt[0] = Ceps*_RK_Dev + Cpc*_RK_Dpc; // dSwdt
00444     //std::cout << Y[0] << "   " << dYdt[0] << std::endl;
00445     return GSL_SUCCESS;
00446 }
00447 
00448 inline int UnsatFlow::_RK_func_pc (double t, double const Y[], double dYdt[])
00449 {
00450     double Sw  = _RK_Sw + t*_RK_DSw;
00451     double pc  = Y[0];
00452     bool   dry = (_RK_DSw<0.0);
00453     Cpc  = _Cpc  (dry, pc, Sw);
00454     Ceps = _Ceps (dry, pc, Sw);
00455     if (fabs(Cpc)>1.0e-7) dYdt[0] = (1.0/Cpc) * (_RK_DSw - Ceps*_RK_Dev); // dpcdt
00456     else                  dYdt[0] = 1.0e+8;
00457     //std::cout << "_RK_func_pc: pc = " << Y[0] << "    dpcdt = " << dYdt[0] << std::endl;
00458     return GSL_SUCCESS;
00459 }
00460 
00461 inline void UnsatFlow::GenCurve (Array<double> pcs, char const * Filekey, size_t Np)
00462 {
00463     // initial state
00464     UnsatFlowState sta(NDim);
00465     SDPair ini;
00466     ini.Set ("n",   Por);
00467     ini.Set ("pw", -pcs[0]);
00468     InitIvs (ini, &sta);
00469 
00470     // header and initial output
00471     std::ostringstream oss;
00472     oss << Util::_8s<<"pc"   << Util::_8s<<"Sw"   << Util::_6<<"Drying"   << Util::_8s<<"n"   << Util::_8s<<"rw"       << Util::_8s<<"kw"                        << std::endl;
00473     oss << Util::_8s<<sta.pc << Util::_8s<<sta.Sw << Util::_6<<sta.Drying << Util::_8s<<sta.n << Util::_8s<<rw(sta.Sw) << Util::_8s<<rw(sta.Sw)*kwsatb(0,0)*GamW << std::endl;
00474 
00475     // update
00476     for (size_t i=1; i<pcs.Size(); ++i)
00477     {
00478         double dpc = (pcs[i]-sta.pc)/Np;
00479         for (size_t j=0; j<Np; ++j)
00480         {
00481             Update (-dpc, 0.0, &sta);
00482             oss << Util::_8s<<sta.pc << Util::_8s<<sta.Sw << Util::_6<<sta.Drying << Util::_8s<<sta.n << Util::_8s<<rw(sta.Sw) << Util::_8s<<rw(sta.Sw)*kwsatb(0,0)*GamW << std::endl;
00483         }
00484     }
00485 
00486     // save file
00487     String buf(Filekey);
00488     buf += ".res";
00489     std::ofstream of(buf.CStr(), std::ios::out);
00490     of << oss.str();
00491     of.close();
00492     printf("\nFile <%s%s%s> written\n",TERM_CLR_BLUE_H,buf.CStr(),TERM_RST);
00493 }
00494 
00495 inline void UnsatFlow::Stiffness (State const * Sta, UnsatFlowState const * FSta, Mat_t & D) const
00496 {
00497     // eq state
00498     EquilibState sta(NDim);
00499     sta = (*static_cast<EquilibState const *>(Sta));
00500 
00501     // constitutive stresses
00502     TgVars (FSta);
00503     sta.Sig += (chi*(-FSta->pc))*I;
00504 
00505     // stiffness
00506     EMdl->Stiffness (&sta, D);
00507 }
00508 
00509 
00511 
00512 
00513 Model * UnsatFlowMaker(int NDim, SDPair const & Prms, Model const * EquilibMdl) { return new UnsatFlow(NDim,Prms,EquilibMdl); }
00514 
00515 int UnsatFlowRegister()
00516 {
00517     ModelFactory   ["UnsatFlow"] = UnsatFlowMaker;
00518     MODEL.Set      ("UnsatFlow", (double)MODEL.Keys.Size());
00519     MODEL_PRM_NAMES["UnsatFlow"].Resize(27);
00520     MODEL_PRM_NAMES["UnsatFlow"] = "kwsat",  "akw",    "cw",
00521                                    "bc_lam", "bc_sb",  "bc_wr",
00522                                    "zi_del", "zi_bet", "zi_gam", "zi_a", "zi_b", "zi_alp",
00523                                    "hz_a",   "hz_b",   "hz_A",   "hz_B",
00524                                    "ld",     "xRd",    "yR",     "xRw",  "bd",   "bw",  "b1",
00525                                    "BC",     "ZI",     "HZ",     "PW";
00526     MODEL_IVS_NAMES["UnsatFlow"].Resize(2);
00527     MODEL_IVS_NAMES["UnsatFlow"] = "pw", "Sw";
00528     return 0;
00529 }
00530 
00531 int __UnsatFlow_dummy_int = UnsatFlowRegister();
00532 
00533 
00534 #endif // MECHSYS_UNSATFLOW_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines