fppimenta / rheoTool

Toolbox to simulate GNF and viscoelastic fluid flows in OpenFOAM®
GNU General Public License v3.0
162 stars 67 forks source link

Saramito constitutive eqn in simple shear #121

Closed ktiqbal closed 8 months ago

ktiqbal commented 8 months ago

Discussed in https://github.com/fppimenta/rheoTool/discussions/120

Originally posted by **ktiqbal** February 21, 2024 Hello, I'm trying to simulate the Saramito EVP constituive eqn in simple shear (the same case as in Fig. 5a in [1]), however I am getting some discrepancy. I attach my input dicts for the problem and the solution that I get with rheoTool compared to the solution by Saramito. Please note that I am not trying to reproduce exactly the result in Fig. 5a in [1] as I am aware that Saramito did not include the factor of 1/sqrt(2) when computing the contraction of the deviator as rheoTool does; instead I am solving Eq. 13 in [1] with my own solver using the 2nd invariant of the deviator for the effective stress (as rheoTool does) and comparing with rheoTool's solution. [0.zip](https://github.com/fppimenta/rheoTool/files/14361260/0.zip) [constant.zip](https://github.com/fppimenta/rheoTool/files/14361261/constant.zip) [system.zip](https://github.com/fppimenta/rheoTool/files/14361262/system.zip) ![image](https://github.com/fppimenta/rheoTool/assets/93269009/5429c278-ecc5-4a86-b803-fbd41915c6f8) For reference, following the same procedure as in section 3.2 in [1], I get excellement agreement with rheoTool for other viscoelastic constitutive equations like Oldroyd-B and Giesekus (see below), but some discrepancy with the Saramito.. I have also solved the sysem of ODEs that the Saramito constitutive equation reduces to for simple shear with an imposed flow solution (Eq. 13 in [1]) (using Saramito's contraction norm) and can reproduce the solution presented in Fig. 5a. ![image](https://github.com/fppimenta/rheoTool/assets/93269009/2658555f-060e-45d4-ad71-6bf102fd505c) ![image](https://github.com/fppimenta/rheoTool/assets/93269009/66470a5a-a1fe-4c40-813d-845a82dab94b) Is the formulation in rheoTool by chance different to Saramito's formulation in [1] (other than the contraction vs 2nd invariant for the effective stress)? I looked through the equations for Saramito in the user guide and the source code Saramito.C and for n = 1 and k = etap, the equation seems should simplify to the same as in [1], but I'm stumped. One specific question I have regarding this: When calculating the deviator tau_d = tau - tr(tau)/N * I, am I correct in saying that N = 2 in rheoTool for 2D problems (and N = 3 for 3D problems)? I'd be grateful for any help with this! [1] Saramito, Pierre. "A new constitutive equation for elastoviscoplastic fluid flows." Journal of Non-Newtonian Fluid Mechanics 145.1 (2007)
fppimenta commented 8 months ago

There was in fact a bug for Saramito (+Log) and ML_IKH models related with N and the I tensor components (affecting the deviatoric). The code could compute those from vector dims provided by the user or deduce it from the mesh. The former approach was correct (you can try it by defining dims (1 1 0) without recompiling the code), but there was a bug in the second one.

The bug was fixed by requiring vector dims to be always user defined with the remaining parameters under constant/constitutiveProperties/parameters dict. In your case, for example, being 2D, you should have dims (1 1 0). For a 3D case (including axisymmetric), it would be dims (1 1 1) and in 1D dims (1 0 0).

Note: this only affects the above mentioned rheological models.