|
[Sponsors] |
OpenFOAM issue with interpolation (urgent help) |
![]() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
![]() |
![]() |
#1 |
New Member
Saman
Join Date: Nov 2024
Posts: 2
Rep Power: 0 ![]() |
Hello Foamers,
I hope you are all doing well. I’m encountering a complex issue in OpenFOAM 5.x and would greatly appreciate your assistance. I have a class that calculates the temperature at a specific point in each cell, which is called every timestep. The calculation of temperature at that specific point is conducted using cell, cellPoint, cellPintFace interpolation schemes. The class for calling the interpolation header files is as follows: Temp.C Code:
interpolationCellPoint<scalar> voidfractionInterpolator_(voidfraction_); interpolationCellPoint<vector> UInterpolator_(U_); interpolationCellPoint<scalar> TInterpolator_(tempField_); for(int index = 0;index < particleCloud_.numberOfParticles(); ++index) { cellI = particleCloud_.cellIDs()[index][0]; if(cellI >= 0) { vector position = particleCloud_.position(index); voidfraction = voidfractionInterpolator_.interpolate(position,cellI); Ufluid = UInterpolator_.interpolate(position,cellI); Tfluid = TInterpolator_.interpolate(position,cellI); } } Code:
interpolationCellPoint<scalar> TInterpolator_(tempField_); I’m wondering if this could be related to a memory leak for the TInterpolator_ because of its enourmous usage during simulation. The interpolationCellPoint.C file suggests a possible cause for this scenario: Code:
template<class Type> Foam::interpolationCellPoint<Type>::interpolationCellPoint ( const GeometricField<Type, fvPatchField, volMesh>& psi ) : interpolation<Type>(psi), psip_ ( volPointInterpolation::New(psi.mesh()).interpolate ( psi, "volPointInterpolate(" + psi.name() + ')', true // use cache ) ) { // Uses cellPointWeight to do interpolation which needs tet decomposition (void)psi.mesh().tetBasePtIs(); } Please guide me how to solve this issue! ![]() ![]() ![]() Last edited by Fairy; November 13, 2024 at 02:50. |
|
![]() |
![]() |
![]() |
![]() |
#2 |
New Member
Saman
Join Date: Nov 2024
Posts: 2
Rep Power: 0 ![]() |
Nobody knows how I can reset the memory for his interpolation variable every time step?
I really got stuck into this issue. |
|
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[OpenFOAM.org] Openfoam 5 on centos 7, environment variables issue | mahmoodn | OpenFOAM Installation | 2 | October 6, 2020 09:52 |
How to contribute to the community of OpenFOAM users and to the OpenFOAM technology | wyldckat | OpenFOAM | 17 | November 10, 2017 16:54 |
OpenFOAM v3.0+ ?? | SBusch | OpenFOAM | 22 | December 26, 2016 15:24 |
OpenFOAM Training: Programming CFD Course 12-13 and 19-20 April 2016 | cfd.direct | OpenFOAM Announcements from Other Sources | 0 | January 14, 2016 11:19 |
CyclicAMI Issue In OpenFOAM 2.2.0 | prasant | OpenFOAM Running, Solving & CFD | 17 | March 16, 2013 03:00 |