示例#1
0
                      wrt_file)

    ## Convert the orientations from the calibration datasets from bunge euler angles
    ## to GSH coefficients
    gsh.euler_to_gsh(el, H, ns_cal, set_id_cal, step, wrt_file)

    ## Convert the orientations from the validation datasets from bunge euler angles
    ## to GSH coefficients
    gsh.euler_to_gsh(el, H, ns_val, set_id_val, step, wrt_file)

    ## Generate the fftn of the calibration microstructure function
    msf.micr_func(el, H, ns_cal, set_id_cal, step, wrt_file)

    ## Generate the fftn of the validation microstructure function
    msf.micr_func(el, H, ns_val, set_id_val, step, wrt_file)

    ## Perform the calibration
    for comp in compl:
        calibration.calibration_procedure(el, H, ns_cal, set_id_cal, step,
                                          comp, wrt_file)

    ## Perform the validation
    for comp in compl:
        validation.validation(el, H, ns_cal, ns_val, set_id_cal, set_id_val,
                              step, comp, wrt_file)

    comp_app = 0

    results.results_all(el, ns_val, set_id_val, step, 'epsilon', compl,
                        comp_app)
示例#2
0
    for comp in compl:
        vtk.read_meas(ns_val, set_id_val, step, comp, vtk_filename, tensor_ID,
                      dir_val, wrt_file, 1)

#    ## Convert the orientations from the calibration datasets from bunge euler angles
#    ## to GSH coefficients
#    gsh.euler_to_gsh(ns_cal,set_id_cal,step,wrt_file)

## Convert the orientations from the validation datasets from bunge euler angles
## to GSH coefficients
    gsh.euler_to_gsh(ns_val, set_id_val, step, wrt_file)

    #    ## Generate the fftn of the calibration microstructure function
    #    msf.micr_func(ns_cal,set_id_cal,step,wrt_file)

    ## Generate the fftn of the validation microstructure function
    msf.micr_func(ns_val, set_id_val, step, wrt_file)

    #    ## Perform the calibration
    #    for comp in compl:
    #        calibration.calibration_procedure(ns_cal,set_id_cal,step,comp,wrt_file)

    ## Perform the validation
    for comp in compl:
        validation.validation_procedure(ns_cal, ns_val, set_id_cal, set_id_val,
                                        step, comp, wrt_file)

    comp_app = 1

    results.results_all(ns_val, set_id_val, step, 'sigma', compl, comp_app)
示例#3
0
import numpy as np
import functions_polycrystal as rr

plt.close('all')

el = 21
ns = 1
set_id_new = 'new'
set_id_old = 'old'
step = 1

wrt_file = 'log_%s.txt' %time.strftime("%Y-%m-%d_h%Hm%M")

vtk_filename_new = 'Results_Ti64_RandomMicroFZfinal_21x21x21_AbqInp_PowerLaw_%s_data_v2_0%s.vtk' %('%s',step)
vtk_filename_old = 'Results_Ti64_RandomMicroFZfinal_21x21x21_AbqInp_PowerLaw_%s_data_v2_0%s_old.vtk' %('%s',step)


## The tensorID determines the type of tensor data read from the .vtk file
## if tensorID == 0, we read the stress tensor        
## if tensorID == 1, we read the strain tensor        
## if tensorID == 2, we read the plastic strain tensor 

tensor_ID = 0  

## get field of interest from vtk file
for comp in xrange(9):
    vtk.read_meas(el,ns,set_id_old,step,comp,vtk_filename_old, tensor_ID, wrt_file)
    vtk.read_meas(el,ns,set_id_new,step,comp,vtk_filename_new, tensor_ID, wrt_file)
    
results.results_all(el,ns,set_id_old,set_id_new,step,'sigma')
    
vtk.read_euler(ns_val, set_id_val, vtk_filename, dir_val, wrt_file)

for comp in xrange(9):
    vtk.read_meas(ns_val, set_id_val, comp, vtk_filename, tensor_ID, dir_val,
                  wrt_file)

## Convert the orientations from the calibration datasets from bunge euler angles
## to GSH coefficients
gsh.euler_to_gsh(ns_cal, set_id_cal, wrt_file)

## Convert the orientations from the validation datasets from bunge euler angles
## to GSH coefficients
gsh.euler_to_gsh(ns_val, set_id_val, wrt_file)

## Generate the fftn of the calibration microstructure function
msf.micr_func(ns_cal, set_id_cal, wrt_file)

## Generate the fftn of the validation microstructure function
msf.micr_func(ns_val, set_id_val, wrt_file)

## Perform the calibration
for comp in xrange(9):
    calibration.calibration_procedure(ns_cal, set_id_cal, comp, wrt_file)

## Perform the validation
for comp in xrange(9):
    validation.validation_procedure(ns_cal, ns_val, set_id_cal, set_id_val,
                                    comp, wrt_file)

results.results_all(ns_val, set_id_val, 'sigma')