CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Community Contributions > OpenFOAM CC Toolkits for Fluid-Structure Interaction

[solidMechanics] Support thread for "Solid Mechanics Solvers added to OpenFOAM Extend"

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree134Likes

Closed Thread
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 7, 2019, 09:42
Default
  #441
New Member
 
Maxime
Join Date: Mar 2019
Location: Paris
Posts: 5
Rep Power: 7
MaximeB is on a distinguished road
Hello everyone,

I have a question, probably a stupid one because I'm just starting with foam-extend.

It it possible to extract the velocity of the solid in precise points when we run a fsi simulation?
I'll try to be more precise, when I run a simulation I have new files in the fluid folder with new pressure, velocity fields... but not in the solid one so how can I get these informations

Thanks,
Maxime
MaximeB is offline  

Old   May 7, 2019, 09:47
Default
  #442
Super Moderator
 
bigphil's Avatar
 
Philip Cardiff
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 1,089
Rep Power: 34
bigphil will become famous soon enoughbigphil will become famous soon enough
Quote:
Originally Posted by MaximeB View Post
Hello everyone,

I have a question, probably a stupid one because I'm just starting with foam-extend.

It it possible to extract the velocity of the solid in precise points when we run a fsi simulation?
I'll try to be more precise, when I run a simulation I have new files in the fluid folder with new pressure, velocity fields... but not in the solid one so how can I get these informations

Thanks,
Maxime
Hi Maxime,

Which solver are you using?

The solid fields are typically written to the time-steps in a sub-directory called "solid".

Philip
bigphil is offline  

Old   May 7, 2019, 09:52
Default
  #443
New Member
 
Maxime
Join Date: Mar 2019
Location: Paris
Posts: 5
Rep Power: 7
MaximeB is on a distinguished road
Hi,

I have found it thank you for the quick reply!

Maxime
MaximeB is offline  

Old   May 27, 2019, 14:01
Default
  #444
New Member
 
ilhado's Avatar
 
Iago Lessa de Oliveira
Join Date: May 2015
Posts: 23
Rep Power: 11
ilhado is on a distinguished road
Quote:
Originally Posted by bigphil View Post
Hi nima,

To implement a new constitutive law, you need to find a procedure/algorithm to calculate the stress tensor (e.g. Cauchy, 1st/2nd Piola Kirchhoff) from the deformation gradient. Once you have this procedure, you can code this into foam e.g. copy and rename the neo-Hookean hyperelastic mechanical law in solids4foam and then insert the new code for calculating the stress tensor in the "correct()" function.

Philip
Hello, Phillip.

I am currently trying to implement the Mooney-Rivlin model and an exponential model based on the first invariant of the right Cauchy-Green deformation tensor in solids4foam. However, both of these models use material constants that do not relate to the Lamé constants of the neo-Hookean constitutive model, for example. So, in this case, how should I calculate the implicit stiffness for a specific model?

Based on a paper by Prof. Jasak regarding solvers for elasticity problems, I tried to extract the linear part of the complete equation when I replace the Cauchy stress expression in the governing equation and. hence, the coefficient of this Laplacian term would be the implicit stiffness. However, I am not sure if this is a theoretically correct procedure. Could you help me with this issue?

Thanks in advance
Best regards

Iago Lessa
ilhado is offline  

Old   May 27, 2019, 15:43
Default
  #445
Super Moderator
 
bigphil's Avatar
 
Philip Cardiff
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 1,089
Rep Power: 34
bigphil will become famous soon enoughbigphil will become famous soon enough
Quote:
Originally Posted by ilhado View Post
Hello, Phillip.

I am currently trying to implement the Mooney-Rivlin model and an exponential model based on the first invariant of the right Cauchy-Green deformation tensor in solids4foam. However, both of these models use material constants that do not relate to the Lamé constants of the neo-Hookean constitutive model, for example. So, in this case, how should I calculate the implicit stiffness for a specific model?

Based on a paper by Prof. Jasak regarding solvers for elasticity problems, I tried to extract the linear part of the complete equation when I replace the Cauchy stress expression in the governing equation and. hence, the coefficient of this Laplacian term would be the implicit stiffness. However, I am not sure if this is a theoretically correct procedure. Could you help me with this issue?

Thanks in advance
Best regards

Iago Lessa
Hi Iago,

The 'implicit stiffness' coefficient only affects convergence and does not affect the result (assuming the procedure converges), so I suggest you try set it to "2*mu" (twice the linearised shear modulus, or something similar) and see if it converges. You may need some field relaxation for the D field (or DD depending on the solid model).

Philip
bigphil is offline  

Old   May 29, 2019, 15:29
Default
  #446
New Member
 
ilhado's Avatar
 
Iago Lessa de Oliveira
Join Date: May 2015
Posts: 23
Rep Power: 11
ilhado is on a distinguished road
Quote:
Originally Posted by bigphil View Post
Hi Iago,

The 'implicit stiffness' coefficient only affects convergence and does not affect the result (assuming the procedure converges), so I suggest you try set it to "2*mu" (twice the linearised shear modulus, or something similar) and see if it converges. You may need some field relaxation for the D field (or DD depending on the solid model).

Philip
Hey Philip, thanks for the quick response and the suggestion!

I tried with the "2*mu" and with "2*c01" (c01 is one of the material constants of the Mooney model I am using), however both procedures lead to divergence
I printed the determinant of the deformation gradient and it increases until divergence (since the initial iterations the Jacobian is negative and very high), even changing the relaxation.
I am currently reviewing the code and the equations of the model, but do you think that it could be caused by the highly non-linear behavior of this model?

Any help would be great
Thanks again and kind regards,
Iago
ilhado is offline  

Old   May 30, 2019, 18:27
Default
  #447
Super Moderator
 
bigphil's Avatar
 
Philip Cardiff
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 1,089
Rep Power: 34
bigphil will become famous soon enoughbigphil will become famous soon enough
sigh... I wrote a reply and then the internet dropped when I clicked "post". OK, here I go again (when my clipboard now has my back covered):

All hyperelastic laws should reduce to linear elasticity when the strains are small, so I suggest you try a case with small strains. Keep the case simple with a simple orthogonal mesh.

Related to this is the traction boundaries, their implementation (in the tractionBoundarySnGrad function within a solid model) can also greatly affect convergence: you may need to use 2*mu there too.

For trying under-relaxation for the D field, make sure to try values as low as 0.1.

If your law is incompressible then how do you calculate the hydrostatic pressure? This could be causing the problem. I guess you need to solve a pressure equation, and then be careful of the boundary conditions. You may try a compressible form first to see if this is the issue.

Philip
ilhado likes this.
bigphil is offline  

Old   June 6, 2019, 07:17
Default solids4foam installation
  #448
Member
 
Lilian Chabannes
Join Date: Apr 2017
Posts: 58
Rep Power: 9
Lookid is on a distinguished road
Hello, I installed solids4foam but every tutorial crashes after few iterations. I joined the cavity tutorial log below.
I thought I just broke foam-extend-4.0 after replacing fvMesh.C, solution.C etc.. but the fe40 tuto works properly.

Any idea of what I missed here?
Thanks

Code:
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | foam-extend: Open Source CFD                    |
|  \\    /   O peration     | Version:     4.0                                |
|   \\  /    A nd           | Web:         http://www.foam-extend.org         |
|    \\/     M anipulation  | For copyright notice see file Copyright         |
\*---------------------------------------------------------------------------*/
Build    : 4.0-f500917045c0
Exec     : solids4Foam
Date     : Jun 06 2019
Time     : 13:09:19
Host     : lilian-VB
PID      : 9776
CtrlDict : "/home/lilian/foam/lilian-4.0/tutorials_solids4foam/fluids/cavity/system/controlDict"
Case     : /home/lilian/foam/lilian-4.0/tutorials_solids4foam/fluids/cavity
nProcs   : 1
SigFpe   : Enabling floating point exception trapping (FOAM_SIGFPE).

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

/*---------------------------------------------------------------------------*\
|    For further information on the solids4Foam toolbox implementations,      |
|    please see the following publications:                                   |
|                                                                             |
|    P. Cardiff, A Karac, P. De Jaeger, H. Jasak, J. Nagy, A. Ivankovic,      |
|    Z. Tukovic: An open-source finite volume toolbox for solid mechanics and |
|    fluid-solid interaction simulations. arXiv:1808.10736v2, 2018, available |
|    at https://arxiv.org/abs/1808.10736.                                     |
|                                                                             |
|    Z. Tukovic, A. Karac, P. Cardiff, H. Jasak, A. Ivankovic: OpenFOAM       |
|    finite volume solver for fluid-solid interaction.  Transactions of       |
|    Famena, 42 (3), pp. 1-31, 2018, 10.21278/TOF.42301.                      |
\*---------------------------------------------------------------------------*/

Selecting physicsModel fluid

Selecting fluidModel icoFluid
Selecting dynamicFvMesh staticFvMesh
g field not found in constant directory: initialising to zero

PISO: Operating solver in PISO mode

Time = 0.005

Evolving fluid model: icoFluid
Courant Number mean: 0 max: 0 velocity magnitude: 0
DILUPBiCG:  Solving for Ux, Initial residual = 1, Final residual = 2.96338e-06, No Iterations 8
PBiCG:  Solving for Uy, Initial residual = 0, Final residual = 0, No Iterations 0
DICPCG:  Solving for p, Initial residual = 1, Final residual = 7.56362e-07, No Iterations 35
PCG:  Solving for p, Initial residual = 3.4915e-07, Final residual = 3.4915e-07, No Iterations 0
time step continuity errors : sum local = 5.61198e-09, global = 1.60142e-19, cumulative = 1.60142e-19
DICPCG:  Solving for p, Initial residual = 0.0373132, Final residual = 6.84278e-07, No Iterations 32
PCG:  Solving for p, Initial residual = 6.55699e-07, Final residual = 6.55699e-07, No Iterations 0
time step continuity errors : sum local = 1.14621e-08, global = -1.25731e-19, cumulative = 3.44107e-20
DICPCG:  Solving for p, Initial residual = 0.0306494, Final residual = 8.90318e-07, No Iterations 31
PCG:  Solving for p, Initial residual = 8.59511e-07, Final residual = 8.59511e-07, No Iterations 0
time step continuity errors : sum local = 1.60703e-08, global = -4.35428e-19, cumulative = -4.01017e-19
ExecutionTime = 0.01 s  ClockTime = 0 s

Time = 0.01

Evolving fluid model: icoFluid
Courant Number mean: 0.0633348 max: 0.652495 velocity magnitude: 0.652495
DILUPBiCG:  Solving for Ux, Initial residual = 0.564705, Final residual = 5.02236e-06, No Iterations 7
DILUPBiCG:  Solving for Uy, Initial residual = 1, Final residual = 6.02072e-06, No Iterations 7
DICPCG:  Solving for p, Initial residual = 0.955695, Final residual = 7.23834e-07, No Iterations 34
PCG:  Solving for p, Initial residual = 3.97939e-07, Final residual = 3.97939e-07, No Iterations 0
time step continuity errors : sum local = 4.26527e-08, global = -7.51742e-19, cumulative = -1.15276e-18
DICPCG:  Solving for p, Initial residual = 0.0469785, Final residual = 7.02703e-07, No Iterations 32
PCG:  Solving for p, Initial residual = 7.01974e-07, Final residual = 7.01974e-07, No Iterations 0
time step continuity errors : sum local = 7.57423e-08, global = -5.20131e-19, cumulative = -1.67289e-18
DICPCG:  Solving for p, Initial residual = 0.0396281, Final residual = 9.64776e-07, No Iterations 31
PCG:  Solving for p, Initial residual = 9.68577e-07, Final residual = 9.68577e-07, No Iterations 0
time step continuity errors : sum local = 1.03807e-07, global = -6.5248e-19, cumulative = -2.32537e-18
ExecutionTime = 0.01 s  ClockTime = 0 s

Time = 0.015

Evolving fluid model: icoFluid
Courant Number mean: 0.133341 max: 1.24061 velocity magnitude: 1.24061
DILUPBiCG:  Solving for Ux, Initial residual = 0.712947, Final residual = 5.34155e-06, No Iterations 7
DILUPBiCG:  Solving for Uy, Initial residual = 0.988583, Final residual = 9.34277e-06, No Iterations 7
DICPCG:  Solving for p, Initial residual = 0.961172, Final residual = 6.79535e-07, No Iterations 33
PCG:  Solving for p, Initial residual = 3.70372e-07, Final residual = 3.70372e-07, No Iterations 0
time step continuity errors : sum local = 2.22259e-07, global = 8.78797e-19, cumulative = -1.44657e-18
DICPCG:  Solving for p, Initial residual = 0.0176281, Final residual = 6.8951e-07, No Iterations 29
PCG:  Solving for p, Initial residual = 6.95257e-07, Final residual = 6.95257e-07, No Iterations 0
time step continuity errors : sum local = 4.11115e-07, global = -6.14099e-19, cumulative = -2.06067e-18
DICPCG:  Solving for p, Initial residual = 0.0154448, Final residual = 6.57921e-07, No Iterations 29
PCG:  Solving for p, Initial residual = 6.63021e-07, Final residual = 6.63021e-07, No Iterations 0
time step continuity errors : sum local = 3.86489e-07, global = -5.50571e-19, cumulative = -2.61124e-18
ExecutionTime = 0.02 s  ClockTime = 0 s

Time = 0.02

Evolving fluid model: icoFluid
Courant Number mean: 0.193945 max: 1.27361 velocity magnitude: 1.27361
DILUPBiCG:  Solving for Ux, Initial residual = 0.820961, Final residual = 7.95315e-07, No Iterations 8
DILUPBiCG:  Solving for Uy, Initial residual = 0.998289, Final residual = 5.30591e-06, No Iterations 7
DICPCG:  Solving for p, Initial residual = 0.966537, Final residual = 5.67282e-07, No Iterations 32
PCG:  Solving for p, Initial residual = 3.04536e-07, Final residual = 3.04536e-07, No Iterations 0
time step continuity errors : sum local = 1.05194e-06, global = 4.80691e-18, cumulative = 2.19567e-18
DICPCG:  Solving for p, Initial residual = 0.0134272, Final residual = 5.81579e-07, No Iterations 28
PCG:  Solving for p, Initial residual = 5.87513e-07, Final residual = 5.87513e-07, No Iterations 0
time step continuity errors : sum local = 1.97667e-06, global = -6.56451e-19, cumulative = 1.53922e-18
DICPCG:  Solving for p, Initial residual = 0.0125092, Final residual = 5.38448e-07, No Iterations 28
PCG:  Solving for p, Initial residual = 5.4365e-07, Final residual = 5.4365e-07, No Iterations 0
time step continuity errors : sum local = 1.80577e-06, global = 2.29758e-18, cumulative = 3.83679e-18
ExecutionTime = 0.02 s  ClockTime = 0 s

Time = 0.025

Evolving fluid model: icoFluid
Courant Number mean: 1.37537 max: 11.0114 velocity magnitude: 11.0114
DILUPBiCG:  Solving for Ux, Initial residual = 0.798569, Final residual = 5.6189e-06, No Iterations 8
DILUPBiCG:  Solving for Uy, Initial residual = 0.983555, Final residual = 4.88237e-06, No Iterations 9
DICPCG:  Solving for p, Initial residual = 0.95958, Final residual = 4.82828e-07, No Iterations 33
PCG:  Solving for p, Initial residual = 2.57333e-07, Final residual = 2.57333e-07, No Iterations 0
time step continuity errors : sum local = 4.99873e-06, global = -9.82558e-18, cumulative = -5.98879e-18
DICPCG:  Solving for p, Initial residual = 0.0178135, Final residual = 8.20424e-07, No Iterations 29
PCG:  Solving for p, Initial residual = 8.27314e-07, Final residual = 8.27314e-07, No Iterations 0
time step continuity errors : sum local = 1.58687e-05, global = 1.47384e-17, cumulative = 8.74959e-18
DICPCG:  Solving for p, Initial residual = 0.0176538, Final residual = 8.08312e-07, No Iterations 29
PCG:  Solving for p, Initial residual = 8.14435e-07, Final residual = 8.14435e-07, No Iterations 0
time step continuity errors : sum local = 1.54528e-05, global = 2.24464e-18, cumulative = 1.09942e-17
ExecutionTime = 0.02 s  ClockTime = 0 s

Time = 0.03

Evolving fluid model: icoFluid
Courant Number mean: 5.76872 max: 48.0483 velocity magnitude: 48.0483
DILUPBiCG:  Solving for Ux, Initial residual = 0.783183, Final residual = 1.07369e-06, No Iterations 13
DILUPBiCG:  Solving for Uy, Initial residual = 0.92337, Final residual = 2.04154e-06, No Iterations 12
DICPCG:  Solving for p, Initial residual = 0.925342, Final residual = 8.81149e-07, No Iterations 33
PCG:  Solving for p, Initial residual = 4.71599e-07, Final residual = 4.71599e-07, No Iterations 0
time step continuity errors : sum local = 4.77081e-05, global = 3.72694e-17, cumulative = 4.82637e-17
DICPCG:  Solving for p, Initial residual = 0.0464455, Final residual = 5.58182e-07, No Iterations 30
PCG:  Solving for p, Initial residual = 5.61316e-07, Final residual = 5.61316e-07, No Iterations 0
time step continuity errors : sum local = 5.63008e-05, global = 1.00289e-16, cumulative = 1.48552e-16
DICPCG:  Solving for p, Initial residual = 0.0518286, Final residual = 5.84817e-07, No Iterations 30
PCG:  Solving for p, Initial residual = 5.8853e-07, Final residual = 5.8853e-07, No Iterations 0
time step continuity errors : sum local = 5.8646e-05, global = 4.60786e-17, cumulative = 1.94631e-16
ExecutionTime = 0.03 s  ClockTime = 0 s

Time = 0.035

Evolving fluid model: icoFluid
Courant Number mean: 25.4612 max: 145.647 velocity magnitude: 145.647
DILUPBiCG:  Solving for Ux, Initial residual = 0.721755, Final residual = 4.05054e-06, No Iterations 21
DILUPBiCG:  Solving for Uy, Initial residual = 0.772057, Final residual = 5.8086e-06, No Iterations 21
DICPCG:  Solving for p, Initial residual = 0.874298, Final residual = 3.50262e-07, No Iterations 33
PCG:  Solving for p, Initial residual = 1.90244e-07, Final residual = 1.90244e-07, No Iterations 0
time step continuity errors : sum local = 8.25885e-05, global = 4.45878e-16, cumulative = 6.40509e-16
DICPCG:  Solving for p, Initial residual = 0.121134, Final residual = 4.58234e-07, No Iterations 31
PCG:  Solving for p, Initial residual = 4.34285e-07, Final residual = 4.34285e-07, No Iterations 0
time step continuity errors : sum local = 0.000210197, global = -3.46945e-16, cumulative = 2.93564e-16
DICPCG:  Solving for p, Initial residual = 0.352347, Final residual = 4.87244e-07, No Iterations 32
PCG:  Solving for p, Initial residual = 4.12811e-07, Final residual = 4.12811e-07, No Iterations 0
time step continuity errors : sum local = 0.000287, global = 2.70508e-15, cumulative = 2.99865e-15
ExecutionTime = 0.03 s  ClockTime = 0 s

Time = 0.04

Evolving fluid model: icoFluid
Courant Number mean: 208.417 max: 1327.69 velocity magnitude: 1327.69
DILUPBiCG:  Solving for Ux, Initial residual = 0.938117, Final residual = 5.97465e-06, No Iterations 126
DILUPBiCG:  Solving for Uy, Initial residual = 0.970662, Final residual = 6.63502e-06, No Iterations 143
DICPCG:  Solving for p, Initial residual = 0.6835, Final residual = 5.56485e-07, No Iterations 33
PCG:  Solving for p, Initial residual = 3.62332e-07, Final residual = 3.62332e-07, No Iterations 0
time step continuity errors : sum local = 0.000557523, global = 1.07336e-15, cumulative = 4.07201e-15
DICPCG:  Solving for p, Initial residual = 0.820069, Final residual = 7.85147e-07, No Iterations 32
PCG:  Solving for p, Initial residual = 4.52001e-07, Final residual = 4.52001e-07, No Iterations 0
time step continuity errors : sum local = 0.00474066, global = 2.4503e-15, cumulative = 6.52231e-15
DICPCG:  Solving for p, Initial residual = 0.986497, Final residual = 7.76072e-07, No Iterations 32
PCG:  Solving for p, Initial residual = 3.92988e-07, Final residual = 3.92988e-07, No Iterations 0
time step continuity errors : sum local = 0.286096, global = -1.78607e-12, cumulative = -1.77955e-12
ExecutionTime = 0.03 s  ClockTime = 0 s

Time = 0.045

Evolving fluid model: icoFluid
Courant Number mean: 154828 max: 4.23053e+06 velocity magnitude: 4.23053e+06
DILUPBiCG:  Solving for Ux, Initial residual = 0.999996, Final residual = 4.28954e-06, No Iterations 507
DILUPBiCG:  Solving for Uy, Initial residual = 0.999997, Final residual = 9.50619e-06, No Iterations 369
DICPCG:  Solving for p, Initial residual = 0.618983, Final residual = 3.07179e-07, No Iterations 32
PCG:  Solving for p, Initial residual = 2.43946e-07, Final residual = 2.43946e-07, No Iterations 0
time step continuity errors : sum local = 0.286393, global = -2.33147e-12, cumulative = -4.11102e-12
DICPCG:  Solving for p, Initial residual = 0.999994, Final residual = 8.15227e-07, No Iterations 33
PCG:  Solving for p, Initial residual = 4.07379e-07, Final residual = 4.07379e-07, No Iterations 0
time step continuity errors : sum local = 77527.3, global = 9.20301e-07, cumulative = 9.20297e-07
DICPCG:  Solving for p, Initial residual = 0.999995, Final residual = 9.44633e-07, No Iterations 32
PCG:  Solving for p, Initial residual = 4.72084e-07, Final residual = 4.72084e-07, No Iterations 0
time step continuity errors : sum local = 2.49645e+10, global = -0.292119, cumulative = -0.292118
ExecutionTime = 0.04 s  ClockTime = 0 s

Time = 0.05

Evolving fluid model: icoFluid
Courant Number mean: 1.61649e+16 max: 9.0784e+17 velocity magnitude: 9.0784e+17
DILUPBiCG:  Solving for Ux, Initial residual = 1, Final residual = 9.13487e-06, No Iterations 533
DILUPBiCG:  Solving for Uy, Initial residual = 1, Final residual = 5.68473e-06, No Iterations 396
DICPCG:  Solving for p, Initial residual = 1, Final residual = 9.07758e-07, No Iterations 416
PCG:  Solving for p, Initial residual = 4.47002e-07, Final residual = 4.47002e-07, No Iterations 0
time step continuity errors : sum local = 1.6131e+13, global = 265.796, cumulative = 265.504
DICPCG:  Solving for p, Initial residual = 1, Final residual = 9.12404e-07, No Iterations 386
PCG:  Solving for p, Initial residual = 4.49842e-07, Final residual = 4.49842e-07, No Iterations 0
time step continuity errors : sum local = 4.07351e+19, global = 8.56115e+08, cumulative = 8.56116e+08
DICPCG:  Solving for p, Initial residual = 1, Final residual = 5.90091e-07, No Iterations 366
PCG:  Solving for p, Initial residual = 2.85712e-07, Final residual = 2.85712e-07, No Iterations 0
time step continuity errors : sum local = 1.93922e+26, global = 6.02541e+15, cumulative = 6.02541e+15
ExecutionTime = 0.06 s  ClockTime = 0 s

Time = 0.055

Evolving fluid model: icoFluid
Courant Number mean: 1.71569e+33 max: 1.95088e+34 velocity magnitude: 1.95088e+34
DILUPBiCG:  Solving for Ux, Initial residual = 1, Final residual = 6269.35, No Iterations 1000
DILUPBiCG:  Solving for Uy, Initial residual = 1, Final residual = 1002.2, No Iterations 1000
DICPCG:  Solving for p, Initial residual = 1, Final residual = 5.75833e-07, No Iterations 865
PCG:  Solving for p, Initial residual = 2.84033e-07, Final residual = 2.84033e-07, No Iterations 0
time step continuity errors : sum local = 5.65699e+38, global = 2.94018e+27, cumulative = 2.94018e+27
DICPCG:  Solving for p, Initial residual = 1, Final residual = 6.2911e-07, No Iterations 885
PCG:  Solving for p, Initial residual = 2.43513e-07, Final residual = 2.43513e-07, No Iterations 0
time step continuity errors : sum local = 3.4619e+47, global = -7.89303e+37, cumulative = -7.89303e+37
DICPCG:  Solving for p, Initial residual = 1, Final residual = 3.4134e-07, No Iterations 959
PCG:  Solving for p, Initial residual = 1.61789e-07, Final residual = 1.61789e-07, No Iterations 0
time step continuity errors : sum local = 1.58512e+57, global = -9.87592e+46, cumulative = -9.87592e+46
ExecutionTime = 0.1 s  ClockTime = 0 s

Time = 0.06

Evolving fluid model: icoFluid
Courant Number mean: 5.84558e+63 max: 1.6118e+65 velocity magnitude: 1.6118e+65
DILUPBiCG:  Solving for Ux, Initial residual = 1, Final residual = 858486, No Iterations 1000
DILUPBiCG:  Solving for Uy, Initial residual = 1, Final residual = 79426.9, No Iterations 1000
DICPCG:  Solving for p, Initial residual = 1, Final residual = 0.00450428, No Iterations 1000
DICPCG:  Solving for p, Initial residual = 0.00224882, Final residual = 0.00213946, No Iterations 1000
time step continuity errors : sum local = 1.57344e+77, global = 3.08363e+61, cumulative = 3.08363e+61
DICPCG:  Solving for p, Initial residual = 1, Final residual = 0.000290142, No Iterations 1000
DICPCG:  Solving for p, Initial residual = 0.000145062, Final residual = 6.33882e-07, No Iterations 252
time step continuity errors : sum local = 5.0545e+81, global = 6.32137e+69, cumulative = 6.32137e+69
DICPCG:  Solving for p, Initial residual = 1, Final residual = 7.29587e-05, No Iterations 1000
DICPCG:  Solving for p, Initial residual = 3.64753e-05, Final residual = 6.83794e-07, No Iterations 190
time step continuity errors : sum local = 1.10318e+92, global = -1.18135e+80, cumulative = -1.18135e+80
ExecutionTime = 0.15 s  ClockTime = 0 s

Time = 0.065

Evolving fluid model: icoFluid
Courant Number mean: 1.89699e+97 max: 5.96825e+98 velocity magnitude: 5.96825e+98
Floating point exception (core dumped)
__________________
Feel free to join the OpenFOAM Discord https://discord.gg/P9p9eHn, a live chat about OpenFOAM
Lookid is offline  

Old   June 6, 2019, 08:39
Default
  #449
New Member
 
ilhado's Avatar
 
Iago Lessa de Oliveira
Join Date: May 2015
Posts: 23
Rep Power: 11
ilhado is on a distinguished road
Quote:
Originally Posted by bigphil View Post
sigh... I wrote a reply and then the internet dropped when I clicked "post". OK, here I go again (when my clipboard now has my back covered):

All hyperelastic laws should reduce to linear elasticity when the strains are small, so I suggest you try a case with small strains. Keep the case simple with a simple orthogonal mesh.

Related to this is the traction boundaries, their implementation (in the tractionBoundarySnGrad function within a solid model) can also greatly affect convergence: you may need to use 2*mu there too.

For trying under-relaxation for the D field, make sure to try values as low as 0.1.

If your law is incompressible then how do you calculate the hydrostatic pressure? This could be causing the problem. I guess you need to solve a pressure equation, and then be careful of the boundary conditions. You may try a compressible form first to see if this is the issue.

Philip
Thank you for all the suggestions!

I will do that, they are pretty new to me, especially the one about the traction boundaries, i didn't know that the change must done for the tractionBoundarySnGrad function too.

Regarding the compressibility, I am modeling my problem as incompressible and the law I use is indicated to this case, but in the class implementation, I just changed the Cauchy stress tensor function without actually accounting for the hydrostatic pressure. So to include it i must also change the equation being solved, right? Because it will appear as a term in the Cauchy stress.

And just to be sure: an incompressible form of the law is one that do not depend on the third invariant of the deformation tensor?

iago
ilhado is offline  

Old   June 6, 2019, 08:56
Default
  #450
Super Moderator
 
bigphil's Avatar
 
Philip Cardiff
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 1,089
Rep Power: 34
bigphil will become famous soon enoughbigphil will become famous soon enough
Quote:
Originally Posted by Lookid View Post
Hello, I installed solids4foam but every tutorial crashes after few iterations. I joined the cavity tutorial log below.
I thought I just broke foam-extend-4.0 after replacing fvMesh.C, solution.C etc.. but the fe40 tuto works properly.

Any idea of what I missed here?
Thanks

Code:
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | foam-extend: Open Source CFD                    |
|  \\    /   O peration     | Version:     4.0                                |
|   \\  /    A nd           | Web:         http://www.foam-extend.org         |
|    \\/     M anipulation  | For copyright notice see file Copyright         |
\*---------------------------------------------------------------------------*/
Build    : 4.0-f500917045c0
Exec     : solids4Foam
Date     : Jun 06 2019
Time     : 13:09:19
Host     : lilian-VB
PID      : 9776
CtrlDict : "/home/lilian/foam/lilian-4.0/tutorials_solids4foam/fluids/cavity/system/controlDict"
Case     : /home/lilian/foam/lilian-4.0/tutorials_solids4foam/fluids/cavity
nProcs   : 1
SigFpe   : Enabling floating point exception trapping (FOAM_SIGFPE).

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

/*---------------------------------------------------------------------------*\
|    For further information on the solids4Foam toolbox implementations,      |
|    please see the following publications:                                   |
|                                                                             |
|    P. Cardiff, A Karac, P. De Jaeger, H. Jasak, J. Nagy, A. Ivankovic,      |
|    Z. Tukovic: An open-source finite volume toolbox for solid mechanics and |
|    fluid-solid interaction simulations. arXiv:1808.10736v2, 2018, available |
|    at https://arxiv.org/abs/1808.10736.                                     |
|                                                                             |
|    Z. Tukovic, A. Karac, P. Cardiff, H. Jasak, A. Ivankovic: OpenFOAM       |
|    finite volume solver for fluid-solid interaction.  Transactions of       |
|    Famena, 42 (3), pp. 1-31, 2018, 10.21278/TOF.42301.                      |
\*---------------------------------------------------------------------------*/

Selecting physicsModel fluid

Selecting fluidModel icoFluid
Selecting dynamicFvMesh staticFvMesh
g field not found in constant directory: initialising to zero

PISO: Operating solver in PISO mode

Time = 0.005

Evolving fluid model: icoFluid
Courant Number mean: 0 max: 0 velocity magnitude: 0
DILUPBiCG:  Solving for Ux, Initial residual = 1, Final residual = 2.96338e-06, No Iterations 8
PBiCG:  Solving for Uy, Initial residual = 0, Final residual = 0, No Iterations 0
DICPCG:  Solving for p, Initial residual = 1, Final residual = 7.56362e-07, No Iterations 35
PCG:  Solving for p, Initial residual = 3.4915e-07, Final residual = 3.4915e-07, No Iterations 0
time step continuity errors : sum local = 5.61198e-09, global = 1.60142e-19, cumulative = 1.60142e-19
DICPCG:  Solving for p, Initial residual = 0.0373132, Final residual = 6.84278e-07, No Iterations 32
PCG:  Solving for p, Initial residual = 6.55699e-07, Final residual = 6.55699e-07, No Iterations 0
time step continuity errors : sum local = 1.14621e-08, global = -1.25731e-19, cumulative = 3.44107e-20
DICPCG:  Solving for p, Initial residual = 0.0306494, Final residual = 8.90318e-07, No Iterations 31
PCG:  Solving for p, Initial residual = 8.59511e-07, Final residual = 8.59511e-07, No Iterations 0
time step continuity errors : sum local = 1.60703e-08, global = -4.35428e-19, cumulative = -4.01017e-19
ExecutionTime = 0.01 s  ClockTime = 0 s

Time = 0.01

Evolving fluid model: icoFluid
Courant Number mean: 0.0633348 max: 0.652495 velocity magnitude: 0.652495
DILUPBiCG:  Solving for Ux, Initial residual = 0.564705, Final residual = 5.02236e-06, No Iterations 7
DILUPBiCG:  Solving for Uy, Initial residual = 1, Final residual = 6.02072e-06, No Iterations 7
DICPCG:  Solving for p, Initial residual = 0.955695, Final residual = 7.23834e-07, No Iterations 34
PCG:  Solving for p, Initial residual = 3.97939e-07, Final residual = 3.97939e-07, No Iterations 0
time step continuity errors : sum local = 4.26527e-08, global = -7.51742e-19, cumulative = -1.15276e-18
DICPCG:  Solving for p, Initial residual = 0.0469785, Final residual = 7.02703e-07, No Iterations 32
PCG:  Solving for p, Initial residual = 7.01974e-07, Final residual = 7.01974e-07, No Iterations 0
time step continuity errors : sum local = 7.57423e-08, global = -5.20131e-19, cumulative = -1.67289e-18
DICPCG:  Solving for p, Initial residual = 0.0396281, Final residual = 9.64776e-07, No Iterations 31
PCG:  Solving for p, Initial residual = 9.68577e-07, Final residual = 9.68577e-07, No Iterations 0
time step continuity errors : sum local = 1.03807e-07, global = -6.5248e-19, cumulative = -2.32537e-18
ExecutionTime = 0.01 s  ClockTime = 0 s

Time = 0.015

Evolving fluid model: icoFluid
Courant Number mean: 0.133341 max: 1.24061 velocity magnitude: 1.24061
DILUPBiCG:  Solving for Ux, Initial residual = 0.712947, Final residual = 5.34155e-06, No Iterations 7
DILUPBiCG:  Solving for Uy, Initial residual = 0.988583, Final residual = 9.34277e-06, No Iterations 7
DICPCG:  Solving for p, Initial residual = 0.961172, Final residual = 6.79535e-07, No Iterations 33
PCG:  Solving for p, Initial residual = 3.70372e-07, Final residual = 3.70372e-07, No Iterations 0
time step continuity errors : sum local = 2.22259e-07, global = 8.78797e-19, cumulative = -1.44657e-18
DICPCG:  Solving for p, Initial residual = 0.0176281, Final residual = 6.8951e-07, No Iterations 29
PCG:  Solving for p, Initial residual = 6.95257e-07, Final residual = 6.95257e-07, No Iterations 0
time step continuity errors : sum local = 4.11115e-07, global = -6.14099e-19, cumulative = -2.06067e-18
DICPCG:  Solving for p, Initial residual = 0.0154448, Final residual = 6.57921e-07, No Iterations 29
PCG:  Solving for p, Initial residual = 6.63021e-07, Final residual = 6.63021e-07, No Iterations 0
time step continuity errors : sum local = 3.86489e-07, global = -5.50571e-19, cumulative = -2.61124e-18
ExecutionTime = 0.02 s  ClockTime = 0 s

Time = 0.02

Evolving fluid model: icoFluid
Courant Number mean: 0.193945 max: 1.27361 velocity magnitude: 1.27361
DILUPBiCG:  Solving for Ux, Initial residual = 0.820961, Final residual = 7.95315e-07, No Iterations 8
DILUPBiCG:  Solving for Uy, Initial residual = 0.998289, Final residual = 5.30591e-06, No Iterations 7
DICPCG:  Solving for p, Initial residual = 0.966537, Final residual = 5.67282e-07, No Iterations 32
PCG:  Solving for p, Initial residual = 3.04536e-07, Final residual = 3.04536e-07, No Iterations 0
time step continuity errors : sum local = 1.05194e-06, global = 4.80691e-18, cumulative = 2.19567e-18
DICPCG:  Solving for p, Initial residual = 0.0134272, Final residual = 5.81579e-07, No Iterations 28
PCG:  Solving for p, Initial residual = 5.87513e-07, Final residual = 5.87513e-07, No Iterations 0
time step continuity errors : sum local = 1.97667e-06, global = -6.56451e-19, cumulative = 1.53922e-18
DICPCG:  Solving for p, Initial residual = 0.0125092, Final residual = 5.38448e-07, No Iterations 28
PCG:  Solving for p, Initial residual = 5.4365e-07, Final residual = 5.4365e-07, No Iterations 0
time step continuity errors : sum local = 1.80577e-06, global = 2.29758e-18, cumulative = 3.83679e-18
ExecutionTime = 0.02 s  ClockTime = 0 s

Time = 0.025

Evolving fluid model: icoFluid
Courant Number mean: 1.37537 max: 11.0114 velocity magnitude: 11.0114
DILUPBiCG:  Solving for Ux, Initial residual = 0.798569, Final residual = 5.6189e-06, No Iterations 8
DILUPBiCG:  Solving for Uy, Initial residual = 0.983555, Final residual = 4.88237e-06, No Iterations 9
DICPCG:  Solving for p, Initial residual = 0.95958, Final residual = 4.82828e-07, No Iterations 33
PCG:  Solving for p, Initial residual = 2.57333e-07, Final residual = 2.57333e-07, No Iterations 0
time step continuity errors : sum local = 4.99873e-06, global = -9.82558e-18, cumulative = -5.98879e-18
DICPCG:  Solving for p, Initial residual = 0.0178135, Final residual = 8.20424e-07, No Iterations 29
PCG:  Solving for p, Initial residual = 8.27314e-07, Final residual = 8.27314e-07, No Iterations 0
time step continuity errors : sum local = 1.58687e-05, global = 1.47384e-17, cumulative = 8.74959e-18
DICPCG:  Solving for p, Initial residual = 0.0176538, Final residual = 8.08312e-07, No Iterations 29
PCG:  Solving for p, Initial residual = 8.14435e-07, Final residual = 8.14435e-07, No Iterations 0
time step continuity errors : sum local = 1.54528e-05, global = 2.24464e-18, cumulative = 1.09942e-17
ExecutionTime = 0.02 s  ClockTime = 0 s

Time = 0.03

Evolving fluid model: icoFluid
Courant Number mean: 5.76872 max: 48.0483 velocity magnitude: 48.0483
DILUPBiCG:  Solving for Ux, Initial residual = 0.783183, Final residual = 1.07369e-06, No Iterations 13
DILUPBiCG:  Solving for Uy, Initial residual = 0.92337, Final residual = 2.04154e-06, No Iterations 12
DICPCG:  Solving for p, Initial residual = 0.925342, Final residual = 8.81149e-07, No Iterations 33
PCG:  Solving for p, Initial residual = 4.71599e-07, Final residual = 4.71599e-07, No Iterations 0
time step continuity errors : sum local = 4.77081e-05, global = 3.72694e-17, cumulative = 4.82637e-17
DICPCG:  Solving for p, Initial residual = 0.0464455, Final residual = 5.58182e-07, No Iterations 30
PCG:  Solving for p, Initial residual = 5.61316e-07, Final residual = 5.61316e-07, No Iterations 0
time step continuity errors : sum local = 5.63008e-05, global = 1.00289e-16, cumulative = 1.48552e-16
DICPCG:  Solving for p, Initial residual = 0.0518286, Final residual = 5.84817e-07, No Iterations 30
PCG:  Solving for p, Initial residual = 5.8853e-07, Final residual = 5.8853e-07, No Iterations 0
time step continuity errors : sum local = 5.8646e-05, global = 4.60786e-17, cumulative = 1.94631e-16
ExecutionTime = 0.03 s  ClockTime = 0 s

Time = 0.035

Evolving fluid model: icoFluid
Courant Number mean: 25.4612 max: 145.647 velocity magnitude: 145.647
DILUPBiCG:  Solving for Ux, Initial residual = 0.721755, Final residual = 4.05054e-06, No Iterations 21
DILUPBiCG:  Solving for Uy, Initial residual = 0.772057, Final residual = 5.8086e-06, No Iterations 21
DICPCG:  Solving for p, Initial residual = 0.874298, Final residual = 3.50262e-07, No Iterations 33
PCG:  Solving for p, Initial residual = 1.90244e-07, Final residual = 1.90244e-07, No Iterations 0
time step continuity errors : sum local = 8.25885e-05, global = 4.45878e-16, cumulative = 6.40509e-16
DICPCG:  Solving for p, Initial residual = 0.121134, Final residual = 4.58234e-07, No Iterations 31
PCG:  Solving for p, Initial residual = 4.34285e-07, Final residual = 4.34285e-07, No Iterations 0
time step continuity errors : sum local = 0.000210197, global = -3.46945e-16, cumulative = 2.93564e-16
DICPCG:  Solving for p, Initial residual = 0.352347, Final residual = 4.87244e-07, No Iterations 32
PCG:  Solving for p, Initial residual = 4.12811e-07, Final residual = 4.12811e-07, No Iterations 0
time step continuity errors : sum local = 0.000287, global = 2.70508e-15, cumulative = 2.99865e-15
ExecutionTime = 0.03 s  ClockTime = 0 s

Time = 0.04

Evolving fluid model: icoFluid
Courant Number mean: 208.417 max: 1327.69 velocity magnitude: 1327.69
DILUPBiCG:  Solving for Ux, Initial residual = 0.938117, Final residual = 5.97465e-06, No Iterations 126
DILUPBiCG:  Solving for Uy, Initial residual = 0.970662, Final residual = 6.63502e-06, No Iterations 143
DICPCG:  Solving for p, Initial residual = 0.6835, Final residual = 5.56485e-07, No Iterations 33
PCG:  Solving for p, Initial residual = 3.62332e-07, Final residual = 3.62332e-07, No Iterations 0
time step continuity errors : sum local = 0.000557523, global = 1.07336e-15, cumulative = 4.07201e-15
DICPCG:  Solving for p, Initial residual = 0.820069, Final residual = 7.85147e-07, No Iterations 32
PCG:  Solving for p, Initial residual = 4.52001e-07, Final residual = 4.52001e-07, No Iterations 0
time step continuity errors : sum local = 0.00474066, global = 2.4503e-15, cumulative = 6.52231e-15
DICPCG:  Solving for p, Initial residual = 0.986497, Final residual = 7.76072e-07, No Iterations 32
PCG:  Solving for p, Initial residual = 3.92988e-07, Final residual = 3.92988e-07, No Iterations 0
time step continuity errors : sum local = 0.286096, global = -1.78607e-12, cumulative = -1.77955e-12
ExecutionTime = 0.03 s  ClockTime = 0 s

Time = 0.045

Evolving fluid model: icoFluid
Courant Number mean: 154828 max: 4.23053e+06 velocity magnitude: 4.23053e+06
DILUPBiCG:  Solving for Ux, Initial residual = 0.999996, Final residual = 4.28954e-06, No Iterations 507
DILUPBiCG:  Solving for Uy, Initial residual = 0.999997, Final residual = 9.50619e-06, No Iterations 369
DICPCG:  Solving for p, Initial residual = 0.618983, Final residual = 3.07179e-07, No Iterations 32
PCG:  Solving for p, Initial residual = 2.43946e-07, Final residual = 2.43946e-07, No Iterations 0
time step continuity errors : sum local = 0.286393, global = -2.33147e-12, cumulative = -4.11102e-12
DICPCG:  Solving for p, Initial residual = 0.999994, Final residual = 8.15227e-07, No Iterations 33
PCG:  Solving for p, Initial residual = 4.07379e-07, Final residual = 4.07379e-07, No Iterations 0
time step continuity errors : sum local = 77527.3, global = 9.20301e-07, cumulative = 9.20297e-07
DICPCG:  Solving for p, Initial residual = 0.999995, Final residual = 9.44633e-07, No Iterations 32
PCG:  Solving for p, Initial residual = 4.72084e-07, Final residual = 4.72084e-07, No Iterations 0
time step continuity errors : sum local = 2.49645e+10, global = -0.292119, cumulative = -0.292118
ExecutionTime = 0.04 s  ClockTime = 0 s

Time = 0.05

Evolving fluid model: icoFluid
Courant Number mean: 1.61649e+16 max: 9.0784e+17 velocity magnitude: 9.0784e+17
DILUPBiCG:  Solving for Ux, Initial residual = 1, Final residual = 9.13487e-06, No Iterations 533
DILUPBiCG:  Solving for Uy, Initial residual = 1, Final residual = 5.68473e-06, No Iterations 396
DICPCG:  Solving for p, Initial residual = 1, Final residual = 9.07758e-07, No Iterations 416
PCG:  Solving for p, Initial residual = 4.47002e-07, Final residual = 4.47002e-07, No Iterations 0
time step continuity errors : sum local = 1.6131e+13, global = 265.796, cumulative = 265.504
DICPCG:  Solving for p, Initial residual = 1, Final residual = 9.12404e-07, No Iterations 386
PCG:  Solving for p, Initial residual = 4.49842e-07, Final residual = 4.49842e-07, No Iterations 0
time step continuity errors : sum local = 4.07351e+19, global = 8.56115e+08, cumulative = 8.56116e+08
DICPCG:  Solving for p, Initial residual = 1, Final residual = 5.90091e-07, No Iterations 366
PCG:  Solving for p, Initial residual = 2.85712e-07, Final residual = 2.85712e-07, No Iterations 0
time step continuity errors : sum local = 1.93922e+26, global = 6.02541e+15, cumulative = 6.02541e+15
ExecutionTime = 0.06 s  ClockTime = 0 s

Time = 0.055

Evolving fluid model: icoFluid
Courant Number mean: 1.71569e+33 max: 1.95088e+34 velocity magnitude: 1.95088e+34
DILUPBiCG:  Solving for Ux, Initial residual = 1, Final residual = 6269.35, No Iterations 1000
DILUPBiCG:  Solving for Uy, Initial residual = 1, Final residual = 1002.2, No Iterations 1000
DICPCG:  Solving for p, Initial residual = 1, Final residual = 5.75833e-07, No Iterations 865
PCG:  Solving for p, Initial residual = 2.84033e-07, Final residual = 2.84033e-07, No Iterations 0
time step continuity errors : sum local = 5.65699e+38, global = 2.94018e+27, cumulative = 2.94018e+27
DICPCG:  Solving for p, Initial residual = 1, Final residual = 6.2911e-07, No Iterations 885
PCG:  Solving for p, Initial residual = 2.43513e-07, Final residual = 2.43513e-07, No Iterations 0
time step continuity errors : sum local = 3.4619e+47, global = -7.89303e+37, cumulative = -7.89303e+37
DICPCG:  Solving for p, Initial residual = 1, Final residual = 3.4134e-07, No Iterations 959
PCG:  Solving for p, Initial residual = 1.61789e-07, Final residual = 1.61789e-07, No Iterations 0
time step continuity errors : sum local = 1.58512e+57, global = -9.87592e+46, cumulative = -9.87592e+46
ExecutionTime = 0.1 s  ClockTime = 0 s

Time = 0.06

Evolving fluid model: icoFluid
Courant Number mean: 5.84558e+63 max: 1.6118e+65 velocity magnitude: 1.6118e+65
DILUPBiCG:  Solving for Ux, Initial residual = 1, Final residual = 858486, No Iterations 1000
DILUPBiCG:  Solving for Uy, Initial residual = 1, Final residual = 79426.9, No Iterations 1000
DICPCG:  Solving for p, Initial residual = 1, Final residual = 0.00450428, No Iterations 1000
DICPCG:  Solving for p, Initial residual = 0.00224882, Final residual = 0.00213946, No Iterations 1000
time step continuity errors : sum local = 1.57344e+77, global = 3.08363e+61, cumulative = 3.08363e+61
DICPCG:  Solving for p, Initial residual = 1, Final residual = 0.000290142, No Iterations 1000
DICPCG:  Solving for p, Initial residual = 0.000145062, Final residual = 6.33882e-07, No Iterations 252
time step continuity errors : sum local = 5.0545e+81, global = 6.32137e+69, cumulative = 6.32137e+69
DICPCG:  Solving for p, Initial residual = 1, Final residual = 7.29587e-05, No Iterations 1000
DICPCG:  Solving for p, Initial residual = 3.64753e-05, Final residual = 6.83794e-07, No Iterations 190
time step continuity errors : sum local = 1.10318e+92, global = -1.18135e+80, cumulative = -1.18135e+80
ExecutionTime = 0.15 s  ClockTime = 0 s

Time = 0.065

Evolving fluid model: icoFluid
Courant Number mean: 1.89699e+97 max: 5.96825e+98 velocity magnitude: 5.96825e+98
Floating point exception (core dumped)
Hi Lilian,

Apoligies, this is a temporary issue with the "master" branch: I will merge the fix from the development branch soon.

For now, please change to the "development" branch:
Code:
$> cd solids4foam-release
$> git checkout development
$> ./Allwclean
$> ./Allwmake
Philip
bigphil is offline  

Old   June 6, 2019, 09:00
Default
  #451
Super Moderator
 
bigphil's Avatar
 
Philip Cardiff
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 1,089
Rep Power: 34
bigphil will become famous soon enoughbigphil will become famous soon enough
Quote:
Originally Posted by ilhado View Post
Thank you for all the suggestions!

I will do that, they are pretty new to me, especially the one about the traction boundaries, i didn't know that the change must done for the tractionBoundarySnGrad function too.

Regarding the compressibility, I am modeling my problem as incompressible and the law I use is indicated to this case, but in the class implementation, I just changed the Cauchy stress tensor function without actually accounting for the hydrostatic pressure. So to include it i must also change the equation being solved, right? Because it will appear as a term in the Cauchy stress.

And just to be sure: an incompressible form of the law is one that do not depend on the third invariant of the deformation tensor?

iago
Hi iago,

The mechanical law should return the total Cauchy stress i.e. deviatoric term plus volumetric/dilatation/pressure term. Can you give a link to the form of law you are using? Be careful in case you are just using the definition of deviatoric stress (shape change) without the pressure contribution.

You may or may not need to solve an equation to get the pressure; there is probably no need to modify the solidModel as you could solve the equation within the mechanical law to get the pressure.

Philip
ilhado likes this.
bigphil is offline  

Old   June 6, 2019, 10:21
Default
  #452
Member
 
Lilian Chabannes
Join Date: Apr 2017
Posts: 58
Rep Power: 9
Lookid is on a distinguished road
Quote:
Originally Posted by bigphil View Post
Hi Lilian,

Apoligies, this is a temporary issue with the "master" branch: I will merge the fix from the development branch soon.

For now, please change to the "development" branch:
Code:
$> cd solids4foam-release
$> git checkout development
$> ./Allwclean
$> ./Allwmake
Philip
Hi,

restarted everything from 0, did that, but the problem is still the same unfortunately
__________________
Feel free to join the OpenFOAM Discord https://discord.gg/P9p9eHn, a live chat about OpenFOAM
Lookid is offline  

Old   June 6, 2019, 10:50
Default
  #453
Super Moderator
 
bigphil's Avatar
 
Philip Cardiff
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 1,089
Rep Power: 34
bigphil will become famous soon enoughbigphil will become famous soon enough
Quote:
Originally Posted by Lookid View Post
Hi,

restarted everything from 0, did that, but the problem is still the same unfortunately
Hi Lilian,

I have pushed the fixes to the master now so try a fresh copy and see if it works:
Code:
$> git clone git@bitbucket.org:philip_cardiff/solids4foam-release.git
$> cd solids4foam-release
$> ./Allwmake
Then try the case. Hopefully, it should work.

Philip
dewey and Shifeng like this.
bigphil is offline  

Old   June 12, 2019, 05:17
Default
  #454
Super Moderator
 
bigphil's Avatar
 
Philip Cardiff
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 1,089
Rep Power: 34
bigphil will become famous soon enoughbigphil will become famous soon enough
Quote:
Originally Posted by ilhado View Post
Thank you for all the suggestions!

I will do that, they are pretty new to me, especially the one about the traction boundaries, i didn't know that the change must done for the tractionBoundarySnGrad function too.

Regarding the compressibility, I am modeling my problem as incompressible and the law I use is indicated to this case, but in the class implementation, I just changed the Cauchy stress tensor function without actually accounting for the hydrostatic pressure. So to include it i must also change the equation being solved, right? Because it will appear as a term in the Cauchy stress.

And just to be sure: an incompressible form of the law is one that do not depend on the third invariant of the deformation tensor?

iago
From PM:
Quote:
Originally Posted by ilhado
Hi Philip, regarding your last post about my issues implementing the Mooney-Rivlin model in solids4foam:

Quote:
The mechanical law should return the total Cauchy stress i.e. deviatoric term plus volumetric/dilatation/pressure term. Can you give a link to the form of law you are using? Be careful in case you are just using the definition of deviatoric stress (shape change) without the pressure contribution.

You may or may not need to solve an equation to get the pressure; there is probably no need to modify the solidModel as you could solve the equation within the mechanical law to get the pressure.
Maybe this is the problem after all: I am really only considering the deviatoric part

I am using the following simplified form of the Mooney-Rivlin series expansion for an incompressible solid where the strain energy function, psi, is given by:

psi(I1,I2) = c10*(I1 - 3) + c01*(I2 - 3).

I got this expression from Belytschko's book: "Nonlinear Finite Elements for Continua and Structures", 2nd Ed, Eq. (5.4.60). However, reviewing the textbook, to account for the pressure part I should use a penalty parameter, right? Could you explain how this could be done in solids4Foam or, if possible, indicate a textbook where I could learn a little bit more about these kinds of methods? I am really new to this part of Solid Mechanics and its implementation details.

My intention was to try the above simpler form first and, then, explore a more complex form used to model aneurysms tissue:

psi(I1,I2) = c10*(I1 - 3) + c01*(I2 - 3) + c11*(I1 - 3)*(I2 - 3).

and others exponential constitutive laws.

Thanks very much in advance
Best regards,
iago
Hi iago,

Using a penalty parameter approach for an incompressible pressure term basically means assume the material is compressible and then use a large value for the bulk modulus (the bulk modulus is termed the penalty factor/stiffness in this case); as the bulk modulus is increased, the answer approaches the incompressible solution.

So, I suggest you use the pressure term from the implemented compressible neo-Hookean law:

Code:
// Calculate Jacobian
const volScalarField J = det(F());

// Calculate hydrostatic pressure
const volScalarField p = -(1.0/J)*(0.5*K_*(pow(J, 2) - 1)*I;

// Calculate total Cauchy stress (where 's' is the deviatoric stress that you already calculated):
sigma = s - p*I;
You can then try using a large value for K_ (bulk modulus) to approximate incompressibility; to begin with, I recommend you try a reasonable/compressible value for K_ as you will start to get pressure oscillations for large values for K_.

Best,
Philip
ilhado likes this.
bigphil is offline  

Old   June 21, 2019, 04:10
Default How to choose a proper constitutive law?
  #455
New Member
 
wulonglong
Join Date: Jan 2018
Posts: 7
Rep Power: 8
wulonglong is on a distinguished road
Hi everyone!

I have a question(or stupid question).

How do i know which constitutive law should be choosed?

If my problem is small strain, small deformation then I should use the linear constitutive law.

And if the problem is finite strain then need to use nonlinear constitutive law.


But is there a simple idea to choose the proper constitutive law?

Such like if the ratio of water depth to water length smaller than 1/20
(i.e h/L < 1/20)
then I can say this is a shallow water problem.



Wu
wulonglong is offline  

Old   June 21, 2019, 07:02
Default
  #456
Super Moderator
 
bigphil's Avatar
 
Philip Cardiff
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 1,089
Rep Power: 34
bigphil will become famous soon enoughbigphil will become famous soon enough
Quote:
Originally Posted by wulonglong View Post
Hi everyone!

I have a question(or stupid question).

How do i know which constitutive law should be choosed?

If my problem is small strain, small deformation then I should use the linear constitutive law.

And if the problem is finite strain then need to use nonlinear constitutive law.


But is there a simple idea to choose the proper constitutive law?

Such like if the ratio of water depth to water length smaller than 1/20
(i.e h/L < 1/20)
then I can say this is a shallow water problem.



Wu
Hi Wu,

I would say that this is not a stupid question at all!

Generally, if the strains are less than or equal to 1% and the rotations (or each cell/element) are small (less than a few degrees), then the linear geometry (small strain) approach is probably fine, though in some cases it is fine to larger strains e.g. ~5%.

So if the linear geometry approach is OK, then you have to decide what material behaviour is most important i.e. what material are you modelling and what are you interested in? For example:
  • are plastic/permanent deformation important (not just if it will happen but how it happens), then you may need an elasto-plasticity law; you will then need to see what type of plasticity model is suitable for your material
  • are visco-elastic deformations important at the time-scales of interest then you may need a visco-elastic law.
  • most of the time linear elastic may be fine if it is the dominant deformation type and is the primary interest.

The same points also apply for finite/large strains, in that case, the constitutive laws can become more complex.

Feel free to describe your material and problem for me and others to give our thoughts.

Philip

Last edited by bigphil; June 21, 2019 at 07:04. Reason: added " are small (less than a few degrees)" after "the rotations (or each cell/element)"
bigphil is offline  

Old   June 24, 2019, 07:40
Default
  #457
New Member
 
ilhado's Avatar
 
Iago Lessa de Oliveira
Join Date: May 2015
Posts: 23
Rep Power: 11
ilhado is on a distinguished road
Hello!

I have successfully compiled solids4foam before with foam-extend-4.1. However, I tried again in a new machine yesterday and it did not completely compile due to the following error:

Quote:
${WM_PROJECT_DIR}/foam-extend-4.1/src/foam/lnInclude/interpolationTable.C:543:17: error: attributes at the beginning of statement are ignored
[-Werror=attributes]
[[fallthrough]];
^
The weird part is that this error appears a lot in the log, but as a warning only (I attached the log file). Did this also happen with anyone?

I tried in Ubuntu 16.04 and Ubuntu 18.04, with foam-extend-4.1.

Thanks a lot,
Iago
Attached Files
File Type: zip log.zip (17.9 KB, 2 views)
ilhado is offline  

Old   June 25, 2019, 05:47
Default
  #458
Member
 
Emad Tandis
Join Date: Sep 2010
Posts: 77
Rep Power: 15
EmadTandis is on a distinguished road
Hello Philip,


I have implemented a solver for neo-hookean material deformation. Now, I want to extend it for mooney-rivlin model. I was thinking of finding a relation between Elasticity (E) and mooney-rivlin constants. Is there any relation like this?

I have used B (left Cauchy-Green deformation) in my code. Do you think I can find Elasticity as a function of B which makes the material behave like mooeny-rivlin?
EmadTandis is offline  

Old   June 27, 2019, 09:14
Default
  #459
Super Moderator
 
bigphil's Avatar
 
Philip Cardiff
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 1,089
Rep Power: 34
bigphil will become famous soon enoughbigphil will become famous soon enough
Quote:
Originally Posted by EmadTandis View Post
Hello Philip,


I have implemented a solver for neo-hookean material deformation. Now, I want to extend it for mooney-rivlin model. I was thinking of finding a relation between Elasticity (E) and mooney-rivlin constants. Is there any relation like this?

I have used B (left Cauchy-Green deformation) in my code. Do you think I can find Elasticity as a function of B which makes the material behave like mooeny-rivlin?
Hi Emad,

Many forms of Mooney-Rivlin laws can be found in the literature; for example of a compressible form, see equation 27 in the following paper: https://www.sciencedirect.com/scienc...478?via%3Dihub.

Best,
Philip
ilhado likes this.
bigphil is offline  

Old   June 27, 2019, 09:18
Default
  #460
Super Moderator
 
bigphil's Avatar
 
Philip Cardiff
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 1,089
Rep Power: 34
bigphil will become famous soon enoughbigphil will become famous soon enough
Quote:
Originally Posted by ilhado View Post
Hello!

I have successfully compiled solids4foam before with foam-extend-4.1. However, I tried again in a new machine yesterday and it did not completely compile due to the following error:



The weird part is that this error appears a lot in the log, but as a warning only (I attached the log file). Did this also happen with anyone?

I tried in Ubuntu 16.04 and Ubuntu 18.04, with foam-extend-4.1.

Thanks a lot,
Iago
Hi Iago,

Which compiler are you using? My guess is that these errors are related to you using "too new" a compiler. It should work with gcc 4, 5 and 6 (as well as relatively recent Intel compilers); I have not (yet) checked with later gcc versions.

Best,
Philip
bigphil is offline  

Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
GPU Linear Solvers for OpenFOAM gocarts OpenFOAM Announcements from Other Sources 37 August 17, 2022 14:22
[Virtualization] OpenFOAM oriented tutorial on using VMware Player - support thread wyldckat OpenFOAM Installation 2 July 11, 2012 16:01
New OpenFOAM Forum Structure jola OpenFOAM 2 October 19, 2011 06:55
Cross-compiling OpenFOAM 1.7.0 on Linux for Windows 32 and 64bits with Mingw-w64 wyldckat OpenFOAM Announcements from Other Sources 3 September 8, 2010 06:25
OpenFOAM Debian packaging current status problems and TODOs oseen OpenFOAM Installation 9 August 26, 2007 13:50


All times are GMT -4. The time now is 10:48.