emvalbuena / romtime

Unsteady Finite Element Reduced Order Model for Time Moving Domains
1 stars 1 forks source link

BUG : Using scipy.linalg.orth does not honor the boundary conditions in the out coming basis #23

Closed emvalbuena closed 3 years ago

emvalbuena commented 3 years ago

I observed during the implementation of the DEIM algorithm (#22) that when I increase the number of nodes, the two boundary point where coming out as interpolation nodes (which is not necessarily a problem).

Yet, when I checked the basis vectors, I realised that the homogeneous boundary conditions are not being honoured by all basis vectors.

I went to check the boundary conditions of the vectors in the naive ROM for MFP-1 ... and not all of them satisfy the boundary values either! I performed a visual check on the basis vectors, only to find out that most of them are smooth up to basis vector 11.

I think this might have to do with using the snapshots as they are, without any prior orthogonalisation, scaling with their norm, etc.

emvalbuena commented 3 years ago

(For the forcing term in MFP-1, whose equation is a parametrised parabola).

I have scaled the vectors by their norm before proceeding to orthogonalise them with the SVD. This hasn't had any impact.

So I checked the spectrum of the singular values ... and tachan! After basis number 2, the singular values decay to 1e-15!

Empirically, with what I am seeing, after a given threshold in the spectrum, the basis vectors must be disregarded:

  1. Their visual plot looks pretty much like noise.
  2. They do not honor the boundary conditions.

singular_values basis_vectors snapshots_l2 snapshots