How export data using MATLAB Link?
Hi All I need information, how I can export data by vertex using MATLAB? Before solve my problem, first I obtain information about mesh: nElem = model.mesh('mesh1').getNumElem; nVertex =...
View ArticleLiveLink for Matlab_Magnetic Buoyancy Force_Complicated force equation
Hi there! I am trying to simulate the transport of non magnetic particles using ferrofluids and magnetic fields. I have simulated the magnetic field, and I have now to do the particle tracing. Because...
View Articleload two models in the Matlab Livelink
Hello; I am new in Comsol and Matlab Livelink. my question is how can I load two models in Matlab Livelink? For example I try to run the following sample code, but it generates error which I am unable...
View ArticleHow to Generate Smooth Molecular Surface with COMSOL
Hello folks, I have COMSOL 4.3a and LiveLink for Matlab with me. And I have constructed a protein subunit of about 1000 atoms based on the coordinate data in the PDB file. I simulated each atom as a...
View ArticleProblem of using femtime() in COMSOL 3.5a
Hello all, I use femtime() in matlab to solve a dynamic FE problem as follow: fem.sol = femtime(fem,'Tlist',tspan); where tspan is an equally distributed time list. tspan = [t0,t1,t2,...tn]. Now, I am...
View ArticleExecute COMSOL Ribbon buttons with VBA
Does anyone know if there is a way to execute COMSOL ribbon buttons (for example, it 'clicks' the mesh button or it clicks plot group and selects the correct plot)? Basically, what I doing is creating...
View ArticleHow to duplicate solution in Matlab
Hi all, I am now using the COMSOL Livelink for Matlab. I create two solutions whose soltags are 'sol1' and 'sol2' respectively. I want to copy the solution from 'sol1' to 'sol2'. Here is what I am...
View Articlerecover matrix
hello everyone I made a resolution a PDE on COMSOL and I would like to to recover the resolution matrix using Matlab. is that possible? thank you for your help
View ArticleConvergence plots
Does anyone know if it is possible to show a convergence plot during a livelink with Matlab? I'm using version 4.4 and matlab R2013a. Thanks
View ArticleSolving memory intensive model
Solving 3D problem with a better mesh has become an issue for my model. I am always getting out of memory errors. I was wondering if It is possible to extract the matrices and solve it with , for...
View Articlempheval command
Dear all, I have got some questions regarding the mpheval command, which are not very clear in the documentation. There is a model file, that I export to matlab, that contains 2 studies, with a...
View ArticleVariable modifications between solution iterations
I'm developing a transient model using the Livelink interface. The model first calculates an initial solution for the first time window, then I would like to modify the state variable values due to...
View ArticleCreating solution objects and assigning values from MATLAB in COMSOL 4...
Hello, I am trying to adapt from COMSOL 3.5a to COMSOL 4, and so far, the biggest functionality that I miss while using the MATLAB connection is the following: I want to be able to create solution...
View ArticleCan we impose a MINIMUM STEPSIZE AS A STOP CONDITION?
I loop thousands of transient simulations in matlab and I can't find a solver setting that will stop the solver when the step size becomes very small (history of the stepsize in log file) and the...
View Articleaccessing MATLAB global variables when running models in MATLAB
I have defined an external function in matlab that I use in my Comsol/Matlab livelink model to set a volume heat source, let's call this function my_heat(x,y,z), where x,y,z are comsol spatial...
View ArticleGetting derived values into matlab variables
Hello! I have some trouble getting the value of an average operator into a matlab variable when using comsol through matlab. What I get when I translate the model into an .m file is this:...
View ArticleLocalSelectionImpl/set error when using mphinterp
This is not a question, rather documentation for anyone who might encounter the same problem in the future. I followed these steps: 1. Build a model. 2. Delete everything non-essential. 3. File ->...
View ArticleCOMSOL with Matlab syntaxis (plotting and extraction datas while optimization...
hello. I'm trying to make belows these days. First, I've opened a 'Topology Optimization of a Loaded Knee Structure' from the model library that is aleady exist. And I clicked 'reset history' then...
View Articlehandling interpolation function on Matlab environment
Hi. i usually do turn on the check box 'use space coordinates as arguments' to interpolate functions on GUI environment. But, i encountered situation about disappearing messages on Matlab environment....
View ArticleExtracting a table from a Comsol using Matlab livelink
Hello, I am having troubles in accessing a table that is created in comsol model using matlab livelink. When I use this command a = 120; b = 100; d = 100; model = waterDropsInOil(a,b,d); tabl =...
View Article