# -*- coding: utf-8 -*-
# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
# %                MiCoFaM - Classes and Functions               %
# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
"""
Dialog box of ABAQUS-PlugIn MiCoFaM. 
 
@note: ABAQUS plug-in.       
@version:  1.0    
----------------------------------------------------------------------------------------------
@requires:
       - 

@change: 
       -    
   
@author: Gordon Just
----------------------------------------------------------------------------------------------
"""

# Do not edit this file or it may not load correctly
# if you try to open it with the RSG Dialog Builder.

# Note: thisDir is defined by the Activator class when
#       this file gets exec'd

from rsg.rsgGui import *
from abaqusConstants import INTEGER, FLOAT #@UnresolvedImport @UnusedImport

dialogBox = RsgDialog(title='MICOFAM - MIcromechanical COmposite FAtigue Modeler', kernelModule='micofam_main', kernelFunction='main', includeApplyBtn=False, includeSeparator=True, okBtnText='Create', applyBtnText='Default', execDir=thisDir)  #@UndefinedVariable
RsgTabBook(name='TabBook_1', p='DialogBox', layout='0') #@UndefinedVariable
#
# TAB RVE SETTINGS
#
RsgTabItem(name='TabItem_6', p='TabBook_1', text='RVE Settings') #@UndefinedVariable
RsgHorizontalFrame(name='HFrame_2', p='TabItem_6', layout='0', pl=0, pr=0, pt=0, pb=0) #@UndefinedVariable
RsgGroupBox(name='GroupBox_5', p='HFrame_2', text='RVE Geometry', layout='0') #@UndefinedVariable
RsgVerticalAligner(name='VAligner_5', p='GroupBox_5', pl=0, pr=0, pt=0, pb=0) #@UndefinedVariable
RsgTextField(p='VAligner_5', fieldType='Float', ncols=5, labelText='Fibre Volume Fraction', keyword='rve_fvc', default='65') #@UndefinedVariable
RsgTextField(p='VAligner_5', fieldType='Float', ncols=5, labelText='Fibre Diameter', keyword='rve_radius', default='6.6') #@UndefinedVariable
RsgTextField(p='VAligner_5', fieldType='Float', ncols=5, labelText='RVE Length', keyword='rve_lgth', default='50') #@UndefinedVariable
RsgTextField(p='VAligner_5', fieldType='Float', ncols=5, labelText='RVE Depth', keyword='rve_dpth', default='1') #@UndefinedVariable
try:
    # Display image correctly when plug-in is loaded.
    RsgIcon(p='HFrame_2', fileName=os.path.join(thisDir,'res',"rve_dialog.png")) #@UndefinedVariable
except:
    ## Image is not shown in RSG plug-in dialog.
    pass  
#
# TAB MATERIAL DATA
#
# FIBRE
RsgTabItem(name='TabItem_3', p='TabBook_1', text='Material Data') #@UndefinedVariable
RsgHorizontalFrame(name='HFrame_1', p='TabItem_3', layout='0', pl=0, pr=0, pt=0, pb=0) #@UndefinedVariable
RsgGroupBox(name='GroupBox_2', p='HFrame_1', text='Fibre', layout='0') #@UndefinedVariable
RsgVerticalAligner(name='VAligner_2', p='GroupBox_2', pl=0, pr=0, pt=0, pb=0) #@UndefinedVariable
RsgTextField(p='VAligner_2', fieldType='Float', ncols=8, labelText='E11', keyword='fib_e11', default='238000') #@UndefinedVariable
RsgTextField(p='VAligner_2', fieldType='Float', ncols=8, labelText='E22', keyword='fib_e22', default='28000') #@UndefinedVariable
RsgTextField(p='VAligner_2', fieldType='Float', ncols=8, labelText='E33', keyword='fib_e33', default='28000') #@UndefinedVariable
RsgTextField(p='VAligner_2', fieldType='Float', ncols=8, labelText='G12', keyword='fib_g12', default='24000') #@UndefinedVariable
RsgTextField(p='VAligner_2', fieldType='Float', ncols=8, labelText='G13', keyword='fib_g13', default='24000') #@UndefinedVariable
RsgTextField(p='VAligner_2', fieldType='Float', ncols=8, labelText='G23', keyword='fib_g23', default='7200') #@UndefinedVariable
RsgTextField(p='VAligner_2', fieldType='Float', ncols=8, labelText='nu12', keyword='fib_nu12', default='0.23') #@UndefinedVariable
RsgTextField(p='VAligner_2', fieldType='Float', ncols=8, labelText='nu13', keyword='fib_nu13', default='0.23') #@UndefinedVariable
RsgTextField(p='VAligner_2', fieldType='Float', ncols=8, labelText='nu23', keyword='fib_nu23', default='0.33') #@UndefinedVariable
# RESIN
RsgGroupBox(name='GroupBox_3', p='HFrame_1', text='Resin', layout='0') #@UndefinedVariable
RsgVerticalAligner(name='VAligner_3', p='GroupBox_3', pl=0, pr=0, pt=0, pb=0) #@UndefinedVariable
RsgTextField(p='VAligner_3', fieldType='Float', ncols=8, labelText='E1', keyword='res_e1', default='3000') #@UndefinedVariable
RsgTextField(p='VAligner_3', fieldType='Float', ncols=8, labelText='E2', keyword='res_e2', default='630') #@UndefinedVariable
RsgTextField(p='VAligner_3', fieldType='Float', ncols=8, labelText='D', keyword='res_d', default='800') #@UndefinedVariable
RsgTextField(p='VAligner_3', fieldType='Float', ncols=8, labelText='nu', keyword='res_nu', default='0.34') #@UndefinedVariable
RsgTextField(p='VAligner_3', fieldType='Float', ncols=8, labelText='Yield Stress', keyword='res_yield', default='82') #@UndefinedVariable
RsgTextField(p='VAligner_3', fieldType='Float', ncols=8, labelText='Fric. Angle', keyword='res_fric', default='26') #@UndefinedVariable
RsgTextField(p='VAligner_3', fieldType='Float', ncols=8, labelText='Dil. Angle', keyword='res_dil', default='10') #@UndefinedVariable
RsgTextField(p='VAligner_3', fieldType='Float', ncols=8, labelText='C1', keyword='res_c1', default='5') #@UndefinedVariable
RsgTextField(p='VAligner_3', fieldType='Float', ncols=8, labelText='C2', keyword='res_c2', default='1.5') #@UndefinedVariable
# INTERFACE
RsgGroupBox(name='GroupBox_4', p='HFrame_1', text='Interface', layout='0') #@UndefinedVariable
RsgVerticalAligner(name='VAligner_4', p='GroupBox_4', pl=0, pr=0, pt=0, pb=0) #@UndefinedVariable
RsgTextField(p='VAligner_4', fieldType='Float', ncols=8, labelText='E', keyword='int_e', default='22000') #@UndefinedVariable
RsgTextField(p='VAligner_4', fieldType='Float', ncols=8, labelText='G', keyword='int_g', default='22000') #@UndefinedVariable
RsgTextField(p='VAligner_4', fieldType='Float', ncols=8, labelText='t_n', keyword='int_tn', default='90') #@UndefinedVariable
RsgTextField(p='VAligner_4', fieldType='Float', ncols=8, labelText='t_s', keyword='int_ts', default='90') #@UndefinedVariable
RsgTextField(p='VAligner_4', fieldType='Float', ncols=8, labelText='U_frac', keyword='int_ufrac', default='10') #@UndefinedVariable
RsgTextField(p='VAligner_4', fieldType='String', ncols=8, labelText='Visc. Coefficient', keyword='int_visc', default='off') #@UndefinedVariable
RsgTextField(p='VAligner_4', fieldType='Float', ncols=8, labelText='K1', keyword='int_k1', default='10') #@UndefinedVariable
RsgTextField(p='VAligner_4', fieldType='Float', ncols=8, labelText='K2', keyword='int_k2', default='1.5') #@UndefinedVariable
#
# TAB MESH
#
RsgTabItem(name='TabItem_4', p='TabBook_1', text='Mesh') #@UndefinedVariable
RsgGroupBox(name='GroupBox_6', p='TabItem_4', text='Elementation Settings', layout='0') #@UndefinedVariable
RsgVerticalAligner(name='VAligner_6', p='GroupBox_6', pl=0, pr=0, pt=0, pb=0) #@UndefinedVariable
RsgTextField(p='VAligner_6', fieldType='Float', ncols=5, labelText='Fibre Circumference', keyword='mesh_fib', default='60') #@UndefinedVariable
RsgTextField(p='VAligner_6', fieldType='Float', ncols=5, labelText='RVE Length', keyword='mesh_lgth', default='60') #@UndefinedVariable
RsgTextField(p='VAligner_6', fieldType='Float', ncols=5, labelText='RVE Depth', keyword='mesh_dpth', default='1') #@UndefinedVariable
RsgComboBox(name='ComboBox_2', p='VAligner_6', text='Auto Assign RVE Edges', keyword='mesh_aa', default='on', comboType='STANDARD', repository='', rootText='', rootKeyword='C1', layout='') #@UndefinedVariable
RsgListItem(p='ComboBox_2', text='on') #@UndefinedVariable
RsgListItem(p='ComboBox_2', text='off') #@UndefinedVariable
#
# TAB BCs
#
# Displacement Gradient
RsgTabItem(name='TabItem_5', p='TabBook_1', text='BCs / Loads') #@UndefinedVariable
RsgVerticalAligner(name='VAligner_bc', p='TabItem_5', pl=0, pr=0, pt=0, pb=0) #@UndefinedVariable
RsgGroupBox(name='GroupBox_7', p='VAligner_bc', text='Displacement Gradient', layout='0') #@UndefinedVariable
RsgHorizontalFrame(name='HFrame_4', p='GroupBox_7', layout='0', pl=0, pr=0, pt=0, pb=0) #@UndefinedVariable
RsgVerticalAligner(name='VAligner_7', p='HFrame_4', pl=0, pr=0, pt=0, pb=0) #@UndefinedVariable
RsgTextField(p='VAligner_7', fieldType='String', ncols=8, labelText='H11', keyword='bc_h11', default='0.0025') #@UndefinedVariable
RsgTextField(p='VAligner_7', fieldType='String', ncols=8, labelText='H21', keyword='bc_h21', default='UNSET') #@UndefinedVariable
RsgTextField(p='VAligner_7', fieldType='String', ncols=8, labelText='H31', keyword='bc_h31', default='UNSET') #@UndefinedVariable
RsgVerticalAligner(name='VAligner_8', p='HFrame_4', pl=0, pr=0, pt=0, pb=0) #@UndefinedVariable
RsgTextField(p='VAligner_8', fieldType='String', ncols=8, labelText='H12', keyword='bc_h12', default='UNSET') #@UndefinedVariable
RsgTextField(p='VAligner_8', fieldType='String', ncols=8, labelText='H22', keyword='bc_h22', default='UNSET') #@UndefinedVariable
RsgTextField(p='VAligner_8', fieldType='String', ncols=8, labelText='H32', keyword='bc_h32', default='UNSET') #@UndefinedVariable
RsgVerticalAligner(name='VAligner_9', p='HFrame_4', pl=0, pr=0, pt=0, pb=0) #@UndefinedVariable
RsgTextField(p='VAligner_9', fieldType='String', ncols=8, labelText='H13', keyword='bc_h13', default='UNSET') #@UndefinedVariable
RsgTextField(p='VAligner_9', fieldType='String', ncols=8, labelText='H23', keyword='bc_h23', default='UNSET') #@UndefinedVariable
RsgTextField(p='VAligner_9', fieldType='String', ncols=8, labelText='H33', keyword='bc_h33', default='UNSET') #@UndefinedVariable
# Stress Tensor
RsgGroupBox(name='GroupBox_stress', p='VAligner_bc', text='Stress Tensor', layout='0') #@UndefinedVariable
RsgHorizontalFrame(name='HFrame_stress', p='GroupBox_stress', layout='0', pl=0, pr=0, pt=0, pb=0) #@UndefinedVariable
RsgVerticalAligner(name='VAligner_s1', p='HFrame_stress', pl=0, pr=0, pt=0, pb=0) #@UndefinedVariable
RsgTextField(p='VAligner_s1', fieldType='Float', ncols=8, labelText='S11', keyword='bc_s11', default='20') #@UndefinedVariable
RsgTextField(p='VAligner_s1', fieldType='Float', ncols=8, labelText='S21 ', keyword='bc_s21', default='0') #@UndefinedVariable
RsgTextField(p='VAligner_s1', fieldType='Float', ncols=8, labelText='S31 ', keyword='bc_s31', default='0') #@UndefinedVariable
RsgVerticalAligner(name='VAligner_s2', p='HFrame_stress', pl=0, pr=0, pt=0, pb=0) #@UndefinedVariable
RsgTextField(p='VAligner_s2', fieldType='Float', ncols=8, labelText='S12 ', keyword='bc_s12', default='0') #@UndefinedVariable
RsgTextField(p='VAligner_s2', fieldType='Float', ncols=8, labelText='S22 ', keyword='bc_s22', default='0') #@UndefinedVariable
RsgTextField(p='VAligner_s2', fieldType='Float', ncols=8, labelText='S32 ', keyword='bc_s32', default='0') #@UndefinedVariable
RsgVerticalAligner(name='VAligner_s3', p='HFrame_stress', pl=0, pr=0, pt=0, pb=0) #@UndefinedVariable
RsgTextField(p='VAligner_s3', fieldType='Float', ncols=8, labelText='S13 ', keyword='bc_s13', default='0') #@UndefinedVariable
RsgTextField(p='VAligner_s3', fieldType='Float', ncols=8, labelText='S23 ', keyword='bc_s23', default='0') #@UndefinedVariable
RsgTextField(p='VAligner_s3', fieldType='Float', ncols=8, labelText='S33 ', keyword='bc_s33', default='0') #@UndefinedVariable
#
# TAB INCREMENTATION/JOB
#
RsgTabItem(name='TabItem_2', p='TabBook_1', text='Incrementation / Job Settings') #@UndefinedVariable
RsgHorizontalFrame(name='HFrame_5', p='TabItem_2', layout='0', pl=0, pr=0, pt=0, pb=0) #@UndefinedVariable
# INCREMENTATION
RsgGroupBox(name='GroupBox_9', p='HFrame_5', text='Incrementation', layout='0') #@UndefinedVariable
RsgVerticalAligner(name='VAligner_10', p='GroupBox_9', pl=0, pr=0, pt=0, pb=0) #@UndefinedVariable
RsgTextField(p='VAligner_10', fieldType='Float', ncols=8, labelText='Initial IncSize', keyword='inc_init', default='0.001') #@UndefinedVariable
RsgTextField(p='VAligner_10', fieldType='Float', ncols=8, labelText='Minimum IncSize', keyword='inc_min', default='1.E-10') #@UndefinedVariable
RsgTextField(p='VAligner_10', fieldType='Float', ncols=8, labelText='Maximum IncSize', keyword='inc_max', default='0.001') #@UndefinedVariable
RsgTextField(p='VAligner_10', fieldType='Float', ncols=8, labelText='Maximum IncNumber', keyword='inc_maxnum', default='20000') #@UndefinedVariable
RsgVerticalAligner(name='VAligner_cyc', p='HFrame_5', pl=0, pr=0, pt=0, pb=0) #@UndefinedVariable
# JOB SETTINGS
RsgGroupBox(name='GroupBox_8', p='VAligner_cyc', text='Job Settings', layout='0') #@UndefinedVariable
RsgVerticalAligner(name='VAligner_11', p='GroupBox_8', pl=0, pr=0, pt=0, pb=0) #@UndefinedVariable
RsgComboBox(name='ComboBox_3', p='VAligner_11', text='Load Case                   ', keyword='job_lc', default='cyclic', comboType='STANDARD', repository='', rootText='', rootKeyword='C2', layout='') #@UndefinedVariable
RsgListItem(p='ComboBox_3', text='static') #@UndefinedVariable
RsgListItem(p='ComboBox_3', text='cyclic') #@UndefinedVariable
RsgComboBox(name='ComboBox_4', p='VAligner_11', text='Load Type          ', keyword='job_lt', default='stress', comboType='STANDARD', repository='', rootText='', rootKeyword='C3', layout='') #@UndefinedVariable
RsgListItem(p='ComboBox_4', text='stress') #@UndefinedVariable
RsgListItem(p='ComboBox_4', text='strain') #@UndefinedVariable
RsgTextField(p='VAligner_11', fieldType='String', ncols=8, labelText='Stabilization', keyword='job_stab', default='2.E-5') #@UndefinedVariable
RsgTextField(p='VAligner_11', fieldType='Float', ncols=8, labelText='F-Output Frequency', keyword='job_fout', default='0.01') #@UndefinedVariable
RsgTextField(p='VAligner_11', fieldType='Float', ncols=8, labelText='H-Output Frequency', keyword='job_hout', default='0.01') #@UndefinedVariable
# CYCLIC OPTIONS
RsgGroupBox(name='GroupBox_cyc', p='VAligner_cyc', text='Cyclic Options', layout='0') #@UndefinedVariable
RsgVerticalAligner(name='VAligner_50', p='GroupBox_cyc', pl=0, pr=0, pt=0, pb=0) #@UndefinedVariable
RsgTextField(p='VAligner_50', fieldType='Float', ncols=8, labelText='Damage Tolerance', keyword='job_dDmax', default='0.1') #@UndefinedVariable
RsgTextField(p='VAligner_50', fieldType='String', ncols=8, labelText='Amplitude Ratio        ', keyword='job_amplratio', default='0') #@UndefinedVariable
RsgTextField(p='VAligner_50', fieldType='Float', ncols=8, labelText='Frequency              ', keyword='job_freq', default='25') #@UndefinedVariable
RsgTextField(p='VAligner_50', fieldType='Float', ncols=8, labelText='NumCycles', keyword='job_ncycl', default='50') #@UndefinedVariable
RsgTextField(p='VAligner_50', fieldType='Float', ncols=8, labelText='dNmin', keyword='job_dnmin', default='500') #@UndefinedVariable
#
# BUILD DIALOG
#
dialogBox.show()

if __name__ == '__main__':
    pass