|
[Sponsors] | |||||
|
|
|
#1 |
|
Member
Joaquín Neira
Join Date: Oct 2017
Posts: 38
Rep Power: 10 ![]() |
Hello,
I'm trying to set the vorticity of the fluid in a similar way than the velocity or density in the KinematicParcel class: File KinematicParcelTrackingDataI.H: Code:
template<class ParcelType>
template<class CloudType>
inline Foam::KinematicParcel<ParcelType>::TrackingData<CloudType>::TrackingData
(
CloudType& cloud,
trackPart part
)
:
ParcelType::template TrackingData<CloudType>(cloud),
rhoInterp_
(
interpolation<scalar>::New
(
cloud.solution().interpolationSchemes(),
cloud.rho()
)
),
UInterp_
(
interpolation<vector>::New
(
cloud.solution().interpolationSchemes(),
cloud.U()
)
),
muInterp_
(
interpolation<scalar>::New
(
cloud.solution().interpolationSchemes(),
cloud.mu()
)
),
curlUInterp_
(
interpolation<vector>::New
(
cloud.solution().interpolationSchemes(),
fvc::curl(cloud.U())
).ptr()
),
g_(cloud.g().value()),
part_(part)
{}
Code:
template<class ParcelType>
template<class TrackData>
void Foam::KinematicParcel<ParcelType>::setCellValues
(
TrackData& td,
const scalar dt,
const label celli
)
{
tetIndices tetIs = this->currentTetIndices();
rhoc_ = td.rhoInterp().interpolate(this->coordinates(), tetIs);
if (rhoc_ < td.cloud().constProps().rhoMin())
{
if (debug)
{
WarningInFunction
<< "Limiting observed density in cell " << celli << " to "
<< td.cloud().constProps().rhoMin() << nl << endl;
}
rhoc_ = td.cloud().constProps().rhoMin();
}
Uc_ = td.UInterp().interpolate(this->coordinates(), tetIs);
muc_ = td.muInterp().interpolate(this->coordinates(), tetIs);
curlUc_ = td.curlUInterp().interpolate(this->coordinates(), tetIs);
// Apply dispersion components to carrier phase velocity
Uc_ = td.cloud().dispersion().update
(
dt,
celli,
U_,
Uc_,
UTurb_,
tTurb_
);
}
Code:
[1] #0 Foam::error::printStack(Foam::Ostream&) at ??:? [1] #1 Foam::sigSegv::sigHandler(int) at ??:? [1] #2 ? in "/lib/x86_64-linux-gnu/libc.so.6" [1] #3 Foam::interpolationCell<Foam::Vector<double> >::interpolate(Foam::Vector<double> const&, int, int) const at ??:? [1] #4 Foam::interpolationCell<Foam::Vector<double> >::interpolate(Foam::Barycentric<double> const&, Foam::tetIndices const&, int) const at ??:? |
|
|
|
|
|
![]() |
| Tags |
| lagrangian, lpt, vorticity |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Dealing with Lagrangian Library | omid20110 | OpenFOAM Programming & Development | 10 | June 10, 2018 11:12 |
| two-way coupling with KinematicParcel class | jiejie | OpenFOAM Running, Solving & CFD | 2 | April 26, 2015 23:32 |
| possible bug in KinematicParcel | guanghaowu | OpenFOAM Bugs | 0 | April 19, 2011 05:20 |
| Segmentation Fault when using class based on KinematicParcel in parallel | gschaider | OpenFOAM Bugs | 1 | August 18, 2008 07:18 |