Hi,
I am tryig to model T-peel test for cohezive zone parameter. So I modeled test and create a Abaqus2Matlab file with using your CZM example. Everything was good, model was running but when the main_code run for step 4, it gave an error. The error says:
Error using cat
Dimensions of arrays being concatenated are not consistent.
Error in cell2mat (line 75)
m{n} = cat(2,c{n,:});
Error in Main_CODE (line 75)
CMOD_points=linspace(max(min(cell2mat(CMOD_simulated))),min(max((CMOD_exp))),num_points);
Could you give me any suggestion for this error? You can download my files below the link:
https://yadi.sk/d/clfRD9CgW-RnLg
Dear cdengiz07,
You are welcome, and I am glad that you solved your problem.
Please see the description below for a more detailed explanation of the procedure in step 5 of the main Matlab code.
Initially, 5 Abaqus simulations are carried out and give 5 input-output pairs.
Then an iterative loop is followed in order to minimize the error between the experimental curve and the simulated curve. In each repetition of the loop, the following are done:
(1) A neural network is trained based on the training data. Initially these data include 5 input-output pairs (its size is equal to 5).
(2) Fit the experimental curve as an optimization procedure:
- Optimizer function: fminsearch
- Design variables: the input variables of the ANN (which is trained in step (1) above)
- Objective function: the difference between the output (prediction) of the ANN (which is trained in step (1) above) and the experimental curve
(3) Perform an Abaqus simulation with the optimum values of the design variables found in step (2) above (as input parameters). This Abaqus simulation gives an additional input-output pair, like the first 5 Abaqus simulations did.
(4) Add the input-output pair found in step (3) above to the input-output set (training data) of the ANN. Now the size of the training data increases by 1.
(5) Go to step (1) and repeat the procedure.
Eventually, the ANN that is obtained in the end is capable of reproducing the experimental curve with a high accuracy (relative error is smaller than 1e-5).
Please let me know if you do not understand something in the above description.
Thank you very much for your consideration.
Best,
George
Hello!
Please replace the line:
CMOD_points=linspace(max(min(cell2mat(CMOD_simulated))),min(max((CMOD_exp))),num_points);
of the Matlab script Main_CODE.m, with the following code segment:
L=cellfun(@numel,CMOD_simulated);
Lmax=max(L);
CMOD_simulated_mat=nan(Lmax,numel(L));
for i=1:numel(L)
CMOD_simulated_mat(1:L(i),i)=CMOD_simulated{1,i};
end
CMOD_points=linspace(max(min(CMOD_simulated_mat)),min(max((CMOD_exp))),num_points);
I think that this will solve the problem.
Best regards,
George