Merge branch 'development' of magit1.mpie.de:damask/DAMASK into development
2
LICENSE
|
@ -1,6 +1,6 @@
|
|||
Copyright 2011-17 Max-Planck-Institut für Eisenforschung GmbH
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
DAMASK is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
|
2
PRIVATE
|
@ -1 +1 @@
|
|||
Subproject commit 5e97c9ac2fa4f7748a1bc040c15889623a3afd1f
|
||||
Subproject commit ff93e6862501439bbcca055dcf956bb09c086dc5
|
|
@ -0,0 +1,25 @@
|
|||
[Air]
|
||||
|
||||
## Isotropic Material model to simulate free surfaces ##
|
||||
## For more information see paper Maiti+Eisenlohr2018, Scripta Materialia,
|
||||
## "Fourier-based spectral method solution to finite strain crystal plasticity with free surfaces"
|
||||
|
||||
elasticity hooke
|
||||
plasticity isotropic
|
||||
|
||||
/dilatation/
|
||||
|
||||
(output) flowstress
|
||||
(output) strainrate
|
||||
|
||||
lattice_structure isotropic
|
||||
c11 110.9e9
|
||||
c12 0.0
|
||||
taylorfactor 3
|
||||
tau0 31e6
|
||||
gdot0 0.001
|
||||
n 20
|
||||
h0 75e6
|
||||
tausat 63e6
|
||||
w0 2.25
|
||||
atol_resistance 1
|
|
@ -0,0 +1,94 @@
|
|||
Creative Commons Attribution-NoDerivatives 4.0 International Public License
|
||||
|
||||
By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution-NoDerivatives 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions.
|
||||
|
||||
Section 1 – Definitions.
|
||||
|
||||
Adapted Material means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image.
|
||||
Copyright and Similar Rights means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights.
|
||||
Effective Technological Measures means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements.
|
||||
Exceptions and Limitations means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material.
|
||||
Licensed Material means the artistic or literary work, database, or other material to which the Licensor applied this Public License.
|
||||
Licensed Rights means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license.
|
||||
Licensor means the individual(s) or entity(ies) granting rights under this Public License.
|
||||
Share means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them.
|
||||
Sui Generis Database Rights means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world.
|
||||
You means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning.
|
||||
|
||||
Section 2 – Scope.
|
||||
|
||||
License grant.
|
||||
Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to:
|
||||
reproduce and Share the Licensed Material, in whole or in part; and
|
||||
produce and reproduce, but not Share, Adapted Material.
|
||||
Exceptions and Limitations. For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions.
|
||||
Term. The term of this Public License is specified in Section 6(a).
|
||||
Media and formats; technical modifications allowed. The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a)(4) never produces Adapted Material.
|
||||
Downstream recipients.
|
||||
Offer from the Licensor – Licensed Material. Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License.
|
||||
No downstream restrictions. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material.
|
||||
No endorsement. Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(A)(i).
|
||||
|
||||
Other rights.
|
||||
Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise.
|
||||
Patent and trademark rights are not licensed under this Public License.
|
||||
To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties.
|
||||
|
||||
Section 3 – License Conditions.
|
||||
|
||||
Your exercise of the Licensed Rights is expressly made subject to the following conditions.
|
||||
|
||||
Attribution.
|
||||
|
||||
If You Share the Licensed Material, You must:
|
||||
retain the following if it is supplied by the Licensor with the Licensed Material:
|
||||
identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated);
|
||||
a copyright notice;
|
||||
a notice that refers to this Public License;
|
||||
a notice that refers to the disclaimer of warranties;
|
||||
a URI or hyperlink to the Licensed Material to the extent reasonably practicable;
|
||||
indicate if You modified the Licensed Material and retain an indication of any previous modifications; and
|
||||
indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License.
|
||||
For the avoidance of doubt, You do not have permission under this Public License to Share Adapted Material.
|
||||
You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information.
|
||||
If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable.
|
||||
|
||||
Section 4 – Sui Generis Database Rights.
|
||||
|
||||
Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material:
|
||||
|
||||
for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database, provided You do not Share Adapted Material;
|
||||
if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material; and
|
||||
You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database.
|
||||
|
||||
For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights.
|
||||
|
||||
Section 5 – Disclaimer of Warranties and Limitation of Liability.
|
||||
|
||||
Unless otherwise separately undertaken by the Licensor, to the extent possible, the Licensor offers the Licensed Material as-is and as-available, and makes no representations or warranties of any kind concerning the Licensed Material, whether express, implied, statutory, or other. This includes, without limitation, warranties of title, merchantability, fitness for a particular purpose, non-infringement, absence of latent or other defects, accuracy, or the presence or absence of errors, whether or not known or discoverable. Where disclaimers of warranties are not allowed in full or in part, this disclaimer may not apply to You.
|
||||
To the extent possible, in no event will the Licensor be liable to You on any legal theory (including, without limitation, negligence) or otherwise for any direct, special, indirect, incidental, consequential, punitive, exemplary, or other losses, costs, expenses, or damages arising out of this Public License or use of the Licensed Material, even if the Licensor has been advised of the possibility of such losses, costs, expenses, or damages. Where a limitation of liability is not allowed in full or in part, this limitation may not apply to You.
|
||||
|
||||
The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability.
|
||||
|
||||
Section 6 – Term and Termination.
|
||||
|
||||
This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically.
|
||||
|
||||
Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates:
|
||||
automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or
|
||||
upon express reinstatement by the Licensor.
|
||||
For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License.
|
||||
For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License.
|
||||
Sections 1, 5, 6, 7, and 8 survive termination of this Public License.
|
||||
|
||||
Section 7 – Other Terms and Conditions.
|
||||
|
||||
The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed.
|
||||
Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License.
|
||||
|
||||
Section 8 – Interpretation.
|
||||
|
||||
For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License.
|
||||
To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions.
|
||||
No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor.
|
||||
Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority.
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 8.1 KiB After Width: | Height: | Size: 8.1 KiB |
After Width: | Height: | Size: 1.9 MiB |
After Width: | Height: | Size: 132 KiB |
After Width: | Height: | Size: 253 KiB |
After Width: | Height: | Size: 9.5 KiB |
After Width: | Height: | Size: 8.0 KiB |
|
@ -5,11 +5,37 @@
|
|||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
viewBox="0 0 104.4 104.4"
|
||||
height="104.4"
|
||||
width="104.4"
|
||||
version="1.1"
|
||||
id="svg4314">
|
||||
id="svg4314"
|
||||
sodipodi:docname="DAMASK_QR-CodeBW.svg"
|
||||
inkscape:version="0.92.1 r15371">
|
||||
<title
|
||||
id="title4483">DAMASK QR code</title>
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1001"
|
||||
id="namedview6"
|
||||
showgrid="false"
|
||||
inkscape:zoom="2.2605364"
|
||||
inkscape:cx="52.200001"
|
||||
inkscape:cy="52.200001"
|
||||
inkscape:window-x="-9"
|
||||
inkscape:window-y="-9"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg4314" />
|
||||
<metadata
|
||||
id="metadata4320">
|
||||
<rdf:RDF>
|
||||
|
@ -18,8 +44,32 @@
|
|||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
<dc:title>DAMASK QR code</dc:title>
|
||||
<cc:license
|
||||
rdf:resource="http://creativecommons.org/licenses/by-nd/4.0/" />
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>Franz Roters</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
<dc:subject>
|
||||
<rdf:Bag>
|
||||
<rdf:li>DAMASK; Crystal Plasticity; Multi-Physics</rdf:li>
|
||||
</rdf:Bag>
|
||||
</dc:subject>
|
||||
<dc:description>link to https://damask.mpie.de</dc:description>
|
||||
</cc:Work>
|
||||
<cc:License
|
||||
rdf:about="http://creativecommons.org/licenses/by-nd/4.0/">
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Reproduction" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Distribution" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Notice" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Attribution" />
|
||||
</cc:License>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
Before Width: | Height: | Size: 9.0 KiB After Width: | Height: | Size: 11 KiB |
|
@ -0,0 +1,32 @@
|
|||
DAMASK logo: Copyright 2011 Philip Eisenlohr,
|
||||
Max-Planck-Institut für Eisenforschung GmbH
|
||||
DAMASK QR code: Copyright 2016 Franz Roters,
|
||||
Max-Planck-Institut für Eisenforschung GmbH
|
||||
|
||||
These images are licensed according to the Attribution-NoDerivatives 4.0 International
|
||||
(CC BY-ND 4.0) license.
|
||||
|
||||
You should have received a copy of the Attribution-NoDerivatives 4.0 International license
|
||||
along with these images. If not, see <http://creativecommons.org/licenses/by-nd/4.0/>
|
||||
|
||||
The following is a human-readable summary of (and not a substitute for) the license:
|
||||
|
||||
You are free to:
|
||||
|
||||
Share — copy and redistribute the material in any medium or format for any purpose,
|
||||
even commercially.
|
||||
|
||||
The licensor cannot revoke these freedoms as long as you follow the license terms.
|
||||
|
||||
Under the following terms:
|
||||
|
||||
Attribution — You must give appropriate credit, provide a link to the license, and
|
||||
indicate if changes were made. You may do so in any reasonable manner, but not in
|
||||
any way that suggests the licensor endorses you or your use.
|
||||
|
||||
NoDerivatives — If you remix, transform, or build upon the material, you may not
|
||||
distribute the modified material.
|
||||
|
||||
No additional restrictions — You may not apply legal terms or technological measures
|
||||
that legally restrict others from doing anything the license permits.
|
||||
|
Before Width: | Height: | Size: 404 KiB |
Before Width: | Height: | Size: 62 KiB |
Before Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 5.5 KiB |
|
@ -72,6 +72,7 @@ for name in filenames:
|
|||
table.head_write()
|
||||
|
||||
# ------------------------------------------ process data ------------------------------------------
|
||||
|
||||
outputAlive = True
|
||||
while outputAlive and table.data_read(): # read next data line of ASCII table
|
||||
F = np.array(map(float,table.data[column[options.defgrad]:column[options.defgrad]+9]),'d').reshape(3,3)
|
||||
|
|
|
@ -22,7 +22,13 @@ parser.add_option('-t','--tensor',
|
|||
dest = 'tensor',
|
||||
action = 'extend', metavar = '<string LIST>',
|
||||
help = 'heading of columns containing tensor field values')
|
||||
parser.add_option('--no-check',
|
||||
dest = 'rh',
|
||||
action = 'store_false',
|
||||
help = 'skip check for right-handed eigenvector basis')
|
||||
|
||||
parser.set_defaults(rh = True,
|
||||
)
|
||||
(options,filenames) = parser.parse_args()
|
||||
|
||||
if options.tensor is None:
|
||||
|
@ -43,7 +49,8 @@ for name in filenames:
|
|||
|
||||
table.head_read()
|
||||
|
||||
# ------------------------------------------ sanity checks ----------------------------------------
|
||||
|
||||
# ------------------------------------------ assemble header 1 ------------------------------------
|
||||
|
||||
items = {
|
||||
'tensor': {'dim': 9, 'shape': [3,3], 'labels':options.tensor, 'column': []},
|
||||
|
@ -57,8 +64,10 @@ for name in filenames:
|
|||
if dim != data['dim']: remarks.append('column {} is not a {}...'.format(what,type))
|
||||
else:
|
||||
items[type]['column'].append(table.label_index(what))
|
||||
table.labels_append(['{}_eigval({})'.format(i+1,what) for i in range(3)]) # extend ASCII header with new labels
|
||||
table.labels_append(['{}_eigvec({})'.format(i+1,what) for i in range(9)]) # extend ASCII header with new labels
|
||||
for order in ['Min','Mid','Max']:
|
||||
table.labels_append(['eigval{}({})'.format(order,what)]) # extend ASCII header with new labels
|
||||
for order in ['Min','Mid','Max']:
|
||||
table.labels_append(['{}_eigvec{}({})'.format(i+1,order,what) for i in range(3)]) # extend ASCII header with new labels
|
||||
|
||||
if remarks != []: damask.util.croak(remarks)
|
||||
if errors != []:
|
||||
|
@ -66,22 +75,22 @@ for name in filenames:
|
|||
table.close(dismiss = True)
|
||||
continue
|
||||
|
||||
# ------------------------------------------ assemble header --------------------------------------
|
||||
# ------------------------------------------ assemble header 2 ------------------------------------
|
||||
|
||||
table.info_append(scriptID + '\t' + ' '.join(sys.argv[1:]))
|
||||
table.head_write()
|
||||
|
||||
# ------------------------------------------ process data ------------------------------------------
|
||||
# ------------------------------------------ process data -----------------------------------------
|
||||
|
||||
outputAlive = True
|
||||
while outputAlive and table.data_read(): # read next data line of ASCII table
|
||||
for type, data in items.iteritems():
|
||||
for column in data['column']:
|
||||
(u,v) = np.linalg.eigh(np.array(map(float,table.data[column:column+data['dim']])).reshape(data['shape']))
|
||||
if np.dot(np.cross(v[:,0], v[:,1]), v[:,2]) < 0.0 : v[:, 2] *= -1.0 # ensure right-handed coordinate system
|
||||
table.data_append(list(u))
|
||||
table.data_append(list(v.transpose().reshape(data['dim'])))
|
||||
outputAlive = table.data_write() # output processed line
|
||||
if options.rh and np.dot(np.cross(v[:,0], v[:,1]), v[:,2]) < 0.0 : v[:, 2] *= -1.0 # ensure right-handed eigenvector basis
|
||||
table.data_append(list(u)) # vector of max,mid,min eigval
|
||||
table.data_append(list(v.transpose().reshape(data['dim']))) # 3x3=9 combo vector of max,mid,min eigvec coordinates
|
||||
outputAlive = table.data_write() # output processed line in accordance with column labeling
|
||||
|
||||
# ------------------------------------------ output finalization -----------------------------------
|
||||
|
||||
|
|
|
@ -451,9 +451,9 @@ def mapIncremental(label, mapping, N, base, new):
|
|||
# -----------------------------
|
||||
def OpenPostfile(name,type,nodal = False):
|
||||
"""Open postfile with extrapolation mode 'translate'"""
|
||||
p = {\
|
||||
'spectral': MPIEspectral_result,\
|
||||
'marc': post_open,\
|
||||
p = {
|
||||
'spectral': MPIEspectral_result,
|
||||
'marc': post_open,
|
||||
}[type](name)
|
||||
p.extrapolation({True:'linear',False:'translate'}[nodal])
|
||||
p.moveto(1)
|
||||
|
@ -512,19 +512,19 @@ def ParsePostfile(p,filename, outputFormat):
|
|||
|
||||
needs "outputFormat" for mapping of output names to postfile output indices
|
||||
"""
|
||||
stat = { \
|
||||
'IndexOfLabel': {}, \
|
||||
'Title': p.title(), \
|
||||
'Extrapolation': p.extrapolate, \
|
||||
'NumberOfIncrements': p.increments(), \
|
||||
'NumberOfNodes': p.nodes(), \
|
||||
'NumberOfNodalScalars': p.node_scalars(), \
|
||||
'LabelOfNodalScalar': [None]*p.node_scalars() , \
|
||||
'NumberOfElements': p.elements(), \
|
||||
'NumberOfElementalScalars': p.element_scalars(), \
|
||||
'LabelOfElementalScalar': [None]*p.element_scalars() , \
|
||||
'NumberOfElementalTensors': p.element_tensors(), \
|
||||
'LabelOfElementalTensor': [None]*p.element_tensors(), \
|
||||
stat = {
|
||||
'IndexOfLabel': {},
|
||||
'Title': p.title(),
|
||||
'Extrapolation': p.extrapolate,
|
||||
'NumberOfIncrements': p.increments(),
|
||||
'NumberOfNodes': p.nodes(),
|
||||
'NumberOfNodalScalars': p.node_scalars(),
|
||||
'LabelOfNodalScalar': [None]*p.node_scalars(),
|
||||
'NumberOfElements': p.elements(),
|
||||
'NumberOfElementalScalars': p.element_scalars(),
|
||||
'LabelOfElementalScalar': [None]*p.element_scalars(),
|
||||
'NumberOfElementalTensors': p.element_tensors(),
|
||||
'LabelOfElementalTensor': [None]*p.element_tensors(),
|
||||
}
|
||||
|
||||
# --- find labels
|
||||
|
@ -671,6 +671,9 @@ parser.add_option('-m','--map', dest='func',
|
|||
parser.add_option('-p','--type', dest='filetype',
|
||||
metavar = 'string',
|
||||
help = 'type of result file [auto]')
|
||||
parser.add_option('-q','--quiet', dest='verbose',
|
||||
action = 'store_false',
|
||||
help = 'suppress verbose output')
|
||||
|
||||
group_material = OptionGroup(parser,'Material identifier')
|
||||
|
||||
|
@ -711,24 +714,26 @@ parser.add_option_group(group_material)
|
|||
parser.add_option_group(group_general)
|
||||
parser.add_option_group(group_special)
|
||||
|
||||
parser.set_defaults(info = False)
|
||||
parser.set_defaults(legacy = False)
|
||||
parser.set_defaults(nodal = False)
|
||||
parser.set_defaults(prefix = '')
|
||||
parser.set_defaults(suffix = '')
|
||||
parser.set_defaults(dir = 'postProc')
|
||||
parser.set_defaults(filetype = None)
|
||||
parser.set_defaults(func = 'avg')
|
||||
parser.set_defaults(homog = '1')
|
||||
parser.set_defaults(cryst = '1')
|
||||
parser.set_defaults(phase = '1')
|
||||
parser.set_defaults(filter = '')
|
||||
parser.set_defaults(sep = [])
|
||||
parser.set_defaults(sort = [])
|
||||
parser.set_defaults(inc = False)
|
||||
parser.set_defaults(time = False)
|
||||
parser.set_defaults(separateFiles = False)
|
||||
parser.set_defaults(getIncrements= False)
|
||||
parser.set_defaults(info = False,
|
||||
verbose = True,
|
||||
legacy = False,
|
||||
nodal = False,
|
||||
prefix = '',
|
||||
suffix = '',
|
||||
dir = 'postProc',
|
||||
filetype = None,
|
||||
func = 'avg',
|
||||
homog = '1',
|
||||
cryst = '1',
|
||||
phase = '1',
|
||||
filter = '',
|
||||
sep = [],
|
||||
sort = [],
|
||||
inc = False,
|
||||
time = False,
|
||||
separateFiles = False,
|
||||
getIncrements= False,
|
||||
)
|
||||
|
||||
(options, files) = parser.parse_args()
|
||||
|
||||
|
@ -797,8 +802,9 @@ options.sep.reverse()
|
|||
|
||||
# --- start background messaging
|
||||
|
||||
bg = damask.util.backgroundMessage()
|
||||
bg.start()
|
||||
if options.verbose:
|
||||
bg = damask.util.backgroundMessage()
|
||||
bg.start()
|
||||
|
||||
# --- parse .output and .t16 files
|
||||
|
||||
|
@ -816,7 +822,7 @@ me = {
|
|||
'Constitutive': options.phase,
|
||||
}
|
||||
|
||||
bg.set_message('parsing .output files...')
|
||||
if options.verbose: bg.set_message('parsing .output files...')
|
||||
|
||||
for what in me:
|
||||
outputFormat[what] = ParseOutputFormat(filename, what, me[what])
|
||||
|
@ -824,9 +830,10 @@ for what in me:
|
|||
print("\nsection '{}' not found in <{}>".format(me[what], what))
|
||||
print('\n'.join(map(lambda x:' [%s]'%x, outputFormat[what]['specials']['brothers'])))
|
||||
|
||||
bg.set_message('opening result file...')
|
||||
if options.verbose: bg.set_message('opening result file...')
|
||||
|
||||
p = OpenPostfile(filename+extension,options.filetype,options.nodal)
|
||||
bg.set_message('parsing result file...')
|
||||
if options.verbose: bg.set_message('parsing result file...')
|
||||
stat = ParsePostfile(p, filename, outputFormat)
|
||||
if options.filetype == 'marc':
|
||||
stat['NumberOfIncrements'] -= 1 # t16 contains one "virtual" increment (at 0)
|
||||
|
@ -870,8 +877,7 @@ if options.info:
|
|||
|
||||
elementsOfNode = {}
|
||||
for e in range(stat['NumberOfElements']):
|
||||
if e%1000 == 0:
|
||||
bg.set_message('connect elem %i...'%e)
|
||||
if options.verbose and e%1000 == 0: bg.set_message('connect elem %i...'%e)
|
||||
for n in map(p.node_sequence,p.element(e).items):
|
||||
if n not in elementsOfNode:
|
||||
elementsOfNode[n] = [p.element_id(e)]
|
||||
|
@ -893,8 +899,7 @@ memberCount = 0
|
|||
|
||||
if options.nodalScalar:
|
||||
for n in range(stat['NumberOfNodes']):
|
||||
if n%1000 == 0:
|
||||
bg.set_message('scan node %i...'%n)
|
||||
if options.verbose and n%1000 == 0: bg.set_message('scan node %i...'%n)
|
||||
myNodeID = p.node_id(n)
|
||||
myNodeCoordinates = [p.node(n).x, p.node(n).y, p.node(n).z]
|
||||
myElemID = 0
|
||||
|
@ -928,8 +933,7 @@ if options.nodalScalar:
|
|||
|
||||
else:
|
||||
for e in range(stat['NumberOfElements']):
|
||||
if e%1000 == 0:
|
||||
bg.set_message('scan elem %i...'%e)
|
||||
if options.verbose and e%1000 == 0: bg.set_message('scan elem %i...'%e)
|
||||
myElemID = p.element_id(e)
|
||||
myIpCoordinates = ipCoords(p.element(e).type, map(lambda node: [node.x, node.y, node.z],
|
||||
map(p.node, map(p.node_sequence, p.element(e).items))))
|
||||
|
@ -995,7 +999,7 @@ if 'none' not in map(str.lower, options.sort):
|
|||
theKeys.append('x[0][%i]'%where[criterium])
|
||||
|
||||
sortKeys = eval('lambda x:(%s)'%(','.join(theKeys)))
|
||||
bg.set_message('sorting groups...')
|
||||
if options.verbose: bg.set_message('sorting groups...')
|
||||
groups.sort(key = sortKeys) # in-place sorting to save mem
|
||||
|
||||
|
||||
|
@ -1014,7 +1018,7 @@ standard = ['inc'] + \
|
|||
|
||||
# --------------------------- loop over positions --------------------------------
|
||||
|
||||
bg.set_message('getting map between positions and increments...')
|
||||
if options.verbose: bg.set_message('getting map between positions and increments...')
|
||||
|
||||
incAtPosition = {}
|
||||
positionOfInc = {}
|
||||
|
@ -1075,7 +1079,7 @@ for incCount,position in enumerate(locations): # walk through locations
|
|||
member += 1
|
||||
if member%1000 == 0:
|
||||
time_delta = ((len(locations)*memberCount)/float(member+incCount*memberCount)-1.0)*(time.time()-time_start)
|
||||
bg.set_message('(%02i:%02i:%02i) processing point %i of %i from increment %i (position %i)...'
|
||||
if options.verbose: bg.set_message('(%02i:%02i:%02i) processing point %i of %i from increment %i (position %i)...'
|
||||
%(time_delta//3600,time_delta%3600//60,time_delta%60,member,memberCount,increments[incCount],position))
|
||||
|
||||
newby = [] # current member's data
|
||||
|
|
|
@ -0,0 +1,119 @@
|
|||
#!/usr/bin/env python2.7
|
||||
# -*- coding: UTF-8 no BOM -*-
|
||||
|
||||
import os,sys,math
|
||||
from optparse import OptionParser
|
||||
import damask
|
||||
import pipes
|
||||
|
||||
scriptName = os.path.splitext(os.path.basename(__file__))[0]
|
||||
scriptID = ' '.join([scriptName,damask.version])
|
||||
|
||||
# --------------------------------------------------------------------
|
||||
# MAIN
|
||||
# --------------------------------------------------------------------
|
||||
|
||||
parser = OptionParser(option_class=damask.extendableOption, usage='%prog options [file[s]]',
|
||||
description ='generate 3D RVE from .ang files of EBSD slices .',
|
||||
version = scriptID)
|
||||
|
||||
parser.add_option('--offset',
|
||||
dest='offset',
|
||||
type='float',
|
||||
help='offset of EBSD slices [%default]',
|
||||
metavar='float')
|
||||
parser.add_option('--outname',
|
||||
dest='outName',
|
||||
type='string',
|
||||
help='output file name [%default]', metavar='string')
|
||||
parser.add_option('--vtr',
|
||||
action="store_true",
|
||||
dest='vtr')
|
||||
parser.add_option('--geom',
|
||||
action="store_true",
|
||||
dest='geom')
|
||||
parser.set_defaults(offset = 1.0,
|
||||
outName = 'RVE3D')
|
||||
|
||||
(options,filenames) = parser.parse_args()
|
||||
|
||||
numFiles = len(filenames)
|
||||
formatwidth = 1+int(math.log10(numFiles))
|
||||
|
||||
# copy original files to tmp files to not alter originals
|
||||
for i in range(numFiles):
|
||||
sliceID = 'slice' + str(i).zfill(formatwidth) + '.tmp'
|
||||
strCommand = 'cp ' + pipes.quote(filenames[i]) + ' ' + sliceID
|
||||
os.system(strCommand)
|
||||
|
||||
# modify tmp files
|
||||
print('Add z-coordinates')
|
||||
for i in range(numFiles):
|
||||
sliceID = 'slice' + str(i).zfill(formatwidth) + '.tmp'
|
||||
strCommand = 'OIMgrainFile_toTable ' + sliceID
|
||||
os.system(strCommand)
|
||||
strCommand = 'addCalculation --label 3Dpos --formula "np.array(#pos#.tolist()+[' + str(i*options.offset) + '])" ' + sliceID
|
||||
os.system(strCommand)
|
||||
|
||||
# join temp files into one
|
||||
|
||||
print('\n Colocate files')
|
||||
fileOut = open(options.outName + '.ang','w')
|
||||
|
||||
# take header information from 1st file
|
||||
sliceID = 'slice' + str(0).zfill(formatwidth) + '.tmp'
|
||||
fileRead = open(sliceID)
|
||||
data = fileRead.readlines()
|
||||
fileRead.close()
|
||||
headerLines = int(data[0].split()[0])
|
||||
fileOut.write(str(headerLines+1) + '\t header\n')
|
||||
for line in data[1:headerLines]:
|
||||
fileOut.write(line)
|
||||
fileOut.write(scriptID + '\t' + ' '.join(sys.argv[1:]) + '\n')
|
||||
for line in data[headerLines:]:
|
||||
fileOut.write(line)
|
||||
|
||||
# append other files content without header
|
||||
for i in range(numFiles-1):
|
||||
sliceID = 'slice' + str(i+1).zfill(formatwidth) + '.tmp'
|
||||
fileRead = open(sliceID)
|
||||
data = fileRead.readlines()
|
||||
fileRead.close()
|
||||
headerLines = int(data[0].split()[0])
|
||||
for line in data[headerLines+1:]:
|
||||
fileOut.write(line)
|
||||
fileOut.close()
|
||||
|
||||
# tidy up and add phase column
|
||||
print('\n Remove temp data and add phase info')
|
||||
strCommand = 'filterTable --black pos ' + options.outName + '.ang'
|
||||
os.system(strCommand)
|
||||
strCommand = 'reLabel --label 3Dpos --substitute pos ' + options.outName + '.ang'
|
||||
os.system(strCommand)
|
||||
strCommand = 'addCalculation -l phase -f 1 ' + options.outName + '.ang'
|
||||
os.system(strCommand)
|
||||
|
||||
|
||||
# create geom file when asked for
|
||||
if options.geom:
|
||||
print('\n Build geometry file')
|
||||
strCommand = 'geom_fromTable --phase phase --eulers euler --coordinates pos ' + pipes.quote(options.outName) + '.ang'
|
||||
os.system(strCommand)
|
||||
|
||||
# create paraview file when asked for
|
||||
|
||||
if options.vtr:
|
||||
print('\n Build Paraview file')
|
||||
strCommand = 'addIPFcolor --eulers euler --pole 0.0 0.0 1.0 ' + options.outName + '.ang'
|
||||
os.system(strCommand)
|
||||
strCommand = 'vtk_rectilinearGrid ' + pipes.quote(options.outName) + '.ang'
|
||||
os.system(strCommand)
|
||||
os.rename(pipes.quote(options.outName) + '_pos(cell)'+'.vtr', pipes.quote(options.outName) + '.vtr')
|
||||
strCommand = 'vtk_addRectilinearGridData --vtk '+ pipes.quote(options.outName) + '.vtr --color IPF_001_cubic '\
|
||||
+ pipes.quote(options.outName) + '.ang'
|
||||
os.system(strCommand)
|
||||
|
||||
# delete tmp files
|
||||
for i in range(numFiles):
|
||||
sliceID = 'slice' + str(i).zfill(formatwidth) + '.tmp'
|
||||
os.remove(sliceID)
|
|
@ -74,10 +74,8 @@ add_library (PLASTIC OBJECT
|
|||
"plastic_disloUCLA.f90"
|
||||
"plastic_isotropic.f90"
|
||||
"plastic_phenopowerlaw.f90"
|
||||
"plastic_titanmod.f90"
|
||||
"plastic_nonlocal.f90"
|
||||
"plastic_none.f90"
|
||||
"plastic_phenoplus.f90")
|
||||
"plastic_none.f90")
|
||||
add_dependencies(PLASTIC DAMASK_HELPERS)
|
||||
list(APPEND OBJECTFILES $<TARGET_OBJECTS:PLASTIC>)
|
||||
|
||||
|
|
|
@ -113,7 +113,11 @@ end subroutine CPFEM_initAll
|
|||
!> @brief allocate the arrays defined in module CPFEM and initialize them
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine CPFEM_init
|
||||
use, intrinsic :: iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran 4.6 at the moment)
|
||||
#ifdef __GFORTRAN__
|
||||
use, intrinsic :: iso_fortran_env, only: &
|
||||
compiler_version, &
|
||||
compiler_options
|
||||
#endif
|
||||
use prec, only: &
|
||||
pInt
|
||||
use IO, only: &
|
||||
|
|
|
@ -82,7 +82,11 @@ end subroutine CPFEM_initAll
|
|||
!> @brief allocate the arrays defined in module CPFEM and initialize them
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine CPFEM_init
|
||||
use, intrinsic :: iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran 4.6 at the moment)
|
||||
#ifdef __GFORTRAN__
|
||||
use, intrinsic :: iso_fortran_env, only: &
|
||||
compiler_version, &
|
||||
compiler_options
|
||||
#endif
|
||||
use prec, only: &
|
||||
pInt
|
||||
use IO, only: &
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
DAMASK_marc.f90
|
|
@ -7,8 +7,11 @@
|
|||
!> results
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
program DAMASK_spectral
|
||||
use, intrinsic :: &
|
||||
iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran >4.6 at the moment)
|
||||
#ifdef __GFORTRAN__
|
||||
use, intrinsic :: iso_fortran_env, only: &
|
||||
compiler_version, &
|
||||
compiler_options
|
||||
#endif
|
||||
use prec, only: &
|
||||
pInt, &
|
||||
pLongInt, &
|
||||
|
|
|
@ -43,7 +43,11 @@ contains
|
|||
!> solver the information is provided by the interface module
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine FE_init
|
||||
use, intrinsic :: iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran 4.6 at the moment)
|
||||
#ifdef __GFORTRAN__
|
||||
use, intrinsic :: iso_fortran_env, only: &
|
||||
compiler_version, &
|
||||
compiler_options
|
||||
#endif
|
||||
use debug, only: &
|
||||
debug_level, &
|
||||
debug_FEsolving, &
|
||||
|
|
|
@ -81,7 +81,11 @@ contains
|
|||
!> @brief only outputs revision number
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine IO_init
|
||||
use, intrinsic :: iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran 4.6 at the moment)
|
||||
#ifdef __GFORTRAN__
|
||||
use, intrinsic :: iso_fortran_env, only: &
|
||||
compiler_version, &
|
||||
compiler_options
|
||||
#endif
|
||||
|
||||
implicit none
|
||||
|
||||
|
@ -1587,6 +1591,8 @@ subroutine IO_error(error_ID,el,ip,g,instance,ext_msg)
|
|||
! DAMASK_marc errors
|
||||
case (700_pInt)
|
||||
msg = 'invalid materialpoint result requested'
|
||||
case (701_pInt)
|
||||
msg = 'not supported input file format, use Marc 2016 or earlier'
|
||||
|
||||
!-------------------------------------------------------------------------------------------------
|
||||
! errors related to spectral solver
|
||||
|
|
|
@ -28,8 +28,6 @@
|
|||
#include "plastic_none.f90"
|
||||
#include "plastic_isotropic.f90"
|
||||
#include "plastic_phenopowerlaw.f90"
|
||||
#include "plastic_phenoplus.f90"
|
||||
#include "plastic_titanmod.f90"
|
||||
#include "plastic_dislotwin.f90"
|
||||
#include "plastic_disloUCLA.f90"
|
||||
#include "plastic_nonlocal.f90"
|
||||
|
|
|
@ -37,7 +37,11 @@ contains
|
|||
!> @brief allocates arrays pointing to array of the various constitutive modules
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine constitutive_init()
|
||||
use, intrinsic :: iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran 4.6 at the moment)
|
||||
#ifdef __GFORTRAN__
|
||||
use, intrinsic :: iso_fortran_env, only: &
|
||||
compiler_version, &
|
||||
compiler_options
|
||||
#endif
|
||||
use prec, only: &
|
||||
pReal
|
||||
use debug, only: &
|
||||
|
@ -70,10 +74,8 @@ subroutine constitutive_init()
|
|||
PLASTICITY_none_ID, &
|
||||
PLASTICITY_isotropic_ID, &
|
||||
PLASTICITY_phenopowerlaw_ID, &
|
||||
PLASTICITY_phenoplus_ID, &
|
||||
PLASTICITY_dislotwin_ID, &
|
||||
PLASTICITY_disloucla_ID, &
|
||||
PLASTICITY_titanmod_ID, &
|
||||
PLASTICITY_nonlocal_ID ,&
|
||||
SOURCE_thermal_dissipation_ID, &
|
||||
SOURCE_thermal_externalheat_ID, &
|
||||
|
@ -93,10 +95,8 @@ subroutine constitutive_init()
|
|||
PLASTICITY_NONE_label, &
|
||||
PLASTICITY_ISOTROPIC_label, &
|
||||
PLASTICITY_PHENOPOWERLAW_label, &
|
||||
PLASTICITY_PHENOPLUS_label, &
|
||||
PLASTICITY_DISLOTWIN_label, &
|
||||
PLASTICITY_DISLOUCLA_label, &
|
||||
PLASTICITY_TITANMOD_label, &
|
||||
PLASTICITY_NONLOCAL_label, &
|
||||
SOURCE_thermal_dissipation_label, &
|
||||
SOURCE_thermal_externalheat_label, &
|
||||
|
@ -113,10 +113,8 @@ subroutine constitutive_init()
|
|||
use plastic_none
|
||||
use plastic_isotropic
|
||||
use plastic_phenopowerlaw
|
||||
use plastic_phenoplus
|
||||
use plastic_dislotwin
|
||||
use plastic_disloucla
|
||||
use plastic_titanmod
|
||||
use plastic_nonlocal
|
||||
use source_thermal_dissipation
|
||||
use source_thermal_externalheat
|
||||
|
@ -158,10 +156,8 @@ subroutine constitutive_init()
|
|||
if (any(phase_plasticity == PLASTICITY_NONE_ID)) call plastic_none_init
|
||||
if (any(phase_plasticity == PLASTICITY_ISOTROPIC_ID)) call plastic_isotropic_init(FILEUNIT)
|
||||
if (any(phase_plasticity == PLASTICITY_PHENOPOWERLAW_ID)) call plastic_phenopowerlaw_init(FILEUNIT)
|
||||
if (any(phase_plasticity == PLASTICITY_PHENOPLUS_ID)) call plastic_phenoplus_init(FILEUNIT)
|
||||
if (any(phase_plasticity == PLASTICITY_DISLOTWIN_ID)) call plastic_dislotwin_init(FILEUNIT)
|
||||
if (any(phase_plasticity == PLASTICITY_DISLOUCLA_ID)) call plastic_disloucla_init(FILEUNIT)
|
||||
if (any(phase_plasticity == PLASTICITY_TITANMOD_ID)) call plastic_titanmod_init(FILEUNIT)
|
||||
if (any(phase_plasticity == PLASTICITY_NONLOCAL_ID)) then
|
||||
call plastic_nonlocal_init(FILEUNIT)
|
||||
call plastic_nonlocal_stateInit()
|
||||
|
@ -218,11 +214,6 @@ subroutine constitutive_init()
|
|||
thisNoutput => plastic_phenopowerlaw_Noutput
|
||||
thisOutput => plastic_phenopowerlaw_output
|
||||
thisSize => plastic_phenopowerlaw_sizePostResult
|
||||
case (PLASTICITY_PHENOPLUS_ID) plasticityType
|
||||
outputName = PLASTICITY_PHENOPLUS_label
|
||||
thisNoutput => plastic_phenoplus_Noutput
|
||||
thisOutput => plastic_phenoplus_output
|
||||
thisSize => plastic_phenoplus_sizePostResult
|
||||
case (PLASTICITY_DISLOTWIN_ID) plasticityType
|
||||
outputName = PLASTICITY_DISLOTWIN_label
|
||||
thisNoutput => plastic_dislotwin_Noutput
|
||||
|
@ -233,11 +224,6 @@ subroutine constitutive_init()
|
|||
thisNoutput => plastic_disloucla_Noutput
|
||||
thisOutput => plastic_disloucla_output
|
||||
thisSize => plastic_disloucla_sizePostResult
|
||||
case (PLASTICITY_TITANMOD_ID) plasticityType
|
||||
outputName = PLASTICITY_TITANMOD_label
|
||||
thisNoutput => plastic_titanmod_Noutput
|
||||
thisOutput => plastic_titanmod_output
|
||||
thisSize => plastic_titanmod_sizePostResult
|
||||
case (PLASTICITY_NONLOCAL_ID) plasticityType
|
||||
outputName = PLASTICITY_NONLOCAL_label
|
||||
thisNoutput => plastic_nonlocal_Noutput
|
||||
|
@ -392,11 +378,8 @@ function constitutive_homogenizedC(ipc,ip,el)
|
|||
use material, only: &
|
||||
phase_plasticity, &
|
||||
material_phase, &
|
||||
PLASTICITY_TITANMOD_ID, &
|
||||
PLASTICITY_DISLOTWIN_ID, &
|
||||
PLASTICITY_DISLOUCLA_ID
|
||||
use plastic_titanmod, only: &
|
||||
plastic_titanmod_homogenizedC
|
||||
use plastic_dislotwin, only: &
|
||||
plastic_dislotwin_homogenizedC
|
||||
use lattice, only: &
|
||||
|
@ -412,8 +395,6 @@ function constitutive_homogenizedC(ipc,ip,el)
|
|||
plasticityType: select case (phase_plasticity(material_phase(ipc,ip,el)))
|
||||
case (PLASTICITY_DISLOTWIN_ID) plasticityType
|
||||
constitutive_homogenizedC = plastic_dislotwin_homogenizedC(ipc,ip,el)
|
||||
case (PLASTICITY_TITANMOD_ID) plasticityType
|
||||
constitutive_homogenizedC = plastic_titanmod_homogenizedC (ipc,ip,el)
|
||||
case default plasticityType
|
||||
constitutive_homogenizedC = lattice_C66(1:6,1:6,material_phase (ipc,ip,el))
|
||||
end select plasticityType
|
||||
|
@ -434,19 +415,13 @@ subroutine constitutive_microstructure(orientations, Fe, Fp, ipc, ip, el)
|
|||
thermalMapping, &
|
||||
PLASTICITY_dislotwin_ID, &
|
||||
PLASTICITY_disloucla_ID, &
|
||||
PLASTICITY_titanmod_ID, &
|
||||
PLASTICITY_nonlocal_ID, &
|
||||
PLASTICITY_phenoplus_ID
|
||||
use plastic_titanmod, only: &
|
||||
plastic_titanmod_microstructure
|
||||
PLASTICITY_nonlocal_ID
|
||||
use plastic_nonlocal, only: &
|
||||
plastic_nonlocal_microstructure
|
||||
use plastic_dislotwin, only: &
|
||||
plastic_dislotwin_microstructure
|
||||
use plastic_disloucla, only: &
|
||||
plastic_disloucla_microstructure
|
||||
use plastic_phenoplus, only: &
|
||||
plastic_phenoplus_microstructure
|
||||
|
||||
implicit none
|
||||
integer(pInt), intent(in) :: &
|
||||
|
@ -470,12 +445,8 @@ subroutine constitutive_microstructure(orientations, Fe, Fp, ipc, ip, el)
|
|||
call plastic_dislotwin_microstructure(temperature(ho)%p(tme),ipc,ip,el)
|
||||
case (PLASTICITY_DISLOUCLA_ID) plasticityType
|
||||
call plastic_disloucla_microstructure(temperature(ho)%p(tme),ipc,ip,el)
|
||||
case (PLASTICITY_TITANMOD_ID) plasticityType
|
||||
call plastic_titanmod_microstructure (temperature(ho)%p(tme),ipc,ip,el)
|
||||
case (PLASTICITY_NONLOCAL_ID) plasticityType
|
||||
call plastic_nonlocal_microstructure (Fe,Fp,ip,el)
|
||||
case (PLASTICITY_PHENOPLUS_ID) plasticityType
|
||||
call plastic_phenoplus_microstructure(orientations,ipc,ip,el)
|
||||
end select plasticityType
|
||||
|
||||
end subroutine constitutive_microstructure
|
||||
|
@ -501,23 +472,17 @@ subroutine constitutive_LpAndItsTangent(Lp, dLp_dTstar3333, dLp_dFi3333, Tstar_v
|
|||
PLASTICITY_NONE_ID, &
|
||||
PLASTICITY_ISOTROPIC_ID, &
|
||||
PLASTICITY_PHENOPOWERLAW_ID, &
|
||||
PLASTICITY_PHENOPLUS_ID, &
|
||||
PLASTICITY_DISLOTWIN_ID, &
|
||||
PLASTICITY_DISLOUCLA_ID, &
|
||||
PLASTICITY_TITANMOD_ID, &
|
||||
PLASTICITY_NONLOCAL_ID
|
||||
use plastic_isotropic, only: &
|
||||
plastic_isotropic_LpAndItsTangent
|
||||
use plastic_phenopowerlaw, only: &
|
||||
plastic_phenopowerlaw_LpAndItsTangent
|
||||
use plastic_phenoplus, only: &
|
||||
plastic_phenoplus_LpAndItsTangent
|
||||
use plastic_dislotwin, only: &
|
||||
plastic_dislotwin_LpAndItsTangent
|
||||
use plastic_disloucla, only: &
|
||||
plastic_disloucla_LpAndItsTangent
|
||||
use plastic_titanmod, only: &
|
||||
plastic_titanmod_LpAndItsTangent
|
||||
use plastic_nonlocal, only: &
|
||||
plastic_nonlocal_LpAndItsTangent
|
||||
|
||||
|
@ -560,8 +525,6 @@ subroutine constitutive_LpAndItsTangent(Lp, dLp_dTstar3333, dLp_dFi3333, Tstar_v
|
|||
call plastic_isotropic_LpAndItsTangent(Lp,dLp_dMstar,Mstar_v,ipc,ip,el)
|
||||
case (PLASTICITY_PHENOPOWERLAW_ID) plasticityType
|
||||
call plastic_phenopowerlaw_LpAndItsTangent(Lp,dLp_dMstar,Mstar_v,ipc,ip,el)
|
||||
case (PLASTICITY_PHENOPLUS_ID) plasticityType
|
||||
call plastic_phenoplus_LpAndItsTangent(Lp,dLp_dMstar,Mstar_v,ipc,ip,el)
|
||||
case (PLASTICITY_NONLOCAL_ID) plasticityType
|
||||
call plastic_nonlocal_LpAndItsTangent(Lp,dLp_dMstar,Mstar_v, &
|
||||
temperature(ho)%p(tme),ip,el)
|
||||
|
@ -571,9 +534,6 @@ subroutine constitutive_LpAndItsTangent(Lp, dLp_dTstar3333, dLp_dFi3333, Tstar_v
|
|||
case (PLASTICITY_DISLOUCLA_ID) plasticityType
|
||||
call plastic_disloucla_LpAndItsTangent(Lp,dLp_dMstar,Mstar_v, &
|
||||
temperature(ho)%p(tme), ipc,ip,el)
|
||||
case (PLASTICITY_TITANMOD_ID) plasticityType
|
||||
call plastic_titanmod_LpAndItsTangent(Lp,dLp_dMstar,Mstar_v, &
|
||||
temperature(ho)%p(tme), ipc,ip,el)
|
||||
end select plasticityType
|
||||
|
||||
dLp_dTstar3333 = math_Plain99to3333(dLp_dMstar)
|
||||
|
@ -884,10 +844,8 @@ subroutine constitutive_collectDotState(Tstar_v, FeArray, FpArray, subdt, subfra
|
|||
PLASTICITY_none_ID, &
|
||||
PLASTICITY_isotropic_ID, &
|
||||
PLASTICITY_phenopowerlaw_ID, &
|
||||
PLASTICITY_phenoplus_ID, &
|
||||
PLASTICITY_dislotwin_ID, &
|
||||
PLASTICITY_disloucla_ID, &
|
||||
PLASTICITY_titanmod_ID, &
|
||||
PLASTICITY_nonlocal_ID, &
|
||||
SOURCE_damage_isoDuctile_ID, &
|
||||
SOURCE_damage_anisoBrittle_ID, &
|
||||
|
@ -897,14 +855,10 @@ subroutine constitutive_collectDotState(Tstar_v, FeArray, FpArray, subdt, subfra
|
|||
plastic_isotropic_dotState
|
||||
use plastic_phenopowerlaw, only: &
|
||||
plastic_phenopowerlaw_dotState
|
||||
use plastic_phenoplus, only: &
|
||||
plastic_phenoplus_dotState
|
||||
use plastic_dislotwin, only: &
|
||||
plastic_dislotwin_dotState
|
||||
use plastic_disloucla, only: &
|
||||
plastic_disloucla_dotState
|
||||
use plastic_titanmod, only: &
|
||||
plastic_titanmod_dotState
|
||||
use plastic_nonlocal, only: &
|
||||
plastic_nonlocal_dotState
|
||||
use source_damage_isoDuctile, only: &
|
||||
|
@ -950,17 +904,12 @@ subroutine constitutive_collectDotState(Tstar_v, FeArray, FpArray, subdt, subfra
|
|||
call plastic_isotropic_dotState (Tstar_v,ipc,ip,el)
|
||||
case (PLASTICITY_PHENOPOWERLAW_ID) plasticityType
|
||||
call plastic_phenopowerlaw_dotState(Tstar_v,ipc,ip,el)
|
||||
case (PLASTICITY_PHENOPLUS_ID) plasticityType
|
||||
call plastic_phenoplus_dotState (Tstar_v,ipc,ip,el)
|
||||
case (PLASTICITY_DISLOTWIN_ID) plasticityType
|
||||
call plastic_dislotwin_dotState (Tstar_v,temperature(ho)%p(tme), &
|
||||
ipc,ip,el)
|
||||
case (PLASTICITY_DISLOUCLA_ID) plasticityType
|
||||
call plastic_disloucla_dotState (Tstar_v,temperature(ho)%p(tme), &
|
||||
ipc,ip,el)
|
||||
case (PLASTICITY_TITANMOD_ID) plasticityType
|
||||
call plastic_titanmod_dotState (Tstar_v,temperature(ho)%p(tme), &
|
||||
ipc,ip,el)
|
||||
case (PLASTICITY_NONLOCAL_ID) plasticityType
|
||||
call plastic_nonlocal_dotState (Tstar_v,FeArray,FpArray,temperature(ho)%p(tme), &
|
||||
subdt,subfracArray,ip,el)
|
||||
|
@ -1093,10 +1042,8 @@ function constitutive_postResults(Tstar_v, FeArray, ipc, ip, el)
|
|||
PLASTICITY_NONE_ID, &
|
||||
PLASTICITY_ISOTROPIC_ID, &
|
||||
PLASTICITY_PHENOPOWERLAW_ID, &
|
||||
PLASTICITY_PHENOPLUS_ID, &
|
||||
PLASTICITY_DISLOTWIN_ID, &
|
||||
PLASTICITY_DISLOUCLA_ID, &
|
||||
PLASTICITY_TITANMOD_ID, &
|
||||
PLASTICITY_NONLOCAL_ID, &
|
||||
SOURCE_damage_isoBrittle_ID, &
|
||||
SOURCE_damage_isoDuctile_ID, &
|
||||
|
@ -1106,14 +1053,10 @@ function constitutive_postResults(Tstar_v, FeArray, ipc, ip, el)
|
|||
plastic_isotropic_postResults
|
||||
use plastic_phenopowerlaw, only: &
|
||||
plastic_phenopowerlaw_postResults
|
||||
use plastic_phenoplus, only: &
|
||||
plastic_phenoplus_postResults
|
||||
use plastic_dislotwin, only: &
|
||||
plastic_dislotwin_postResults
|
||||
use plastic_disloucla, only: &
|
||||
plastic_disloucla_postResults
|
||||
use plastic_titanmod, only: &
|
||||
plastic_titanmod_postResults
|
||||
use plastic_nonlocal, only: &
|
||||
plastic_nonlocal_postResults
|
||||
use source_damage_isoBrittle, only: &
|
||||
|
@ -1153,16 +1096,11 @@ function constitutive_postResults(Tstar_v, FeArray, ipc, ip, el)
|
|||
endPos = plasticState(material_phase(ipc,ip,el))%sizePostResults
|
||||
|
||||
plasticityType: select case (phase_plasticity(material_phase(ipc,ip,el)))
|
||||
case (PLASTICITY_TITANMOD_ID) plasticityType
|
||||
constitutive_postResults(startPos:endPos) = plastic_titanmod_postResults(ipc,ip,el)
|
||||
case (PLASTICITY_ISOTROPIC_ID) plasticityType
|
||||
constitutive_postResults(startPos:endPos) = plastic_isotropic_postResults(Tstar_v,ipc,ip,el)
|
||||
case (PLASTICITY_PHENOPOWERLAW_ID) plasticityType
|
||||
constitutive_postResults(startPos:endPos) = &
|
||||
plastic_phenopowerlaw_postResults(Tstar_v,ipc,ip,el)
|
||||
case (PLASTICITY_PHENOPLUS_ID) plasticityType
|
||||
constitutive_postResults(startPos:endPos) = &
|
||||
plastic_phenoplus_postResults(Tstar_v,ipc,ip,el)
|
||||
case (PLASTICITY_DISLOTWIN_ID) plasticityType
|
||||
constitutive_postResults(startPos:endPos) = &
|
||||
plastic_dislotwin_postResults(Tstar_v,temperature(ho)%p(tme),ipc,ip,el)
|
||||
|
|
|
@ -137,7 +137,11 @@ contains
|
|||
!> @brief allocates and initialize per grain variables
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine crystallite_init
|
||||
use, intrinsic :: iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran 4.6 at the moment)
|
||||
#ifdef __GFORTRAN__
|
||||
use, intrinsic :: iso_fortran_env, only: &
|
||||
compiler_version, &
|
||||
compiler_options
|
||||
#endif
|
||||
use debug, only: &
|
||||
debug_info, &
|
||||
debug_reset, &
|
||||
|
@ -3084,35 +3088,49 @@ logical function crystallite_stateJump(ipc,ip,el)
|
|||
|
||||
implicit none
|
||||
integer(pInt), intent(in):: &
|
||||
el, & ! element index
|
||||
ip, & ! integration point index
|
||||
el, & ! element index
|
||||
ip, & ! integration point index
|
||||
ipc ! grain index
|
||||
|
||||
integer(pInt) :: &
|
||||
c, &
|
||||
p, &
|
||||
mySource, &
|
||||
myOffsetPlasticDeltaState, &
|
||||
myOffsetSourceDeltaState, &
|
||||
mySizePlasticDeltaState, &
|
||||
mySizeSourceDeltaState
|
||||
|
||||
c= phasememberAt(ipc,ip,el)
|
||||
c = phasememberAt(ipc,ip,el)
|
||||
p = phaseAt(ipc,ip,el)
|
||||
|
||||
call constitutive_collectDeltaState(crystallite_Tstar_v(1:6,ipc,ip,el), crystallite_Fe(1:3,1:3,ipc,ip,el), ipc,ip,el)
|
||||
mySizePlasticDeltaState = plasticState(p)%sizeDeltaState
|
||||
if( any(IEEE_is_NaN(plasticState(p)%deltaState(:,c)))) then ! NaN occured in deltaState
|
||||
|
||||
myOffsetPlasticDeltaState = plasticState(p)%offsetDeltaState
|
||||
mySizePlasticDeltaState = plasticState(p)%sizeDeltaState
|
||||
|
||||
if( any(IEEE_is_NaN(plasticState(p)%deltaState(1:mySizePlasticDeltaState,c)))) then ! NaN occured in deltaState
|
||||
crystallite_stateJump = .false.
|
||||
return
|
||||
endif
|
||||
plasticState(p)%state(1:mySizePlasticDeltaState,c) = plasticState(p)%state(1:mySizePlasticDeltaState,c) + &
|
||||
plasticState(p)%deltaState(1:mySizePlasticDeltaState,c)
|
||||
|
||||
plasticState(p)%state(myOffsetPlasticDeltaState + 1_pInt : &
|
||||
myOffsetPlasticDeltaState + mySizePlasticDeltaState,c) = &
|
||||
plasticState(p)%state(myOffsetPlasticDeltaState + 1_pInt : &
|
||||
myOffsetPlasticDeltaState + mySizePlasticDeltaState,c) + &
|
||||
plasticState(p)%deltaState(1:mySizePlasticDeltaState,c)
|
||||
|
||||
do mySource = 1_pInt, phase_Nsources(p)
|
||||
mySizeSourceDeltaState = sourceState(p)%p(mySource)%sizeDeltaState
|
||||
if( any(IEEE_is_NaN(sourceState(p)%p(mySource)%deltaState(:,c)))) then ! NaN occured in deltaState
|
||||
myOffsetSourceDeltaState = sourceState(p)%p(mySource)%offsetDeltaState
|
||||
mySizeSourceDeltaState = sourceState(p)%p(mySource)%sizeDeltaState
|
||||
if (any(IEEE_is_NaN(sourceState(p)%p(mySource)%deltaState(1:mySizeSourceDeltaState,c)))) then ! NaN occured in deltaState
|
||||
crystallite_stateJump = .false.
|
||||
return
|
||||
endif
|
||||
sourceState(p)%p(mySource)%state(1:mySizeSourceDeltaState,c) = &
|
||||
sourceState(p)%p(mySource)%state(1:mySizeSourceDeltaState,c) + &
|
||||
sourceState(p)%p(mySource)%state(myOffsetSourceDeltaState + 1_pInt : &
|
||||
myOffsetSourceDeltaState + mySizeSourceDeltaState,c) = &
|
||||
sourceState(p)%p(mySource)%state(myOffsetSourceDeltaState + 1_pInt : &
|
||||
myOffsetSourceDeltaState + mySizeSourceDeltaState,c) + &
|
||||
sourceState(p)%p(mySource)%deltaState(1:mySizeSourceDeltaState,c)
|
||||
enddo
|
||||
|
||||
|
@ -3123,7 +3141,9 @@ logical function crystallite_stateJump(ipc,ip,el)
|
|||
.or. .not. iand(debug_level(debug_crystallite), debug_levelSelective) /= 0_pInt)) then
|
||||
write(6,'(a,i8,1x,i2,1x,i3, /)') '<< CRYST >> update state at el ip ipc ',el,ip,ipc
|
||||
write(6,'(a,/,(12x,12(e12.5,1x)),/)') '<< CRYST >> deltaState', plasticState(p)%deltaState(1:mySizePlasticDeltaState,c)
|
||||
write(6,'(a,/,(12x,12(e12.5,1x)),/)') '<< CRYST >> new state', plasticState(p)%state (1:mySizePlasticDeltaState,c)
|
||||
write(6,'(a,/,(12x,12(e12.5,1x)),/)') '<< CRYST >> new state', &
|
||||
plasticState(p)%state(myOffsetSourceDeltaState + 1_pInt : &
|
||||
myOffsetSourceDeltaState + mySizeSourceDeltaState,c)
|
||||
endif
|
||||
#endif
|
||||
|
||||
|
|
|
@ -41,7 +41,11 @@ contains
|
|||
!> @brief allocates all neccessary fields, reads information from material configuration file
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine damage_local_init(fileUnit)
|
||||
use, intrinsic :: iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran 4.6 at the moment)
|
||||
#ifdef __GFORTRAN__
|
||||
use, intrinsic :: iso_fortran_env, only: &
|
||||
compiler_version, &
|
||||
compiler_options
|
||||
#endif
|
||||
use IO, only: &
|
||||
IO_read, &
|
||||
IO_lc, &
|
||||
|
|
|
@ -16,7 +16,11 @@ contains
|
|||
!> @brief allocates all neccessary fields, reads information from material configuration file
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine damage_none_init()
|
||||
use, intrinsic :: iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran 4.6 at the moment)
|
||||
#ifdef __GFORTRAN__
|
||||
use, intrinsic :: iso_fortran_env, only: &
|
||||
compiler_version, &
|
||||
compiler_options
|
||||
#endif
|
||||
use prec, only: &
|
||||
pInt
|
||||
use IO, only: &
|
||||
|
|
|
@ -46,7 +46,11 @@ contains
|
|||
!> @details reads in material parameters, allocates arrays, and does sanity checks
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine damage_nonlocal_init(fileUnit)
|
||||
use, intrinsic :: iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran 4.6 at the moment)
|
||||
#ifdef __GFORTRAN__
|
||||
use, intrinsic :: iso_fortran_env, only: &
|
||||
compiler_version, &
|
||||
compiler_options
|
||||
#endif
|
||||
use IO, only: &
|
||||
IO_read, &
|
||||
IO_lc, &
|
||||
|
|
|
@ -102,7 +102,11 @@ contains
|
|||
!> @brief reads in parameters from debug.config and allocates arrays
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine debug_init
|
||||
use, intrinsic :: iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran 4.6 at the moment)
|
||||
#ifdef __GFORTRAN__
|
||||
use, intrinsic :: iso_fortran_env, only: &
|
||||
compiler_version, &
|
||||
compiler_options
|
||||
#endif
|
||||
use numerics, only: &
|
||||
nStress, &
|
||||
nState, &
|
||||
|
|
|
@ -71,7 +71,11 @@ contains
|
|||
!> @brief module initialization
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine homogenization_init
|
||||
use, intrinsic :: iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran 4.6 at the moment)
|
||||
#ifdef __GFORTRAN__
|
||||
use, intrinsic :: iso_fortran_env, only: &
|
||||
compiler_version, &
|
||||
compiler_options
|
||||
#endif
|
||||
use math, only: &
|
||||
math_I3
|
||||
use debug, only: &
|
||||
|
|
|
@ -72,7 +72,11 @@ contains
|
|||
!> @brief allocates all neccessary fields, reads information from material configuration file
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine homogenization_RGC_init(fileUnit)
|
||||
use, intrinsic :: iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran 4.6 at the moment)
|
||||
#ifdef __GFORTRAN__
|
||||
use, intrinsic :: iso_fortran_env, only: &
|
||||
compiler_version, &
|
||||
compiler_options
|
||||
#endif
|
||||
use prec, only: &
|
||||
pReal, &
|
||||
pInt
|
||||
|
|
|
@ -49,7 +49,11 @@ contains
|
|||
!> @brief allocates all neccessary fields, reads information from material configuration file
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine homogenization_isostrain_init(fileUnit)
|
||||
use, intrinsic :: iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran 4.6 at the moment)
|
||||
#ifdef __GFORTRAN__
|
||||
use, intrinsic :: iso_fortran_env, only: &
|
||||
compiler_version, &
|
||||
compiler_options
|
||||
#endif
|
||||
use prec, only: &
|
||||
pReal
|
||||
use debug, only: &
|
||||
|
|
|
@ -18,7 +18,11 @@ contains
|
|||
!> @brief allocates all neccessary fields, reads information from material configuration file
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine homogenization_none_init()
|
||||
use, intrinsic :: iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran 4.6 at the moment)
|
||||
#ifdef __GFORTRAN__
|
||||
use, intrinsic :: iso_fortran_env, only: &
|
||||
compiler_version, &
|
||||
compiler_options
|
||||
#endif
|
||||
use prec, only: &
|
||||
pReal, &
|
||||
pInt
|
||||
|
|
|
@ -51,7 +51,11 @@ contains
|
|||
!> @details reads in material parameters, allocates arrays, and does sanity checks
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine hydrogenflux_cahnhilliard_init(fileUnit)
|
||||
use, intrinsic :: iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran 4.6 at the moment)
|
||||
#ifdef __GFORTRAN__
|
||||
use, intrinsic :: iso_fortran_env, only: &
|
||||
compiler_version, &
|
||||
compiler_options
|
||||
#endif
|
||||
use IO, only: &
|
||||
IO_read, &
|
||||
IO_lc, &
|
||||
|
|
|
@ -16,7 +16,11 @@ contains
|
|||
!> @brief allocates all neccessary fields, reads information from material configuration file
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine hydrogenflux_isoconc_init()
|
||||
use, intrinsic :: iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran 4.6 at the moment)
|
||||
#ifdef __GFORTRAN__
|
||||
use, intrinsic :: iso_fortran_env, only: &
|
||||
compiler_version, &
|
||||
compiler_options
|
||||
#endif
|
||||
use prec, only: &
|
||||
pReal, &
|
||||
pInt
|
||||
|
|
|
@ -51,7 +51,11 @@ contains
|
|||
!> @details reads in material parameters, allocates arrays, and does sanity checks
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine kinematics_cleavage_opening_init(fileUnit)
|
||||
use, intrinsic :: iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran 4.6 at the moment)
|
||||
#ifdef __GFORTRAN__
|
||||
use, intrinsic :: iso_fortran_env, only: &
|
||||
compiler_version, &
|
||||
compiler_options
|
||||
#endif
|
||||
use debug, only: &
|
||||
debug_level,&
|
||||
debug_constitutive,&
|
||||
|
|
|
@ -41,7 +41,11 @@ contains
|
|||
!> @details reads in material parameters, allocates arrays, and does sanity checks
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine kinematics_hydrogen_strain_init(fileUnit)
|
||||
use, intrinsic :: iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran 4.6 at the moment)
|
||||
#ifdef __GFORTRAN__
|
||||
use, intrinsic :: iso_fortran_env, only: &
|
||||
compiler_version, &
|
||||
compiler_options
|
||||
#endif
|
||||
use debug, only: &
|
||||
debug_level,&
|
||||
debug_constitutive,&
|
||||
|
|
|
@ -51,7 +51,11 @@ contains
|
|||
!> @details reads in material parameters, allocates arrays, and does sanity checks
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine kinematics_slipplane_opening_init(fileUnit)
|
||||
use, intrinsic :: iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran 4.6 at the moment)
|
||||
#ifdef __GFORTRAN__
|
||||
use, intrinsic :: iso_fortran_env, only: &
|
||||
compiler_version, &
|
||||
compiler_options
|
||||
#endif
|
||||
use debug, only: &
|
||||
debug_level,&
|
||||
debug_constitutive,&
|
||||
|
|
|
@ -41,7 +41,11 @@ contains
|
|||
!> @details reads in material parameters, allocates arrays, and does sanity checks
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine kinematics_thermal_expansion_init(fileUnit)
|
||||
use, intrinsic :: iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran 4.6 at the moment)
|
||||
#ifdef __GFORTRAN__
|
||||
use, intrinsic :: iso_fortran_env, only: &
|
||||
compiler_version, &
|
||||
compiler_options
|
||||
#endif
|
||||
use debug, only: &
|
||||
debug_level,&
|
||||
debug_constitutive,&
|
||||
|
|
|
@ -41,7 +41,11 @@ contains
|
|||
!> @details reads in material parameters, allocates arrays, and does sanity checks
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine kinematics_vacancy_strain_init(fileUnit)
|
||||
use, intrinsic :: iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran 4.6 at the moment)
|
||||
#ifdef __GFORTRAN__
|
||||
use, intrinsic :: iso_fortran_env, only: &
|
||||
compiler_version, &
|
||||
compiler_options
|
||||
#endif
|
||||
use debug, only: &
|
||||
debug_level,&
|
||||
debug_constitutive,&
|
||||
|
|
|
@ -1243,7 +1243,11 @@ contains
|
|||
!> @brief Module initialization
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine lattice_init
|
||||
use, intrinsic :: iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran 4.6 at the moment)
|
||||
#ifdef __GFORTRAN__
|
||||
use, intrinsic :: iso_fortran_env, only: &
|
||||
compiler_version, &
|
||||
compiler_options
|
||||
#endif
|
||||
use IO, only: &
|
||||
IO_open_file,&
|
||||
IO_open_jobFile_stat, &
|
||||
|
|
|
@ -25,10 +25,8 @@ module material
|
|||
PLASTICITY_none_label = 'none', &
|
||||
PLASTICITY_isotropic_label = 'isotropic', &
|
||||
PLASTICITY_phenopowerlaw_label = 'phenopowerlaw', &
|
||||
PLASTICITY_phenoplus_label = 'phenoplus', &
|
||||
PLASTICITY_dislotwin_label = 'dislotwin', &
|
||||
PLASTICITY_disloucla_label = 'disloucla', &
|
||||
PLASTICITY_titanmod_label = 'titanmod', &
|
||||
PLASTICITY_nonlocal_label = 'nonlocal', &
|
||||
SOURCE_thermal_dissipation_label = 'thermal_dissipation', &
|
||||
SOURCE_thermal_externalheat_label = 'thermal_externalheat', &
|
||||
|
@ -74,10 +72,8 @@ module material
|
|||
PLASTICITY_none_ID, &
|
||||
PLASTICITY_isotropic_ID, &
|
||||
PLASTICITY_phenopowerlaw_ID, &
|
||||
PLASTICITY_phenoplus_ID, &
|
||||
PLASTICITY_dislotwin_ID, &
|
||||
PLASTICITY_disloucla_ID, &
|
||||
PLASTICITY_titanmod_ID, &
|
||||
PLASTICITY_nonlocal_ID
|
||||
end enum
|
||||
|
||||
|
@ -312,10 +308,8 @@ module material
|
|||
PLASTICITY_none_ID, &
|
||||
PLASTICITY_isotropic_ID, &
|
||||
PLASTICITY_phenopowerlaw_ID, &
|
||||
PLASTICITY_phenoplus_ID, &
|
||||
PLASTICITY_dislotwin_ID, &
|
||||
PLASTICITY_disloucla_ID, &
|
||||
PLASTICITY_titanmod_ID, &
|
||||
PLASTICITY_nonlocal_ID, &
|
||||
SOURCE_thermal_dissipation_ID, &
|
||||
SOURCE_thermal_externalheat_ID, &
|
||||
|
@ -367,7 +361,11 @@ contains
|
|||
!> material.config
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine material_init()
|
||||
use, intrinsic :: iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran 4.6 at the moment)
|
||||
#ifdef __GFORTRAN__
|
||||
use, intrinsic :: iso_fortran_env, only: &
|
||||
compiler_version, &
|
||||
compiler_options
|
||||
#endif
|
||||
use IO, only: &
|
||||
IO_error, &
|
||||
IO_open_file, &
|
||||
|
@ -985,14 +983,10 @@ subroutine material_parsePhase(fileUnit,myPart)
|
|||
phase_plasticity(section) = PLASTICITY_ISOTROPIC_ID
|
||||
case (PLASTICITY_PHENOPOWERLAW_label)
|
||||
phase_plasticity(section) = PLASTICITY_PHENOPOWERLAW_ID
|
||||
case (PLASTICITY_PHENOPLUS_label)
|
||||
phase_plasticity(section) = PLASTICITY_PHENOPLUS_ID
|
||||
case (PLASTICITY_DISLOTWIN_label)
|
||||
phase_plasticity(section) = PLASTICITY_DISLOTWIN_ID
|
||||
case (PLASTICITY_DISLOUCLA_label)
|
||||
phase_plasticity(section) = PLASTICITY_DISLOUCLA_ID
|
||||
case (PLASTICITY_TITANMOD_label)
|
||||
phase_plasticity(section) = PLASTICITY_TITANMOD_ID
|
||||
case (PLASTICITY_NONLOCAL_label)
|
||||
phase_plasticity(section) = PLASTICITY_NONLOCAL_ID
|
||||
case default
|
||||
|
|
122
src/math.f90
|
@ -172,7 +172,11 @@ contains
|
|||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine math_init
|
||||
|
||||
use, intrinsic :: iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran 4.6 at the moment)
|
||||
#ifdef __GFORTRAN__
|
||||
use, intrinsic :: iso_fortran_env, only: &
|
||||
compiler_version, &
|
||||
compiler_options
|
||||
#endif
|
||||
use numerics, only: fixedSeed
|
||||
use IO, only: IO_timeStamp
|
||||
|
||||
|
@ -1435,35 +1439,37 @@ end function math_RtoQ
|
|||
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief rotation matrix from Euler angles (in radians)
|
||||
!> @details rotation matrix is meant to represent a PASSIVE rotation,
|
||||
!> @details composed of INTRINSIC rotations around the axes of the
|
||||
!> @details rotating reference frame
|
||||
!> @details (see http://en.wikipedia.org/wiki/Euler_angles for definitions)
|
||||
!> @brief rotation matrix from Bunge-Euler (3-1-3) angles (in radians)
|
||||
!> @details rotation matrix is meant to represent a PASSIVE rotation, composed of INTRINSIC
|
||||
!> @details rotations around the axes of the details rotating reference frame.
|
||||
!> @details similar to eu2om from "D Rowenhorst et al. Consistent representations of and conversions
|
||||
!> @details between 3D rotations, Model. Simul. Mater. Sci. Eng. 23-8 (2015)", but R is transposed
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
pure function math_EulerToR(Euler)
|
||||
|
||||
implicit none
|
||||
real(pReal), dimension(3), intent(in) :: Euler
|
||||
real(pReal), dimension(3,3) :: math_EulerToR
|
||||
real(pReal) c1, c, c2, s1, s, s2
|
||||
real(pReal) :: c1, C, c2, s1, S, s2
|
||||
|
||||
C1 = cos(Euler(1))
|
||||
c1 = cos(Euler(1))
|
||||
C = cos(Euler(2))
|
||||
C2 = cos(Euler(3))
|
||||
S1 = sin(Euler(1))
|
||||
c2 = cos(Euler(3))
|
||||
s1 = sin(Euler(1))
|
||||
S = sin(Euler(2))
|
||||
S2 = sin(Euler(3))
|
||||
s2 = sin(Euler(3))
|
||||
|
||||
math_EulerToR(1,1)=C1*C2-S1*S2*C
|
||||
math_EulerToR(1,2)=-C1*S2-S1*C2*C
|
||||
math_EulerToR(1,3)=S1*S
|
||||
math_EulerToR(2,1)=S1*C2+C1*S2*C
|
||||
math_EulerToR(2,2)=-S1*S2+C1*C2*C
|
||||
math_EulerToR(2,3)=-C1*S
|
||||
math_EulerToR(3,1)=S2*S
|
||||
math_EulerToR(3,2)=C2*S
|
||||
math_EulerToR(3,3)=C
|
||||
math_EulerToR(1,1) = c1*c2 -s1*C*s2
|
||||
math_EulerToR(1,2) = -c1*s2 -s1*C*c2
|
||||
math_EulerToR(1,3) = s1*S
|
||||
|
||||
math_EulerToR(2,1) = s1*c2 +c1*C*s2
|
||||
math_EulerToR(2,2) = -s1*s2 +c1*C*c2
|
||||
math_EulerToR(2,3) = -c1*S
|
||||
|
||||
math_EulerToR(3,1) = S*s2
|
||||
math_EulerToR(3,2) = S*c2
|
||||
math_EulerToR(3,3) = C
|
||||
|
||||
math_EulerToR = transpose(math_EulerToR) ! convert to passive rotation
|
||||
|
||||
|
@ -1471,29 +1477,29 @@ end function math_EulerToR
|
|||
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief quaternion (w+ix+jy+kz) from 3-1-3 Euler angles (in radians)
|
||||
!> @details quaternion is meant to represent a PASSIVE rotation,
|
||||
!> @details composed of INTRINSIC rotations around the axes of the
|
||||
!> @details rotating reference frame
|
||||
!> @details (see http://en.wikipedia.org/wiki/Euler_angles for definitions)
|
||||
!> @brief quaternion (w+ix+jy+kz) from Bunge-Euler (3-1-3) angles (in radians)
|
||||
!> @details rotation matrix is meant to represent a PASSIVE rotation, composed of INTRINSIC
|
||||
!> @details rotations around the axes of the details rotating reference frame.
|
||||
!> @details similar to eu2qu from "D Rowenhorst et al. Consistent representations of and
|
||||
!> @details conversions between 3D rotations, Model. Simul. Mater. Sci. Eng. 23-8 (2015)", but
|
||||
!> @details Q is conjucated and Q is not reversed for Q(0) < 0.
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
pure function math_EulerToQ(eulerangles)
|
||||
|
||||
implicit none
|
||||
real(pReal), dimension(3), intent(in) :: eulerangles
|
||||
real(pReal), dimension(4) :: math_EulerToQ
|
||||
real(pReal), dimension(3) :: halfangles
|
||||
real(pReal) :: c, s
|
||||
real(pReal) :: c, s, sigma, delta
|
||||
|
||||
halfangles = 0.5_pReal * eulerangles
|
||||
|
||||
c = cos(halfangles(2))
|
||||
s = sin(halfangles(2))
|
||||
|
||||
math_EulerToQ= [cos(halfangles(1)+halfangles(3)) * c, &
|
||||
cos(halfangles(1)-halfangles(3)) * s, &
|
||||
sin(halfangles(1)-halfangles(3)) * s, &
|
||||
sin(halfangles(1)+halfangles(3)) * c ]
|
||||
c = cos(0.5_pReal * eulerangles(2))
|
||||
s = sin(0.5_pReal * eulerangles(2))
|
||||
sigma = 0.5_pReal * (eulerangles(1)+eulerangles(3))
|
||||
delta = 0.5_pReal * (eulerangles(1)-eulerangles(3))
|
||||
|
||||
math_EulerToQ= [c * cos(sigma), &
|
||||
s * cos(delta), &
|
||||
s * sin(delta), &
|
||||
c * sin(sigma) ]
|
||||
math_EulerToQ = math_qConj(math_EulerToQ) ! convert to passive rotation
|
||||
|
||||
end function math_EulerToQ
|
||||
|
@ -1504,6 +1510,8 @@ end function math_EulerToQ
|
|||
!> @details rotation matrix is meant to represent a ACTIVE rotation
|
||||
!> @details (see http://en.wikipedia.org/wiki/Euler_angles for definitions)
|
||||
!> @details formula for active rotation taken from http://mathworld.wolfram.com/RodriguesRotationFormula.html
|
||||
!> @details equivalent to eu2om (P=-1) from "D Rowenhorst et al. Consistent representations of and
|
||||
!> @details conversions between 3D rotations, Model. Simul. Mater. Sci. Eng. 23-8 (2015)"
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
pure function math_axisAngleToR(axis,omega)
|
||||
|
||||
|
@ -1511,31 +1519,31 @@ pure function math_axisAngleToR(axis,omega)
|
|||
real(pReal), dimension(3,3) :: math_axisAngleToR
|
||||
real(pReal), dimension(3), intent(in) :: axis
|
||||
real(pReal), intent(in) :: omega
|
||||
real(pReal), dimension(3) :: axisNrm
|
||||
real(pReal), dimension(3) :: n
|
||||
real(pReal) :: norm,s,c,c1
|
||||
|
||||
norm = norm2(axis)
|
||||
if (norm > 1.0e-8_pReal) then ! non-zero rotation
|
||||
axisNrm = axis/norm ! normalize axis to be sure
|
||||
wellDefined: if (norm > 1.0e-8_pReal) then
|
||||
n = axis/norm ! normalize axis to be sure
|
||||
|
||||
s = sin(omega)
|
||||
c = cos(omega)
|
||||
c1 = 1.0_pReal - c
|
||||
|
||||
math_axisAngleToR(1,1) = c + c1*axisNrm(1)**2.0_pReal
|
||||
math_axisAngleToR(1,2) = -s*axisNrm(3) + c1*axisNrm(1)*axisNrm(2)
|
||||
math_axisAngleToR(1,3) = s*axisNrm(2) + c1*axisNrm(1)*axisNrm(3)
|
||||
math_axisAngleToR(1,1) = c + c1*n(1)**2.0_pReal
|
||||
math_axisAngleToR(1,2) = c1*n(1)*n(2) - s*n(3)
|
||||
math_axisAngleToR(1,3) = c1*n(1)*n(3) + s*n(2)
|
||||
|
||||
math_axisAngleToR(2,1) = s*axisNrm(3) + c1*axisNrm(2)*axisNrm(1)
|
||||
math_axisAngleToR(2,2) = c + c1*axisNrm(2)**2.0_pReal
|
||||
math_axisAngleToR(2,3) = -s*axisNrm(1) + c1*axisNrm(2)*axisNrm(3)
|
||||
math_axisAngleToR(2,1) = c1*n(1)*n(2) + s*n(3)
|
||||
math_axisAngleToR(2,2) = c + c1*n(2)**2.0_pReal
|
||||
math_axisAngleToR(2,3) = c1*n(2)*n(3) - s*n(1)
|
||||
|
||||
math_axisAngleToR(3,1) = -s*axisNrm(2) + c1*axisNrm(3)*axisNrm(1)
|
||||
math_axisAngleToR(3,2) = s*axisNrm(1) + c1*axisNrm(3)*axisNrm(2)
|
||||
math_axisAngleToR(3,3) = c + c1*axisNrm(3)**2.0_pReal
|
||||
else
|
||||
math_axisAngleToR(3,1) = c1*n(1)*n(3) - s*n(2)
|
||||
math_axisAngleToR(3,2) = c1*n(2)*n(3) + s*n(1)
|
||||
math_axisAngleToR(3,3) = c + c1*n(3)**2.0_pReal
|
||||
else wellDefined
|
||||
math_axisAngleToR = math_I3
|
||||
endif
|
||||
endif wellDefined
|
||||
|
||||
end function math_axisAngleToR
|
||||
|
||||
|
@ -1544,6 +1552,8 @@ end function math_axisAngleToR
|
|||
!> @brief rotation matrix from axis and angle (in radians)
|
||||
!> @details rotation matrix is meant to represent a PASSIVE rotation
|
||||
!> @details (see http://en.wikipedia.org/wiki/Euler_angles for definitions)
|
||||
!> @details eq-uivalent to eu2qu (P=+1) from "D Rowenhorst et al. Consistent representations of and
|
||||
!> @details conversions between 3D rotations, Model. Simul. Mater. Sci. Eng. 23-8 (2015)"
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
pure function math_EulerAxisAngleToR(axis,omega)
|
||||
|
||||
|
@ -1580,8 +1590,10 @@ end function math_EulerAxisAngleToQ
|
|||
!> @brief quaternion (w+ix+jy+kz) from axis and angle (in radians)
|
||||
!> @details quaternion is meant to represent an ACTIVE rotation
|
||||
!> @details (see http://en.wikipedia.org/wiki/Euler_angles for definitions)
|
||||
!> @details formula for active rotation taken from
|
||||
!> @details formula for active rotation taken from
|
||||
!> @details http://en.wikipedia.org/wiki/Rotation_representation_%28mathematics%29#Rodrigues_parameters
|
||||
!> @details equivalent to eu2qu (P=+1) from "D Rowenhorst et al. Consistent representations of and
|
||||
!> @details conversions between 3D rotations, Model. Simul. Mater. Sci. Eng. 23-8 (2015)"
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
pure function math_axisAngleToQ(axis,omega)
|
||||
|
||||
|
@ -1592,13 +1604,13 @@ pure function math_axisAngleToQ(axis,omega)
|
|||
real(pReal), dimension(3) :: axisNrm
|
||||
real(pReal) :: norm
|
||||
|
||||
norm = sqrt(math_mul3x3(axis,axis))
|
||||
rotation: if (norm > 1.0e-8_pReal) then
|
||||
norm = norm2(axis)
|
||||
wellDefined: if (norm > 1.0e-8_pReal) then
|
||||
axisNrm = axis/norm ! normalize axis to be sure
|
||||
math_axisAngleToQ = [cos(0.5_pReal*omega), sin(0.5_pReal*omega) * axisNrm(1:3)]
|
||||
else rotation
|
||||
else wellDefined
|
||||
math_axisAngleToQ = [1.0_pReal,0.0_pReal,0.0_pReal,0.0_pReal]
|
||||
endif rotation
|
||||
endif wellDefined
|
||||
|
||||
end function math_axisAngleToQ
|
||||
|
||||
|
|
38
src/mesh.f90
|
@ -472,7 +472,11 @@ contains
|
|||
!! Order and routines strongly depend on type of solver
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine mesh_init(ip,el)
|
||||
use, intrinsic :: iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran 4.6 at the moment)
|
||||
#ifdef __GFORTRAN__
|
||||
use, intrinsic :: iso_fortran_env, only: &
|
||||
compiler_version, &
|
||||
compiler_options
|
||||
#endif
|
||||
use DAMASK_interface
|
||||
use IO, only: &
|
||||
#ifdef Abaqus
|
||||
|
@ -706,7 +710,6 @@ integer(pInt) function mesh_FEasCP(what,myID)
|
|||
mesh_FEasCP = lookupMap(2_pInt,upper)
|
||||
return
|
||||
endif
|
||||
! this might be the reason for the heap problems
|
||||
binarySearch: do while (upper-lower > 1_pInt)
|
||||
center = (lower+upper)/2_pInt
|
||||
if (lookupMap(1_pInt,center) < myID) then
|
||||
|
@ -1692,13 +1695,15 @@ subroutine mesh_marc_count_cpElements(fileUnit)
|
|||
use IO, only: IO_lc, &
|
||||
IO_stringValue, &
|
||||
IO_stringPos, &
|
||||
IO_countContinuousIntValues
|
||||
IO_countContinuousIntValues, &
|
||||
IO_error, &
|
||||
IO_intValue
|
||||
|
||||
implicit none
|
||||
integer(pInt), intent(in) :: fileUnit
|
||||
|
||||
integer(pInt), allocatable, dimension(:) :: chunkPos
|
||||
integer(pInt) :: i
|
||||
integer(pInt) :: i, version
|
||||
character(len=300):: line
|
||||
|
||||
mesh_NcpElems = 0_pInt
|
||||
|
@ -1709,15 +1714,26 @@ subroutine mesh_marc_count_cpElements(fileUnit)
|
|||
do
|
||||
read (fileUnit,610,END=620) line
|
||||
chunkPos = IO_stringPos(line)
|
||||
|
||||
if ( IO_lc(IO_stringValue(line,chunkPos,1_pInt)) == 'hypoelastic') then
|
||||
do i=1_pInt,3_pInt+hypoelasticTableStyle ! Skip 3 or 4 lines
|
||||
if ( IO_lc(IO_stringValue(line,chunkPos,1_pInt)) == 'version') then
|
||||
version = IO_intValue(line,chunkPos,2_pInt)
|
||||
if (version < 13) then ! Marc 2016 or earlier
|
||||
rewind(fileUnit)
|
||||
do
|
||||
read (fileUnit,610,END=620) line
|
||||
chunkPos = IO_stringPos(line)
|
||||
if ( IO_lc(IO_stringValue(line,chunkPos,1_pInt)) == 'hypoelastic') then
|
||||
do i=1_pInt,3_pInt+hypoelasticTableStyle ! Skip 3 or 4 lines
|
||||
read (fileUnit,610,END=620) line
|
||||
enddo
|
||||
mesh_NcpElems = mesh_NcpElems + IO_countContinuousIntValues(fileUnit) ! why not simply mesh_NcpElems = IO_countContinuousIntValues(fileUnit)? keyword hypoelastic might appear several times
|
||||
exit
|
||||
endif
|
||||
enddo
|
||||
mesh_NcpElems = mesh_NcpElems + IO_countContinuousIntValues(fileUnit) ! why not simply mesh_NcpElems = IO_countContinuousIntValues(fileUnit)?
|
||||
exit
|
||||
endif
|
||||
enddo
|
||||
else ! Marc2017 and later
|
||||
call IO_error(error_ID=701_pInt)
|
||||
end if
|
||||
end if
|
||||
enddo
|
||||
|
||||
620 end subroutine mesh_marc_count_cpElements
|
||||
|
||||
|
|
|
@ -198,7 +198,11 @@ contains
|
|||
! a sanity check
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine numerics_init
|
||||
use, intrinsic :: iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran 4.6 at the moment)
|
||||
#ifdef __GFORTRAN__
|
||||
use, intrinsic :: iso_fortran_env, only: &
|
||||
compiler_version, &
|
||||
compiler_options
|
||||
#endif
|
||||
use IO, only: &
|
||||
IO_read, &
|
||||
IO_error, &
|
||||
|
|
|
@ -119,7 +119,11 @@ contains
|
|||
!> @details reads in material parameters, allocates arrays, and does sanity checks
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine plastic_disloUCLA_init(fileUnit)
|
||||
use, intrinsic :: iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran 4.6 at the moment)
|
||||
#ifdef __GFORTRAN__
|
||||
use, intrinsic :: iso_fortran_env, only: &
|
||||
compiler_version, &
|
||||
compiler_options
|
||||
#endif
|
||||
use debug, only: &
|
||||
debug_level,&
|
||||
debug_constitutive,&
|
||||
|
|
|
@ -198,7 +198,11 @@ contains
|
|||
!> @details reads in material parameters, allocates arrays, and does sanity checks
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine plastic_dislotwin_init(fileUnit)
|
||||
use, intrinsic :: iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran 4.6 at the moment)
|
||||
#ifdef __GFORTRAN__
|
||||
use, intrinsic :: iso_fortran_env, only: &
|
||||
compiler_version, &
|
||||
compiler_options
|
||||
#endif
|
||||
use prec, only: &
|
||||
dEq0, &
|
||||
dNeq0, &
|
||||
|
|
|
@ -60,15 +60,18 @@ module plastic_isotropic
|
|||
flowstress, &
|
||||
accumulatedShear
|
||||
end type
|
||||
|
||||
type, private :: tIsotropicAbsTol !< internal alias for abs tolerance in state
|
||||
real(pReal), pointer :: & ! scalars along NipcMyInstance
|
||||
flowstress, &
|
||||
accumulatedShear
|
||||
end type
|
||||
|
||||
type(tIsotropicState), allocatable, dimension(:), private :: & !< state aliases per instance
|
||||
state, &
|
||||
state0, &
|
||||
dotState
|
||||
|
||||
type(tIsotropicAbsTol), allocatable, dimension(:), private :: & !< state aliases per instance
|
||||
stateAbsTol
|
||||
|
||||
|
@ -87,7 +90,11 @@ contains
|
|||
!> @details reads in material parameters, allocates arrays, and does sanity checks
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine plastic_isotropic_init(fileUnit)
|
||||
use, intrinsic :: iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran 4.6 at the moment)
|
||||
#ifdef __GFORTRAN__
|
||||
use, intrinsic :: iso_fortran_env, only: &
|
||||
compiler_version, &
|
||||
compiler_options
|
||||
#endif
|
||||
use debug, only: &
|
||||
debug_level, &
|
||||
debug_constitutive, &
|
||||
|
@ -140,7 +147,7 @@ subroutine plastic_isotropic_init(fileUnit)
|
|||
extmsg = ''
|
||||
character(len=64) :: &
|
||||
outputtag = ''
|
||||
integer(pInt) :: NipcMyPhase
|
||||
integer(pInt) :: NipcMyPhase
|
||||
|
||||
write(6,'(/,a)') ' <<<+- constitutive_'//PLASTICITY_ISOTROPIC_label//' init -+>>>'
|
||||
write(6,'(a15,a)') ' Current time: ',IO_timeStamp()
|
||||
|
@ -293,9 +300,9 @@ subroutine plastic_isotropic_init(fileUnit)
|
|||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
! allocate state arrays
|
||||
sizeState = 2_pInt ! flowstress, accumulated_shear
|
||||
sizeDotState = sizeState ! both evolve
|
||||
sizeDotState = 2_pInt ! flowstress, accumulated_shear
|
||||
sizeDeltaState = 0_pInt ! no sudden jumps in state
|
||||
sizeState = sizeDotState + sizeDeltaState
|
||||
plasticState(phase)%sizeState = sizeState
|
||||
plasticState(phase)%sizeDotState = sizeDotState
|
||||
plasticState(phase)%sizeDeltaState = sizeDeltaState
|
||||
|
@ -418,7 +425,7 @@ subroutine plastic_isotropic_LpAndItsTangent(Lp,dLp_dTstar99,Tstar_v,ipc,ip,el)
|
|||
* ( sqrt(1.5_pReal) * norm_Tstar_dev / param(instance)%fTaylor / state(instance)%flowstress(of) ) &
|
||||
**param(instance)%n
|
||||
|
||||
Lp = Tstar_dev_33/norm_Tstar_dev * gamma_dot/param(instance)%fTaylor
|
||||
Lp = Tstar_dev_33/norm_Tstar_dev * gamma_dot/param(instance)%fTaylor
|
||||
|
||||
if (iand(debug_level(debug_constitutive), debug_levelExtensive) /= 0_pInt &
|
||||
.and. ((el == debug_e .and. ip == debug_i .and. ipc == debug_g) &
|
||||
|
|
|
@ -26,7 +26,11 @@ contains
|
|||
!> @details reads in material parameters, allocates arrays, and does sanity checks
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine plastic_none_init
|
||||
use, intrinsic :: iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran 4.6 at the moment)
|
||||
#ifdef __GFORTRAN__
|
||||
use, intrinsic :: iso_fortran_env, only: &
|
||||
compiler_version, &
|
||||
compiler_options
|
||||
#endif
|
||||
use debug, only: &
|
||||
debug_level, &
|
||||
debug_constitutive, &
|
||||
|
|
|
@ -123,7 +123,11 @@ contains
|
|||
!> @details reads in material parameters, allocates arrays, and does sanity checks
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine plastic_phenopowerlaw_init(fileUnit)
|
||||
use, intrinsic :: iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran 4.6 at the moment)
|
||||
#ifdef __GFORTRAN__
|
||||
use, intrinsic :: iso_fortran_env, only: &
|
||||
compiler_version, &
|
||||
compiler_options
|
||||
#endif
|
||||
use prec, only: &
|
||||
dEq0
|
||||
use debug, only: &
|
||||
|
|
|
@ -16,7 +16,11 @@ contains
|
|||
!> @brief allocates all neccessary fields, reads information from material configuration file
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine porosity_none_init()
|
||||
use, intrinsic :: iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran 4.6 at the moment)
|
||||
#ifdef __GFORTRAN__
|
||||
use, intrinsic :: iso_fortran_env, only: &
|
||||
compiler_version, &
|
||||
compiler_options
|
||||
#endif
|
||||
use prec, only: &
|
||||
pReal, &
|
||||
pInt
|
||||
|
|
|
@ -48,7 +48,11 @@ contains
|
|||
!> @details reads in material parameters, allocates arrays, and does sanity checks
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine porosity_phasefield_init(fileUnit)
|
||||
use, intrinsic :: iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran 4.6 at the moment)
|
||||
#ifdef __GFORTRAN__
|
||||
use, intrinsic :: iso_fortran_env, only: &
|
||||
compiler_version, &
|
||||
compiler_options
|
||||
#endif
|
||||
use IO, only: &
|
||||
IO_read, &
|
||||
IO_lc, &
|
||||
|
|
22
src/prec.f90
|
@ -39,20 +39,21 @@ module prec
|
|||
!http://stackoverflow.com/questions/3948210/can-i-have-a-pointer-to-an-item-in-an-allocatable-array
|
||||
type, public :: tState
|
||||
integer(pInt) :: &
|
||||
sizeState = 0_pInt , & !< size of state
|
||||
sizeDotState = 0_pInt, & !< size of dot state, i.e. parts of the state that are integrated
|
||||
sizeDeltaState = 0_pInt, & !< size of delta state, i.e. parts of the state that have discontinuous rates
|
||||
sizePostResults = 0_pInt !< size of output data
|
||||
sizeState = 0_pInt, & !< size of state
|
||||
sizeDotState = 0_pInt, & !< size of dot state, i.e. state(1:sizeDot) follows time evolution by dotState rates
|
||||
offsetDeltaState = 0_pInt, & !< offset of delta state
|
||||
sizeDeltaState = 0_pInt, & !< size of delta state, i.e. state(offset+1:offset+sizeDot) follows time evolution by deltaState increments
|
||||
sizePostResults = 0_pInt !< size of output data
|
||||
real(pReal), pointer, dimension(:), contiguous :: &
|
||||
atolState
|
||||
real(pReal), pointer, dimension(:,:), contiguous :: & ! a pointer is needed here because we might point to state/doState. However, they will never point to something, but are rather allocated and, hence, contiguous
|
||||
state0, &
|
||||
state, & !< state
|
||||
dotState, & !< state rate
|
||||
state0
|
||||
dotState, & !< rate of state change
|
||||
deltaState !< increment of state change
|
||||
real(pReal), allocatable, dimension(:,:) :: &
|
||||
partionedState0, &
|
||||
subState0, &
|
||||
deltaState, &
|
||||
previousDotState, & !< state rate of previous xxxx
|
||||
previousDotState2, & !< state rate two xxxx ago
|
||||
RK4dotState
|
||||
|
@ -110,8 +111,11 @@ contains
|
|||
!> @brief reporting precision
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine prec_init
|
||||
use, intrinsic :: &
|
||||
iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran 4.6 at the moment)
|
||||
#ifdef __GFORTRAN__
|
||||
use, intrinsic :: iso_fortran_env, only: &
|
||||
compiler_version, &
|
||||
compiler_options
|
||||
#endif
|
||||
|
||||
implicit none
|
||||
external :: &
|
||||
|
|
|
@ -63,7 +63,11 @@ contains
|
|||
!> @details reads in material parameters, allocates arrays, and does sanity checks
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine source_damage_anisoBrittle_init(fileUnit)
|
||||
use, intrinsic :: iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran 4.6 at the moment)
|
||||
#ifdef __GFORTRAN__
|
||||
use, intrinsic :: iso_fortran_env, only: &
|
||||
compiler_version, &
|
||||
compiler_options
|
||||
#endif
|
||||
use debug, only: &
|
||||
debug_level,&
|
||||
debug_constitutive,&
|
||||
|
|
|
@ -67,7 +67,11 @@ contains
|
|||
!> @details reads in material parameters, allocates arrays, and does sanity checks
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine source_damage_anisoDuctile_init(fileUnit)
|
||||
use, intrinsic :: iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran 4.6 at the moment)
|
||||
#ifdef __GFORTRAN__
|
||||
use, intrinsic :: iso_fortran_env, only: &
|
||||
compiler_version, &
|
||||
compiler_options
|
||||
#endif
|
||||
use debug, only: &
|
||||
debug_level,&
|
||||
debug_constitutive,&
|
||||
|
|
|
@ -53,7 +53,11 @@ contains
|
|||
!> @details reads in material parameters, allocates arrays, and does sanity checks
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine source_damage_isoBrittle_init(fileUnit)
|
||||
use, intrinsic :: iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran 4.6 at the moment)
|
||||
#ifdef __GFORTRAN__
|
||||
use, intrinsic :: iso_fortran_env, only: &
|
||||
compiler_version, &
|
||||
compiler_options
|
||||
#endif
|
||||
use debug, only: &
|
||||
debug_level,&
|
||||
debug_constitutive,&
|
||||
|
|
|
@ -53,7 +53,11 @@ contains
|
|||
!> @details reads in material parameters, allocates arrays, and does sanity checks
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine source_damage_isoDuctile_init(fileUnit)
|
||||
use, intrinsic :: iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran 4.6 at the moment)
|
||||
#ifdef __GFORTRAN__
|
||||
use, intrinsic :: iso_fortran_env, only: &
|
||||
compiler_version, &
|
||||
compiler_options
|
||||
#endif
|
||||
use debug, only: &
|
||||
debug_level,&
|
||||
debug_constitutive,&
|
||||
|
|
|
@ -39,7 +39,11 @@ contains
|
|||
!> @details reads in material parameters, allocates arrays, and does sanity checks
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine source_thermal_dissipation_init(fileUnit)
|
||||
use, intrinsic :: iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran 4.6 at the moment)
|
||||
#ifdef __GFORTRAN__
|
||||
use, intrinsic :: iso_fortran_env, only: &
|
||||
compiler_version, &
|
||||
compiler_options
|
||||
#endif
|
||||
use debug, only: &
|
||||
debug_level,&
|
||||
debug_constitutive,&
|
||||
|
|
|
@ -45,7 +45,11 @@ contains
|
|||
!> @details reads in material parameters, allocates arrays, and does sanity checks
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine source_thermal_externalheat_init(fileUnit)
|
||||
use, intrinsic :: iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran 4.6 at the moment)
|
||||
#ifdef __GFORTRAN__
|
||||
use, intrinsic :: iso_fortran_env, only: &
|
||||
compiler_version, &
|
||||
compiler_options
|
||||
#endif
|
||||
use debug, only: &
|
||||
debug_level,&
|
||||
debug_constitutive,&
|
||||
|
|
|
@ -41,7 +41,11 @@ contains
|
|||
!> @details reads in material parameters, allocates arrays, and does sanity checks
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine source_vacancy_irradiation_init(fileUnit)
|
||||
use, intrinsic :: iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran 4.6 at the moment)
|
||||
#ifdef __GFORTRAN__
|
||||
use, intrinsic :: iso_fortran_env, only: &
|
||||
compiler_version, &
|
||||
compiler_options
|
||||
#endif
|
||||
use debug, only: &
|
||||
debug_level,&
|
||||
debug_constitutive,&
|
||||
|
|
|
@ -39,7 +39,11 @@ contains
|
|||
!> @details reads in material parameters, allocates arrays, and does sanity checks
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine source_vacancy_phenoplasticity_init(fileUnit)
|
||||
use, intrinsic :: iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran 4.6 at the moment)
|
||||
#ifdef __GFORTRAN__
|
||||
use, intrinsic :: iso_fortran_env, only: &
|
||||
compiler_version, &
|
||||
compiler_options
|
||||
#endif
|
||||
use debug, only: &
|
||||
debug_level,&
|
||||
debug_constitutive,&
|
||||
|
|
|
@ -41,7 +41,11 @@ contains
|
|||
!> @details reads in material parameters, allocates arrays, and does sanity checks
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine source_vacancy_thermalfluc_init(fileUnit)
|
||||
use, intrinsic :: iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran 4.6 at the moment)
|
||||
#ifdef __GFORTRAN__
|
||||
use, intrinsic :: iso_fortran_env, only: &
|
||||
compiler_version, &
|
||||
compiler_options
|
||||
#endif
|
||||
use debug, only: &
|
||||
debug_level,&
|
||||
debug_constitutive,&
|
||||
|
|
|
@ -60,7 +60,11 @@ contains
|
|||
!> @brief allocates all neccessary fields and fills them with data, potentially from restart info
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine spectral_damage_init()
|
||||
use, intrinsic :: iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran >4.6 at the moment)
|
||||
#ifdef __GFORTRAN__
|
||||
use, intrinsic :: iso_fortran_env, only: &
|
||||
compiler_version, &
|
||||
compiler_options
|
||||
#endif
|
||||
use IO, only: &
|
||||
IO_intOut, &
|
||||
IO_read_realFile, &
|
||||
|
|
|
@ -42,7 +42,9 @@ contains
|
|||
!! information on computation to screen
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine DAMASK_interface_init()
|
||||
use, intrinsic :: iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran 4.6 at the moment)
|
||||
use, intrinsic :: &
|
||||
iso_fortran_env
|
||||
|
||||
use system_routines, only: &
|
||||
getHostName
|
||||
|
||||
|
|
|
@ -84,7 +84,11 @@ contains
|
|||
!> @todo use sourced allocation, e.g. allocate(Fdot,source = F_lastInc)
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine AL_init
|
||||
use, intrinsic :: iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran >4.6 at the moment)
|
||||
#ifdef __GFORTRAN__
|
||||
use, intrinsic :: iso_fortran_env, only: &
|
||||
compiler_version, &
|
||||
compiler_options
|
||||
#endif
|
||||
use IO, only: &
|
||||
IO_intOut, &
|
||||
IO_read_realFile, &
|
||||
|
|
|
@ -72,7 +72,11 @@ contains
|
|||
!> @brief allocates all neccessary fields and fills them with data, potentially from restart info
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine basicPETSc_init
|
||||
use, intrinsic :: iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran >4.6 at the moment)
|
||||
#ifdef __GFORTRAN__
|
||||
use, intrinsic :: iso_fortran_env, only: &
|
||||
compiler_version, &
|
||||
compiler_options
|
||||
#endif
|
||||
use IO, only: &
|
||||
IO_intOut, &
|
||||
IO_read_realFile, &
|
||||
|
|
|
@ -84,7 +84,11 @@ contains
|
|||
!> @todo use sourced allocation, e.g. allocate(Fdot,source = F_lastInc)
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine Polarisation_init
|
||||
use, intrinsic :: iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran >4.6 at the moment)
|
||||
#ifdef __GFORTRAN__
|
||||
use, intrinsic :: iso_fortran_env, only: &
|
||||
compiler_version, &
|
||||
compiler_options
|
||||
#endif
|
||||
use IO, only: &
|
||||
IO_intOut, &
|
||||
IO_read_realFile, &
|
||||
|
|
|
@ -60,7 +60,11 @@ contains
|
|||
!> @brief allocates all neccessary fields and fills them with data, potentially from restart info
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine spectral_thermal_init
|
||||
use, intrinsic :: iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran >4.6 at the moment)
|
||||
#ifdef __GFORTRAN__
|
||||
use, intrinsic :: iso_fortran_env, only: &
|
||||
compiler_version, &
|
||||
compiler_options
|
||||
#endif
|
||||
use IO, only: &
|
||||
IO_intOut, &
|
||||
IO_read_realFile, &
|
||||
|
|
|
@ -160,7 +160,11 @@ contains
|
|||
!> Initializes FFTW.
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine utilities_init()
|
||||
use, intrinsic :: iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran >4.6 at the moment)
|
||||
#ifdef __GFORTRAN__
|
||||
use, intrinsic :: iso_fortran_env, only: &
|
||||
compiler_version, &
|
||||
compiler_options
|
||||
#endif
|
||||
use IO, only: &
|
||||
IO_error, &
|
||||
IO_warning, &
|
||||
|
|
|
@ -46,7 +46,11 @@ contains
|
|||
!> @details reads in material parameters, allocates arrays, and does sanity checks
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine thermal_adiabatic_init(fileUnit)
|
||||
use, intrinsic :: iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran 4.6 at the moment)
|
||||
#ifdef __GFORTRAN__
|
||||
use, intrinsic :: iso_fortran_env, only: &
|
||||
compiler_version, &
|
||||
compiler_options
|
||||
#endif
|
||||
use IO, only: &
|
||||
IO_read, &
|
||||
IO_lc, &
|
||||
|
|
|
@ -47,7 +47,11 @@ contains
|
|||
!> @details reads in material parameters, allocates arrays, and does sanity checks
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine thermal_conduction_init(fileUnit)
|
||||
use, intrinsic :: iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran 4.6 at the moment)
|
||||
#ifdef __GFORTRAN__
|
||||
use, intrinsic :: iso_fortran_env, only: &
|
||||
compiler_version, &
|
||||
compiler_options
|
||||
#endif
|
||||
use IO, only: &
|
||||
IO_read, &
|
||||
IO_lc, &
|
||||
|
|
|
@ -16,7 +16,11 @@ contains
|
|||
!> @brief allocates all neccessary fields, reads information from material configuration file
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine thermal_isothermal_init()
|
||||
use, intrinsic :: iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran 4.6 at the moment)
|
||||
#ifdef __GFORTRAN__
|
||||
use, intrinsic :: iso_fortran_env, only: &
|
||||
compiler_version, &
|
||||
compiler_options
|
||||
#endif
|
||||
use prec, only: &
|
||||
pReal, &
|
||||
pInt
|
||||
|
|
|
@ -61,7 +61,11 @@ contains
|
|||
!> @details reads in material parameters, allocates arrays, and does sanity checks
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine vacancyflux_cahnhilliard_init(fileUnit)
|
||||
use, intrinsic :: iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran 4.6 at the moment)
|
||||
#ifdef __GFORTRAN__
|
||||
use, intrinsic :: iso_fortran_env, only: &
|
||||
compiler_version, &
|
||||
compiler_options
|
||||
#endif
|
||||
use IO, only: &
|
||||
IO_read, &
|
||||
IO_lc, &
|
||||
|
|
|
@ -44,7 +44,11 @@ contains
|
|||
!> @details reads in material parameters, allocates arrays, and does sanity checks
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine vacancyflux_isochempot_init(fileUnit)
|
||||
use, intrinsic :: iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran 4.6 at the moment)
|
||||
#ifdef __GFORTRAN__
|
||||
use, intrinsic :: iso_fortran_env, only: &
|
||||
compiler_version, &
|
||||
compiler_options
|
||||
#endif
|
||||
use IO, only: &
|
||||
IO_read, &
|
||||
IO_lc, &
|
||||
|
|
|
@ -16,7 +16,11 @@ contains
|
|||
!> @brief allocates all neccessary fields, reads information from material configuration file
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine vacancyflux_isoconc_init()
|
||||
use, intrinsic :: iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran 4.6 at the moment)
|
||||
#ifdef __GFORTRAN__
|
||||
use, intrinsic :: iso_fortran_env, only: &
|
||||
compiler_version, &
|
||||
compiler_options
|
||||
#endif
|
||||
use prec, only: &
|
||||
pReal, &
|
||||
pInt
|
||||
|
|