|
[Sponsors] |
July 9, 2014, 08:45 |
Problem Creating Splash Interaction model
|
#1 | ||||
Member
bilal
Join Date: Mar 2014
Location: Germany
Posts: 30
Rep Power: 12 |
Hello Everyone,
I am implementing the new splash submodel in Patchinteractionmodel. I am using some equations from Patchinteractionmodel and some from Thermosurfacefilmmodel. I have created a new submodel name splash. Then add that in Patchinteractionmodel also. Then in cloud folder inside templates folder in Kinematic cloud files i add new class with name Splash-patchData. This class is called by splash model and its working but i have some error in compiling the library. In Kinematic cloud.H file it is using a function name "cached rndGen" number. It is using this as Quote:
Quote:
Quote:
Error is : Quote:
I have also attached the kinematic cloud.c file which i try to compile. Please check that it is giving the error on line 838 where it uses this rndGen_. function. Anyone have any idea what is wrong or what should i do. Best Regards, Bilal |
|||||
July 11, 2014, 05:42 |
|
#2 |
Member
bilal
Join Date: Mar 2014
Location: Germany
Posts: 30
Rep Power: 12 |
Hello ,
no one have any idea what is wrong?? |
|
July 11, 2014, 06:43 |
|
#3 |
Senior Member
|
Hi,
in fact the error is quite self explanatory rndGen_ is a constant, while sample01 method modifies the instance of the class. I wasn't able to figure out why it is constant for the source you've provided. |
|
July 3, 2015, 04:31 |
Any fix for this issue??
|
#4 |
Member
Ananda Kannan
Join Date: Feb 2014
Location: Göteborg, Sweden
Posts: 55
Rep Power: 12 |
Hi!!
I have encountered the same problem while trying to initialize a Gaussian random number within the class Wallspringsliderdashpot, used in Lagrangian particle tracking... .../src/lagrangian.. Here is the screen stack trace of the error reported while compiling the code - Code:
lnInclude/WallSpringSliderDashpotvib.C:118:5: error: passing ‘const Foam::Random’ as ‘this’ argument of ‘Foam::scalar Foam::Random::GaussNormal()’ discards qualifiers [-fpermissive] lnInclude/WallSpringSliderDashpotvib.C:122:5: error: passing ‘const Foam::Random’ as ‘this’ argument of ‘Foam::scalar Foam::Random::scalar01()’ discards qualifiers [-fpermissive] lnInclude/WallSpringSliderDashpotvib.C:392:9: instantiated from ‘void Foam::WallSpringSliderDashpotvib<CloudType>::evaluateWall(typename CloudType::parcelType&, const Foam::List<Foam::Vector<double> >&, const Foam::List<Foam::WallSiteData<Foam::Vector<double> > >&, const Foam::List<Foam::Vector<double> >&, const Foam::List<Foam::WallSiteData<Foam::Vector<double> > >&) const [with CloudType = Foam::CollidingCloud<Foam::KinematicCloud<Foam::Cloud<Foam::CollidingParcel<Foam::KinematicParcel<Foam::particle> > > > >, typename CloudType::parcelType = Foam::CollidingParcel<Foam::KinematicParcel<Foam::particle> >]’ parcels/derived/basicKinematicCollidingParcel/makeBasicKinematicCollidingParcelSubmodels.C:53:1: instantiated from here Btw, here is my current code modification to the class wallspringsliderdashpot - Code:
template<class CloudType> void Foam::WallSpringSliderDashpot<CloudType>::evaluateWall ( typename CloudType::parcelType& p, const point& site, const WallSiteData<vector>& data, scalar pREff, scalar kN, bool cohesion ) const { ....... alphaR = sigmar*GaussGen.GaussNormal(); // Gaussian normal distributed polar angle // Sample uniformly between 0 and 360 [0 - 2pi]// phieR = 360.0*RanGen.scalar01(); // Gaussian normal distributed azimuthal angle scalar normalYcomp= rHat_PW.y(); scalar normalZcomp= rHat_PW.z(); vector t_a = vector(0.0, -normalYcomp, normalZcomp); ....... |
|
Tags |
kinematic cloud, rndgen, splash |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Centrifugal pump OpenFOAM, convergence problem, ANSA model | RDD | OpenFOAM Running, Solving & CFD | 0 | July 5, 2014 10:12 |
manualInjection model in sprayFoam | Mentalo | OpenFOAM Running, Solving & CFD | 1 | April 2, 2014 10:29 |
problem in glass radiation model (DO model) | wunan805 | FLUENT | 0 | October 10, 2012 06:06 |
Problem in Buoyancy Model? | dhrubo | CFX | 3 | June 5, 2010 06:32 |
A model is used to model particle interaction with the geometry | dungsidietquy | FLUENT | 0 | November 4, 2009 17:05 |