Commit State - determines state of concrete panel based on strain field and commits uniaxial materials
| 943 | |
| 944 | // Commit State - determines state of concrete panel based on strain field and commits uniaxial materials |
| 945 | int FSAM::commitState(void) |
| 946 | { |
| 947 | |
| 948 | double Tstrain[3]; //ex, ey, gamma |
| 949 | |
| 950 | // Get strain values from strain of element |
| 951 | Tstrain[0] = strain_vec(0); //ex |
| 952 | Tstrain[1] = strain_vec(1); //ey |
| 953 | Tstrain[2] = strain_vec(2); //gxy |
| 954 | |
| 955 | // Determine State |
| 956 | // Uncracked panel behavior ...................................................... |
| 957 | if (crackA == 0 && crackB == 0) |
| 958 | { |
| 959 | |
| 960 | // Stage 1 - uncracked |
| 961 | Stage1(Tstrain[0], Tstrain[1], Tstrain[2]); |
| 962 | |
| 963 | // Store committed values of epscmax |
| 964 | Cepscmax1 = Tepscmax1; |
| 965 | Cepscmax2 = Tepscmax2; |
| 966 | |
| 967 | // Store committed values of principal strains |
| 968 | Cprstrain1 = Tprstrain1; |
| 969 | Cprstrain2 = Tprstrain2; |
| 970 | |
| 971 | // cracking criterium for 1st crack |
| 972 | if ( fmax(Cprstrain1,Cprstrain2) >= et) { |
| 973 | |
| 974 | // Initiate 1st crack |
| 975 | crackA = 1; |
| 976 | |
| 977 | // Calculate Direction of 1st Concrete Strut |
| 978 | double extest = 0.5*(Tstrain[0] + Tstrain[1]) + 0.5*(Tstrain[0] - Tstrain[1] )*cos( 2.0*alpha_strain ) + 0.5*Tstrain[2]*sin(2.0*alpha_strain); |
| 979 | |
| 980 | if (fabs(extest-Cprstrain1) < fabs(extest-Cprstrain2)) |
| 981 | { |
| 982 | if (Cprstrain1 >= Cprstrain2) { |
| 983 | alfa_crackA = alpha_strain; |
| 984 | } else { |
| 985 | if ( alpha_strain < 0.0) { |
| 986 | alfa_crackA = alpha_strain + 0.5*pi; |
| 987 | } else { |
| 988 | alfa_crackA = alpha_strain - 0.5*pi; |
| 989 | } |
| 990 | } |
| 991 | } |
| 992 | else |
| 993 | { |
| 994 | if (Cprstrain2 >= Cprstrain1) { |
| 995 | alfa_crackA = alpha_strain; |
| 996 | } else { |
| 997 | if (alpha_strain < 0.0) { |
| 998 | alfa_crackA = alpha_strain + 0.5*pi; |
| 999 | } else { |
| 1000 | alfa_crackA = alpha_strain - 0.5*pi; |
| 1001 | } |
| 1002 | } |