Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.
Matlab LiveLink - Comsol Multiphysics- obtaining stresses of a beam Model
Posted Oct 25, 2021, 7:06 p.m. EDT Structural & Acoustics, LiveLink for MATLAB, Structural Mechanics 1 Reply
Please login with a confirmed email address before reporting spam
Hello, I'm having issues reading the results of a beam model I solved with Comsol inside my MATLAB algorythm.
My algorythm:
mphopen('PRUEBA')
% mesh info [meshstats,meshdata] = mphmeshstats(model,'mesh1'); coord=meshdata.vertex; nnodos=size(coord,2); conect=meshdata.elem{2}; nelem=size(conect,2);
% Resultados of stress, shear, and transformation to global system. stress=mpheval(model,'beam.sn','dataset','dset1');
The mesh part works fine, I get the coordinates and conection I want, but it gives me a struct with empty fields whenever I try to ask for shear and stress:
struct with fields:
expr: {'beam.sn'}
d1: [1×0 double]
p: [3×0 double]
t: [4×0 int32]
ve: [0×1 int32]
unit: {'N/m^2'}
Also tried mphiterp just in case:
shear=mphinterp(model,'beam.txymax','dataset','dset1','coord',coord); Error using mphinterp mphinterp (0): Unable to perform assignment because the size of the left side is 1-by-3 and the size of the right side is 1-by-0.
I saved my comsol file and it works fine, I have values of stress and displacement, but I don't know why I can't read them on COMSOL.
Best Regards
Attachments: