|
[Sponsors] | |||||
|
|
|
#1 |
|
New Member
Davide
Join Date: Jun 2018
Posts: 10
Rep Power: 9 ![]() |
Hello everyone.
I'm very new to CFD enviroment and OpenFOAM software. I've managed to implement a lagrangian particle tracker inside pimpleFoam (I don't know if I can post here the reference pdf). Now I need to create an output file just like the one for velocity, pressure etc. but for the shear stress on particles, i.e. I need to output first order derivatives of u1,u2,u3 in x1,x2,x3, and then calculate the scalar stress: ![]() where ![]() This last part I think is easier once I understood how to output the spatial derivatives of the particles' velocities. How can I implement this in OpenFOAM and in which file of the solver? Thanks for your help. Davide Last edited by Lighto; June 30, 2018 at 12:12. Reason: mistake in tau expression |
|
|
|
|
|
|
|
|
#2 |
|
New Member
Davide
Join Date: Jun 2018
Posts: 10
Rep Power: 9 ![]() |
I've read so many topics in these 24 hours but I didn't managed to solve my problem
![]() However I have done a small progress, that I post here. In the createFields.H file in the solver folder I've added the following lines to output the gradient of the vector field U (named DUDX): Code:
volTensorField DUDX
(
IOobject
(
"DUDX",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
mesh,
//assign dim of tensor and inizialize it to zero
dimensionedTensor("DUDX", dimVelocity/dimLength, tensor::zero)
);
Code:
while (runTime.run())
{
...
// --- Pressure-velocity PIMPLE corrector loop
...
DUDX = fvc::grad(U);
...
}
This should output the gradient of the velocity as a tensor of 9 components du1/dx1, du2/dx1, etc. in the whole domain, but I want it only for the particles (so gradient of U of the particles, not U of the fluid). |
|
|
|
|
|
![]() |
| Tags |
| derivatives, openfoam 4.0 extend, output, output file, stress |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [foam-extend.org] Problems installing foam-extend-4.0 on openSUSE 42.2 and Ubuntu 16.04 | ordinary | OpenFOAM Installation | 19 | September 3, 2019 19:13 |
| [OpenFOAM.org] Patches to compile OpenFOAM 2.2 on Mac OS X | gschaider | OpenFOAM Installation | 136 | October 10, 2017 18:25 |
| [swak4Foam] groovyBC in openFOAM-2.0 for parabolic velocity bc | ofslcm | OpenFOAM Community Contributions | 25 | March 6, 2017 11:03 |
| [swak4Foam] swak4foam building problem | GGerber | OpenFOAM Community Contributions | 54 | April 24, 2015 17:02 |
| DecomposePar links against liblamso0 with OpenMPI | jens_klostermann | OpenFOAM Bugs | 11 | June 28, 2007 18:51 |