|
[Sponsors] |
Assign a Euler value to a lagrangian particle |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 22, 2018, 14:13 |
Assign a Euler value to a lagrangian particle
|
#1 |
New Member
Davide
Join Date: Jun 2018
Posts: 10
Rep Power: 8 |
Hello foamers,
I have a simple question (even though I'm struggling to find an answer...) I want to assign a value coming from an Euler volume field to a lagrangian particle. The idea is that if a particle belongs to a cell where, from the solution of the Euler equation, there is a certain value of U, fvc::grad(U), and so on, that particle should have assigned that U, fvc::grad(U), etc... I searched in the lagrangian libraries and I found that in the folder Intermediate > parcels > Templates > KinematicParcel there are some files that do that (for example) for the velocity U. I want to do the same for another scalar volume field that I have created on my own, but I didn't managed to do so. I copied-paste all the lines that include U and replaced "U" with my scalar volume field "Stress" (also replaced "vector" with "scalar" when necessary). For example in file KinematicParcel.C I've added the lines Code:
Stress_(p.Stress) In the file KinematicParcel.H (that is called at the very first lines of the file *.C) I've added Code:
scalar Stress_ Code:
// Access [...] //- Return const access to scalar stress inline scalar Stress() const [...] // Edit [...] //- Return access to scalar stress inline scalar& Stress() But, when I try to compile with wmake all, the error is: Code:
lnInclude/KinematicParcel.H:438:27: warning: inline function ‘Foam::scalar Foam::KinematicParcel<ParcelType>::Stress() const [with ParcelType = Foam::particle; Foam::scalar = double]’ used but never defined [enabled by default] inline scalar Stress() const; Any idea to fix that? Regards, Davide |
|
Tags |
kinematicparcel, lagrangian, openfoam 4.0 extend, output, volscalafield |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Assign Particle Size in java for Polyhedral Partcles | Vee | STAR-CCM+ | 1 | April 22, 2018 10:45 |
Particle tracking error | alchem | OpenFOAM Bugs | 5 | May 6, 2017 17:30 |
Lagrangian Particle Tracking in Eulerian-Eulerian Multiphase Flow | DarrenC | CFX | 5 | April 7, 2016 15:50 |
injection problem | Mark New | FLUENT | 0 | August 4, 2013 02:30 |
DPM UDF particle position using the macro P_POS(p)[i] | dm2747 | FLUENT | 0 | April 17, 2009 02:29 |