Basically, this is my problem: I have two MATLAB programs, program A is able to calculate the concentrations of chemical species by solving a system of non-linear equations, given an initial value of an input parameter.

MATLAB Program B, uses the value of the chemical species concentrations mentioned in program A and calculates the value of the parameter.

on the other hand, I would like to solve a non-steady state 1D transport model in COMSOL a interval from (0,L) at all the nodes of my geometry.

I would like to couple MATLAB with COMSOL in such way that the initial concentrations provided by the MATLAB program, can be used as the initial concentrations in my COMSOL transport model, solve my transport equations and move to the next node and time step and use now the concentrations obtained by COMSOL and feed them into the MATLAB program to calculate again the desired parameter.

And I would like to continue solving the model through all the geometry distance.

Thank you very much for your comments and suggestions.

Similar questions and discussions