Home

WM Program manual Amani Tahat, Ali Khwaldeh

image

Contents

1. DeleteFile folderOut freq_cof out Il DeleteFile folderOut freq_disp out DeleteFile folderOut check out Screen gt Cursor crDefault Application gt ProcessMessages end TFormMain Recalc void fastcall TFormMain CheckBoxDrawGraphClick TObject Sender if flIgnoreChangeEvent return if TabControllVariants gt TabIndex lt 0 return Il 229 InputValues pIV InputValues TabControllVariants gt Tabs gt Objects TabControllVariants gt TabIndex pIV gt iDrawGraph CheckBoxDrawGraph gt Checked if CheckBoxDrawGraph gt Checked if pIV gt pResults InputValuesGetFromForm pIV Recalc pIV 59 SetCaptions pIV gt pResults if pIV gt pResults return j if pFormGraph pFormGraph NewFormGraph new TFormGraph this if pFormGraph pFormGraph gt UpdateGraphData pFormGraph gt BringToFront void fastcall TFormMain FormCloseQuery TObject Sender bool amp CanClose if isModifyVariants return Confirm AnsiString msg Save changes to file V sFileVariants int ret Application gt MessageBox A msg c str NULL MB YESNOCANCELIMB ICONQUESTION MB ICONWARNING if ret IDNO return if ret IDYES VariantSaveToFile sFile Variants c str if ret IDCANCEL Il isModifyVariants 60 CanClose false return const Results GetResults int amp indResults bool pflActive AnsiString p
2. r n Variant t sVariant r n r n pIV gt pResults gt sLogInfo pIV gt pResults gt sLogInfo 3 pIV gt pResults gt pFormViewLog gt RecommendedFileName ChangeFileExt ExpandFileName sFile Variants pIV gt sVariantIdent txt pIV gt pResults gt pFormViewLog gt Show 62 ifdef DEBUG ftendif 63
3. e 0 AnsiString sParamName AnsiString p Trim AnsiString sParamValue AnsiString v Trim if sParamName Variantident pIV new InputValues pIV gt sVariantIdent sParam Value AddTab pIV continue if sParamName VariantComment I pIV gt sVariantComment sParamValue continue hf sParamName n I String asz IN if pIV continue ParamInfo pPI FindParam ParamInfoEdt sParamName if pPD 45 pIV gt SetAsDouble pPI gt sms sParamValue pIV gt ToDialogParamDouble1 pPI continue pPI FindParam ParamInfoChB sParamName if pPD pIV gt SetAsCheckBox pPI gt sms sParamValue continue pPI FindParam ParamInfoCoB sParamName if PPD pIV gt SetAsComboBox pPI gt sms sParam Value continue Unknown Param end for fclose in sFileVariants pFileVariants Caption AnsiString WM sFileVariants Draw On LoadFile variants int isDraw O 46 const int nV TabControllVariants gt Tabs gt Count for int 120 1 nV i I InputValues pIV InputValues TabControllVariants gt Tabs gt Objects 1 if pIV gt iDrawGraph continue if pIV gt pResults Recalc pIV isDraw l int pIV gt pResults end for if isDraw if pFormGraph pFormGraph NewFormGraph new TFormGraph this pFormGraph UpdateGraphData pFormGraph gt BringToFront InputValuesSetToForm pIV e
4. Figure 19 Output the option file stress out menus WM generates six output files with extension out and they are check cofecl freq cof freq disp stresses and displace in order to extract the plotting data following the user needs all these files stored in the default directory samples in the same time Figures legends Figure 1 The GUI of the program Adope Photoshop Figure 2 The simple two dimensional soil structure interaction model Figure 3 the WM main window Figure 4 menu structure of the WM package Figure 5 loading the default input file from the default directory sample Figure 6 The WM main panel windows which defines the input file and completed with default values in addition to the plotting window with its plotting menu Figure 7 Random example of using plotting window Figure 8 main window of the program WM Figure 9 the fields Variant and comment 12 Figure 10 the current Variant menu Figurel 1 presents the two output files Figure 12 Example of plotting the coefficient of reflection for P fast P slow and S waves coef Pf coefPs coefSh from free half space surface when the seepage force is included versus angle of incident waves of the mixture for different values of permeability and for fixed value porosity and frequency eta user can continue adding curves by using the plotting menu Figure 13 the status bar of the window Plotter show current
5. clone or Delete from the CurrentVariant menu as presented in figure 10 Then user can continue deleting until deletes all variants to restart the WM program by inserting the default input file QQ dat for adding new variants Figure 10 the currentVariant menu WM program provides two modes of calculation and they are 1 The default mode Al Rjoub 2007 computing the coefficient of reflection for incident plane p wave and sv wave P fast P slow and S waves coef Pf coefPs coefSh from free half space surface when the seepage force is e Included in the analysis by clicking the mouse on the checkbox iseapage then to click the checkbox recalc amp draw results e Not included in the analysis user needs to repeat the previous steps but to invert the state of a check box user must click the mouse on the checkbox jseapage In both cases WM program will produce the WM plotter window automatically user can close this window in order to view the output file by clicking the button view log The output window provides four services save as copy and paste available on the popup menu that appears on clicking the right key of the mouse Figure 11 presents the two output files Figure 11 presents the two output files WM allows file manipulations Thus it provides viewing and plotting capabilities of the produced data after inserting the variants A B C etc and calculating the desired output
6. file users can generate graphic plots of data extracting from a specific output file Figure 12 presents an example of plotting curves as those of Al Rjoub 2007 to illustrate a chart of normalized wave velocities of the mixture for different values of permeability and for fixed value porosity 0 4 and frequency eta 2HZ WM program can extract data from the stored database output file for plotting output data and displaying the required graphic through the WM plotter window in a matter of seconds User can plot the two graphs one above the other at the same distance scale with different colors to allow distinguishing them furthermore WM can generate several curves in the same graph not only two graphs depending on the conditions of the case study This helps in drawing many plots with arguments that have been set the function of this program to include drawing plots and saving them as a graphic files the user may use the right key of mouse to download the plot in clipboard this allows pasting the plot in any data file moreover the program works in a dialog mode until it is being closed Figure 12 Example of plotting the coefficient of reflection Al Rjoub 2007 for P fast P slow and S waves coef Pf coefPs coefSh from free half space surface when the seepage force is included versus angle of incident waves of the mixture for different values of permeability and for fixed value porosity and frequency eta user can co
7. ret AnsiString msg msg printf Error N d on Create Temp Input File r n s ret fnameInTmp c str MessageBox this msg c_str NULL MB OK return Screen gt Cursor crHourGlass Application gt ProcessMessages try pFunCalculation mode fnameInTmp c_str fnameOut c_str folderOut c_str catch VerifyButtonsEnabled OnBtnViewOutputLogFile delete pIV pResults Results pResults pIV gt pResults new Results 57 pResults gt nPoints ReadGraphData folderOut cofecl out amp pResults gt pX amp pResults gt pC1 amp pResults gt pC2 amp pResults gt pC3 NULL ReadGraphData folderOut displace out NULL amp pResults gt pD1 amp pResults gt pD2 NULL NULL if pIV gt i_eta 1 ReadGraphData folderOut stresses out NULL amp pResults gt pS1 amp pResults gt pS2 amp pResults gt pS3 amp pResults gt pS4 else ReadGraphData folderOut stresses out NULL amp pResults gt pS31 amp pResults gt pS32 amp pResults gt pS33 NULL pResults gt sLogInfo LoadTextFile fnameOut c_str ifdef DEBUG bool flDeleteFiles false flDeleteFiles true else bool flDeleteFiles true endif if flDeleteFiles unlink fnamelnTmp c_str unlink fnameOut c str DeleteFile folderQut cofec1 out 58 DeleteFile folderOut displace out DeleteFile folderOut stresses out
8. 0000000E 00 g212 0 6377414 0 0000000E 00 g22 0 5426397 0 0000000E 00 g411 0 0000000E 00 1 9184327E 04 g412 0 0000000E 00 0 9939941 g42 0 0000000E 00 0 3207974 61 0 1053397 0 0000000E 00 0000E 00 R 0 3000000 rholl 0 8050000 0 0000000E 00 rhol2 0 1050000 0 0000000E 00 rho22 0 1950000 0 0000000E 00 P 5 966666 A 1 300000 Figurel7 Output file contents example file cofeci out gt file displace out file cofeci out gt file displace out gt cabs tau_72 file stresses out gt cabs tau xz cabs tau xx cabs sigma file stresses out gt cabs tau xx cabs sigma cabs tau xz View Tables View Tables Copy bitmap Copy bitmap Save 4s Save As Grid X Grid X v Grid Y v Grid Y 27 Figure 18 How to select the option file stress out menus WM Plotter cabs tau zz cabs tau xz cabs tau xx cabs sigma Copy bitmap Save As 0 751 0 376 u a 39 0 2 73937 WariantB cabsttau_xx 0 871172 variant cabs tau xx 0 504699 Figure 19 Output the option file stress out menus Appendix1 WM Main Form Created by using Borland C Builder 6 28 include vcl h include lt stdio h gt include lt process h gt pragma hdrstop include frmMain h include frmAbout h include frmGraph h include Results h include frmViewLog h pragma package sma
9. Value for nearest Graph from cursor position Figure 14 source data files output when using variantA only Figure 15 the two source data files output when using variantA and variantB Figure 16 the angle of the incident wave versus cabsuux for two variant A and B Figure17 Output file contents example Figure 18 How to select the option file stress out menus Figure 19 Output the option file stress out menus Figures list 13 E E Sera EX Ba Figure 2 The simple two dimensional soil structure interaction model 14 Figure 3 the WM main window 15 Figure 4 menu structure of the WM package Look in 3 Samples ek E3 Recent Desktop My Documents pU My Computer My Network File name P Places Files of type Input files dat Figure 5 loading the default input file from the default directory sample 16 MM C Documents and Settings amani Desktop Samples Q File CurrentVariant Help Input Values Variant VariantB Comment Comment for VariantB Dimensionless Frequency eta i Porosity n 13 Viscosity fi 1e 08 Permeability E iEta 2 IV iSeepage Fluid compressibility kf Density of fluid rhof Poisson s ratio for the solid skeleton anus m Sealed Recalc amp Draw results View lag WM Plot
10. d kf AddParam daParamInfoTmp rhof EdtDensityFluidRhof d GetSMS amp d rhof AddParam daParamInfoTmp anus EdtPoissonRatioAnus d GetSMS amp d anus 42 AddParam daParamInfoTmp viscosity EdtViscosity d GetS MS amp d viscosity AddParam daParamInfoTmp permeabil EdtPermeability d GetSMS amp d permeabil ParamInfoEdt MoveParams daParamInfoTmp AddParam daParamInfoTmp 1 sealed CheckBoxSealed d GetSMS amp d i sealed AddParam daParamInfoTmp i seepage CheckBoxSeepage d GetS MS amp d i_seepage AddParam daParamInfoTmp iDrawGraph CheckBoxDrawGraph d GetSMS amp d iDrawGraph ParamInfoChB MoveParams daParamInfoTmp AddParam daParamInfoTmp i_eta ComboBoxIEta d GetSMS amp d 1 eta ParamInfoCoB MoveParams daParamInfoTmp end TFormMain InitParams void TFormMain VariantsLoadFromFile const char pFileVariants f if TabControllVariants gt Tabs gt Count lt 0 SetModifyVariants false FILE in fopen pFileVariants rt if lin 43 n sFileVariants return InputValues pIV NULL char buf 1000 for 44 char p fgets buf sizeof buf 1 in if p break while p p V p if p continue comment char e p for e e if strchr t e break if e 0 continue char v if fe v e else v strchr e if v continue
11. return NULL void TFormMain ClearFields EdtPorosity gt Text EdtFrequencyEta gt Text EdtFluidCompressibilityKf gt Text 40 EdtDensityFluidRhof gt Text EdtPoissonRatio Anus gt Text EdtViscosity gt Text EdtPermeability gt Text Le p Las M EE typedef DynamicArray lt ParamInfo gt DynamicArrayParamInfo ParamInfo ParamInfoEdt NULL ParamInfo ParamInfoChB NULL ParamInfo ParamInfoCoB NULL void AddParam DynamicArrayParamInfo amp daParamInfo const char pParamName void pParamControl int ParamSms ParamInfo amp pi daParamInfo daParamInfo Length pi pParamName strdup pParamName pi pParamControl pParamControl pi sms ParamSms ParamInfo MoveParams DynamicArrayParamInfo amp daParamInfoTmp const int nP daParamInfoTmp Length ParamInfo pPI new ParamInfo nP 1 41 ParamInfo p pPI for int 120 i lt nP i const ParamInfo amp pi daParamInfoTmpli p p j p gt pParamName NULL p gt pParamControl NULL p gt sms 0 daParamInfoTmp Length 0 return pPI end MoveParams void TFormMain InitParams DynamicArrayParamInfo daParamInfoTmp Input Values d AddParam daParamInfoTmp n EdtPorosity d GetSMS amp d n AddParam daParamInfoTmp eta EdtFreguencyEta d GetSMS amp d eta AddParam daParamInfoTmp kf EdtFluidCompressibilityKf d GetSMS amp
12. values of permeability and for fixed value porosity and frequency eta user can continue adding curves by using the plotting menu 22 WM Plotter 0 x coefast co cabs sigma 1 66 0 829 0 553 0 276 21 6 1 23416 igriantB coefast 1 Variant coefast 0 950566 WariantB coesh 0 638505 WariantB cabs sigma 0 375384 A4 Figure 13 the status bar of the window Plotter show current Value for nearest Graph from cursor position 23 0 0 0 D 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 coefast 1 9998844 9995381 9989617 9981564 9971238 9958667 9943873 9926889 9907752 9886504 9863193 9837867 9810585 9781403 9750389 9717612 9683143 9647064 9609452 9570395 9529982 9488306 9445465 9401559 9356695 9310976 9264515 9217425 9169823 d 8 as LE 0 0 0 D D 0 9000000 900000000 coeslow 703205e 09 781745e 06 512027e 05 894556e 05 000140175 0002186623 0003142533 0004267332 0005558611 0 00070135 0008628928 001040131 001232679 001440117 001661971 001897764 002146968 002409021 002683349 002969306 003266251 0 00357351 003890365 004216079 004549887 004890994 005238587 005591825 005949841 006311757 coesh 0 0 009601105 01919118 02875921 03829423 04778526 05722148 06659204 07588626 08509354 2220000000 5990900000000000
13. 000000 09420338 1032055 1120896 1208457 1294639 1379346 1462482 1543956 1623676 1701555 1777506 1851447 2923297 1992977 2060413 2125532 2188264 2248543 2306304 2361487 WM Plotter 05112233445566778890 74 3 0 426605 Figure 14 source data files output when using variantA only 24 VariantA coes 4 WM Plotter v file cofeci out File displace out File stresses out File stresses out coefast Copy bitmap Save As Grid x Ev PPP Pp PPP Pp pp PPP PP 0 1 2 09436 Varianta coefast 0 999987 WariantB coesh 0 999986 WariantB coefast 0 0069812 VariantA coesh 0 00105507 Table VariantA Comment for VariantA iml b Table VariantB Comment for VariantB oH coefast coeslow coesh I coefast 1 3 703205e 09 0 coeslow 0 0 0 0 005 0 0003176453 3 15611e 05 1 0 9998844 8 781745e 06 0 009601105 2 0 9995381 3 512027e 05 0 01919118 0 01 0 0006352906 6 312219e 05 0 9999999 3 0 9989617 7 894556e 05 0 02875921 0 015 0 000952936 9 46833e 05 0 9999997 4 0 9981564 0 000140175 0 03829423 0 02 0 001270581 0 0001262444 0 9999995 5 0 9971238 0 0002186623 0 04778526 E 0 025 0 001588227 0 0001578055 D 9999933 6 0 9958667 0 0003142533 0 05722148 0 03 0 001905872 0 0001893666 0 999999 7 0 9943873 0 0004267332 0 06659204 0 035 0 002223517 0 0002209276 0 9999986 8 0 9926889 0 0005558611 0 07588626 0 04 0 002541162 0 0002524887 0 9999981 3 0 9907
14. 00E 00 potsh 0 5384616 0 0000000E 00 akSh 0 8651367 0 0000000E 00 akPf 0 3207974 0 0000000E 00 akPs 1 044478 0 0000000E 00 Figurell presents the two output files 21 Log VariantA with seepage kf 1 000000 rhof 0 3000000 E anus 0 3500000 viscosity 1 1000000E 08 permeabil 1 000000 i_sealed 0 i seepage 1 i eta 4 4 Output values freq 33 85016 g111 0 4859182 4 2487590E 17 g112 1 288688 1 06461 gi2 0 5154967 1 0516044 g211 1 2308563E 04 1 Ctrl Ins g212 0 6377414 2 4092 ste Shift Ins g22 0 5426397 2 55355 g411 1 0287862E 21 1 9 g412 3 7497390E 15 0 9 g42 1 7203146E 18 0 3207974 0 1053397 1 9312718E 1 0 7000000 0 3000000 rholi 0 8050000 1 3958577E 15 rhol2 0 1050000 1 3958577E 15 rho22 0 1950000 1 3958577E 15 P 5 966666 A 1 300000 IX WM Plotter v file cofeci out v coefast File displace out wv coeslow File stresses out v coesh File stresses out View Tables Copy bitmap Save As Grid X v Grid Y 45 50 55 4 4 0 89272 WariantA coefast 0 997777 MariantA coesh 0 0417814 Variant coeslow 0000169013 Z Figure 12 Example of plotting the coefficient of reflection for P fast P slow and S waves coef Pf coefPs coefSh from free half space surface when the seepage force is included versus angle of incident waves of the mixture for different
15. 2 then the solution of the problem was expressed entirely in terms of dimensionless parameters in order to control the system response Al Rjoub 2007 The user of the WM program must be familiar with the theoretical background of the Fortran program SSI POROUS of Todorovska and Al Rjoub 2006 a b that will simplify inserting the specified input data depending on the studying case conditions in order to generate the expected reflection coefficient Al Rjoub 2007 WM program provides a very simple way for managing that User has to start with filling his variants A B C D etc files and give it a comment following his studying case WM used these variants instead of using input files in order to allow understanding the whole matter in one work station user can save all variants in one input file where the default input file includes two variants A and B Figure 9 presents the location of the variants comment filed in the main window the user comment will be appeared in the output file Figure 9 the fields Variant and comment User has several input parameters that need to be specified Sometimes the case study is due to fixing some parameters so that user can generate so many curves each one differs from the other by changing one parameter at each time For this purpose user can delete or clone more variants depending on the preconditions of the specified case study This can be done by pointing the option
16. 752 0 00070135 0 08509354 0 04499999 0 002858807 0 0002840497 1 99999 77 10 0 9886504 0 0008628928 0 09420338 0 04999999 0 003176451 0 0003156108 0 9999971 11 0 9863193 0 001040131 0 1032055 0 05499999 0 003494096 0 0003471719 0 9999965 12 0 9837867 0 001232679 0 1120896 0 05999999 0 003811741 0 0003787329 0 9999959 13 0 9810585 0 001440117 0 1208457 0 06499999 0 004129386 0 000410294 0 9999952 14 0 9781403 0 001661971 0 1294639 0 06999999 0 004447031 0 000441855 0 9999945 15 0 9750389 0 001897764 0 1379346 0 075 0 004764676 0 0004734161 0 9999936 18 09717612 0002146968 1462462 0 08 0 00508232 0000504977 0 999992 Figure 15 the two source data files output when using variantA and variantB 25 26 WM Plotter File cofec1 out v file displace out File stresses out File stresses out v cabs uux cabs uuz View Tables Copy bitmap Save As Grid X v Grid Y 0 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 68 4 1 47062 VariantA cabs uux 0 705969 Variante cabs uux 0 356254 A Figure 16 the angle of the incident wave versus cabsuux for two variant A and B Log VariantA Comment for VariantA kf 1 000000 rhof 0 3000000 anus 0 3500000 viscosity 1 1000000E 08 permeabil 1 000000 i_sealed 1 i seepage D i eta 1 Output values freq 33 85016 giii 0 4859182 0 0000000E 00 gii2 1 288688 0 0000000E 00 gi2 0 5154967 0 0000000E 00 g211 1 2308563E 04 0
17. V gt iDrawGraph 0 if pFormGraph pFormGraph gt Invalidate 54 SetCaptions pIV gt pResults typedef int tdCalculation int mode char fnameInTmp char fnameOut char folderOut tdCalculation pFunCalculation NULL void GetProcAddresses static HMODULE hModuleDII NULL if hModuleDll return AnsiString sDIIFullName ExtractFileDir _argv 0 NWM dll hModuleDII LoadLibrary sDlIFullName c str pFunCalculation tdCalculation GetProcAddress hModuleDII Calculation AnsiString LoadTextFile const char pFileName FILE in fopen pFileName if lin return Error AnsiString s char buf 1000 for char p fgets buf sizeof buf 1 in if p break 55 s AnsiString p TrimRight Wn fclose in return 5 void TFormMain Recalc InputValues pIV static int nv 1 if nv nv 0 GetProcAddresses if pFunCalculation I Application gt MessageBoxA Couldn t load DLL NULL MB OK return if pFunCalculation return AnsiString sInputFileName sFileVariants if sInputFileName IsEmpty sInputFileName _argv 0 sInputFileName ExpandFileName sInputFileName AnsiString fnameOut ChangeFileExt sInputFileName Log txt AnsiString folderOut ExtractFileDir fnameOut 56 AnsiString fnameInTmp int mode 2 int ret pIV 2CreateTemplInputFile sInputFileName c str mode fnameInTmp if
18. WM Program manual lAmani Tahat Ali Khwaldeh Mohammad Tahat Department of Physics and Nuclear Engineering Technical University of Catalonia Barcelona Spain Department Of Computer Engineering Faculty of engineering Philadelphia University Amman Jordan Department of Civil Engineering New Mexico State University United State of America This user manual has been written to describe the open source code WM to be distributed associated with a research article submitted to the information technology journal 44124 ITJ ANSLentiteled Maintenance and Reengineering of software Creating a Visual C Graphical User Interface to Perform Specific Tasks Related to Soil Structure Interaction in Poroelastic Soil This manual describes how to run the new produced GUI C program that so called WM program Section two describes the instructions of the program installation Section three illustrates test runs description including running the program WM sample of the input output files in addition to some generated graphs followed by the main form of the program created by using the Borland C Builder 6 1 Instructions OF Installation This program is an open source code and available on request from authors Appendixl presents the main form of the program created by using the Borland C Builder 6 At least 25 MB of free disk space is required for installing WM on user s computer PC The user needs to execute SetupWM file Setup wi
19. cluded in the same output file That will be generated in this step all when clicking the isealed checkbox or not For more clarifications this can be done by clicking the mouse on the checkbox isealed for the case sealed boundary then to click the checkbox recalc amp draw results User needs to repeat the previous steps to invert the state of a check box for the case unsealed boundary so user must click the mouse on the checkbox isealed In the two cases WM program will produce the WM plotter window automatically user can close this window in order to view the output file by pressing the button view log In this case user can continue using the Wmplotter window for computing e The reflection coefficients for incident unit displacement plane p wave and sealed boundary and e The reflection coefficient for incident unit displacement plane SV wave and sealed boundary Herein user has to select the option file displace out from the plotting menu then the option cabs uux to generate number of curves depending on the number of the input variants A B C etc See figure 16 Figure 16 the angle of the incident wave versus cabsuux for two variant A and B User can view the output file by using the option view tables in the same way that has been discussed in the previous section On the other hand in order to compute the following 10 e The reflection coefficients for incident unit displacement
20. iSeald presents the fortran code of Todorovska and Al Rjoub 2006a b and iSeepage presents the new development of this code based on Al Rjoub 2007 Each checkbox has a caption help for describing the meaning of the check box Inverting the state of a check box is done by clicking the mouse on the box Switching to the mode of calculations can be done by using the two checkboxes iseapage and iseal easily In the meantime the output results can be drawn by pointing checkbox draw result Furthermore user can easily view the output file by clicking the button view log A new checkbox will be appeared when adding a new variant namely called recalc amp draw results One of the main purposes of the fortran code SSI POROUS of Todorovska and Al Rjoub 2006 b calculations was to generate data in order to draw graphs for several cases depending mainly on changing the frequency values if the apparent building foundation soil system frequency changes due to water saturation the analysis begins with understanding how the wave velocities depend on frequency eta and on the soil permeability for fixed value of viscosity of the fluid which will help in interpreting the results for the foundation stiffness and damping of Al Rjoub 2007 Moreover the FORTRAN computer program was written in terms of dimensionless parameters defined using as reference length a material modulus us and mass density Pu as explained in section 1
21. ilel Click TObject Sender bool enSave isModifyVariants amp amp sFileVariants IsEmpty amp amp TabControllVariants gt Tabs gt Count gt 0 mmSave gt Enabled enSave bool enSaveAs TabControll Variants gt Tabs gt Count gt 0 mmSaveAs gt Enabled enSaveAs void fastcall TFormMain mmSaveClick TObject Sender VariantSaveToFile sFile Variants c str j void fastcall TFormMain mmSaveAsClick TObject Sender I SaveDialogInputVasues gt Filter Input files dat I datlAll files I 1 if SaveDialogInputVasues gt Execute return VariantSaveToFile SaveDialogInputVasues gt FileName c str 53 void fastcall TFormMain EdtV ariantIdentChange TObject Sender if TabControllVariants gt TabIndex lt 0 return TabControllVariants gt Tabs gt Strings TabControllVariants gt TabIndex EdtVariantIdent gt Text if fllgnoreChangeEvent SetModifyVariants true j void fastcall TFormMain EdtVariantCommentChange TObject Sender if IfllgnoreChangeEvent SetModifyV ariants true void fastcall TFormMain OnChangelInputValues TObject Sender I if fllgnoreChangeEvent return if TabControllVariants gt Tablndex lt 0 return SetModifyVariants true InputValues pIV InputValues TabControllVariants gt Tabs gt Objects TabControllVariants gt TabIndex if pIV gt pResults delete pIV gt pResults pIV gt pResults NULL if pIV gt iDrawGraph pI
22. int sms const AnsiString amp s int p int char this sms sscanf s c_str d p void SetAsComboBox int sms const AnsiString amp s int p int char this sms sscanf s c_str d p void ToDialogParamDouble const ParamInfo piEdt const void ToDialogParamDoubleAll const ParamInfo piEdt const 32 void ToDialogParamCheckBox const ParamInfo piChB const void ToDialogParamCheckBoxAll const ParamInfo piChB const void ToDialogParamComboBox const ParamInfo piCoB const void ToDialogParamComboBoxAll const ParamInfo piCoB const void FromDialogParamDouble const ParamInfo piEdt void FromDialogParamDoubleAll const ParamInfo piEdt void FromDialogParamCheckBox const ParamInfo piChB void FromDialogParamCheckBoxAll const ParamInfo piChB void FromDialogParamComboBox const ParamInfo piCoB void FromDialogParamComboBoxAll const ParamInfo piCoB void SaveVariant FILE out const int CreateTempInputFile const char fnameln int mode AnsiString amp fnameInTmp const Results pResults end class InputValues n 20 3 eta kf 33 rhof 0 3 anus 0 3 viscosity le 8 Heels permeabil 1 i_sealed 0 1 seepage 1 i_eta 0 iDrawGraph 0 pResults NULL end InputValues InputValues void InputValues SaveVariant FILE out const I fprintf out n 5 fprintf out nVa
23. inting the option view tables from the popup menu enabled viewing the output file The options of the plotting menu are based on the mode of calculation that will be discussed in the next section Figure 7 presents a random example of such plotting User can continue viewing the default output by using the tabs varianA and variantB view log button draw results and recalc in addition to draw results checkboxes Figure 7 Random example of using plotting window 3 12 WM main window Figure 8 presents the main window of the program it consists of six Input fields and three checkboxes besides the buttons view log and variantA variantB variantC ets Figure 8 main window of the program WM The input parameters are eta n kf rhof anus plus iEta that has two values 1 and 2 Brief descriptions about the input parameters is available in table 2 Moreover the input parameters e g ieta eta n rhof anus detailed descriptions can be found in section 2 3 2 of reference AI Rjoub 2007 Table 2 description of the input parameters The main window presents three checkboxes iSealed iSeepage in addition to Recalc amp Draw results thus permits making multiple selections from a number of options Normally white space for false or a tick mark for true as illustrated in figure 8 It is clear now how the new produced GUI has linked the separated Fortran programes to be work in one station
24. ll create the program s shortcut in the start menu folder The selection of different folder could be done by clicking browse then specifying the preferred folder One or two additional tasks could be selected to perform setup while installing WM setup offers two additional tasks 1 create a desktop icon and 2 create a quick lunch icon After setup has been finished installing WM on user computer PC the application may be launched by selecting the installed icon launch WM But if user select the icon create a desktop icon then starting up the program is performed through traditional windows by clicking on an assigned icon on the desktop The program works in a dialog mode through all steps By choosing an item from the menu the program opens several available programs in the package Multi windows are preserved through the execution of the program No compilers or programming language are needed to be installed in PC 3 Test Runs Description 3 1 Running the Program WM WM is the main program in this package and it is being used for the organization of all other programs of this package The start up of the program is performed using standard windows possibilities for example to start using the WM program user needs to double click on the icon WM after installing it and then the WM main window will be appeared as shown in figure 3 Figure 3 the WM main window The main window of the program will be opened as soon as WM
25. mDialogParamComboBox All ParamInfoCoB end TFormMain InputValuesGetFromForm void TFormMain AddTab InputValues pIV TabControllVariants gt Tabs gt Add pIV gt sVariantIdent int Tablndex TabControllVariants gt Tabs gt Count 1 TabControllVariants gt Tabs gt Objects TabIndex TObject pIV SetTabIndex TabIndex 49 void TFormMain SetTabIndex int TabIndex TabControllV ariants gt Visible TabControllVariants gt Tabs gt Count gt 0 if TabIndex gt 0 TabControll Variants gt TabIndex TabIndex const Input Values pIV const InputValues TabControll Variants gt Tabs gt Objects TabIndex InputValuesSetToForm pIV else TabControll Variants gt TabIndex 1 ClearFields void fastcall TFormMain TabControllVariantsChanging TObject Sender bool amp AllowChange if TabControllVariants gt Tablndex lt 0 return InputValues pIV InputValues TabControllVariants gt Tabs gt Objects TabControllVariants gt TabIndex InputValuesGetFromForm pIV flIgnoreChangeEvent true j 50 void fastcall TFormMain TabControllV ariantsChange TObject Sender I SetTabIndex TabControll Variants gt TabIndex flIgnoreChangeEvent false if pFormGraph pFormGraph gt Invalidate if CheckBoxDrawGraph gt Checked pFormGraph gt Show this gt BringToFront void fastcall TFormMain mmCurrent VariantClick TObject Sender I bool en TabControll Varia
26. nd TFormMain VariantsLoadFromFile void TFormMain VariantSaveToFile const char pFileVariants intnV TabControllVariants gt Tabs gt Count if nV lt 0 return AnsiString sFileBAK ChangeFileExt AnsiString pFileVariants bak unlink sFileBAK c str rename pFileVariants sFileBAK c str 47 FILE out fopen pFile Variants wt if lout return for int 120 i lt nV i const InputValues pIV const InputValues TabControllVariants gt Tabs Objects i pIV gt SaveVariant out end for fclose out SetModifyVariants false sFileVariants pFileVariants end TFormMain VariantSaveToFile void TFormMain InputValuesSetToForm const InputValues pIV if IpIV 11777 ClearFields return j flIgnoreChangeEvent true EdtVariantIdent gt Text pIV gt sVariantIdent EdtVariantComment gt Text pIV gt sVariantComment 48 pIV gt ToDialogParamDoubleAll ParamInfoEdt pIV gt ToDialogParamCheckBoxAll ParamInfoChB pIV gt ToDialogParamComboBox ParaminfoCoB SetCaptions pIV gt pResults flIgnoreChangeEvent false end TFormMain InputValuesSetToForm void TFormMain InputValuesGetFromForm InputValues pIV if pIV return pIV gt sVariantldent EdtVariantldent gt Text pIV gt sVariantComment EdtVariantComment gt Text pIV gt FromDialogParamDoubleAll ParamInfoEdt pIV gt FromDialogParamCheckBox All ParamInfoChB pIV gt Fro
27. ndex 1 void Input V alues ToDialogParamComboBoxAll const ParamInfo piCoB const for piCoB pParamName piCoB ToDialogParamComboBox piCoB void InputValues FromDialogParamDouble const ParamInfo piEdt 38 TEdit pEdt TEdit piEdt gt pParamControl AnsiString s pEdt gt Text double p double char this piEdt gt sms sscanf s c_str lg p void InputValues FromDialogParamDoubleAll const ParamInfo piEdt for piEdt gt pParamName piEdt FromDialogParamDouble piEdt void InputValues FromDialogParamCheckBox const ParamInfo piChB TCheckBox pCheckBox TCheckBox piChB gt pParamControl int p int char this piChB gt sms p 2 pCheckBox Checked j void Input V alues FromDialogParamCheckBoxAll const ParamInfo piChB I for piChB gt pParamName pi ChB FromDialogParamCheckBox piChB void InputValues FromDialogParamComboBox const ParamInfo piCoB I 39 TComboBox pComboBox TComboBox piCoB gt pParamControl int p int char this piCoB gt sms if pComboBox gt ItemIndex gt 0 p StrTolnt pComboBox gt Text void Input V alues FromDialogParamComboBoxAll const ParamInfo piCoB for piCoB gt pParamName piCoB FromDialogParamComboBox piCoB ParamInfo FindParam ParamInfo PI const AnsiString amp sParamName for PI gt pParamName PI if sParamName PI gt pParamName return PI
28. ntinue adding curves by using the plotting menu The status bar of the WMplotter window presents the values of variants A B C etc that are located in the y axes and the values of the x axes e g the angle of incident wave The values of X Y can be read by moving the curser on the specified curve see figure 13 Figure 13 the status bar of the window Plotter show current Value for nearest Graph from cursor position By selecting the option view tables from the plotting menu WM will generate the source file of the currently plotting data for example if user choose to plot coefast coefslow and coesh versus the angle of incident wave I degree the option view tables will generate the output file that appears in figure 14 following the specified variants if user used 2 variants A and B then selecting the option view tables will generate two different output files see figure 15 Figure 14 source data files output when using variantA only Figure 15 the two source data files output when using variantA and variantB 2 Second mode of calculations involve computing the coefficient of waves reflected from a homogeneous poroelastic halfspace for incident plane p fast wave and sealed as well as unsealed boundaries Besides the computing of the coefficient of waves reflected from a homogeneous poroelastic halfspace for incident plane SV wave and sealed as well as unsealed boundary to be in
29. nts gt TabIndex gt 0 mmCurrentVariantDelete gt Enabled en mmCurrentVariantClone gt Enabled en j void fastcall TFormMain mmCurrent VariantCloneClick TObject Sender I if TabControll Variants gt TabIndex lt 0 return const Input Values pIVSrc const Input Values TabControll Variants gt Tabs gt Objects TabControll Variants gt TabIndex Input Values pIV Dest new InputValues pIVDest pIVSrc pIVDest gt pResults NULL pIVDest gt sVariantIdent Clone 51 AddTab pIVDest SetModifyVariants true j void fastcall TFormMain mmCurrentVariantDeleteClick TObject Sender TabControll Variants gt Tabs gt Clear int TabIndex TabControll Variants gt TabIndex if TabIndex 0 return InputValues pIV InputValues TabControll Variants gt Tabs gt Objects TabIndex TabControllV ariants gt Tabs gt Delete TabIndex delete pIV if TabIndex gt TabControll Variants gt Tabs gt Count TabIndex TabControll Variants gt Tabs gt Count 1 SetTabIndex TabIndex SetModify Variants true void __fastcall TFormMain mmLoadClick TObject Sender OpenDialogInputVasues gt Filter Input files dat I datlAll files I 1 if OpenDialogInputVasues gt Execute return VariantsLoadFromFile OpenDialogInputV asues gt FileName c_str 52 void fastcall TFormMain mmExitClick TObject Sender I Close j void fastcall TFormMain F
30. plane p wave and unsealed boundary e The reflection coefficients for incident unit displacement plane SV wave and unsealed boundary User has to select the option cabs uuz from the plotting window appeared in figure 16 When checking the output file it could be found that it consists of all expected values that has been discussed above the reflection coefficients appears in series way A B C etc depending on the number of the input variants A B C etc for example from figure 17 the C INC S 1 1555887 0 0000000E 0 means that the reflection coefficient for incident unit displacement plane SV wave sealed boundary equals to 1 1555887 and so on for all output values Figurel7 Output file contents example Finally the plotting menu provides two additional options under the title file stresses out with different submenus this part is to check the functions for u r u th tau tt in polar coordinates for integral of stresses along the contact surface all details are included in reference Todorovska and Al Rjoub 2006 in addition to Al Rjoub 2007 study See figure 18 and 19 User can control this from the input parameter iEta that has two values 1 and 2 e Fori eta I user receives the output cabs tau zz cabs tau xz cabs tau xx cabs sigma e Fori eta 2 user receives the output cabs tau xx cabs sigma cabs tau xz 11 Figure 18 How to select the option file stress out menus
31. ple of using plotting window 18 WM Plotter 0 5 101220253035 file displace out file stresses out gt View Tables Copy bitmap Save As Grid x v Grid Y coefast 0 5 1015202530354045505530657075808590 40 1 0 282609 v coefast coeslow file stresses out v coesh VariantA coesh 0 278677 4 Comment for VariantB CS iS page Figure 9 the fields Variant and comment 19 WM C Documents and Settings lamani Desktop Samples Q E urrentvariant SE Comn Comment for VariantB WM C Documents and Settings amani WDesktop Samples 0 E x Figure 10 the currentVariant menu 20 Log VariantA Comment for VariantA Output values freq 33 85016 glii 0 4859182 0 0000000E 00 g112 1 288688 0 0000000E 00 g12 0 5154967 0 0000000E 00 g211 1 2308563E 04 0 0000000E 00 g212 0 6377414 0 0000000E 00 g22 0 5426397 0 0000000E 00 g411 0 0000000E 00 1 9184327E 04 g412 0 0000000E 00 0 9939941 g42 0 0000000E 00 0 3207974 g 11 0 1053397 0 0000000E 00 1 0 7000000 0 3000000 rholl 0 8050000 0 0000000E 00 rhoi2 0 1050000 0 0000000E 00 rho22 0 1950000 0 0000000E 00 P 5 966666 1 300000 B 1 552000 0 0000000E 00 C 0 1459500 0 0000000E 00 potPfast 1 078665 0 0000000E 00 potPslow 6 566760 0 00000
32. program being executed This main window contains menu items at the top of the window the menu items include Load CurrentVariant and help figure 4 presents menu structure of the WM program Figure 4 menu structure of the WM package For running the WM program user needs to point the option load from the file menu then a window pops up showing the default input files directory that consists of one folder called samples which includes the default input file QQ dat The way of loading the input file is presented in figure 5 Figure 5 loading the default input file from the default directory sample After loading the input file WM will produce two windows like those illustrated in Figure 6 this section provides a full description of these two windows with random screenshot to explain the way of running WM Figure 6 The WM main panel windows which defines the input file and completed with default values in addition to the plotting window with its plotting menu 3 1 1 WM Plotter Window User can switch to use the WM main window by closing the WM plotter window as shown in figure 6 Then the massage please press right button mouse will be appeared in the plotter window panel On a mouse right click the plotting output menu will be appeared pointing any option will produce a specific graph based on the stored calculations that depends on the default input file QQ dat which consists of two randomly variants A Po
33. riantIdent s sVariantIdent c str fprintf out In VariantComment s sVariantComment c str fprintf out neta lg eta fprintf out nkf lg kf fprintf out Inrhof lg rhof 34 fprintf out nanus lg anus fprintf out nn 1g n fprintf out nviscosity lg Viscosity fprintf out npermeabil lg permeabil Il fprintf out nj lg DE fprintf out mi sealed d i sealed fprintf out mi seepage d 1 seepage fprintf out ni_eta d i eta fprintf out n fprintf out miDrawGraph d iDrawGraph fprintf out n end InputValues SaveVariant int InputValues CreateTempInputFile const char fnameln int mode AnsiString amp fnameInTmp const if mode lt 1 mode gt 2 return 1 const char modeName NULL SEE REF txt REF COF txt fnameInTmp ChangeFileExt fnameIn modeName mode 35 FILE out fopen fnameInTmp c str wt if lout return 2 if mode 1 j else fprintf out 761g lg lg lg n n kf rhof anus fprintf out 961g viscosity fprintf out lg n J fprintf out 76d 96d d n i sealed i seepage i eta fprintf out n fprintf out n n kf rhof anus fprintf out n viscosity j fprintf out In i sealed i seepage i eta if mode 2 fprintf out lg lg lg lg lg n n eta kf rhof anus fprintf out lg lg n visco
34. rt_init pragma resource dfm TFormMain FormMain TFormGraph TFormMain NewFormGraph I if pFormGraph return pFormGraph pFormGraph new TFormGraph this pFormGraph sFileVariantsFullName ExpandFileName sFileV ariants return pFormGraph j bool flIgnoreChangeEvent false 29 __fastcall TFormMain TFormMain TComponent Owner TForm Owner pFormGraph NULL j void fastcall TFormMain FormCreate TObject Sender SetModifyVariants false OpenDialogInputVasues gt InitialDir ExtractFileDir argv 0 InitParams ifdef DEBUG const char pFile Variants Samples QQ dat VariantsLoadFromFile pFile Variants endif void fastcall TFormMain mmHelpClick TObject Sender TFormAbout frm new TFormAbout this frm gt ShowModal delete frm 30 struct ParamInfo const char pParamName void pParamControl int sms class InputValues public InputValues InputValues delete pResults AnsiString sVariantIdent AnsiString sVariantComment double n double eta double kf double rhof double anus 31 double viscosity double j double permeabil int i sealed i seepage i eta int iDrawGraph int GetSMS void pMember const return char pMember char this void SetAsDouble int sms const AnsiString amp s double p double char this sms sscanf s c_str lg p void SetAsCheckBox
35. sVariantIdent AnsiString psVariantComment int nV FormMain gt TabControllVariants gt Tabs gt Count for int i indResults i lt nV i const InputValues pIV const InputValues FormMain gt TabControll Variants gt Tabs gt Objects 1 if pIV gt iDrawGraph II pIV gt pResults continue indResults 1 if pflActive pflActive i FormMain gt TabControll Variants gt TabIndex if ps VariantIdent psVariantIdent pIV gt sVariantIdent 1f ps VariantComment psVariantComment pIV gt sVariantComment return pIV pResults j return NULL j void fastcall TFormMain BtnViewLogFileClick TObject Sender if TabControllVariants gt Tablndex lt 0 return If const InputValues pIV const InputValues TabControllVariants gt Tabs gt Objects TabControllVariants gt TabIndex if pIV gt pResults BtnViewLogFile gt Enabled false return if pIV gt pResults gt pFormViewLog if pIV gt pResults gt pFormViewLog gt WindowState wsMinimized pIV gt pResults gt pForm ViewLog gt WindowState wsNormal else pIV gt pResults gt pFormViewLog gt Show else pIV gt pResults gt pFormViewLog new TFormViewLog this AnsiString sVariant pIV gt sVariantIdent pIV gt sVariantComment pIV gt pResults gt pFormViewLog gt Caption Log sVariant pIV gt pResults gt pFormViewLog gt Memo1 gt Text File t ExpandFileName sFile Variants
36. sity permeabil fprintf out 26d 96d d n i sealed i seepage i eta fprintf out n fprintf out n n eta kf rhof anus fprintf out n viscosity permeabil fprintf out n i sealed i seepage i eta fclose out 36 return O end InputValues CreateTemplnputFile void InputValues ToDialogParamDouble const ParamInfo piEdt const double p double char this piEdt gt sms AnsiString s s printf lg p TEdit pEdt TEdit piEdt gt pParamControl pEdt gt Text s j void InputValues ToDialogParamDoubleAll const ParamInfo piEdt const for piEdt gt pParamName piEdt ToDialogParamDouble piEdt void InputValues ToDialogParamCheckBox const ParamInfo piChB const int p int char this piChB gt sms TCheckBox pCheckBox TCheckBox piChB gt pParamControl pCheckBox gt Checked p void InputValues ToDialogParamCheckBoxAll const ParamInfo piChB const for piChB gt pParamName piChB ToDialogParamCheckBox piChB 37 void InputValues ToDialogParamComboBox const ParamInfo piCoB const int p int char this piCoB gt sms AnsiString sp IntToStr p TComboBox pComboBox TComboBox piCoB gt pParamControl for int i20 i lt pComboBox gt Items gt Count i I String ss pComboBox gt Items gt Strings i if ss sp pComboBox gt ItemIndex 1 return pComboBox gt ItemI
37. ter AHR Variant amp VariantB File cofeci out file displace out file stresses out file stresses out Please press right button mouse o AR CARE Pe Copy bitmap Save A Grid x v Grid Y Figure 6 The WM main panel windows which defines the input file and completed with default values in addition to the plotting window with its plotting menu 17 WM C Documents and Settings amani Desktop Samples Q E3 File CurrentVariant Help Input Values Variant Variant Comment Comment for Variant Dimensionless Frequency eta fi Porosity inj o3 Fluid compressibility kf fi Viscosity fi Je 08 Density of fluid rhof 03 Permeability fi Poisson s ratio for the pa Tta solid skeleton anus 035 Eta 1 I iSealed iSeepage IV Draw results C NDocuments and Settings amani Desktop Samples QQ dat Variant use REF COF for Input values n 0 3000000 eta 1 000000 kf 1 000000 rhof 0 3000000 anus 0 3500000 viscosity 1 1000000E 08 permeabil 1 000000 i_sealed 0 1 seepage 0 i eta Output values freg 33 85016 gili 0 4859182 0 0000000E 00 gll2 1 288688 0 0000000E 00 gi2 0 5154967 0 0000000E 00 g211 1 2308563E 04 0 0000000E 00 g212 0 6377414 0 0000000E 00 g22 0 5426397 0 0000000E 00 Variant Comment for Variantai Figure 7 Random exam

Download Pdf Manuals

image

Related Search

Related Contents

2026 - Austromex  3B SCIENTIFIC PHYSICS  installation, operation & maintenance manual  Ride Indexer 2010 v1.0  木製キッズハウス ベース 取扱説明書 2-1      Autodesk AutoSketch 10, Commercial Full, EN  ex1200-3164 plug-in module  annexe scientifique 2006.indd - Muséum national d`Histoire naturelle  

Copyright © All rights reserved.
Failed to retrieve file