CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM

KinematicParcel fvc::curl(U)

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 7, 2018, 13:54
Default KinematicParcel fvc::curl(U)
  #1
Member
 
Joaquín Neira
Join Date: Oct 2017
Posts: 38
Rep Power: 9
cojua8 is on a distinguished road
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)
{}
file KinematicParcel.C:

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_
    );
}
However, when running my case it crashes after a while giving this error:

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 ??:?
How can I solve this?
cojua8 is offline   Reply With Quote

Reply

Tags
lagrangian, lpt, vorticity


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 11:50.