QCv1.4

所属分类:Linux/Unix编程
开发工具:Fortran
文件大小:2636KB
下载次数:4
上传日期:2019-08-03 22:22:37
上 传 者lololocad
说明:  准连续介质力学方法源程序,现在版本是1.4,属于二维方法
(SOURCE PROGRAM FOR METHODS OF MECHANICS OF QUASI-CONTINUOUS MEDIUM)

文件列表:
QCv1.4\Code\fortran.d (3002, 2011-12-01)
QCv1.4\Code\Makefile (1097, 2007-05-17)
QCv1.4\Code\Makefile_common (5171, 2007-05-19)
QCv1.4\Code\mod_adaption.f (52042, 2011-12-01)
QCv1.4\Code\mod_bandwidth.f (43062, 2011-11-30)
QCv1.4\Code\mod_boundary.f (9288, 2011-12-01)
QCv1.4\Code\mod_check.f (23454, 2011-12-01)
QCv1.4\Code\mod_cluster.f (12920, 2011-11-30)
QCv1.4\Code\mod_crystal.f (11077, 2011-11-30)
QCv1.4\Code\mod_element.f (30589, 2011-12-01)
QCv1.4\Code\mod_file.f (7328, 2011-11-30)
QCv1.4\Code\mod_ghost.f (4299, 2011-11-30)
QCv1.4\Code\mod_global.f (17534, 2011-11-30)
QCv1.4\Code\mod_grain.f (57599, 2011-12-01)
QCv1.4\Code\mod_head.f (20758, 2011-12-01)
QCv1.4\Code\mod_macros.f (74270, 2011-12-01)
QCv1.4\Code\mod_material.f (9431, 2011-11-30)
QCv1.4\Code\mod_mesh.f (108208, 2011-11-30)
QCv1.4\Code\mod_nonstandard.f (3492, 2011-11-30)
QCv1.4\Code\mod_nonstandard_ibmxlf.f (3501, 2011-11-30)
QCv1.4\Code\mod_nonstandard_nag.f (3557, 2011-11-30)
QCv1.4\Code\mod_nonstandard_sgiMIPSpro7.4.f (3744, 2011-11-30)
QCv1.4\Code\mod_output.f (7347, 2011-11-30)
QCv1.4\Code\mod_pload.f (18655, 2011-11-30)
QCv1.4\Code\mod_plotting.f (42639, 2011-12-01)
QCv1.4\Code\mod_poten_eam.f (52661, 2011-11-30)
QCv1.4\Code\mod_poten_ercal.f (48725, 2011-12-01)
QCv1.4\Code\mod_poten_Fe.f (24068, 2011-12-01)
QCv1.4\Code\mod_poten_morimo.f (47797, 2011-12-01)
QCv1.4\Code\mod_poten_tangmo.f (38224, 2011-12-01)
QCv1.4\Code\mod_qclib.f (36873, 2011-12-01)
QCv1.4\Code\mod_repatom.f (59690, 2011-12-01)
QCv1.4\Code\mod_restart.f (20947, 2011-12-01)
QCv1.4\Code\mod_savemesh.f (25017, 2011-12-01)
QCv1.4\Code\mod_solve.f (43340, 2011-12-01)
QCv1.4\Code\mod_stiff.f (3131, 2011-11-30)
QCv1.4\Code\mod_types.f (10895, 2011-11-30)
QCv1.4\Code\OldMakes\make.absoft (5789, 2011-12-06)
QCv1.4\Code\OldMakes\make.g95 (5779, 2011-12-06)
QCv1.4\Code\OldMakes\make.ibmxlf (5877, 2011-12-06)
... ...

!------------------------------------------------------------------------------- ! ! Quasicontinuum (QC) Method: Mixed Continuum and Atomistic Simulation Package ! QC Package distribution version 1.4 (November 2011) ! ! Copyright (C) 2003 R. Miller, M. Ortiz, R. Phillips, D. Rodney, E. B. Tadmor ! Copyright (C) 2004, 2005, 2006, 2007, 2011 R. Miller, E. B. Tadmor !------------------------------------------------------------------------------- This directory contains the main directories comprising the distribution package for the Quasicontinuum Method. Five directories are included: Code..............Subroutines for the QC code. Docs..............Documentation files: qcrefmanual_v1.4.pdf.....The QC Reference Manual (version 1.4) qctutorial_v1.4.pdf......The QC Tutorial Guide (version 1.4) Potentials........A collection of EAM potentials in DYNAMO format to be used by the QC code. Friction-example..Sliding contact between nano-asperities GB-example........Grain boundary motion example. Punch-example.....Nanoindentation by a rigid punch example. In addition the following two files are included: README............This file. gpl.txt...........The GNU GENERAL PUBLIC LICENSE under which terms this program is distributed. PLEASE READ THE LICENSE BEFORE USING THE CODE. For information on how to run the code, please start by reading the QC Tutorial Manual and working through the examples there. Once you are familiar with the code, the QC Reference Manual will be helpful in setting up new applications. REVISION HISTORY (most recent first) Revision 1.4 changes (November 28, 2011) 1. Fixed a bug that could cause some crystals to be built incorrectly when the orientations of the global axes are along high-index crystal directions. 2. Corrected a bug that could cause the connectivity of repatoms to elements to be incorrectly computed for some rather special mesh designs. 3. Corrected a small bug in the calculation of the load-displacement curve for the nano-indentation example. 4. Corrected parsing of input lines in qcmain.f. Blank lines are no longer placed in qc.cmd 5. Corrected parsing of input lines in mod_head.f. Old code could crash if blank lines appeared in qc.cmd 6. Allocation of grad and bsave corrected in mod_solve.f. Old code would crash if "solv,nr" was called after a "solv,cg". 7. A bug in mod_repatom was corrected that results in a segmentation fault whenever the size of arrays used to find neighboring elements in BuildSeenElementsList has to be extended. 8. A bug in mod_repatom was corrected that occasionally led to missed atomic neighbors when there are multiple grains. 9. Bug in mod_plotting fixed. The old code did not correctly generate strain patch plots (no strains appeared in the file). 10. The routine that builds the connectivity array storing all elements touching a given repatom (BuildIrel) was improved. A flaw was removed from the algorithm that could have caused errors for certain special meshes. 11. Added a macro "mark" that sets or returns to a marked position where the displacement field is stored. 12. Added a convergence test on the number of nonlocal nodes ('nnln'). Items 11 and 12 together can be used to back-up in the event of a nucleation event and to restart from the displacement field prior to the event: loop,load,40 bcon mark,set loop,,10 mark,go solve,cg,1.0,500000,1 status conv,nnln next solve,cg,1.0,500000,1 plot,disp,gbshear,0,1.,1. report pdel,,p-delta restart,write,shear time next,load 13. The routine to determine in a point lies inside a given polygon (PointInPoly) was optimized. 14. The adaption routine were improved so that the refinement of elements on which boundary conditions are applied is more robust (improved routine "fixcon"). Revision 1.3 changes (May 19, 2007) 1. The QC Code was largely rewritten and restructured to conform to the Fortran 90 standard. As a result the code is very portable. It has been tested with ten different Fortran compilers. In all cases it compiles and runs without modifications. Some of the main changes introduced are: (a) All functions and subroutines were placed within modules. This ensures explicit interfaces for called subroutines and functions.. As a result, a variety of potentially non-portable Fortran 77 "tricks" no longer work. These have been removed. (b) "double precision" variables were replaced with "real(kind=dp)", where dp is defined in mod_global as "selected_real_kind(p=15,r=307)". This ensures that the same precision is used on any machine. The change to "dp" means generic routines must be used such as sin(x), sqrt(x) and not the specific double precision routines dsin(x), dsqrt(x), etc. Also, type change to "dp" precision is done with real(n,dp), where n is an integer, and not dble(n). (c) Obsolete features in Fortran 90 were removed. For example, "character*n" were changed to "character(len=n)". Arithmetic if statements removed, etc. (d) Passing of array sections to subroutines were replaced by passing a temporary array containing the relevant section. Technically, this is not necessary since Fortran 90 allows passing array sections. However, in practice some compilers failed to do do this correctly especially, when the array was part of a derived type. (e) Dynamic memory allocation of variables was done automatically whenever possible, otherwise the "allocatable" clause was used. The use of pointers was limited to cases where this was unavoidable. 2. Greatly improved streamlined make architecture designed to allow easy porting from one platform to another. The new approach is very easy to use and robust. It has been tested on a variety of Unix and Linux systems as well as OS X 10.4.9. 3. The code was optimized in a number of ways. A speed-up of about 30-40% was observed for typical applications when switching from version 1.2 to 1.3. 4. The memory requirement of the code were greatly reduced. This was done by doing the following: (a) A number of memory leaks were detected and fixed. (b) The irel() array was reduced from storing all neighbors of a repatom within the cutoff radius to only its nearest neighbors. (c) The arrays xl() and ul() were removed. 5. Restart file size was greatly reduced due to the changes in item 4. Note that version 1.3 will still read in restart files from older versions of the code. This is done automatically without user intervention. 6. Numerous bugs fixed. Most are minor and will not be mentioned. The more major ones are listed below. The subroutine containing the bug appears in parenteses. (a) (StatusCalc) The calculation of deformation gradients and eigenvalues could be corrupted after adaption. As a result repatom status (local or nonlocal) could be incorrectly computed. This would be corrected in subsequent steps but could explain some "jerky" behavior that was sometimes observed in simulations. This was fixed. Note: The corrected code gives results that can be different from earlier versions because the set of nonlocal atoms can be different. (b) (pmacr) When calling restart b() was stored in blstat() for 'read' but not for 'txrd'. This was fixed. (c) (delaunay) Bug related to convex hull triangulation for the special case where ncb=0 and nce/=0 fixed. (d) (GetCellData) For "bad" crystallographic orientations with very large repeat distance the algorithm to find the repeating cell could fail. This was fixed. 7. A number of changes were introduced to the structure of the required user routines that interface with QC. The changes make the routines easier to work with and safer (i.e. less likely to "break" QC due to any errors in them). The main changes are: (a) All user routines are now in a single file called "user_APP.f" where APP is a particular application (e.g. user_gb.f). This file contains: user_mesh -- mesh generator user_bcon -- boundary conditions user_pdel -- force versus displacement user_potential -- user-specified external potential user_plot -- user-specified plot option The last two are new in this release. See the reference manual for details. (b) Direct access to many module variables is no longer possible to prevent a user inadvertently "breaking" the code. Instead routines were added to allow a user to query a module for the value of a particular variable. These routines include: In mode_grain: NumGrains - return number of grains GetGrainCellSize - Get the repeating cell dimensions for a given grain GetGrainNumCell - Get the number of atoms in the repeating cell for a given grain GetGrainCellAtom - Get coordinates of a given atom in the repeating cell for a given grain GetGrainRefStiff - reference stiffness matrix for a given grain GetGrainBvec - Get Bravais vector matrix for a given grain GetGrainBinv - Get inverse Bravais vector matrix for a given grain GetGrainRefatom - Get reference atom for a given grain GetGrainSpecies - Get species for a given grain GetGrainNumVrts - Get number of vertices for polygon of a given grain GetGrainVertex - Get given vertex of the polygon of a given grain GetGrainXlatvect - Get crystallographic axes for a given grain In mod_pload: GetLoadTime - Get current loading time GetLoadTimeStep - Get current loading timestep GetLoadPropFact - Get current loading proportional factor GetLoadOldPropFact - Get previous loading proportional factor (c) "only" clause added to all use statements. (d) Calling header to subroutine qsortr() (called from user_mesh) was changed to: subroutine qsortr(n,list,xkey,sign,listdim,keydim) The variables 'ndim' and 'ind' that appeared between 'xkey' and 'sign' in the old header were dropped. A file user_template.f is included in the QC directory as an aid to porting user routines from older versions to version 1.3. The file contains a skeleton of the file along with instructions on where and how to place the older user routines. 8. The version 1.3 release is focused more on a restructuring of the code as a basis for future development. However, there are a number of minor extensions in this version: (a) Two user routines user_potential and user_plot were added, allowing the user to define a user-specified external potential and plot option. See the reference manual for more information. (b) The zone macro (formerly used to defined no-adaption zones) was generalized to describe "special-attribute" zones. This currently includes nonlocal zones and no-adaption zones. See the reference manual for details. (c) More input verification was added to the code to catch user input errors. Version 1.3 is downward compatible being able to read input files used with earlier versions of the code. 9. The QC Reference Manual and QC Tutorial Guide were significantly expanded. The Reference Manual, in particular, has an entirely new chapter on the structure of the QC code and on writing the user routines. 10.The utility program "dynpots.f" was updated from f77 to conform to the f90 standard. Revision 1.2 changes (February 15, 2005) 1. Changed to handle multiple meshed domains. A new example "Friction-example" is included to demonstrate this capability. (RM) 2. mod_crystal: Small bug in CryCount that would not have affected performance was corrected (ET). 3. New flag DummiesAllowed added. When set to .false. no dummy atoms are allowed, meaning that all neighbors of nonlocal atoms must be repatoms themselves. If the flag is set to false and dummies are detected in a status calculation, adaption is triggered until there are no more dummies. If using the NR solver no changes are necessary to the input file besides setting the appropriate flag. For the CG solver the solver must be placed inside an additional loop with a status,update command: loop,,5 solve,cg,1.0,10000,1 status,update convergence,force next The reason is that neighbor lists are updated inside the CG solver. This can result in dummy atoms being generated. It this happens and dummies are not allowed, the CG solver will exit with a warning. The loop above handles this through the status,update command which will trigger a full status calculation and refine the mesh to remove the dummies. (ET) 4. Before writing out a restart file, a backup of the last written restart file is saved (with "_LAST" added to its name). For example, rest,write,qc_simulation will copy the file qc_simulation.res (if it exists) to qc_simulation_LAST.res, before writing out the new restart file. The reason for this is that if something interesting happens in a simulation, it is often helpful to have the restart file of the step before the event occurred, in order to restart from there with some changes to the input file, e.g. more adaption, etc. (ET) 5. A new file called nonstandard.f has been added to the QC code. This file contains any nonstandard Fortran extensions used by the QC code to facilitate portability. Any compilers which support these extensions differently from most or that need to use specific modules in order to access these extensions have their own nonstandard.f file (nonstandard_compiler.f) along with a corresponding make file. If you are porting QC to a new platform, modify nonstandard.f to support the new compiler. (ET) Currently nonstandard.f contains the following routines: (i) flush command. Flush is a non-standard Fortran command that forces the output buffers to be written to disk. Without it the output files are only written when the buffers become full (the size of the buffers is system dependent). Because the command is non-standard, some compilers implement it differently than others. So far we have encountered trouble only with the SGI MIPSPro Fortran 90 compiler (versions 7.4 and higher) where the number of arguments to flush was changed. As a result the previous version of the QC code crashed with a bus error. (Thanks to Rafael Estevez at GEMPPM INSA Lyon for helping us figure this out.) (ii) system command system is a non-standard Fortran command that lets the program issue an operating system command while running. The system command is used to make the backup copy of the restart file described above. 6. Various code optimizations were performed resulting in about a 25% speed-up: (i) The function dot11 which was called by the active column solver was removed and replaced with faster inline code. (ii) The function trarea which computes the area of a triangle was eliminated and replaced with faster inline code. (iii) The function intri which determines whether a point is inside a triangle was optimized. The part of the routine that computed area coordinates and determined whether the point was on the edges of the triangle was removed because this information was never used. (iv) The routine fe_locate which finds out which element a given point lies in was optimized. (v) Some service routines in qclib (Dist2, distance, etc.) were removed and replaced with faster inline code. 7. The initial output generated by QC has been extended to include the stress tensor and elastic constants matrix (in Voigt notation) in the reference configuration. The stress tensor should be zero. The degree it differs from zero is a measure of the accuracy of the lattice parameter given to the program. Both the stress and elastic constant components are given in relation to the global c.s. (ET) To prevent the code from crashing in the event that moduli calculations are not implemented in the potential being used, an internal error code was added to the routines Calc_Local and NonLocal and to routines calling them. This is transparent to the user and only affects developers. 8. Improved reliability in neighbor finding for nonlocal repatoms. In circumstances of very large relative deformation between two neighboring grains or for grains with a highly non-convex shape (for example with a long thin notch) the code could sometimes miss neighbors to some repatoms, leading to an error in the energy and force calculations. This has been fixed and the new version is now extremely robust at the expense of some slowing down of the code. (RM) 9. If a model contained grains with different periodicities in the out of plane direction, the code would not compute the neighbor lists of nonlocal atoms correctly. The new version can now handle this situation, although it is still constrained by the 2.5-D nature of the code and results must be interpreted with caution. (RM) 10. Multiple plots of the same data, for example the displacements after each load step, can now be appended to multiple zones of a single file, rather than multiple individual files. This is achieved with the "append" flag in the "plot" command. (RM) 11. The z-component of all repatom positions are now mapped onto Bravais lattice sites within the first periodic copy of the crystal structure. This doesn't change the results, but makes visualization of out-of-plane deformations easier. (RM) 12. The "nonlocal fully-refined" feature of the adaption routine is now more robust in that it is less likely to find circumstances where it cannot achieve the full refinement of nonlocal repatoms. In the event that it fails, it terminates with an error message. (RM) 13. The input file is now much more flexible in terms of accepting spaces at the start of commands and comment lines (denoted with a "%") are now accepted everywhere in the file. (RM) 14. A new option, 'type', has been added to the 'plot' command that plots the positions and atomic number of each repatom. (RM) Revision 1.1 changes (May 8, 2004) 1. qclib.f: subroutine fe_locate was rewritten to allow for multiple separate meshed regions. Previous versions were limited to a single connected domain. (RM) 2. mod_pload.f: The proportional load table was modified to handle a step function loading without crashing (two prop values that have the same time value). ( ... ...

近期下载者

相关文件


收藏者