Commit Graph

881 Commits

Author SHA1 Message Date
Haiming Zhang f8e06b488a make the script consistent with other scripts:
1. use new file handles
2. add scriptID and version
2015-04-28 17:47:06 +00:00
Martin Diehl 906c3f63a1 updated hybridIA sampling to work with new format
cropLinearODF is not working for the new format, but filterTable should be able to do the task
2015-04-27 05:30:29 +00:00
Haiming Zhang 1b9595d012 1. add the option 'all', fit all criteria automatically
2. generate equivalent stress automatically for advanced criteria.
2015-04-25 17:08:38 +00:00
Haiming Zhang a55b0c54c6 change the unit of stress 2015-04-25 16:22:32 +00:00
Haiming Zhang edb559d2fa 1. Judge the validity of stress points, and skip the invalid stress points.
2. change the defaulted unit
2015-04-25 16:19:06 +00:00
Martin Diehl 895421e677 changed from core module fftw to fftwpack from latex, tolerances need to be less strict 2015-04-24 08:07:13 +00:00
Martin Diehl b9c5edf7ab changed to standard file and output handling 2015-04-22 18:57:44 +00:00
Martin Diehl 2e6bbe887e changed header in seeds file from 'x,y,z' to '1..3_coords'.
scripts now use the header information and do not rely on coordinates being in the first three columns
2015-04-22 18:44:54 +00:00
Martin Diehl 0cec85ac63 corrected order of output, config file output is not supported yet 2015-04-21 19:37:03 +00:00
Haiming Zhang 46c33b0d98 polishing 2015-04-21 18:55:10 +00:00
Martin Diehl 4581e22a0f change reading in to standard loop over files
getting bins now from header information
format of linearODF now standard ASCII table style with header/keyword/label
2015-04-20 14:22:45 +00:00
Martin Diehl f43afa13d8 simple script to generate geom file from stacked tiff images. 2015-04-20 12:57:45 +00:00
Martin Diehl f5762209dc changed 'range' keyword to 'limit', now using proper ASCII table (with column 'intensity') for linearODF
hybridIO_linODFsampling simplified
2015-04-15 14:37:46 +00:00
Martin Diehl 64764b0902 introduced moving of multiple seeds at the same time
introduced more suitable check for convergence of the first bin. Improvements in bringing seeds with a size outside the range of the target closer are no longer invisible
2015-04-14 12:42:35 +00:00
Philip Eisenlohr 790aa32b1b fixed string to character splitting of weight column label 2015-04-13 20:24:03 +00:00
Philip Eisenlohr 4bcc80911e changed grid to float from (wrong) integer type.
row and column probability density normalization now takes place BEFORE limiting data range.
2015-04-13 19:55:28 +00:00
Martin Diehl d008b566b4 ensure to bring all seeds within target range 2015-04-10 20:47:20 +00:00
Martin Diehl 9d3cd8f997 added options do define number of maximum seeds to move simulateneously 2015-04-10 18:08:17 +00:00
Martin Diehl 4aa63e1ab9 handling of seeds files without microstructure (but eulerangles) 2015-04-10 16:59:08 +00:00
Martin Diehl 09bfd1e18e more verbose error handling for euler angles limits
ensuring that ROUNDED euler angles are not above the limits
2015-04-10 14:50:23 +00:00
Martin Diehl e01e270300 improved search for double microstructures (was N^2 bogosort) in geom_fromAng and introduced it in geom_fromVPSC 2015-04-10 12:57:25 +00:00
Tias Maiti 5257a2161f added options for x and y normalization 2015-04-09 06:45:21 +00:00
Martin Diehl 57a2c90d30 corrected according to vtk specification and remove an unused option 2015-04-08 18:48:35 +00:00
Haiming Zhang 976647b9e4 add the convergence criterion, the method is :
1. calculate the L2 norm of the residual of all the stress points
2. store the relative errors of the L2 norm
3. if the standard deviation of the relative errors of last five fittings is less than 0.05, that it is considered that the relative errors is stabilized, so the fitting is finished.
2015-04-08 17:48:26 +00:00
Haiming Zhang b77768fd4d all the criteria support plane stress 2015-04-08 16:24:20 +00:00
Martin Diehl 0544706c7b corrected help for legacy format 2015-04-08 12:51:40 +00:00
Martin Diehl 6e650a42b4 some comments for discussion 2015-04-07 07:42:46 +00:00
Haiming Zhang ab89c84ec8 Correct the message of last change
1. rename BBC2003 as BBC2000;
2. add the real BBC2003 yield criterion, BBC2003 works; 
3. now the BBC family yield criteria include: BBC2000, BBC2003, BBC2005
2015-04-03 21:01:37 +00:00
Haiming Zhang 412028f33f 1. rename BBC2003 as BBC2000;
2. add the real BBC2003 yield criterion, BBC2003 works;
3. now the BBC family yield criteria include: BBC2000, BBC2003, BBC2008
2015-04-03 20:59:23 +00:00
Haiming Zhang cd2a744db9 add Yld2000 yield criterion, Yld2000 works 2015-04-03 16:20:03 +00:00
Haiming Zhang 2b9964bba5 add Barlat-Lian 1989 yield criterion, Barlat1989 works. 2015-04-03 12:31:13 +00:00
Haiming Zhang 0097d39873 fix some type errors; add more comments 2015-04-02 19:32:48 +00:00
Martin Diehl 86f39de462 remove non-utf symbol 2015-04-02 16:13:00 +00:00
Haiming Zhang d8a99b23bf 1.compact all the criteria into a single Class;
2.the first thorough check of the script;
3.add the option of exponents for all non-quadratic yield criteria, now the user 1)can specify the exponent, for example, m=6 for Barlat 1991, or 2)see the exponent as an undetermined parameters;
4.add the pre-specified bounds for all criteria;
5.add the user defined equivalent stress for some anisotropic yield criteria
2015-04-02 12:08:55 +00:00
Martin Diehl 92a67e1a9d geom_fromAng.py crashed when found empty line (eg. at the end of the file), now fixed 2015-04-01 14:42:25 +00:00
Martin Diehl a1956436be fixed bug introduced last time when searching for keywords in spectralOut header
made reading in of header more robust by explicitly using the information given by fortran specifies the data length
introduced a legacy mode again, now it is used to read old spectralOut files prior to rev 4017
2015-04-01 10:02:21 +00:00
Philip Eisenlohr 38943c1e94 improved help 2015-03-29 15:37:40 +00:00
Martin Diehl 913c5347a5 removed handling for old legacy format (we might introduce a new one) 2015-03-29 09:08:42 +00:00
Martin Diehl 66d4ff097f removed obsolete comment 2015-03-28 11:44:17 +00:00
Haiming Zhang 72c2ead277 polishing, replace variables calculation with arrays calculation. 2015-03-27 17:58:49 +00:00
Martin Diehl 8a30021202 cleaned up core modul 2015-03-27 14:10:18 +00:00
Martin Diehl 004375cc79 removed table rewind causing problem with STDIN/STDOUT 2015-03-27 13:57:34 +00:00
Pratheek Shanthraj 1ee81e74ea more patches to get the tests running again:
- fixed increment counting in postResults to current output scheme

- corrected node coordinates calculation

- some work on restart (restart test still not running)
2015-03-26 21:19:28 +00:00
Martin Diehl 69b8e02a3a removed unwanted ASCII table data rewind causing problem for STDIN 2015-03-26 21:15:59 +00:00
Martin Diehl 643f7fe934 some comments 2015-03-26 05:04:12 +00:00
Pratheek Shanthraj fe4373a9f9 updated post processing script for MPI IO spectralOut file 2015-03-25 16:09:56 +00:00
Martin Diehl 1a3bfc7d1f updated according to new convention for ip and nodes 2015-03-24 13:52:40 +00:00
Haiming Zhang 226381586c compact the code of Yld2004-18p and Karafillis-Boyce, use array instead of components to calculate the partial derivative. 2015-03-16 16:42:26 +00:00
Martin Diehl 12cb5e56fe fixed interpretation 'spectralOut' header. Seem to have been buggy all the time, but manifested itself only after keyword change. Also added ':' after keywords to be more robust 2015-03-15 15:29:38 +00:00
Martin Diehl df2ee87a7c corrected help 2015-03-13 14:47:22 +00:00
Martin Diehl c4f639dbfb prevent crash in option parsing 2015-03-13 14:46:40 +00:00
Haiming Zhang a048b2ec15 1. Implement bbc2005 yield criterion (the residum and Jacobian); 2. bbc2005 works 2015-03-13 10:07:23 +00:00
Haiming Zhang 56cf1b53eb add Fourier interplation, anisotropic Vegter yield criterion is okay 2015-03-13 08:50:47 +00:00
Franz Roters 4b19b74d11 number of intervals is limit/delta not limit/delta -1 2015-03-13 08:39:55 +00:00
Martin Diehl def6d6b878 re-introduced determination of elem column 2015-03-12 06:20:40 +00:00
Bret Dunlap 3f340ffac9 fixed bug for table data without labels in header 2015-03-11 20:39:14 +00:00
Haiming Zhang de29524189 add Vegter criteria, planar isotropy works 2015-03-11 17:42:46 +00:00
Martin Diehl 72efc7b30c renamed resolution -> grid, dimension -> size 2015-03-11 08:55:48 +00:00
Martin Diehl 0dde6539ed renamed from 1_ip to 1_ipinitialcoord 2015-03-11 07:22:11 +00:00
Martin Diehl eb1561b528 changed postprocessing to use 1_ip instead of ip.x etc, plus corrected test files headers 2015-03-10 21:15:05 +00:00
Haiming Zhang a62fa5d5dd rewrite class Loadcase
1. add 2 dimension random load case generator
2. add Vegter load case generator(typical stress points in 2D)
2015-03-09 21:57:22 +00:00
Martin Diehl 271c9eed8b use 1_ip instead of ip.x
Old format still as fallback option to support legacy files
2015-03-09 12:52:43 +00:00
Martin Diehl 4d587b1bf9 introduced 'alias' for ip.x by first searching for 1_ip 2015-03-09 11:32:16 +00:00
Martin Diehl 96a3cb0667 added some ideas regarding the incorporation of the vegter yield criterion 2015-03-09 11:24:06 +00:00
Philip Eisenlohr 639b030c65 shortened code for opening input file list 2015-03-06 17:04:44 +00:00
Haiming Zhang 37e40fdf79 Keep consistent with the new file: example.linearODF 2015-03-06 16:21:05 +00:00
Tias Maiti 654aacf207 removed invalid options (options.packing, options.shift) 2015-03-05 21:41:53 +00:00
Haiming Zhang 5d9abc16e8 the number of grains starts with one. 2015-03-05 20:16:17 +00:00
Haiming Zhang aeb468254d missing file.close() 2015-03-05 19:12:07 +00:00
Haiming Zhang 4579a696e8 use OptionParse to parse the command-line options, add help information,
add the output of material.config file.
2015-03-05 19:01:31 +00:00
Haiming Zhang d188f35c17 use OptionParse to parse the command-line options, add help information, format the header of output file, now the output file can be used by hydribIA_linODFsampling.py directly 2015-03-05 17:04:16 +00:00
Martin Diehl f1df6cf40f copied some stcopied some scripts from the Code folder that are of interest for DAMASK 2015-03-05 10:05:00 +00:00
Chen Zhang 8c91d174fa remove some debugging print;
add meshgrid2, but stick with list comprehension since it is actually faster.
2015-03-02 16:20:47 +00:00
Tias Maiti 0077177c05 some polishing (numpy —> np, theTable —> table) 2015-03-02 05:06:29 +00:00
Chen Zhang 0d7355a49f correct help information. 2015-02-27 23:08:48 +00:00
Chen Zhang 1742725963 interpolate microstructure using Delaunay triangulation and Barycentric interpolation. 2015-02-27 22:59:09 +00:00
Haiming Zhang 9203b37fbc 1. Implement Hill1979 yield criterion (the residum and Jacobian);
2. Hill1979 works
2015-02-25 17:24:33 +00:00
Haiming Zhang 8b1846e78e 1. Implement Karafillis-Boyce yield criterion (the residum and Jacobian);
2. Karafillis-Boyce works
2015-02-24 16:46:09 +00:00
Haiming Zhang 39e17fc95a 1. add __init__() for the "Class" of each Criterion;
2. Polishing
2015-02-20 20:51:23 +00:00
Haiming Zhang a3e5da0bfd 1. Implement 2D and 3D Cazacu-Barlat yield criteria(the residum and Jacobian);
2. Both work
2015-02-20 20:34:47 +00:00
Haiming Zhang 09c357c70f 1. Fix bug of Yld2004-18p;
2. get deformation rate tensor and Lankford coefficient.
2015-02-20 14:40:24 +00:00
Martin Diehl 425251ae2b fixed bug: theTable -> table 2015-02-14 11:23:50 +00:00
Haiming Zhang 4a63aff1ed 1. Implement Yld2004-18p yield criterion(the residum and Jacobian);
2. Yld2004-18p yield criterion takes effect
2015-02-13 17:22:19 +00:00
Haiming Zhang 77cffd8040 1. fix up Banabic-Balan-Comsa 2003 (BBC2003) yield criterion;
2. add the calculation Jacobian of BBC2003; 
3. Now BBC2003 yield criterion takes effect
2015-02-12 20:48:03 +00:00
Haiming Zhang 69af205721 add the calculation of Jacobian of isotropic and anisotropic Barlat1991, shows better performance. 2015-02-12 11:04:00 +00:00
Haiming Zhang 40f1f3af23 add the calculation of Jacobian of Hill1948 and Drucker family criteria. 2015-02-11 19:06:23 +00:00
Philip Eisenlohr 53b40662ec now with executable, correct line endings, and ID tags. 2015-02-11 17:26:56 +00:00
Philip Eisenlohr d5f9f543ca Script to generate PNG image from given column (or 2D data in overall ASCIItable) with custom colormap and pixel sizes.
Supersedes “imageFromData” from “Code” repository.
2015-02-11 17:25:49 +00:00
Philip Eisenlohr 9eae665365 fixed ‘too many files open’ issue when processing a large list of input tables. 2015-02-11 17:22:47 +00:00
Haiming Zhang eed00007f9 Re-write the script:
1. replace curve_fit with leastsq, which supports the analytical Jacobian
2. specify a "class" (contains both residum and jacobian) for each criterion.
3. add the calculation of Jacobian
2015-02-11 16:49:40 +00:00
Tias Maiti 1b1ed3bbcf removed unnecessary lines 2015-02-11 06:18:08 +00:00
Martin Diehl 40a792d785 fixed bug in consistency check 2015-02-10 13:49:47 +00:00
Martin Diehl 63434c2ddb corrected error checking for correct type 2015-02-09 08:57:14 +00:00
Martin Diehl 7edd209ce4 corrected wrong name in add..., more verbose error checking for geom_from... 2015-02-07 22:22:28 +00:00
Martin Diehl 6140285ddd small changes (use ip.x instead of 1_ip). Probably we should modify postResults to use the 1_, 2_, 3_, standard notation for ip as well 2015-02-07 18:13:51 +00:00
Martin Diehl e4a94aa72b put changes on algorithm from geom_fromEuclideanDistance into addEuclideanDistance 2015-02-07 17:11:46 +00:00
Haiming Zhang f3bab46275 addthe Cazacu–Barlat (CZ) yield criterion (3D and 2D), Banabic–Balan–Comsa (BBC) Yield Criterion. 2015-02-07 16:58:57 +00:00
Haiming Zhang cdb7795956 1. Add default boundary constraint(no constraint) and initial guess to the dictionary
2. With the boundary constraint of exponential term, now non-quadratic yield criteria (isotropic Barlat 1991, anisotropic Barlar 1991, Hosford) take effect.
2015-02-07 11:07:45 +00:00
Haiming Zhang 0350b1829c 1. Replace curve_fit(see minpack.py) with curve_fit_bound(see damask/util.py), now the boundary constraint can be applied.
2. Transfer the output information into dictionary 'fittingCriteria', compact subroutine 'fit'.
2015-02-06 14:01:04 +00:00
Haiming Zhang ce09e992cc 1. Change yieldStress from 'list' to 'numpy.arrary', thanks to Martin's suggestion (3907);
2. Change '3*3' Cauchy stress tensor to '1*6', now the number of input 'xdata' for fitting is 6*Points, which is less than the former 9*Points.
2015-02-06 13:48:14 +00:00