PARADISCYL:Cylinder-Algorithm: Difference between revisions

From Micro and Nano Mechanics Group
Jump to navigation Jump to search
 
(3 intermediate revisions by 2 users not shown)
Line 15: Line 15:


1. AllSegmentStress.c
1. AllSegmentStress.c
Changes are made in this file to construct the test cases.


A new function AllSegmentStress_no_cell_test1() is added, which computes the stress field of a
A new function AllSegmentStress_no_cell_test1() is added, which computes the stress field of a
Line 21: Line 22:


Function AllSegmentStress_no_cell() is modified to account for periodic images in Z direction.
Function AllSegmentStress_no_cell() is modified to account for periodic images in Z direction.
A local variable NimgPBC is hard coded. For each dislocation segment, NimgPBC number of its images
NimgPBC is specified in the input file(By default, it is '1'). For each dislocation segment, NimgPBC number
are included in the stress calculation. '''We should move this to Param.h.'''
of its images are included in the stress calculation.


Macros (#ifdef 's) are added to make the Cylinder code use FULL_N2_FORCES when _CYL_TEST23 is defined.
Macros (#ifdef 's) are added to make the Cylinder code use FULL_N2_FORCES when _CYL_TEST23 is defined.
The same changes also affect these files: Initialize.c, LocalSegForce.c, NodeForce.c.


2. Collision.c
2. Cylinder_Remesh.c
In function Cylinder_Remesh(), added new rules to remove surface debris (to increase time step).
Surface debris are defined as dislocation line consisting of two or three segments with two
(end) surface nodes.

See [[PARADISCYL:Cylinder-Remove_surface_debris | M11 Remove surface debris ]].
A new function ProjectSurfaceNodes() is defined to project nodes flagged by CYLINDER_SURFACE_NODE
back to the cylinder surface when it drifts inside the cylinder. Note that surface nodes moving
out of the cylinder are already handled by Cylinder_Remesh.

See [[PARADISCYL:Cylinder-Project_surface_node | M12 Project surface nodes ]].

3. MobilityLaw_BCC_glide.c

Modify the mobility of surface node /* version 3 */ so that they are kept simultaneously on the
surface and its slip plane. This algorithm works in two steps. First, the velocity is made to
satisfy all the slip plane glide constraints (copied from FCC_0 mobility law of bulk). Then the
surface normal is computed. The surface node velocity is adjusted by adding a component parallel to
the surface dislocation segment, so that the velocity becomes orthogonal to the surface normal.

The mobility (magnitude) of the surface node is made to be 2 (or 1, or 3, hard coded) times faster
than the bulk. (Search for keyword: scale). This mobility enhancement is applied to a region near
the cylinder surface (r > 0.8 R_cylinder) with a linear interpolation.

Added codes to choose glide planes for surface nodes based on the force on the force. This force
contains contributions from PK force (due to applied stress and other dislocations) and line tension
force (if any). Image stress does not contribute to this force and the image stress is supposed to
be turned off when running with these codes.
See [[PARADISCYL:Cylinder-Surface_cross_slip | M10 Surface multiplication ]].

A threshold stress is applied to all nodes to mimic the Peierls stress behavior in BCC metals.
(Maybe the surface node has lower Peierls stress.)

'''We need to clean up this file.'''

4. Collision.c
Added lines to turn off collision if param->collisionoMethod is specified as a negative number
Added lines to turn off collision if param->collisionoMethod is specified as a negative number
(in the input file).
(in the input file).


3. cylinder.c
5. cylinder.c
In function CYL_stress_boundary(), a minus sign is added in computing the surface traction from
In function CYL_stress_boundary(), a minus sign is added in computing the surface traction from
the infinite stress:
the infinite stress:
Line 37: Line 74:
tz[j+i*nq] = -cylstress[2][0];
tz[j+i*nq] = -cylstress[2][0];


6. gridstress.c
4. Cylinder_Remesh.c
Added lines to scale the image stress calculation when the cylinder radius is not 1. This removes
Make substitutions: SURFACE_NODE -> CYLINDER_SURFACE_NODE.
the (old) constraint that the cylinder radius has to be one.
'''This is supposed to be handled by translation'''.


See [[PARADISCYL:Scale-Rule | M04 How units are scaled]].
In function Cylinder_Remesh(), added new rules to remove surface debris (to increase time step).
Surface debris are defined as dislocation line consisting of two or three segments with two
(end) surface nodes.


See [Cylinder-Remove_surface_debris].


6. Remesh.c, Cylinder_Remesh.c
A new function ProjectSurfaceNodes() is defined to project nodes flagged by CYLINDER_SURFACE_NODE
Make substitutions: SURFACE_NODE -> CYLINDER_SURFACE_NODE.
back to the cylinder surface when it drifts inside the cylinder. Note that surface nodes moving
out of the cylinder are already handled by Cylinder_Remesh.
'''This is supposed to be handled by translation'''.

See [Cylinder-Project_surface_node].


5. gridstress.c
- remove R=1 constraint
6. Initialize.c, LocalSegForce.c, NodeForce.c
- make flags for CYL_TEST23
: #if (!defined FULL_N2_FORCES) | (!defined _CYL_TEST23)
7. SplitSurfaceNodes.c PredictiveCollision.c ProximityCollision.c
7. SplitSurfaceNodes.c PredictiveCollision.c ProximityCollision.c
- For the surface node split(Not yet)
- For the surface node split (not implemented yet)
8. Remesh. c
- SURFACE_NODE -> CYLINDER_SURFACE_NODE
9. MobilityLaw_BCC_glide.c
- Modify mobility for the surface node(keeping them on the surface/ slip plane)
- Surface Cross Slip
- Surface node mobility correction
- etc


==Cylinder Code Algorithm==
==Cylinder Code Algorithm==

Latest revision as of 06:57, 3 December 2011

Cylinder Code Algorithm

ill Ryu and Wei Cai

This wiki page describes the ParaDiS Cylinder code v.2.5.1. This version of the Cylinder code is created by a translation from the ParaDiS ThinFilm code v.2.5.1, with subsequent modifications. In this wiki page, we only describe the difference between the Cylinder code and the translated ThinFilm code.


List of Files

The following is a list of all files modified manually after the translation.

1. AllSegmentStress.c

Changes are made in this file to construct the test cases.
A new function AllSegmentStress_no_cell_test1() is added, which computes the stress field of a
infinite straight dislocation (analytic expression) for Test Case 1 only.  This function is activated
when CYL_TEST1 is defined (in the makefile).
Function AllSegmentStress_no_cell() is modified to account for periodic images in Z direction.
NimgPBC is specified in the input file(By default, it is '1'). For each dislocation segment, NimgPBC number
of its images are included in the stress calculation.  
Macros (#ifdef 's) are added to make the Cylinder code use FULL_N2_FORCES when _CYL_TEST23 is defined. 
The same changes also affect these files: Initialize.c, LocalSegForce.c,  NodeForce.c.

2. Cylinder_Remesh.c

In function Cylinder_Remesh(), added new rules to remove surface debris (to increase time step).
Surface debris are defined as dislocation line consisting of two or three segments with two
(end) surface nodes. 

See M11 Remove surface debris .

A new function ProjectSurfaceNodes() is defined to project nodes flagged by CYLINDER_SURFACE_NODE
back to the cylinder surface when it drifts inside the cylinder.  Note that surface nodes moving 
out of the cylinder are already handled by Cylinder_Remesh.

See M12 Project surface nodes .

3. MobilityLaw_BCC_glide.c

Modify the mobility of surface node /* version 3 */ so that they are kept simultaneously on the
surface and its slip plane.  This algorithm works in two steps.  First, the velocity is made to
satisfy all the slip plane glide constraints (copied from FCC_0 mobility law of bulk).  Then the
surface normal is computed.  The surface node velocity is adjusted by adding a component parallel to
the surface dislocation segment, so that the velocity becomes orthogonal to the surface normal.
The mobility (magnitude) of the surface node is made to be 2 (or 1, or 3, hard coded) times faster 
than the bulk.  (Search for keyword: scale).  This mobility enhancement is applied to a region near
the cylinder surface (r > 0.8 R_cylinder) with a linear interpolation.
Added codes to choose glide planes for surface nodes based on the force on the force.  This force
contains contributions from PK force (due to applied stress and other dislocations) and line tension
force (if any).  Image stress does not contribute to this force and the image stress is supposed to
be turned off when running with these codes.

See M10 Surface multiplication .

A threshold stress is applied to all nodes to mimic the Peierls stress behavior in BCC metals.  
(Maybe the surface node has lower Peierls stress.)

We need to clean up this file.

4. Collision.c

Added lines to turn off collision if param->collisionoMethod is specified as a negative number 
(in the input file).

5. cylinder.c

In function CYL_stress_boundary(), a minus sign is added in computing the surface traction from 
the infinite stress:
         tr[j+i*nq] = -cylstress[0][0];
         tq[j+i*nq] = -cylstress[0][1];
         tz[j+i*nq] = -cylstress[2][0];

6. gridstress.c

Added lines to scale the image stress calculation when the cylinder radius is not 1.  This removes
the (old) constraint that the cylinder radius has to be one.

See M04 How units are scaled.


6. Remesh.c, Cylinder_Remesh.c

Make substitutions: SURFACE_NODE -> CYLINDER_SURFACE_NODE.  
This is supposed to be handled by translation.

7. SplitSurfaceNodes.c PredictiveCollision.c ProximityCollision.c

- For the surface node split (not implemented yet)

Cylinder Code Algorithm