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.

The size of mphgetu and mphxmeshinfo do not match

Please login with a confirmed email address before reporting spam

Hi

I'm building a coupled model with comsol and phreeqc using matlab livelink.

What I'm doing is like this. First, run the model for 1 step (0.1 years) in comsol, and export the result data to the matlab. phreeqc uses the exported data from comsol and calculate the equalibrium state. After then, it returns the data to comsol as its new initial condition.

At the first time, I preferred to use mpheval to export data from comsol, and interpolation function to import data to comsol (I saved the phreeqc result as .txt file and used it in comsol). However, using the interpolation function was not stable, so now I'm trying to use mphgetu, mphxmeshinfo, and setU functions.

But I having a hard time with figuring out the physical meaning of solution vector returned by mphgetu. In my case, the mphgetu function returns 845x1 vector, which means the degrees of freedom of my model is 845 according to the manual.

However, the degrees of freedom obtained from mphxmeshinfo was 1430. I figured it out that the total degrees of freedom in my model is 1430, which includes 825 DOFs, and 605 internal DOFs.

Here is my question.

If I want to know what is the physical meaning of the solution vector returned by mphgetu, where should I look for? The mphxmeshinfo gave me the data with internal DOFs so I was not able to use it directly.

Thanks for reading!


3 Replies Last Post Jun 17, 2022, 6:08 a.m. EDT
Lars Gregersen COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 2 years ago May 24, 2022, 9:44 a.m. EDT

Please post your model.

Please check that you are getting the u-vector and Xmeshinfo from the same solution and mesh case.

-------------------
Lars Gregersen
Comsol Denmark
Please post your model. Please check that you are getting the u-vector and Xmeshinfo from the same solution and mesh case.

Please login with a confirmed email address before reporting spam

Posted: 2 years ago Jun 15, 2022, 1:31 a.m. EDT

Thanks for your reply.

I was simply getting the data from different two solution.

Thanks for your reply. I was simply getting the data from different two solution.

Lars Gregersen COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 2 years ago Jun 17, 2022, 6:08 a.m. EDT

Hi Wonwoo

I'm glad it helped.

We are updating mpheval to give out a little bit more information by default. Also there are coming new utility functions for getting information about datasets in the next release of Comsol.

In the meantime you may get good use out of mphsolinfo using either the 'dataset' or 'soltag' arguments to clear things up.

-------------------
Lars Gregersen
Comsol Denmark
Hi Wonwoo I'm glad it helped. We are updating mpheval to give out a little bit more information by default. Also there are coming new utility functions for getting information about datasets in the next release of Comsol. In the meantime you may get good use out of mphsolinfo using either the 'dataset' or 'soltag' arguments to clear things up.

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.