|
[Sponsors] |
Virtual Mass Force Implementation in icoLagrangianFoam- foam_exd 3.0 |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 27, 2014, 11:47 |
Virtual Mass Force Implementation in icoLagrangianFoam- foam_exd 3.0
|
#1 |
Member
Alireza Atrian
Join Date: May 2014
Posts: 39
Rep Power: 11 |
Hello Dear openFOAMers
I am a bigginer to openFoam and I want to activate virtualMass force in solver icoLagrangianFoam. so in the file constant/kinematicCloudProperties I enable the force and also add a line to determine Cvm value: Code:
particleForces { gravity on; virtualMass on; Cvm 0.5; pressureGradient on; } Code:
--> FOAM FATAL ERROR: Not implemented From function Foam::particleForces::calcCoupled(...) - virtual mass force in file particleForces/particleForces.C at line 153. FOAM aborting Aborted (core dumped) Code:
Foam::vector Foam::particleForces::calcCoupled ( const label cellI, const scalar dt, const scalar rhoc, const scalar rho, const vector& Uc, const vector& U ) const { vector Ftot = vector::zero; // Virtual mass force if (virtualMass_) { notImplemented ( "Foam::particleForces::calcCoupled(...) - virtual mass force" ); // Ftot += Cvm_*rhoc/rho*d(Uc - U)/dt; } I thankfuuullly apreciate any help |
|
October 30, 2014, 03:40 |
|
#2 |
Member
Alireza Atrian
Join Date: May 2014
Posts: 39
Rep Power: 11 |
some one give me just a small hint pleaseee
in file particleForces.C, I uncommented the line: Code:
Ftot += Cvm_*rhoc/rho*d(Uc - U)/dt Code:
particleForces/particleForces.C: In member function ‘Foam::vector Foam::particleForces::calcCoupled(Foam::label, Foam::scalar, Foam::scalar, Foam::scalar, const vector&, const vector&) const': particleForces/particleForces.C:154:39: error: 'd' was not declared in this scope in openfoam 2.3 and 2.1 i didt find any library file including the virtual mass formula as included in foam-exd 3.0 and any other tutorials in foam extend 3.1 lead to the same errors when virtualMass" is "on" I Greatfuuuly appreciate any help |
|
November 6, 2014, 02:26 |
|
#3 |
Member
Alireza Atrian
Join Date: May 2014
Posts: 39
Rep Power: 11 |
no help on virtual mass implemention to foam-exd 3.0??!!
|
|
November 6, 2014, 09:15 |
|
#4 |
New Member
Kalyan Peri
Join Date: Aug 2014
Posts: 19
Rep Power: 11 |
Hi,
even im struck with VIrtualMass. im using openFoam-2.3.x and defined VirtualMass in particle force as virtualMass { Cvm 0.5; } but i get a error : request for volVectorField U from objectRegistry region0 failed available objects of type volVectorField are 1(U.air). if i remove virtualMass , then simualtion goes fine.. im not sure what this error is.. Regards, Kalyan |
|
November 8, 2014, 11:59 |
|
#5 |
Member
Alireza Atrian
Join Date: May 2014
Posts: 39
Rep Power: 11 |
I got where the problem arises from:
I used "src/finiteVolume/finiteVolume/fvc" library and change the virtual mass formulation as: Code:
Ftot += Cvm_*rhoc/rho*fvc::ddt(Uc-U); Code:
template<class Type> tmp<GeometricField<Type, fvPatchField, volMesh> > ddt ( const GeometricField<Type, fvPatchField, volMesh>& ); Code:
Foam::vector Foam::particleForces::calcCoupled ( const label cellI, const scalar dt, const scalar rhoc, const scalar rho, const vector& Uc, const vector& U ) const { vector Ftot = vector::zero; Code:
/* template<class Type> tmp< vector > ddt ( const vector& ); */ I myself have not ever defined any template so I neglected annny eddition because it seems hard for me to go through this way and now im going to simulate my problem using DPMFoam in OF230 however, I appreciate any comment whether on my findings or about template defenition for this problem GoOoD LucK |
|
November 8, 2014, 12:05 |
|
#6 | |
Member
Alireza Atrian
Join Date: May 2014
Posts: 39
Rep Power: 11 |
Quote:
I will be engaged in virtual mass force in OF230 so sooon, (as I mentioned in prior post) so I will talk about that if there be any comment to share with u |
||
November 10, 2014, 04:34 |
|
#7 |
Member
Join Date: Sep 2010
Location: Leipzig, Germany
Posts: 93
Rep Power: 15 |
In order to calculate the virtual mass force, I added a new member to kinematicParcel called "Urelold". As the name suggests, it is the relative velocity between fluid and particle at the previous time step. To calculate d(Uc-Up)/dt, you can then use the old and the current relative velocities and the current time step and you don't need fvc::ddt(Uc-U) anymore.
|
|
November 10, 2014, 06:22 |
implementation of acceleration in VM force
|
#8 | |
Member
Alireza Atrian
Join Date: May 2014
Posts: 39
Rep Power: 11 |
Hello Oswald
first of all i really thank you to give me some points Maybe i can't get what you exactly mean, but : 1) here we nead (Uc-U) not an average between particle and fluid velocities! 2) in the formula, we have to insert the acceleration (not velocity) so why do you say Quote:
- can u explane a bit more on code implementation (the code that u say it can be used instead of Code:
fvc::ddt(Uc-U) Best Regards |
||
November 10, 2014, 07:00 |
|
#9 |
Member
Join Date: Sep 2010
Location: Leipzig, Germany
Posts: 93
Rep Power: 15 |
I hope I got you right. The code fvc::ddt(Uc-U) can be seen as the change of the relative particle velocity (Uc-U) per time, i.e. d(Uc-U)/dt. Approximately this is the same as [(Uc-U)_current - (Uc-U)_old]/deltaT. (Uc-U)_current ist the current difference between particle and velocity fluid and can be calculated with the current values. I simply store this value as the value for (Uc-U)_old for the next time step. The change over time is then simply calculated by dividing the difference of the relative velocities by the current deltaT.
A disadvantage here is that you are not free to choose a different interpolation scheme. The Urelold-value is stored in the kinematicParcel-class like U, d, rho and so on. |
|
November 11, 2014, 03:16 |
|
#10 |
Member
Alireza Atrian
Join Date: May 2014
Posts: 39
Rep Power: 11 |
Hello Oswald
I really appreciate all your guidance Its now clear for me Best Regards |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Turbulent viscosity ration, Virtual mass | KP | FLUENT | 1 | February 20, 2011 14:17 |
Urgently Need the code of Lift force and VM force | Kai Yan | Main CFD Forum | 0 | July 16, 2008 07:07 |
Virtual mass force? | bk | Siemens | 1 | June 5, 2007 04:45 |
Virtual mass force | Glen | Main CFD Forum | 3 | September 2, 2006 10:20 |
ChannelOodles Correcting driving force for a constant mass flow rate | maka | OpenFOAM Running, Solving & CFD | 3 | September 21, 2005 05:18 |