|
[Sponsors] |
October 14, 2014, 10:20 |
Issue with volTensorField calculation
|
#1 |
New Member
Join Date: Aug 2014
Posts: 3
Rep Power: 12 |
Hello everyone,
I am trying out different ways to calculate Lyapunov exponents for my current calculations. For one of them I am interested in calculating jacobian of particle positions, as a test I started using the cell centres as my positions volVectorField Ct = mesh.C(); volTensorField gradCt = fvc::grad(Ct); However as I run the code (in parallel), I get the error message below. Having looked at similar things being done in Openfoam where for example the velocity field U is used, I don't understand why it happens. Any help would be greatly appreciated. Thanks [25] --> FOAM FATAL ERROR: [25] Not implemented [25] [25] From function slicedFvPatchField<Type>::snGrad() [25] in file lnInclude/slicedFvPatchField.C at line 171. |
|
October 14, 2014, 12:00 |
|
#2 |
Senior Member
Chris Sideroff
Join Date: Mar 2009
Location: Ottawa, ON, CAN
Posts: 434
Rep Power: 22 |
This isn't a solution, simply a diagnosis so apologies if you've already figured this out.
First, as you've found out slicedFvPatch field does not have snGrad defined (not most others). Check out: Code:
$WM_PROJECT_DIR/finiteVolume/fields/fvPatchFields/basic/sliced/slicedFvPatchField.C If you dig into the mesh.C() you'll find it creates a slicedVolVectorField which has internal and boundary fields, the later the cause of the error. Check out line 138 in: Code:
./finiteVolume/fvMesh/fvMeshGeometry.C |
|
October 14, 2014, 13:27 |
|
#3 |
New Member
Join Date: Aug 2014
Posts: 3
Rep Power: 12 |
Thanks for the help!
Indeed I did looked at that in the end, and those "sliced" fields will just have to go..... or maybe not.... Anyway, I'll find a way. |
|
October 14, 2014, 14:13 |
|
#4 |
Senior Member
Chris Sideroff
Join Date: Mar 2009
Location: Ottawa, ON, CAN
Posts: 434
Rep Power: 22 |
Just thought of something, since (I think) you're interested in the Jacobian of _only_ the cell centers of the volume mesh, you could just try returning the internalField of the volume mesh and apply the gradient to that, i.e.:
Code:
volVectorField Ct_i = mesh.C().internalField(); volTensorField gradCt_i = fvc::grad(Ct_i); |
|
October 15, 2014, 07:29 |
|
#5 |
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33 |
Sorry, Chris, no: internalField is just a field and you need a volField to calculate a gradient.
Please make a plain field; make a COPY of the field C and called grad. However, you are just testing discretisation errors: grad(x) = 1 (in 1-D). I think you need something different... Hrv
__________________
Hrvoje Jasak Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk |
|
October 15, 2014, 12:24 |
|
#6 |
New Member
Join Date: Aug 2014
Posts: 3
Rep Power: 12 |
Hello Hrvoje, thank you for your response.
What do you mean by "plain field" and then use the COPY of the mesh.C() field? |
|
October 15, 2014, 12:40 |
|
#7 |
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33 |
volVectorField centres
( IOobject ( "centres", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE ), mesh, dimLength ); centres == mesh.C(); fvc::grad(centres) should now work. Hrv
__________________
Hrvoje Jasak Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
"Hand" calculation jet fan in the garage | mageno | Main CFD Forum | 3 | August 7, 2021 20:09 |
Apply a calculation goal results to another calculation surface | simo125 | FloEFD, FloWorks & FloTHERM | 8 | November 5, 2014 07:14 |
Increase in CPU number during the FIRE calculation | amin_u50 | AVL FIRE | 0 | August 6, 2014 09:34 |
Meshing related issue in Flow EFD | appu | FloEFD, FloWorks & FloTHERM | 1 | May 22, 2011 09:27 |
Heat Flux Calculation under REPORTS | Alberto Schroth | FLUENT | 0 | May 16, 2000 09:19 |