I want to integrate a FEATool Probem into Simulink. Essentially, I want to setup a FEATool Problem struct from a normal Matlab Script like
clear fea
fea.sdim = { 'x', 'y' };
fea = addphys( fea, @heattransfer, { 'T' } );
and so on. Then, I am calling solvetime to solve the first Second from this Matlab Script. From here onwards I want to call solvetime from Simulink to advance in time (always using the last result as an inital solution) but I am struggling to do so. Currently, I am using a Matlab Function Block in Simulink. As an easy example, imagine a Matlab Function Block in Simulink that contains
function T = fcn(fea)
T = evalexpr('T', [0; 0], fea);
where fea is defined as parameter data (as the problem struct is available in the base workspace). I get an error saying
Parameters that have cell arrays are not supported. Cell array variable found in fea.
Is there any way to use Simulink to call solvetime? I want to use Simulink to advance in solution time as I would like to incorporate transfer functions and a PID controller into the fea problem.