Mass Matrix

Numerical methods and mathematical models of Elmer
LJacq
Posts: 6
Joined: 28 Mar 2012, 20:39
Antispam: Yes

Mass Matrix

Post by LJacq »

Hi,

I'm calculating the eigenmodes of a problem and I'd neet to also determine the mass matrix. How can i retrieve it?

Thx in advance
tzwinger
Site Admin
Posts: 100
Joined: 24 Aug 2009, 12:20
Antispam: Yes

Re: Mass Matrix

Post by tzwinger »

Hi,
Do you want to have the system matrix written out in ASCII? If this is your goal, a simple

Code: Select all

 Dump system Matrix = filename
in the solver section should do it. This was explained in the 6.2 Release Notes viewtopic.php?f=11&t=1443&p=4290&hilit= ... dump#p4290

Best Regards,

Thomas
LJacq
Posts: 6
Joined: 28 Mar 2012, 20:39
Antispam: Yes

Re: Mass Matrix

Post by LJacq »

Thx for your response. I tried the manipulation but get this message:

Model Input: Unlisted keyword: [dump system matrix] in section: [solver 1].

I though downloaded the last version
tzwinger
Site Admin
Posts: 100
Joined: 24 Aug 2009, 12:20
Antispam: Yes

Re: Mass Matrix

Post by tzwinger »

Could you then try to cast it, i.e., write

Code: Select all

Dump Mass Matrix = String "TheFilename.suffix"
instead. Does that help?

Best Regards,

Thomas
tzwinger
Site Admin
Posts: 100
Joined: 24 Aug 2009, 12:20
Antispam: Yes

Re: Mass Matrix

Post by tzwinger »

Correction to previously sent message:

Try

Code: Select all

Dump system Matrix = String "TheFilename.suffix"
instead.

BR,

Thomas
LJacq
Posts: 6
Joined: 28 Mar 2012, 20:39
Antispam: Yes

Re: Mass Matrix

Post by LJacq »

OK, I now have a file with the response. But in this response, there's a lot of negatives numbers ...
I think the system matrix is not what i really need, it must be a combination of dumped and mass matrix, to create a "linearized" system (Ax=b).
I probably have to extract myself the mass elements. I try to find in
http://elmerfem.svn.sourceforge.net/vie ... k/fem/src/
where is definite this matrix i have a low level of programmation and it's quite hard for me ... I was waiting "simple files" like "linear elasticity solver" but it's a little more harder to find the right way in all the .src ...
I really don't want to take you much time and please scuse me for all my problems but could you just give me a direction, a start point to find where is made this matrix?
tzwinger
Site Admin
Posts: 100
Joined: 24 Aug 2009, 12:20
Antispam: Yes

Re: Mass Matrix

Post by tzwinger »

Hello,
perhaps you can find some answer in chapter 6 of the ElmerSolverManual http://www.nic.funet.fi/pub/sci/physics ... Manual.pdf: Solving eigenvalue problems

Best Regards,

Thomas
raback
Site Admin
Posts: 4823
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Mass Matrix

Post by raback »

Hi

You could perhaps use a dummy solver just to get the mass matrix. For example, apply the DivergenceSolver which is one of the simplest solvers and use the same "Dump System Matrix" keyword and you should get the mass matrix (without density accounted for).

-Peter
stoykov
Posts: 26
Joined: 11 May 2012, 13:18
Antispam: Yes

Re: Mass Matrix

Post by stoykov »

Hello,

Including the lines:
Dump System Matrix = String "matrix"
Dump System RHS = String "rhs"
into the .sif file in the solver section, creates a files containing the values of a matrix and a vector, let's say [A]{x} = {b} , I obtain the vector {b} equal to zeros.

But the eigenvalue problems is w^2[M]{u} = [K]{u}

Can someone tell me the relation between both equations? Do we have [A] = -w^2[M] + [K], for a fixed w?

Regards,
Stan
raback
Site Admin
Posts: 4823
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Mass Matrix

Post by raback »

Hi

I think that for eigenvalue problems the full matrix that you mark with A is never formed. Arpack needs both M and K. I would think that the system matrix corresponds then to K. For transient problems, for example, the global M is never formed but it's contributions are added to K depending on the time integration scheme.

So for your problem I think the code should be tweaked so that also M is saved, or you should use some other dummy solver where the system matrix is simply the mass matrix.

-Peter
Post Reply