Repository navigation
Replies: 4 comments
|
@javijv4 I'm joining in this discussion a little late, but thanks for looking into this! Regarding test cases: we could look into reproducing the benchmarks discussed in the Liu and Marsden paper (sections 6.1-6.3). The first two use the method of manufactured solutions (MMS) for compressible and incompressible hyperplasticity. The third is a block compression benchmark for which we already have the solver input files. These files probably need to be updated to be compatible with It would be valuable if we have reliable support for Taylor-Hood elements, as they satisfy the LBB (inf-sup) condition and will provide us an independent and stable approach to solving mixed formulations. We can also compare against the There is a fairly old existing issue stemming from the fluids test case (#414) where the velocity results appear consistent but the pressure results do not. It would be nice if we revisited this issue at some point so that we are confident about the implementation for both fluid and solid mechanics. Supporting Taylor-Hood elements will allow us to study compression and Stokes flow problems, which are important capabilities for a general-purpose multiphysics solver. |
|
@kko27 I think testing the block compression test is a good idea! It will also verify the USTRUCT 3D implementation. About the Taylor Hood elements, I also think it would be great to get them working. I think both these test cases can help us identify why it isn't working. As mentioned in the original post, I identified some bugs, but I need to test them and understand the implementation more thoroughly. After I PR the changes to fix #737, I was planning on taking a closer look at the Taylor Hood implementation and maybe see if the bugs above also fix the behavior in #414. However, I wonder whether @zasexton has a plan for the Taylor Hood implementation within the refactoring, and whether we should wait for that instead. |
|
@javijv4 Yes, it would be great to get this mixed function space up and running. Ultimately I would like the refactoring process to wrap this into a more generic call for mixed function space formulations. Technically speaking the Taylor-Hood function space is a family of mixed-order spaces satisfying the inf-sup condition; currently the solver only implements the standard pair ( In the meantime I think we can still get this Taylor-Hood system fixed up and you've already given some great initial evidence for where work needs to go. In addition to this we should probably also add some CI tests for this functionality. Then when refactoring proceeds we can make sure that it agrees with the fixed Taylor-Hood infrastructure. |
|
I will be submitting a PR this afternoon specifically to resolve the issues with the Taylor-Hood element slow convergence performance related to #414; I'll be adding @javijv4 and @kko27 as reviewers since they have been investigating. @javijv4 I won't be addressing Taylor-Hood as it relates to USTRUCT since you already have some great ideas about what needs to change to fix/improve these elements here. |
Uh oh!
There was an error while loading. Please reload this page.
I have been working on a simple problem to 1. Understand better how
ustructworks and 2. Provide a benchmark that we can use to verify the solution.The problem is a 2D cylinder pressurized on the inside. Symmetry boundary conditions allow us to solve this by considering a single quarter of the ring. Assuming a perfectly incompressible, Neo-Hookean material ($J=1$ ), we can derive an analytical solution for the radial displacement $U$ given an inner pressure $P$ . The full details of the analytical solution can be found here, and the following .gif shows the analytical solution (arbitrary units).
I implemented this case, then asked Claude to run the convergence using
ustructwith and without VMS and flag any unexpected convergence issues. Claude also decided to add Taylor Hood elements. I am sharing this to add a bit more detail and because a few independent issues need to be addressed (see below).Neumann loads evaluated at the wrong time.
Time is advanced to t_{n+1} before the solve and loads are read there, but generalized-α
assembles at t_{n+α_f}. The load lags by (1 − α_f)·dt, so time integration is first order.
Time convergence
Below are the time convergence evaluations of the$P(t)$ at time point $t_{n+1}$ (current behavior) or $t_{n+\alpha}$ (as it should be mathematically.
Gen-alpha should converge$O(\Delta t^2)$ , but it currently converges $O(\Delta t)$ because the Neumann BC is evaluated at the wrong time point. The second plot shows that we recover $O(\Delta t^2)$ convergence when the load is evaluated correctly.
Note: in these plots the
ustruct(P1P1) convergence is capped by spatial errors.2D ustruct index errors
ustruct_r2D row loop used<=and read past the row end; the continuity tangent terms inustruct_2d_cwere written one slot too high (lK(8),lK(9)→ 7, 8, the latter out of bounds);a momentum-pressure term in
ustruct_2d_mwent into the continuity block (lK(6)→ 5). Result:heap corruption and a singular matrix. 3D assembly indices were already correct.
Extra ρ in the tau_C tangent
In
ustructthe tangent is assembled asaf*Jac*tauC*rho*NxFi*NxFi. The residual contribution is tau_C·r_C and tau_C alreadycontains ρ, so its velocity derivative is tau_C·∇N_b·F⁻¹, without the extra ρ. This occurs for
ustructonly; fluid and CMM VMS are consistent.Taylor Hood issues
Claude fixed several small issues so we could run TH. I haven't looked into them because I am not sure whether we are supporting TH elements, but I am listing Claude's description here in case it is helpful in the future.
Curved P2 meshes crash
(
Integrator.cpp,corrector_taylor_hood;post.cpp,tensor_post).Higher-order nodes were inverse-mapped into the straight corner element and failed a
1e-4 bounds check.
tensor_postruns for every quadratic mesh, so curved TRI6/TET10 instructare likely affected too.Mixed Jacobians in the continuity loop
(
ustruct.cpp,construct_usolid).Taylor–Hood assembles momentum on the P2 velocity quadrature and continuity on a
separate P1 pressure quadrature. The continuity weight is
w = w_p(g)·Jac, butJacwas shared with the velocity mapping. At the first pressure GP,
gnnon the P1 cornerelement overwrote
Jacwith the straight-sided P1 Jacobian; later GPs recomputedJacfrom the P2 velocity geometry (
!lShpF), so the same continuity integral mixed twodifferent measures — and on curved elements the P1
Jacis the wrong geometry entirely.The fix maps P1 pressure gradients through the velocity element and keeps that Jacobian
for every continuity GP.
Continuity residual invisible in the convergence norm
(
linear_solver/precond.cpp,precond_diag;gmres.cpp).Logged
Riis after diagonal scaling; with TH, ν = 0.5 and no VMS the pressure diagonalis 0, so continuity rows stay unscaled (~1e-10) next to momentum (~1) and GMRES stops on
the default absTol = 1e-10 without reducing continuity (instrumented |R_p| stuck at
8.654e-11). Workaround: small LS
<Absolute_tolerance>; fix: check unscaled momentum andcontinuity residuals separately. P1-VMS is unaffected.
GMRES
dBcolumn is wrongComputes
10*log(fNorm/dB)with a natural log, anddBis reset at each restart, so it showsonly the last restart cycle's reduction (e.g. −6 while R/Ri = 4e-11). Note: I haven't looked into this one in detail, so I need to confirm it is an issue.
Here are the spatial convergence (with$P(t)$ evaluated at $t_{n+\alpha}$ for completeness
Spatial convergence
I will open issues addressing points 1-3. Please let me know if I'm missing any other observations.
All reactions