How to import the PFC model into YADE?

Asked by Jingchi Yu on 2020-10-18

Hi~

I am trying to import a complex model that comes from PFC into YADE, but I don’t know how to achieve it.

May you guide me~?

and the PFC code like this:

; Filename: Agc.DVR
;
; PURPOSE: Create the gross resolution, contact-bonded instance of
; material-A
;
; INPUT: none
; OUTPUT: 'md_run_name' 'spc' final specimen (bonded or unbonded)
;
; Itasca Consulting Group, Inc.
; ===================================================================
SET random 111 ; for reproducibility
new
;===================================
def set_fist_env
 environment('itascaFishTank')='D:\\pfc2d-3.1\\pfc2d_310\\fishtank'
end
set_fist_env

;===================================
set logfile Agc.log
set log on
set safe_conversion on
SET disk on ; model unit-thickness cylinders
;
SET echo off ; load support functions
  call %itascaFishTank%\FishPfc\md\md.FIS
  call %itascaFishTank%\SHPBzw\et2_Beam_zw.FIS
  call %itascaFishTank%\FishPfc\md\flt.FIS
SET echo on
; ===================================================================
SET md_run_name = 'Split'
title
Agc (material-A, fine resolution, contact-bonded)
; ===================================================================
; Specify parameters that control the specimen-genesis procedures
;==============================
def read_nsign
   array aa(40000)
   status = open('nsign-100-1.dat',0,1)
   status = read(aa,40000)
   status = close
end
;====================================================
read_nsign
;==============================
def rock_element
    range_element
;
; ----- Defines a FISH range element that determines whether an object
; lies within rocks in concrete
;
; INPUT: fc_arg(0) - object being queried for range inclusion
; fc_arg(1) - object position (x-component)
; fc_arg(2) - object position (y-component)
;
; RETURN VALUE: 0 - object does not lie within circle
; When called, function value is initialized to 1.
;
   _aalen=round(2000*et2_ylen-1)
   _x = round((fc_arg(1)+et2_ylen/2)*_aalen/et2_ylen)
   _y = round((fc_arg(2)+et2_ylen/2)*_aalen/et2_ylen)
   _xx = min(max(_x,0),_aalen)
   _yy = min(max(_y,0),_aalen)
  if aa(_xx*(_aalen+1)+_yy+1) = 'scc' then ; ball is not within the rock
      rock_element = 0
  else
      rock_element = 1
  end_if
end
;====================================================
 set et2_xlen=0.0985 et2_ylen=0.10
 SET et2_radius_ratio=1.5 et2_rlo=0.4e-3
;
;pause
 SET md_wEcfac=1.1
 SET tm_req_isostr=-5e4 tm_req_isostr_tol=0.50
 SET flt_def=3 flt_remain=0.0
;
;====================================================
;; Specify parameters that define a contact-bonded material
;;
 SET md_add_pbonds=1
 SET md_dens=2800
 SET md_Ec=32e9 md_Ec_scc=32e9 md_Ec_rock=48e9
 SET md_knoverks=1.7 md_knoverks_scc=1.7 md_knoverks_rock=1.5
 SET md_fric=0.5
;
 SET pb_radmult=1.0
 SET pb_Ec=32e9 pb_Ec_scc=32e9 pb_Ec_rock=48e9 pb_Ec_inter=16e9
 SET pb_knoverks=1.7 pb_knoverks_scc=1.7 pb_knoverks_rock=1.5 pb_knoverks_inter=1.9
 SET pb_sn_mean=10e6 pb_sn_sdev=0
 SET pb_ss_mean=10e6 pb_ss_sdev=0
;
 SET pb_sn_mean_rock =42.0e6 pb_sn_sdev_rock =100
 SET pb_ss_mean_rock =84.0e6 pb_ss_sdev_rock =100
 SET pb_sn_mean_scc =15.0e6 pb_sn_sdev_scc =100
 SET pb_ss_mean_scc =30.0e6 pb_ss_sdev_scc =100
 SET pb_sn_mean_inter = 6.0e6 pb_sn_sdev_inter=100
 SET pb_ss_mean_inter =12.0e6 pb_ss_sdev_inter=100
;==========================================================================
 SET et2_prep_saveall=1
 et2_prep ; invoke the specimen-genesis procedures
;
;
group rock_element range fish rock_element
range name scc_element group rock_element not
group scc_element1 range scc_element
prop c_index 0 range group scc_element1
prop c_index 1 range group rock_element
;
md_pbprops_group_rock
md_pbprops_group_scc
md_pbprops_group_inter
;========================================================================
print group
md_tag_name = '-spc'
md_save_state
; ===================================================================
set log off
call Agc_ex_bra.DVR
return
; END OF Filename: Agc.DVR

; fname: Agc_ex.DVR
;
; PURPOSE: 1) Create Agc specimen,
; 2) perform Brazilian test upon it,
; 3) perform biaxial test upon it at Pc=0.0 MPa.
;
; Itasca Consulting Group, Inc.
; ===================================================================
; ----------------------------------
;Create Agc specimen using specimen-genesis procedures
; call Agc.DVR ;=> Agc-spc.SAV
; ----------------------------------
; Execute Brazilian test
 restore Split-spc.SAV
 set safe_conversion on
; SET md_run_name='Agc'
 title 'Agc Brazilian test'

; ----------------------------------
SET echo off ; load support functions
  call %itascaFishTank%\FishPfc\md\fishcall.FIS
  call %itascaFishTank%\FishPfc\md\crk.FIS
SET echo on
; ===================================================================
;
 SET et2_knxfac=1000 et2_knyfac=0.001
 SET et2_wsxx_req=-1.0e4 et2_wsyy_req=-1.0e0 et2_ws_tol=0.01
 SET p_vel=1.0e-3 p_cyc=1000 p_stages=1000
 SET et2_peakfac=0.50
;
et2_wallstiff
;
ini xvel 0.0 yvel 0.0 spin 0.0
 SET fishcall #FC_CYC_MOT et2_servo
 SET et2_servo_xon=1 et2_servo_yon=0
 SET et2_servo_gain_cyc=2 et2_servo_vmax=@p_vel
 del wall 1
 del wall 2
 wadd1 = null
 wadd2 = null
et2_install_ws
solve ; do it 3 times to assure we are near equil.
et2_install_ws
solve
et2_install_ws
;
; ===================================================================
SET fishcall 0 remove et2_strains
bt_sample_dimensions
bt_carve
;
prop xdisp=0.0 ydisp=0.0
prop xv=0.0 yv=0.0
wall id=3 xvel=0.0 yvel=0.0
wall id=4 xvel=0.0 yvel=0.0
;;
cycle 10000
prop xdisp=0.0 ydisp=0.0
prop xv=0.0 yv=0.0
;
split_gage
crk_init
;=======================================
; Install test monitoring variables and histories
;
history reset
history nstep=100
;history id=1 crk_num
;history id=50 crk_num_cnf
;history id=51 crk_num_csf
history id=52 crk_num_pnf
history id=53 crk_num_psf
;
history id=11 time_t
history id=12 time_t_2
;
;
history id=3 et2_meyy_2
history id=4 split_gage_ey
history id=5 wsyy
history id=6 wsyy2
;
history id=204 et2_wfxx ; wall-derived forces
history id=205 et2_wfyy
;
trace energy on ; energy quantities
history id=15 energy boundary
history id=16 energy bond
history id=17 energy frictional
history id=18 energy kinetic
history id=19 energy strain
history id=23 et2_e_delstrain ; increment of strain energy
;
history id=20 et2_n ; wall-derived microstructural quantities
history id=21 et2_e
history id=22 et2_phy_e ; physical void ratio
;
; ===================================================================
plot set color on
plot cur 1
plot set foreground black
plot set background white
plot clear
plot add wall
plot add ball white yellow white white white white white outline lgray
plot add fish crk_item black red black red
plot add his 5 6 v 3 xmin 0 ymin 0
;;
;============================================
SET md_tag_name = '-bt0'
md_save_state
; ----------------------------------
return
; EOF: Agc_ex.DVR

Question information

Language:
English Edit question
Status:
Answered
For:
Yade Edit question
Assignee:
No assignee Edit question
Last query:
2020-10-18
Last reply:
2020-10-19
Robert Caulk (rcaulk) said : #1

Hello,

>I am trying to import a complex model that comes from PFC into YADE, but I don’t know how to achieve it.

There are no modules available for importing models from PFC to Yade. You will need to do it manually.

Cheers,

Robert

Jingchi Yu (yujc-17) said : #2

Robert,

Thanks for your reply!

Best wishes~

Can you help with this problem?

Provide an answer of your own, or ask Jingchi Yu for more information if necessary.

To post a message you must log in.