Regarding modified drag force formulation for application in dense flows
2015-05-26 15:18
274 查看
转载自:http://www.cfd-online.com/Forums/openfoam-programming-development/129966-regarding-modified-drag-force-formulation-application-dense-flows.html
If you have a look into the classes defined in the folder "src/lagrangian/intermediate/submodels/Kinematic/ParticleForces",
there is an interesting pattern:
The sub-folder "ParticleForce" has the base class for all possible forces. It has 3 important methods:
Code:
All rely in the class "forceSuSp", located in the sub-folder of the same name, which has the following description:
Quote:
For example, the sub-folder "Lift/LiftForce" has the base class structure for lift, which relies in the method "calcCoupled" and defines only the "Su" part and "Sp" is set to "0.0".
The sub-folder "Drag" has the classes for drag, from which you've pointed out "SphereDrag". These classes also rely in the method "calcCoupled" and defines only the "Sp" part.
The sub-folder "Gravity" has a single class that relies in the method "calcNonCoupled" and affects only "Su".
The class in the sub-folder "PressureGradient" also relies in the method "calcCoupled" and also affects "Su" only.
OK, so this gets us the individual accountabilities of each force component. The remaining question is: how are all
of them added up?
It's in the class "KinematicParcel", method "calcVelocity", located in the folder "src/lagrangian/intermediate/parcels/Templates/KinematicParcel/".
It relies on the class "TrackData::cloudType::forceType", where "TrackData" is a template name... OK, I got lost here, because this section is deeply based in templates, which is a considerable pain to figure out who-is-what-and-where-and-how
But the point is that this line:
Code:
is probably the addition of all forces that is listed inside "forces".
Hi ansu, Bruno,
I am also investigating this solver. I still have many remaining questions, but maybe the follwing gives you a starting
point:
A. For information on template for class Trackdata look into /intermediate/parcels/Templates/KinematicParcel/KinematicParcel.C.
B. If you want to include a new force to the solver, you may try the following (which I haven't tried yet):
Copy the intermediate library, recompile it to something like "mylib" in your user folder and link the new user library to your own copy of the solver (myIco... )
in submodels/Kinematic/ParticleForces/.. copy a drag model and rename it (do not forget to rename the classes inside the file)
In intermediate/parcels/include/makeParcelForces.H include the file "myNewForce.H" and add the force to the definition (register it to the library):
Code:
In the case file /constant/kinematicCloudProperties add
Code:
I might find some time at the weekend to implement a new force and check if the works. I will keep you updated.
If you have a look into the classes defined in the folder "src/lagrangian/intermediate/submodels/Kinematic/ParticleForces",
there is an interesting pattern:
The sub-folder "ParticleForce" has the base class for all possible forces. It has 3 important methods:
Code:
//- Calculate the coupled force virtual forceSuSp calcCoupled ( const typename CloudType::parcelType& p, const scalar dt, const scalar mass, const scalar Re, const scalar muc ) const; //- Calculate the non-coupled force virtual forceSuSp calcNonCoupled ( const typename CloudType::parcelType& p, const scalar dt, const scalar mass, const scalar Re, const scalar muc ) const; //- Return the added mass virtual scalar massAdd ( const typename CloudType::parcelType& p, const scalar mass ) const;
All rely in the class "forceSuSp", located in the sub-folder of the same name, which has the following description:
Quote:
Code:Helper container for force Su and Sp terms. F = Sp(U - Up) + Su Explicit contribution, Su specified as a force Implicit coefficient, Sp specified as force/velocity |
The sub-folder "Drag" has the classes for drag, from which you've pointed out "SphereDrag". These classes also rely in the method "calcCoupled" and defines only the "Sp" part.
The sub-folder "Gravity" has a single class that relies in the method "calcNonCoupled" and affects only "Su".
The class in the sub-folder "PressureGradient" also relies in the method "calcCoupled" and also affects "Su" only.
OK, so this gets us the individual accountabilities of each force component. The remaining question is: how are all
of them added up?
It's in the class "KinematicParcel", method "calcVelocity", located in the folder "src/lagrangian/intermediate/parcels/Templates/KinematicParcel/".
It relies on the class "TrackData::cloudType::forceType", where "TrackData" is a template name... OK, I got lost here, because this section is deeply based in templates, which is a considerable pain to figure out who-is-what-and-where-and-how
But the point is that this line:
Code:
const forceSuSp Fcp = forces.calcCoupled(p, dt, mass, Re, mu);
is probably the addition of all forces that is listed inside "forces".
Hi ansu, Bruno,
I am also investigating this solver. I still have many remaining questions, but maybe the follwing gives you a starting
point:
A. For information on template for class Trackdata look into /intermediate/parcels/Templates/KinematicParcel/KinematicParcel.C.
B. If you want to include a new force to the solver, you may try the following (which I haven't tried yet):
Copy the intermediate library, recompile it to something like "mylib" in your user folder and link the new user library to your own copy of the solver (myIco... )
in submodels/Kinematic/ParticleForces/.. copy a drag model and rename it (do not forget to rename the classes inside the file)
In intermediate/parcels/include/makeParcelForces.H include the file "myNewForce.H" and add the force to the definition (register it to the library):
Code:
... #include "myNewForce.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #define makeParcelForces(CloudType) \ \ makeParticleForceModel(CloudType); \ makeParticleForceModelType(myNewForce, CloudType); \ ...
In the case file /constant/kinematicCloudProperties add
Code:
... subModels { particleForces { sphereDrag; gravity; myNewForce; } ...
I might find some time at the weekend to implement a new force and check if the works. I will keep you updated.
相关文章推荐
- JNI DETECTED ERROR IN APPLICATION: input is not valid Modified UTF-8: illegal continuation byte 0x3f
- code signing is required for product type 'Application' in SDK 'iOS 6.0'
- CodeSign error: code signing is required for product type Application in SDK iOS
- CodeSign error: code signing is required for product type Application in SDK iOS
- 打包报错问题: code signing is required for product type 'Application' in SDK 'iOS 10.0'
- code signing is required for product type 'Application' in SDK 'iOS 8.1'
- CodeSign error: code signing is required for product type Application in SDK iOS
- CodeSign error: code signing is required for product type Application in SDK iOS
- Silverlight+IIS7.5+WCF Unhandled Error in Silverlight Application Load operation failed for query
- CodeSign error: code signing is required for product type Application in SDK iOS解决办法
- java.lang.RuntimeException: Method setUp in android.test.ApplicationTestCase not mocked. See http://g.co/androidstudio/not-mocked for details.
- wallacel -- Thanks for the question regarding "IN & EXISTS", version 8.1.6
- The Application of Two-level Attention Models in CNN for Fine-grained Image Classification
- [BEROR]CodeSign error: code signing is required for product type 'Application' in SDK 'iOS 8.1'
- Event Aggregator in Prism (Composite Application Guidance for WPF)
- CodeSign error: code signing is required for product type 'Application' in SDK 'iOS 5.0'
- Important parameters For Oracle BRM Application in 11gR2
- 158.Which statements are true regarding the FOR UPDATE clause in a SELECT statement? (Choose all tha
- Nine tips for a healthy "in production" ASP.NET application
- 解决报错 CodeSign error: code signing is required for product type Application in SDK iOS