Please login with a confirmed email address before reporting spam
Hi Edgar,
Thank you in advance for any assistance you can provide. I apologize for the delay in following up on this issue.
I’m currently working on a simulation where I need to apply a time-dependent current waveform to a terminal using an interpolated function. The waveform data was initially created in MATLAB, and I’m using LiveLink for MATLAB to integrate this with COMSOL.
Issue Description
In the COMSOL GUI:
I attempted to apply an interpolated function based on data that includes local extrema (e.g., peaks and troughs in the waveform).However, I encountered errors such as "failed to converge" or "inconsistent value." These errors seem to arise specifically when the interpolation involves sharp changes or non-smooth transitions between these extrema.
Using LiveLink for MATLAB: When I tried to define and assign this interpolated function via LiveLink for MATLAB, I received an error indicating an "incorrect number or types of inputs" when attempting to set the interpolation table.I ensured that the data was formatted as a cell array with each row containing a time-current pair, but the error persists.
Questions:
Function Constraints: Are there any known constraints or best practices for applying interpolated functions to terminals or other boundary conditions in COMSOL, especially when the data includes sharp changes or local extrema? Could the convergence issues be related to the nature of the interpolation?
Data Formatting: Regarding the error in LiveLink for MATLAB, are there specific data formatting requirements or common pitfalls when assigning an interpolation table via LiveLink for MATLAB that I might have overlooked?
Any insights or suggestions on how to resolve these issues would be greatly appreciated. I’m particularly interested in understanding whether the convergence problems in the COMSOL GUI could be related to the mathematical properties of the interpolated function itself, and how best to format and apply such data through LiveLink for MATLAB.
Thank you again for your time and assistance.
Best,
Sophia
Hi,
you can import a table defining the waveform into an interpolation function and use the function in the form f(t) for the electrode potential.
There may be other options that suit your application better.
Cheers
Edgar
Hi Edgar,
Thank you in advance for any assistance you can provide. I apologize for the delay in following up on this issue.
I’m currently working on a simulation where I need to apply a time-dependent current waveform to a terminal using an interpolated function. The waveform data was initially created in MATLAB, and I’m using LiveLink for MATLAB to integrate this with COMSOL.
Issue Description
In the COMSOL GUI:
I attempted to apply an interpolated function based on data that includes local extrema (e.g., peaks and troughs in the waveform).However, I encountered errors such as "failed to converge" or "inconsistent value." These errors seem to arise specifically when the interpolation involves sharp changes or non-smooth transitions between these extrema.
Using LiveLink for MATLAB: When I tried to define and assign this interpolated function via LiveLink for MATLAB, I received an error indicating an "incorrect number or types of inputs" when attempting to set the interpolation table.I ensured that the data was formatted as a cell array with each row containing a time-current pair, but the error persists.
Questions:
Function Constraints: Are there any known constraints or best practices for applying interpolated functions to terminals or other boundary conditions in COMSOL, especially when the data includes sharp changes or local extrema? Could the convergence issues be related to the nature of the interpolation?
Data Formatting: Regarding the error in LiveLink for MATLAB, are there specific data formatting requirements or common pitfalls when assigning an interpolation table via LiveLink for MATLAB that I might have overlooked?
Any insights or suggestions on how to resolve these issues would be greatly appreciated. I’m particularly interested in understanding whether the convergence problems in the COMSOL GUI could be related to the mathematical properties of the interpolated function itself, and how best to format and apply such data through LiveLink for MATLAB.
Thank you again for your time and assistance.
Best,
Sophia
>Hi,
>
>you can import a table defining the waveform into an interpolation function and use the function in the form f(t) for the electrode potential.
>There may be other options that suit your application better.
>
>Cheers
>Edgar