|
[Sponsors] |
November 3, 2017, 06:28 |
|
#101 |
Senior Member
Albrecht vBoetticher
Join Date: Aug 2010
Location: Zürich, Swizerland
Posts: 240
Rep Power: 17 |
I would use salome to create a tet mesh and convert to OpenFOAM (some nice tutorials on youtube).
However, I use hex mesh and snappyHexMesh so I can't help you here. Good Luck! |
|
November 3, 2017, 06:30 |
|
#102 |
Member
Vishwesh Ravi Shrimali
Join Date: Aug 2017
Posts: 43
Rep Power: 9 |
||
November 7, 2017, 01:39 |
|
#103 |
Member
Vishwesh Ravi Shrimali
Join Date: Aug 2017
Posts: 43
Rep Power: 9 |
Hi!
I was able to make a tet mesh using SALOME. I have another doubt regarding the solver technique proposed by Aurelia in her thesis. The inject function that we are using, can it be used multiple times to inject multiple particles at different time instances? Also what happens to the particles that have been injected earlier... |
|
November 17, 2017, 00:11 |
Interpolation not progressing
|
#104 |
Member
Vishwesh Ravi Shrimali
Join Date: Aug 2017
Posts: 43
Rep Power: 9 |
Hi!
Thanks to the help, I was able to make changes to the solver and now it's working fine. I have one problem where I am stuck, following Aurelia's work and adding rhoInterp, UInterp, etc. in solidParticleCloud.C file (move function), when I run the solver, it gets stuck as soon as it reaches the interpolation part. I don't know why that is happening. I left the solver working for a whole day on 32 processors but it didn't proceed further than that. Here is the relevant solidParticleCloud.C section: Code:
Info<<"Function called"<<endl; const volScalarField& rho = mesh_.lookupObject<const volScalarField>("rho"); Info<<"rho: "<<rho<<endl; const volVectorField& U = mesh_.lookupObject<const volVectorField>("U"); const volScalarField& nu = mesh_.lookupObject<const volScalarField>("nu"); const volScalarField& alphaW = mesh_.lookupObject<const volScalarField>("alpha.water"); const volScalarField& p = mesh_.lookupObject<const volScalarField>("p"); Info<<"lookup object worked"<<endl; Info<<"rho interpolation"<<endl; interpolationCellPoint<scalar> rhoInterp(rho); Info<<"U interpolation"<<endl; interpolationCellPoint<vector> UInterp(U); Info<<"nu interpolation"<<endl; interpolationCellPoint<scalar> nuInterp(nu); Info<<"alpha.water interpolation"<<endl; interpolationCell<scalar> alphaWInterp(alphaW); Info<<"p interpolation"<<endl; interpolationCellPoint<scalar> pInterp(p); Info<<"Interpolation complete"<<endl; Code:
Injecting particle with diameter: 0.0301191m, center position: (0.153843 0.0928162 0.102841)m, velocity: (0 -2 0)m/s Function called rho: dimensions [1 -3 0 0 0 0 0]; internalField uniform 1; boundaryField { inlet { type symmetry; } outlet { type symmetry; } walls { type symmetry; } procBoundary0to1 { type processor; value uniform 1; } procBoundary0to2 { type processor; value uniform 1; } procBoundary0to3 { type processor; value uniform 1; } } lookup object worked rho interpolation |
|
March 6, 2018, 02:49 |
|
#105 | |
New Member
liyuan
Join Date: Jul 2015
Posts: 8
Rep Power: 11 |
Quote:
|
||
April 10, 2018, 18:51 |
erroneous interpolation in solidParticle class and 2D issue
|
#106 |
New Member
soroush amd
Join Date: Oct 2011
Posts: 3
Rep Power: 15 |
Hello all,
I am using OpenFoam 4.1 and have coupled solidParticle class with icoFoam for particle tracking. It seems to work fine except for two issues that I just came across. 1. I have noticed that sometimes the interpolation looks unreasonable and trapped in a very long loop. this only happens when my particle is on a face. something like below: Code:
Time = 3.028 trackTime = 0.001 tEnd = 0.001 steptFraction() = 0 in solidParticle, position = (0.0381269 0.095 0.000327212), dt = 0.001, U = (0.685765 0.0165633 0) U_ = (0.685765 0.0165633 0) 1moving in solidParticle.C Time = 3.028 trackTime = 0.001 tEnd = 0.000999879 steptFraction() = 0.000120856 in solidParticle, position = (0.038127 0.095 0.000327212), dt = 0.000999879, U = (0.685766 0.0165632 0) U_ = (0 -0.0165632 0) 1moving in solidParticle.C Time = 3.028 trackTime = 0.001 tEnd = 0.000999879 steptFraction() = 0.000120856 in solidParticle, position = (0.038127 0.095 0.000327281), dt = 0.000999879, U = (1 0 0) U_ = (1 0 0) 1moving in solidParticle.C Time = 3.028 trackTime = 0.001 tEnd = 0.000999879 steptFraction() = 0.000120856 in solidParticle, position = (0.038127 0.095 0.000327315), dt = 0.000999879, U = (0.685766 0.0165632 0) U_ = (0.685766 0.0165632 0) 1moving in solidParticle.C Time = 3.028 trackTime = 0.001 tEnd = 0.000999124 steptFraction() = 0.000875538 in solidParticle, position = (0.0381275 0.095 0.000327315), dt = 0.000999124, U = (0.685768 0.0165623 0) U_ = (0 -0.0165623 0) 1moving in solidParticle.C Time = 3.028 trackTime = 0.001 tEnd = 0.000999124 steptFraction() = 0.000875538 in solidParticle, position = (0.0381275 0.095 0.000327383), dt = 0.000999124, U = (1 0 0) U_ = (1 0 0) 1moving in solidParticle.C Time = 3.028 trackTime = 0.001 tEnd = 0.000999124 steptFraction() = 0.000875538 in solidParticle, position = (0.0381275 0.095 0.000327417), dt = 0.000999124, U = (0.685768 0.0165623 0) U_ = (0.685768 0.0165623 0) 1moving in solidParticle.C Time = 3.028 trackTime = 0.001 tEnd = 0.00099837 steptFraction() = 0.00163026 in solidParticle, position = (0.038128 0.095 0.000327417), dt = 0.00099837, U = (0.685771 0.0165615 0) ........ and it goes on for much longer It is a cavity case with structured grid, and (0.0381269 0.095 0.000327212) falls on a face. One thing to note is that the interpolated velocity does not make sense at all as it fluctuates between (0.685768 0.0165623 0) and (1 0 0). 2. The second issue that I have noticed is that although my case is 2D and there is no z-velocity component, my final particle position depends on its initial z-coordinate which is not physical. I have noticed that the code itself change the particle z-coordinate sometimes but not sure why this happens, its definitely not due to z-velocity component as its always zero and I have confirmed it. So the solidParticle library is doing something under the hood which I do not know and whatever it is it does not seem correct to me. I was wondering if anyone has faced such issues? I have heard in other threads that solidParticle library has bugs and should not be used, should I use something else such as intermediate library instead? Thank you for your help, |
|
April 11, 2018, 05:48 |
|
#107 |
Senior Member
Albrecht vBoetticher
Join Date: Aug 2010
Location: Zürich, Swizerland
Posts: 240
Rep Power: 17 |
have you tried in 3D?
I recommend DPMFoam as a good Lagrangian coupled solver, or IcoUncoupledKinematicParcelFoam if you only need particles as trackers. If your particle is larger then the cell size at the face, your particle will stick to the wall, it will "sink into it" and cause pressure oscillatios. |
|
April 16, 2018, 12:16 |
|
#108 | |
New Member
soroush amd
Join Date: Oct 2011
Posts: 3
Rep Power: 15 |
Thank you for your reply. Yes I have also tried it in 3D, although I did not try to reproduce this error because I am interested in 2D problems only. I found solidParticle library somehow immature because in intermediate library there are some functionally specifically for 2D to restrain the particle within the mesh and its interpolated velocity, also to make sure particle are injected via one processor only which is a problem in solidParticle library if your injection occurs on a processor patch. So I have moved to intermediate library as its more mature and reliable.
Quote:
|
||
October 1, 2018, 18:59 |
|
#109 | |
New Member
Nilay Kulkarni
Join Date: May 2018
Posts: 24
Rep Power: 8 |
Quote:
Were you able to solve this problem? I am trying to compile the same solver and it's giving me the same error. Thank you Nilay |
||
October 1, 2018, 19:01 |
|
#110 | |
New Member
Nilay Kulkarni
Join Date: May 2018
Posts: 24
Rep Power: 8 |
Quote:
Were you able to solve this problem? I am trying to compile the same solver and I am stuck at this point. Could you please help me out? Thank you Nilay |
||
April 4, 2019, 22:09 |
|
#111 |
New Member
John
Join Date: Mar 2019
Posts: 26
Rep Power: 7 |
Thank you so much for this post !
Last edited by thintn222; April 8, 2019 at 05:24. Reason: Delete |
|
July 1, 2019, 06:36 |
|
#112 |
Senior Member
krishna kant
Join Date: Feb 2016
Location: Hyderabad, India
Posts: 133
Rep Power: 10 |
hello All
I am also working in coupling of interFoam with lagrangian particle. I still don't understand what is the meaning of tetFacei and tetPtI. If I need to define a particle I need its position, diameter and velocity. what is importance of tetFaceI and tetPtI. If I want to create a particle at position X which lies inside cellI then physically what is tetFaceI and tetPtI ??? |
|
January 30, 2021, 23:29 |
pisoFoam + solidParticle
|
#113 | |
New Member
王子阳
Join Date: Aug 2019
Posts: 29
Rep Power: 7 |
Quote:
Referring to the previous paper and guide, i want to insert the solidParticle into the pisoFoam. The operiations are followed by the Ds. Vallier guide, i used the of3.0.x when i complie the new solver pisoLPTFoam, it appear an error: Code:
pisoLPTFoam.C: In function ‘int main(int, char**)’: pisoLPTFoam.C:87:18: error: ‘g’ was not declared in this scope particles.move(g); How can i modify the code? Thanks in advances! ziyang |
||
February 4, 2022, 09:17 |
Error while coupling solidParticle with interFoam
|
#114 |
New Member
Avinash Kumar Verma
Join Date: Jul 2021
Posts: 5
Rep Power: 5 |
Hello foamers!
While coupling the solidParticle library with and interFoam based solver I am getting following error: solidParticleCloud.C:75:27: error: ‘class Foam::solidParticle::trackingData’ has no member named ‘cloud’ mesh_.findCellFacePt(td.cloud().posP_, cellI, tetFaceI, tetPtI); ^~~~~ solidParticleCloud.C:76:50: error: ‘class Foam::solidParticle::trackingData’ has no member named ‘cloud’ solidParticle* ptr=new solidParticle(mesh_, td.cloud().posP_, cellI, tetFaceI, tetPtI, td.cloud().dP_, td.cloud().UP_); ^~~~~ solidParticleCloud.C:76:93: error: ‘class Foam::solidParticle::trackingData’ has no member named ‘cloud’ solidParticle(mesh_, td.cloud().posP_, cellI, tetFaceI, tetPtI, td.cloud().dP_, td.cloud().UP_); ^~~~~ solidParticleCloud.C:76:109: error: ‘class Foam::solidParticle::trackingData’ has no member named ‘cloud’ esh_, td.cloud().posP_, cellI, tetFaceI, tetPtI, td.cloud().dP_, td.cloud().UP_); ^~~~~ solidParticleCloud.C: In member function ‘void Foam::solidParticleCloud::move(const dimensionedVector&)’: solidParticleCloud.C:95:30: error: ‘class Foam::solidParticle::trackingData’ has no member named ‘cloud’ if(mesh_.time().value()> td.cloud().tInjStart_&& ^~~~~ solidParticleCloud.C:96:28: error: ‘class Foam::solidParticle::trackingData’ has no member named ‘cloud’ mesh_.time().value()< td.cloud().tInjEnd_) my solidParticleCloud.C file is as follows: void Foam::solidParticleCloud::inject(solidParticle::tr ackingData& td) { label cellI = 1; label tetFaceI = 1; label tetPtI = 1; mesh_.findCellFacePt(td.cloud().posP_, cellI, tetFaceI, tetPtI); solidParticle* ptr=new solidParticle(mesh_, td.cloud().posP_, cellI, tetFaceI, tetPtI, td.cloud().dP_, td.cloud().UP_); Cloud<solidParticle>::addParticle(ptr); } void Foam::solidParticleCloud::move(const dimensionedVector& g) { const volScalarField& rho = mesh_.lookupObject<const volScalarField>("rho"); const volVectorField& U = mesh_.lookupObject<const volVectorField>("U"); const volScalarField& nu = mesh_.lookupObject<const volScalarField>("nu"); interpolationCellPoint<scalar> rhoInterp(rho); interpolationCellPoint<vector> UInterp(U); interpolationCellPoint<scalar> nuInterp(nu); solidParticle::trackingData td(*this, rhoInterp, UInterp, nuInterp, g.value()); Cloud<solidParticle>::move(*this, td, mesh_.time().deltaTValue()); if(mesh_.time().value()> td.cloud().tInjStart_&& mesh_.time().value()< td.cloud().tInjEnd_) { this->inject(td); } } Please help me resolve this. I am using OpenFOAM-in-Box-18.06v1 |
|
March 17, 2022, 21:52 |
|
#115 | |
New Member
Feng
Join Date: Apr 2017
Posts: 9
Rep Power: 9 |
Quote:
Hi, ziyang I'm facing the same problem now, just replaced pisoFoam with pimpleFoam Thanks! |
||
Tags |
interfoam, lagrangian, move, solidparticle |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
lagrangian solid particle tracking - OFv2.1 | PelusDadidus | OpenFOAM Programming & Development | 7 | August 21, 2015 10:05 |
Questions regarding Particle Tracking and Rotating Frame of reference | Maxime Gauthier | CFX | 1 | May 9, 2011 16:07 |
DPM UDF particle position using the macro P_POS(p)[i] | dm2747 | FLUENT | 0 | April 17, 2009 02:29 |
Particle tracking - Domain interface / FrozenRotor | mohanrao | CFX | 4 | January 23, 2008 04:39 |
restarting lagrange (particle tracking) simulation | dbdias | CFX | 0 | September 22, 2007 20:26 |