OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
cemhydmat.h
Go to the documentation of this file.
1 /*
2  *
3  * ##### ##### ###### ###### ### ###
4  * ## ## ## ## ## ## ## ### ##
5  * ## ## ## ## #### #### ## # ##
6  * ## ## ## ## ## ## ## ##
7  * ## ## ## ## ## ## ## ##
8  * ##### ##### ## ###### ## ##
9  *
10  *
11  * OOFEM : Object Oriented Finite Element Code
12  *
13  * Copyright (C) 1993 - 2013 Borek Patzak
14  *
15  *
16  *
17  * Czech Technical University, Faculty of Civil Engineering,
18  * Department of Structural Mechanics, 166 29 Prague, Czech Republic
19  *
20  * This library is free software; you can redistribute it and/or
21  * modify it under the terms of the GNU Lesser General Public
22  * License as published by the Free Software Foundation; either
23  * version 2.1 of the License, or (at your option) any later version.
24  *
25  * This program is distributed in the hope that it will be useful,
26  * but WITHOUT ANY WARRANTY; without even the implied warranty of
27  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
28  * Lesser General Public License for more details.
29  *
30  * You should have received a copy of the GNU Lesser General Public
31  * License along with this library; if not, write to the Free Software
32  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
33  */
34 
35 #ifndef CemhydMat_h
36 #define CemhydMat_h
37 
38 /*CEMHYD3D v 3.0 has been developed at NIST, programmed by D.P.Bentz*/
39 /*modified to an object-oriented version by smilauer@cml.fsv.cvut.cz*/
40 
41 #include "mathfem.h"
42 #include <cstdio>
43 #include <string>
44 #include <cstring>
45 
46 #include <tinyxml2.h>
47 
48 using namespace tinyxml2;
49 
50 #define TINYXML //read CEMHYD3D input file through tinyXML library
51 
52 #ifdef __TM_MODULE //OOFEM transport module
53  #include "domain.h"
54  #include "../isoheatmat.h"
55 #endif
56 
58 
59 #define _IFT_CemhydMat_Name "cemhydmat"
60 #define _IFT_CemhydMat_conductivitytype "conductivitytype"
61 #define _IFT_CemhydMat_capacitytype "capacitytype"
62 #define _IFT_CemhydMat_densitytype "densitytype"
63 #define _IFT_CemhydMat_eachgp "eachgp"
64 #define _IFT_CemhydMat_nowarnings "nowarnings"
65 #define _IFT_CemhydMat_scaling "scaling"
66 #define _IFT_CemhydMat_reinforcementDegree "reinforcementdegree"
67 #define _IFT_CemhydMat_inputFileName "file"
68 
69 
70 namespace oofem {
71 typedef struct FCOMPLEX {
72  float r, i;
73 } fcomplex_cem;
74 
89 class CemhydMatStatus;
90 
91 #ifdef __TM_MODULE //OOFEM transport module
93 {
94 public:
96  CemhydMat(int n, Domain * d);
98  virtual ~CemhydMat();
100  virtual const char *giveInputRecordName() const { return _IFT_CemhydMat_Name; }
101  virtual const char *giveClassName() const { return "CemhydMat"; }
102 
103  virtual int hasInternalSource() { return 1; }
104  virtual void computeInternalSourceVector(FloatArray &val, GaussPoint *gp, TimeStep *tStep, ValueModeType mode);
106  virtual int giveCycleNumber(GaussPoint *gp);
108  virtual double giveTimeOfCycle(GaussPoint *gp);
110  virtual double giveDoHActual(GaussPoint *gp);
112  virtual double giveIsotropicConductivity(GaussPoint *gp, TimeStep *tStep);
114  virtual double giveConcreteCapacity(GaussPoint *gp, TimeStep *tStep);
116  virtual double giveConcreteDensity(GaussPoint *gp, TimeStep *tStep);
117 
119  virtual double giveCharacteristicValue(MatResponseMode mode, GaussPoint *gp, TimeStep *tStep);
120 
121  virtual int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep);
122  virtual int initMaterial(Element *element);
124  virtual void clearWeightTemperatureProductVolume(Element *element);
126  virtual void storeWeightTemperatureProductVolume(Element *element, TimeStep *tStep);
128  virtual void averageTemperature();
129 
130  virtual IRResultType initializeFrom(InputRecord *ir);
132  int conductivityType, capacityType, densityType;
140  int eachGP;
142  std :: string XMLfileName;
143  virtual MaterialStatus *CreateStatus(GaussPoint *gp) const;
149 };
150 #endif
151 
152 
153 #ifdef __TM_MODULE //OOFEM transport module
155 {
156 public:
166  CemhydMatStatus(int n, Domain * d, GaussPoint * gp, CemhydMatStatus * CemStat, CemhydMat * cemhydmat, bool withMicrostructure);
167  virtual ~CemhydMatStatus();
168  //virtual Interface *giveInterface(InterfaceType);
169  virtual const char *giveClassName() const { return "CemhydMatStatus"; }
170  virtual void updateYourself(TimeStep *tStep);
171  virtual void printOutputAt(FILE *file, TimeStep *tStep);
172 #elif CEMPY
173  #define OUTFILES
174  #define IMAGEFILES
175  #define PRINTF
176 class CemhydMatStatus
177 {
178 public:
179  CemhydMatStatus(void);
180  ~CemhydMatStatus(void);
181  void InitializePy(const char *inp);
182 #endif
183  FILE *in;
184  void initializeMicrostructure(void);
185  void read(char *inp);
186  double GivePower(double GiveTemp, double TargTime);
187  double MoveCycles(double GiveTemp, int cycles);
188  int MoveToDoH(double GiveTemp, double DesiredDoH, int maxcyc);
189  int MoveToTime(double GiveTemp, double TargTime);
190  double GiveTotCemHeat(void);
191  double GiveTotHeat(void);
192  double GiveCp(void);
193  double computeConcreteCapacityBentz(void);
194  double GiveDensity(void);
195  double GiveDoHLastCyc(void);
197  double GiveDoHActual(void);
198  int GiveCycNum(void);
199  double GiveCycTime(void);
200  void CreateHDCSH(void);
201  void PercolateForOutput(void);
202  double GiveWcr(void);
203  void GetInputParams(char *my_string);
204  void constructor_init(void);
205  void AnalyticHomogenizationPaste(double &E, double &nu, int perc_unperc_flag);
206  void AnalyticHomogenizationConcrete(double E_paste_inp, double nu_paste_inp, double *E_paste, double *nu_paste, double *E_mortar, double *nu_mortar, double &E_concrete, double &nu_concrete);
207  void GetInitClinkerPhases(double &c3s, double &c2s, double &c3a, double &c4af, double &gypsum, double &hemi, double &anh);
208 
212  double IPVolume;
215 
217  void setAverageTemperatureVolume(double temperature, double volume) {
218  averageTemperature = temperature;
219  IPVolume = volume;
220  }
221  // Auxiliary function
222  double giveAverageTemperature(void);
223  // Auxiliary function
224  double giveTotalVolume(void) { return IPVolume; }
225 
226  int readInputFileAndInitialize(const char *inp, bool generateMicrostructure);
227  int SYSSIZE;
228  int SYSIZE;
229 
230  //disrealnew_30, burn3d, burnset, hydreal, burn_phases, nrutils, complex
231  int ***mic_CSH;
232  int ***ArrPerc;
233  int ***ConnNumbers;
234  double *PhaseFrac;
235  //double E_CSH_hmg,nu_CSH_hmg;
236  //double E_CSH_hmg;
237  //double SH_hmg_1;
238  double LastHydrTime, LastCallTime, PrevHydrTime;
239  double LastCycHeat, LastTotHeat, PrevCycHeat;
241  double PartHeat;
242  /* Parameters for kinetic modelling ---- maturity approach */
243  double ind_time, temp_0, temp_cur, time_step, time_cur, E_act, beta, heat_new, Mass_cement_concrete;
245  int icyc;
247  double *last_values;
250 private:
251 #ifdef __TM_MODULE //OOFEM transport module
252  GaussPoint * gp;
254 #endif
255  double LastTargTime;
256  /*define dimension size for image reconstruction and hydration*/
257  /*Following parameters may be changed if you know what they are for*/
258  int NEIGHBORS; /* number of neighbors to consider (6, 18, or 26) in dissolution */
259 
260  int BoxSize; /*int describing vicinity of CSH*/
261  int SolidLimit; /*how many solid phase voxels must be in a box (max. <=(2*BoxSize+1)^3)*/
262  long MAXTRIES; /* maximum number of random tries for sphere placement */
263  long int MAXCYC_SEAL; /* Maximum number of cycles of sealed hydration (originally MAXCYC in disrealnew.c */
264 
265  /*Following parameters should not be changed*/
267 
268  /* Note that each particle must have a separate ID to allow for flocculation */
269  int CEM; /* and greater */
270  int CEMID; /* phase identifier for cement */
271  int C2SID; /* phase identified for C2S cement */
272  int GYPID; /* phase identifier for gypsum */
273  int HEMIHYDRATE; /* phase identifier for hemihydrate */
274  int POZZID; /* phase identifier for pozzolanic material */
275  int INERTID; /* phase identifier for inert material */
276  int SLAGID; /* phase identifier for slag */
277  int AGG; /* phase identifier for flat aggregate */
278  int FLYASH; /* phase identifier for all fly ash components */
279 
280  long NPARTC;
281  long BURNTG; /* this value must be at least 100 > NPARTC */
282  int NUMSIZES; /* maximum number of different particle sizes */
283 
284  //+distrib3d
285  long MAXSPH; /* maximum number of elements in a spherical template */
286 
287  /*define heat capacities for all components in J/g/C*/
288  /*including free and bound water*/
289  double Cp_pozz;
290  double Cp_CH;
291  double Cp_h2o; /* Cp for free water */
292  double Cp_bh2o; /* Cp for bound water */
293  double WN; /* water bound per gram of cement during hydration */
294  double WCHSH; /* water imbibed per gram of cement during chemical shrinkage (estimate) */
295 
296  int CUBEMAX;
297  int CUBEMIN; /* Minimum cube size for checking pore size */
298  long SYSIZEM1; /* System size -1 */
299 
300  double DISBIAS; /* Dissolution bias- to change all dissolution rates */
301  double DISMIN; /* Minimum dissolution for C3S dissolution */
302  double DISMIN2; /* Minimum dissolution for C2S dissolution */
303  double DISMINSLAG; /* Minimum dissolution for SLAG dissolution */
304  double DISMINASG; /* Minimum dissolution for ASG dissolution */
305  double DISMINCAS2; /* Minimum dissolution for CAS2 dissolution */
306  double DISMIN_C3A_0; /* Minimum dissolution for C3A dissolution */
307  double DISMIN_C4AF_0; /* Minimum dissolution for C4AF dissolution */
308  double DETTRMAX;
309  double DGYPMAX;
310  double DCACO3MAX;
311  double DCACL2MAX;
312  double DCAS2MAX;
313  double CHCRIT;
314  double C3AH6CRIT;
315  double C3AH6GROW; /* Probability for C3AH6 growth */
316  double CHGROW; /* Probability for CH growth */
317  double CHGROWAGG; /* Probability for CH growth on aggregate surface */
318  double ETTRGROW; /* Probability for ettringite growth */
319  double C3AETTR; /* Probability for reaction of diffusing C3A with ettringite */
320  double C3AGYP; /* Probability for diffusing C3A to react with diffusing gypsum */
321  /* diffusing anhydrite, and diffusing hemihydrate */
322  double SOLIDC3AGYP; /* Probability of solid C3A to react with diffusing sulfate */
323  double SOLIDC4AFGYP; /* Probability of solid C4AF to react with diffusing sulfate */
324  double PPOZZ; /* base probability for pozzolanic reaction */
325  double PCSH2CSH; /* probability for CSH dissolution */
326  /* for conversion of C-S-H to pozz. C-S-H */
327  double A0_CHSOL; /* Parameters for variation of CH solubility with */
328  double A1_CHSOL; /* temperature (data from Taylor- Cement Chemistry) */
329  /* changed CSHSCALE to 70000 6/15/01 to better model induction CS */
330  double CSHSCALE; /*scale factor for CSH controlling induction */
331  double C3AH6_SCALE; /*scale factor for C3AH6 controlling induction of aluminates */
332 
333  int BURNT; /* label for a burnt pixel <255 (in char type arrays) */
334  long SIZE2D; /* size of matrices for holding burning locations */
335  /* functions defining coordinates for burning in any of three directions */
336  // definition of general equation of plane xy, yz, xz through cube
337  long cx(int x, int y, int z, int a, int b, int c);
338  long cy(int x, int y, int z, int a, int b, int c);
339  long cz(int x, int y, int z, int a, int b, int c);
340 
341  long SIZESET;
342  double AGRATE; /* Probability of gypsum absorption by CSH */
343  double VOLFACTOR; /* dm per pixel Note- dm*dm*dm = Liters */
344  double MASSFACTOR; /* cm per pixel - specific gravities in g/cm^3 */
345  double MMNa;
346  double MMK;
347  double MMNa2O;
348  double MMK2O;
349  double BNa; /* From Taylor paper in liters (31 mL/1000/ 100 g) */
350  double BK; /* From Taylor paper in liters (20 mL/1000/ 100 g) */
351  double BprimeNa; /* From Taylor paper in liters (3 mL/1000/ 1 g POZZ) */
352  double BprimeK; /* From Taylor paper in liters (3.3 mL/1000/ 1 g POZZ) */
353  double KspCH25C;
354  double KspGypsum;
355  double KspSyngenite;
356  double SpecgravSyngenite; /* Source Taylor, H.F.W., Cement Chemistry */
357  double KperSyn; /* moles of K+ per mole of syngenite */
358 
359  double activeA0; /* A at 295 K (from Ken) */
360  double activeB0; /* B at 295 K (from Ken) */
361  /* z are the absolute charges (valences) per ion */
362  double zCa;
363  double zSO4;
364  double zOH;
365  double zNa;
366  double zK;
367  /* a is similar to an ionic radius (in Angstroms) */
368  double aK;
369  double aCa;
370  double aOH;
371  double aNa;
372  double aSO4; /* Estimate as S ionic radii + O ionic diameter */
373  /* Ionic conductivities (From Snyder, Feng, Keen, and Mason) */
374  /* and from CRC Hanbook of Chemistry and Physics (1983) pp. D-175 */
375  /* pore solution conductivity = sum (zi * [i]*lambdai) */
376  /* lambdai = (lambdai_0/(1.+Gi*(Istrength^0.5))) */
377  /* where Istrength is in units of M (mol/L) */
378  double lambdaOH_0; /* Units: S cm-cm eq.^(-1) */
379  double lambdaNa_0;
380  double lambdaK_0;
381  double lambdaSO4_0;
382  double lambdaCa_0; /* Note that CRC has 60./2 for this */
383  double GOH; /* Units: (eq.^2 mol/L)^(-0.5) */
384  double GK;
385  double GNa;
386  double GCa;
387  double GSO4;
388  double cm2perL2m; /* Conversion from cm2/Liter to 1/m */
389  double EPSS;
390  double MAXIT;
391  double EPSP;
392  int MAXM;
393 
394  int xoff [ 27 ];
395  int yoff [ 27 ];
396  int zoff [ 27 ];
397 
398  //random generator
399  long IA;
400  long IM;
401  long IQ;
402  int IR;
403  int NTAB;
404  double EPS;
405  double NDIV; //= 1.0/(1.0+(IM-1.0)/NTAB);
406  double RNMX; // = (1.0-EPS);
407  double AM; //= (1.0/IM);
408  int iy;
409  int *iv;
410 
411  //phases
412  int POROSITY;
413  int C3S;
414  int C2S;
415  int C3A;
416  int C4AF;
417  int GYPSUM;
418  int HEMIHYD;
420  int POZZ;
421  int INERT;
422  int SLAG;
423  int ASG; /* aluminosilicate glass */
424  int CAS2;
425  int CH;
426  int CSH;
427  int C3AH6;
428  int ETTR;
429  int ETTRC4AF; /* Iron-rich stable ettringite phase */
430  int AFM;
431  int FH3;
432  int POZZCSH;
433  int SLAGCSH; /* Slag gel-hydration product */
434  int CACL2;
435  int FREIDEL; /* Freidel's salt */
436  int STRAT; /* stratlingite (C2ASH8) */
437  int GYPSUMS; /* Gypsum formed from hemihydrate and anhydrite */
438  int CACO3;
439  int AFMC;
440  int INERTAGG;
441  int ABSGYP;
442  int DIFFCSH;
443  int DIFFCH;
444  int DIFFGYP;
445  int DIFFC3A;
446  int DIFFC4A;
447  int DIFFFH3;
448  int DIFFETTR;
450  int DIFFAS;
451  int DIFFANH;
452  int DIFFHEM;
453  int DIFFCAS2;
455  int EMPTYP; /*Empty porosity due to self desiccation*/
456  int HDCSH;
457  int OFFSET; /*Offset for highlighted potentially soluble pixel*/
458 
459  //genpartnew
460  /* Note that each particle must have a separate ID to allow for flocculation */
461  //+distrib3d
462  char ***mic; //char mic [SYSIZE] [SYSIZE] [SYSIZE];
463 
464 #ifdef TINYXML
465  XMLDocument *xmlFile;
466  void QueryNumAttributeExt(XMLDocument *xmlFile, const char *elementName, int position, int &val);
467  void QueryNumAttributeExt(XMLDocument *xmlFile, const char *elementName, int position, long int &val);
468  void QueryNumAttributeExt(XMLDocument *xmlFile, const char *elementName, const char *key, int &val);
469  void QueryNumAttributeExt(XMLDocument *xmlFile, const char *elementName, int position, double &val);
470  void QueryNumAttributeExt(XMLDocument *xmlFile, const char *elementName, const char *key, double &val);
471  void QueryStringAttributeExt(XMLDocument *xmlFile, const char *elementName, int position, char *chars);
472  int countKey; //counter for many keys in the XML element
473 #elif CMLFILE
474  cmlfile *F;
475 #endif
476  double ran1(int *idum);
477  void addagg(void);
478  int chksph(int xin, int yin, int zin, int radd, int wflg, int phasein, int phase2);
479  int gsphere(int numgen, long int *numeach, int *sizeeach, int *pheach);
480  int create(void);
481  void drawfloc(int xin, int yin, int zin, int radd, int phasein, int phase2);
482  int chkfloc(int xin, int yin, int zin, int radd);
483  void makefloc(void);
484  void measure(void);
485  void measagg(void);
486  void connect(void);
487  void outmic(void);
488  int genpartnew(void);
489  void alloc_char_3D(char ***( &mic ), long SYSIZE);
490  void dealloc_char_3D(char ***( &mic ), long SYSIZE);
491  void alloc_long_3D(long ***( &mic ), long SYSIZE);
492  void dealloc_long_3D(long ***( &mic ), long SYSIZE);
493  void alloc_int_3D(int ***( &mask ), long SYSIZE);
494  void dealloc_int_3D(int ***( &mask ), long SYSIZE);
495  void alloc_shortint_3D(short int ***( &mic ), long SYSIZE);
496  void dealloc_shortint_3D(short int ***( &mic ), long SYSIZE);
497  void alloc_double_3D(double ***( &mic ), long SYSIZE);
498  void dealloc_double_3D(double ***( &mic ), long SYSIZE);
499 
500  char ***micorig; //char micorig [SYSIZE] [SYSIZE] [SYSIZE];
501  long int ***micpart; //long int micpart [SYSIZE] [SYSIZE] [SYSIZE];
502 
503  //genpartnew
504  /* data structure for clusters to be used in flocculation */
505  struct cluster {
506  int partid; /* index for particle */
507  int clustid; /* ID for cluster to which this particle belongs */
508  int partphase; /* phase identifier for this particle */
509  int x, y, z, r; /* particle centroid and radius in pixels */
510  struct cluster *nextpart; /* pointer to next particle in cluster */
511  };
512 
513  /* 3-D particle structure (each particle has own ID) stored in array cement */
514  /* 3-D microstructure is stored in 3-D array cemreal */
515 
516  //define long int cement [SYSSIZE+1] [SYSSIZE+1] [SYSSIZE+1];
517  long int ***cement;
518  //define long int cemreal [SYSSIZE+1] [SYSSIZE+1] [SYSSIZE+1];
519  long int ***cemreal;
520 
521  int npart, aggsize; /* global number of particles and size of aggregate */
522  int iseed, nseed, *seed; /* random number seed- global */
523  int dispdist; /* dispersion distance in pixels */
524  int clusleft; /* number of clusters in system */
525  /* parameters to aid in obtaining correct sulfate content */
526  long int n_sulfate, target_sulfate, n_total, target_total, volpart [ 47 ];
527  long int n_anhydrite, target_anhydrite, n_hemi, target_hemi;
528  double probgyp, probhem, probanh; /* probability of gypsum particle instead of cement */
529  /* and probabilities of anhydrite and hemihydrate */
530  /* relative to total sulfate */
531  // struct cluster *clust[NPARTC];/* limit of NPARTC particles/clusters */
532  struct cluster **clust;
533 
534  //distrib3d
535  int maketemp(int size);
536  void phcount(void);
537  int surfpix(int xin, int yin, int zin);
538  float rhcalc(int phin);
539  int countem(int xp, int yp, int zp, int phin);
540  void sysinit(int ph1, int ph2);
541  void sysscan(int ph1, int ph2);
542  int procsol(int nsearch);
543  int procair(int nsearch);
544  int movepix(int ntomove, int ph1, int ph2);
545  void sinter3d(int ph1id, int ph2id, float rhtarget);
546  void stat3d(void);
547  void rand3d(int phasein, int phaseout, float xpt);
548  void distrib3d(void);
549 
550  //int mask[SYSIZE+1][SYSIZE+1][SYSIZE+1];
551  int ***mask;
552  //unsigned short int curvature [SYSSIZE+1] [SYSSIZE+1] [SYSSIZE+1];
553  int ***curvature;
554  long int volume [ 50 ], surface [ 50 ];
555  int nsph;
556  int *xsph, *ysph, *zsph;
557  long int nsolid [ 1500 ], nair [ 1500 ];
558 
559  void init(void);
560  int chckedge(int xck, int yck, int zck);
561  void passone(int low, int high, int cycid, int cshexflag);
562  int loccsh(int xcur, int ycur, int zcur, int extent);
563  int countbox(int boxsize, int qx, int qy, int qz);
564  int countboxc(int boxsize, int qx, int qy, int qz);
565  void makeinert(long int ndesire);
566  void extslagcsh(int xpres, int ypres, int zpres);
567  void dissolve(int cycle);
568  void addrand(int randid, long int nneed);
569  void measuresurf(void);
570  void resaturate(void);
571  void outputImageFileUnperc(char ***m);
572  void readhydrparam(void);
573  void disrealnew_init(void);
574  void disrealnew(double GiveTemp, double TargTime, int flag);
575  int burn3d(int npix, int d1, int d2, int d3);
576  int burnset(int d1, int d2, int d3);
577  void parthyd(void);
578  int moveone(int *xloc, int *yloc, int *zloc, int *act, int sumold);
579  int edgecnt(int xck, int yck, int zck, int ph1, int ph2, int ph3);
580  void extcsh(void);
581  int movecsh(int xcur, int ycur, int zcur, int finalstep, int cycorig);
582  void extfh3(int xpres, int ypres, int zpres);
583  int extettr(int xpres, int ypres, int zpres, int etype);
584  void extch(void);
585  void extgyps(int xpres, int ypres, int zpres);
586  int moveanh(int xcur, int ycur, int zcur, int finalstep, float nucprgyp);
587  int movehem(int xcur, int ycur, int zcur, int finalstep, float nucprgyp);
588  int extfreidel(int xpres, int ypres, int zpres);
589  int extstrat(int xpres, int ypres, int zpres);
590  int movegyp(int xcur, int ycur, int zcur, int finalstep);
591  int movecacl2(int xcur, int ycur, int zcur, int finalstep);
592  int movecas2(int xcur, int ycur, int zcur, int finalstep);
593  int moveas(int xcur, int ycur, int zcur, int finalstep);
594  int movecaco3(int xcur, int ycur, int zcur, int finalstep);
595  void extafm(int xpres, int ypres, int zpres);
596  int moveettr(int xcur, int ycur, int zcur, int finalstep);
597  void extpozz(int xpres, int ypres, int zpres);
598  int movefh3(int xcur, int ycur, int zcur, int finalstep, float nucprob);
599  int movech(int xcur, int ycur, int zcur, int finalstep, float nucprob);
600  void extc3ah6(int xpres, int ypres, int zpres);
601  int movec3a(int xcur, int ycur, int zcur, int finalstep, float nucprob);
602  int movec4a(int xcur, int ycur, int zcur, int finalstep, float nucprob);
603  void hydrate(int fincyc, int stepmax, float chpar1, float chpar2, float hgpar1, float hgpar2, float fhpar1, float fhpar2, float gypar1, float gypar2);
604  void laguer(fcomplex_cem a[], int m, fcomplex_cem *x, float eps, int polish);
605  void zroots(fcomplex_cem a[], int m, fcomplex_cem roots[], int polish);
606  void pHpred(void);
607 
608  int IsSolidPhase(int phase);
609  void burn_phases(int d1, int d2, int d3);
610  int IsConnected(int cx, int cy, int cz, int dx, int dy, int dz);
611  void GenerateConnNumbers(void);
612  void outputImageFilePerc(void);
613  void WriteUnsortedList(int px, int py, int pz);
614  void CountPercolation(int &tot_perc, int &tot_unperc);
615  inline int AdjCoord(int coord);
616  int NumSol(int cx, int cy, int cz);
617  void CSHbox(unsigned int *CSH_vicinity);
618  void nrerror(const char *error_text);
619  float *vector(int nl, int nh);
620  int *ivector(int nl, int nh);
621  double *dvector(int nl, int nh);
622  //float** matrix(int nrl,int nrh,int ncl,int nch);
623  float **matrix_cem(int nrl, int nrh, int ncl, int nch);
624  double **dmatrix(int nrl, int nrh, int ncl, int nch);
625  int **imatrix(int nrl, int nrh, int ncl, int nch);
626  float **submatrix(float **a, int oldrl, int oldrh, int oldcl, int oldch, int newrl, int newcl);
627  void free_vector(float *v, int nl);
628  void free_ivector(int *v, int nl);
629  void free_dvector(double *v, int nl);
630  void free_matrix(float **m, int nrl, int nrh, int ncl);
631  void free_dmatrix(double **m, int nrl, int nrh, int ncl);
632  void free_imatrix(int **m, int nrl, int nrh, int ncl);
633  void free_submatrix(float *b, int nrl);
634  float **convert_matrix(float *a, int nrl, int nrh, int ncl, int nch);
635  void free_convert_matrix(float **b, int nrl);
636  long int *phase;
637 
641  fcomplex_cem ComplexCemhyd(float re, float im);
642  fcomplex_cem Conjg(fcomplex_cem z);
644  float Cabs(fcomplex_cem z);
645  fcomplex_cem Csqrt(fcomplex_cem z);
646  fcomplex_cem RCmul(float x, fcomplex_cem a);
647 
648  /* data structure for diffusing species - to be dynamically allocated */
649  /* Use of a doubly linked list to allow for easy maintenance */
650  /* (i.e. insertion and deletion) */
651  /* Added 11/94 */
652  /* Note that if SYSIZE exceeds 256, need to change x, y, and z to */
653  /* int variables */
654  struct ants {
655  unsigned char x, y, z, id;
656  int cycbirth;
657  struct ants *nextant;
658  struct ants *prevant;
659  };
660 
661  /* data structure for elements to remove to simulate self-desiccation */
662  /* once again a doubly linked list */
663  struct togo {
664  int x, y, z, npore;
665  struct togo *nexttogo;
666  struct togo *prevtogo;
667  };
668  //short int cshage [SYSIZE] [SYSIZE] [SYSIZE];
669  short int ***cshage;
670  //short int faces [SYSIZE] [SYSIZE] [SYSIZE];
671  short int ***faces;
672  unsigned int *CSH_vicinity; //[(2*BoxSize+1)*(2*BoxSize+1)*(2*BoxSize+1)+1];
673  /* counts for dissolved and solid species */
674  long int *discount, *count;
675  long int ncshplategrow, ncshplateinit;
676  /* Counts for pozzolan reacted, initial pozzolan, gypsum, ettringite,
677  * initial porosity, and aluminosilicate reacted */
678  long int npr, nfill, ncsbar, netbar, porinit, nasr, nslagr, slagemptyp;
679  /* Initial clinker phase counts */
680  long int c3sinit, c2sinit, c3ainit, c4afinit, anhinit, heminit, chold, chnew;
681  long int nmade, ngoing, gypready, poregone, poretodo, countpore;
682  long int countkeep, water_left, water_off, pore_off;
683  int ncyc, cyccnt, cubesize, sealed, outfreq, ImgOut;
684  int burnfreq, setfreq, setflag, sf1, sf2, sf3, porefl1, porefl2, porefl3;
685  /*define heat conversion factor for the cement mixture, includes all solids as
686  * count[INERT]+count[SLAG]+count[POZZ]+count[CACL2]+count[ASG]+count[CAS2]*/
687  double heat_cf;
688  float w_to_c, s_to_c, krate, totfract, tfractw04, fractwithfill;
689  float tfractw05, surffract, pfract, pfractw05, sulf_conc;
690  long int scntcement, scnttotal;
691  float U_coeff, T_ambient;
692  double alpha_cur, alpha_last, heat_old, cemmass, mass_agg, mass_water, mass_fill, Cp_now, Cp_agg, Cp_cement;
693  double Mass_tot_concrete, Cp_SCM, Cp_FA, Cp_CA, Cp_inert, Mass_SCM_frac, Mass_FA_frac, Mass_CA_frac, Mass_inert_frac, Concrete_thermal_conductivity, Concrete_bulk_density;
694  double alpha, CH_mass, mass_CH, mass_fill_pozz, E_act_pozz, chs_new, cemmasswgyp;
695  float flyashmass, alpha_fa_cur;
696  double E_act_slag;
697  double TargDoHelas;
698  /* Arrays for variable CSH molar volume and water consumption */
699  float *molarvcsh, *watercsh;
700  float heatsum, molesh2o, saturation;
701  /* Arrays for dissolution probabilities for each phase */
702  float *disprob, *disbase;
703  float gypabsprob, ppozz;
704  /* Arrays for specific gravities, molar volumes, heats of formation, and */
705  /* molar water consumption for each phase */
706  float *specgrav, *molarv, *heatf, *waterc;
707  /* Solubility flags and diffusing species created for each phase */
708  /* Also flag for C1.7SH4.0 to C1.1SH3.9 conversion */
709  int *soluble, *creates;
710  int csh2flag, adiaflag, chflag, nummovsl;
711  float cs_acc; /* increases disprob[C3S] and disprob[C2S] if gypsum is present */
712  float ca_acc; /* increases disprob[C3A] and disprob[C4AF] if gypsum is present */
713  float dismin_c3a;
714  float dismin_c4af;
715  float gsratio2, onepixelbias;
716  /* Slag probabilities */
717  float p1slag; /* probability SLAG is converted to SLAGCSH */
718  float p2slag; /* probability SLAG is converted to POROSITY or EMPTYP */
719  float p3slag; /* probability adjoining pixel is converted to SLAGCSH */
720  float p4slag; /* probability CH is consumed during SLAG reaction */
721  float p5slag; /* probability a C3A diffusing species is created */
722  double slagcasi, slaghydcasi; /* Ca/Si ratios for SLAG and SLAGCSH */
723  float slagh2osi; /* H/S ratio of SLAGCSH */
724  double slagc3a; /* C3A/slag molar ratio */
725  double siperslag; /* S ratio of SLAG (per mole) */
726  double slagreact; /* Base dissolution reactivity factor for SLAG */
727  long int DIFFCHdeficit, slaginit; /* Deficit in CH due to SLAG reaction */
728  long int slagcum, chgone;
729  long int nch_slag; /* number of CH consumed by SLAG reaction */
730  long int sulf_cur;
731  long int sulf_solid;
732  char heatname [ 80 ], adianame [ 80 ], phasname [ 80 ], ppsname [ 80 ], ptsaname [ 80 ], phrname [ 80 ];
733  char chshrname [ 80 ], micname [ 80 ];
734  char cmdnew [ 120 ], pHname [ 80 ], fileroot [ 80 ];
735  struct ants *headant, *tailant;
736  FILE *heatfile, *chsfile, *ptmpfile, *movfile, *pHfile, *micfile, *fileperc, *percfile, *disprobfile, *phasfile, *perc_phases, *CSHfile, *infoperc, *infoUnperc;
737  //fileperc used in burn3d.cpp, percfile in burnset.cpp
738  /* Variables for alkali predictions */
739  double pH_cur, totsodium, totpotassium, rssodium, rspotassium;
740  /* Array for whether pH influences phase solubility -- added 2/12/02 */
741  float *pHeffect;
742  float pHfactor;
743  int pHactive, resatcyc, cshgeom;
744  /* Make conccaplus global to speed up execution and moles_syn_precip */
745  /* global to accumulate properly */
746  double conccaplus, moles_syn_precip, concsulfate;
747  int primevalues [ 6 ];
748  int cshboxsize; /* Box size for addition of extra diffusing C-S-H */
749  //int newmat [SYSIZE][SYSIZE][SYSIZE]; moved to burn_phases and burnset
750 
751  struct percolatedpath {
752  int x, y, z;
755  };
756 
757  struct percolatedpath *last, *current;
758 
759  //disrealnew
761  int ntimes;
762  int cycflag;
763  int phydfreq;
764  double InitTime;
765  double pnucch, pscalech, pnuchg, pscalehg, pnucfh3, pscalefh3;
766  double pnucgyp, pscalegyp;
767  float thtimelo, thtimehi, thtemplo, thtemphi;
768  double mass_cement, mass_cem_now, mass_cur, kpozz, kslag;
769  FILE *adiafile, *thfile, *elasfile;
770 
771  long int LastCycCnt;
772  double Vol_cement_clinker_gypsum, Vol_cement_SCM, Vol_water, Vol_FA, Vol_CA, Vol_inert_filler, Vol_entrained_entrapped_air, Grain_average_FA, Grain_average_CA, ITZ_thickness, ITZ_Young_red, Young_SCM, Poisson_SCM, Young_FA, Poisson_FA, Young_CA, Poisson_CA, Young_inert, Poisson_inert;
773 };
774 } //end of namespace
775 
776 #endif //CEMHYDMAT_H
InternalStateType
Type representing the physical meaning of element or constitutive model internal variable.
virtual int hasInternalSource()
Returns nonzero if receiver generates internal source of state variable(s), zero otherwise.
Definition: cemhydmat.h:103
void free_imatrix(int **m, int nrl, int nrh, int ncl)
Definition: cemhydmat.C:13891
struct oofem::FCOMPLEX fcomplex_cem
double giveTotalVolume(void)
Definition: cemhydmat.h:224
Class and object Domain.
Definition: domain.h:115
std::string XMLfileName
XML input file name for CEMHYD3D.
Definition: cemhydmat.h:142
unsigned int * CSH_vicinity
Definition: cemhydmat.h:672
long int *** micpart
Definition: cemhydmat.h:501
struct percolatedpath * last
Definition: cemhydmat.h:757
double PartHeat
The last incremental heat returned from a GP.
Definition: cemhydmat.h:241
struct cluster ** clust
Definition: cemhydmat.h:532
ValueModeType
Type representing the mode of UnknownType or CharType, or similar types.
Definition: valuemodetype.h:78
int eachGP
Assign a separate microstructure in each integration point.
Definition: cemhydmat.h:140
struct ants * tailant
Definition: cemhydmat.h:735
void free_submatrix(float *b, int nrl)
Definition: cemhydmat.C:13902
Abstract base class for all finite elements.
Definition: element.h:145
double averageTemperature
Average temperature through integration points.
Definition: cemhydmat.h:210
This class implements a transport material status information.
virtual const char * giveClassName() const
Definition: cemhydmat.h:101
Class implementing an array of integers.
Definition: intarray.h:61
MatResponseMode
Describes the character of characteristic material matrix.
struct percolatedpath * prev
Definition: cemhydmat.h:754
int reinforcementDegree
Degree of reinforcement, if defined, reinforcement effect for conductivity and capacity is accounted ...
Definition: cemhydmat.h:138
void free_matrix(float **m, int nrl, int nrh, int ncl)
Definition: cemhydmat.C:13869
long int *** cemreal
Definition: cemhydmat.h:519
FloatArray scaling
Array containing scaling factors for density, conductivity and capacity.
Definition: cemhydmat.h:136
double init_material_time
Inital material time for growing problems.
Definition: cemhydmat.h:214
void free_dvector(double *v, int nl)
Definition: cemhydmat.C:13866
virtual const char * giveInputRecordName() const
Returns input record name of the receiver.
Definition: cemhydmat.h:100
IntArray nowarnings
Array containing warnings supression for density, conductivity, capacity, high temperature.
Definition: cemhydmat.h:134
#define E(p)
Definition: mdm.C:368
CemhydMatStatus * MasterCemhydMatStatus
Pointer to master CemhydMatStatus, which is shared among related integration points (on element...
Definition: cemhydmat.h:148
void free_ivector(int *v, int nl)
Definition: cemhydmat.C:13864
void free_convert_matrix(float **b, int nrl)
Definition: cemhydmat.C:13927
short int *** faces
Definition: cemhydmat.h:671
This class implements an isotropic linear heat material.
Definition: isoheatmat.h:58
Abstract base class representing a material status information.
Definition: matstatus.h:84
Class representing vector of real numbers.
Definition: floatarray.h:82
int Calculate_elastic_homogenization
Flag to proceed percolation filtering and elastic homogenization.
Definition: cemhydmat.h:249
IRResultType
Type defining the return values of InputRecord reading operations.
Definition: irresulttype.h:47
XMLDocument * xmlFile
Definition: cemhydmat.h:465
struct percolatedpath * next
Definition: cemhydmat.h:753
virtual const char * giveClassName() const
Definition: cemhydmat.h:169
Class representing the general Input Record.
Definition: inputrecord.h:101
#define _IFT_CemhydMat_Name
Definition: cemhydmat.h:59
void free_dmatrix(double **m, int nrl, int nrh, int ncl)
Definition: cemhydmat.C:13880
long int *** cement
Definition: cemhydmat.h:517
short int *** cshage
Definition: cemhydmat.h:669
the oofem namespace is to define a context or scope in which all oofem names are defined.
void setAverageTemperatureVolume(double temperature, double volume)
Auxiliary function for temperature averaging over GPs.
Definition: cemhydmat.h:217
double * last_values
Array for storing temporary values (elastic properties etc.)
Definition: cemhydmat.h:247
Class representing integration point in finite element program.
Definition: gausspoint.h:93
void free_vector(float *v, int nl)
Definition: cemhydmat.C:13862
Class representing solution step.
Definition: timestep.h:80
double IPVolume
Volume associated to master IP of one CemhydMat.
Definition: cemhydmat.h:212
int icyc
Cycle of celular automata.
Definition: cemhydmat.h:245

This page is part of the OOFEM documentation. Copyright (c) 2011 Borek Patzak
Project e-mail: info@oofem.org
Generated at Tue Jan 2 2018 20:07:27 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011