|
[Sponsors] |
January 30, 2020, 08:54 |
Loop through a volScalarField
|
#1 |
Senior Member
anonymous
Join Date: Jan 2016
Posts: 416
Rep Power: 14 |
Hi!
I wrote a small total lagrangian solid displacement solver, and I'm trying to create material models for it. The material model is simply returns the Lame's coefficients, BUT. If I loop through the field in my update() function in my material model, the solver gives some weird results. For example: Simple bilinear model, I have let's call Ee_, and Ep_, and based on the strain and stress i set the E_ from Ee_ and Ep_. If i loop through the list and set like "E_[i] = Ee_[i];", the results are reallly bad. If i set "E_ = Ee_;" without loop, it's working perfectly. I wrote out the E_ field for both case and the are exactly the same... Anyone any ideas? I'm pretty lost now. Thanks! |
|
January 30, 2020, 09:43 |
Solved
|
#2 |
Senior Member
anonymous
Join Date: Jan 2016
Posts: 416
Rep Power: 14 |
E_.correctBoundaryConditions(); did it. :S
|
|
January 30, 2020, 10:17 |
|
#3 | |
Member
Emad Tandis
Join Date: Sep 2010
Posts: 77
Rep Power: 16 |
Quote:
I guess the difference is because for the loop case, you don't set boundaryFields but for E_=Ee_, not only cell field but also boundaries are set as well. |
||
January 30, 2020, 10:19 |
|
#4 |
Senior Member
anonymous
Join Date: Jan 2016
Posts: 416
Rep Power: 14 |
Yep you are right. That was the problem.
Thx the feedback. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Gmsh] Extrude on gmsh | Pedro Felix | OpenFOAM Meshing & Mesh Conversion | 0 | October 30, 2019 13:33 |
Need help setting up chtMultiRegion | OskarT | OpenFOAM Pre-Processing | 1 | September 25, 2019 16:51 |
Error message | Bruno_Jorge | Main CFD Forum | 1 | February 5, 2019 12:12 |
writing execFlowFunctionObjects | immortality | OpenFOAM Post-Processing | 30 | September 15, 2013 07:16 |
NACA0012 geometry/design software needed | Franny | Main CFD Forum | 13 | July 7, 2007 16:57 |