CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Defining a new constant vector source in wall interaction models for Lagrangian cases

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By ansubru

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 29, 2014, 06:03
Default Defining a new constant vector source in wall interaction models for Lagrangian cases
  #1
Member
 
Ananda Kannan
Join Date: Feb 2014
Location: Göteborg, Sweden
Posts: 55
Rep Power: 12
ansubru is on a distinguished road
Good day Foamers!!

I have a rather trivial error. I wanted to add a pre-defined velocity vector source within the 'wall model' in

Code:
lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/WallModel/WallSpringSliderDashpot
I need to introduce an extra source term to the total wall force p.f(). This term will be adding some new interactions (apart from collision and cohesion) to the wall interaction model. I have added the following lines of code to the 'original' script WallSpringSliderDashpot.C -

Code:
// Hard-coding vibrational wall
           
   scalar rho_wall = 8000; // Steel density in kg/m3
   scalar m_wall = (rho_wall*(3.14/6.0))*(p.d()*p.d()*p.d());
   scalar Ux = 0;
   scalar Uy = 1;
   scalar Uz = 0;
   v_w = vector(Ux, Uy, Uz); // Wall vib source direction and magnitude
   
   vector f_vib = (p.mass()*p.U()) - (m_wall*v_w);

   p.f() += f_vib; // adding the new vib source
My definition of 'v_w' is not being accepted by the compiler, and I get the following error -

Code:
In file included from lnInclude/WallSpringSliderDashpot.H:179:0,
                 from lnInclude/makeParcelCollisionModels.H:36,
                 from parcels/derived/basicKinematicCollidingParcel/makeBasicKinematicCollidingParcelSubmodels.C:34:
lnInclude/WallSpringSliderDashpot.C: In member function ‘void Foam::WallSpringSliderDashpot<CloudType>::evaluateWall(typename CloudType::parcelType&, const point&, const Foam::WallSiteData<Foam::Vector<double> >&, Foam::scalar, Foam::scalar, bool) const’:
lnInclude/WallSpringSliderDashpot.C:163:4: error: ‘v_w’ was not declared in this scope
make: *** [Make/linux64GccDPDebug/makeBasicKinematicCollidingParcelSubmodels.o] Error 1
Is there an alternate way to define 'v_w' so that it falls within the scope of the compiler??

Thanks in advance

BR

ansubru
ansubru is offline   Reply With Quote

Old   July 29, 2014, 06:23
Default
  #2
Member
 
Ananda Kannan
Join Date: Feb 2014
Location: Göteborg, Sweden
Posts: 55
Rep Power: 12
ansubru is on a distinguished road
Hi Again!!

That was a rather lame error -

I figured out the solution,

using -

Code:
vector v_w = vector(Ux, Uy, Uz);
My issue is solved.. ..

ansubru
arch.mr likes this.
ansubru is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Two-Phase Buoyant Flow Issue Miguel Baritto CFX 4 August 31, 2006 13:02
Multicomponent fluid Andrea CFX 2 October 11, 2004 06:12
Wall functions? Pr Main CFD Forum 7 April 8, 2004 07:15
Constant wall heat flux with uniform temperature Jake FLUENT 2 September 29, 2003 12:34
X-Y plot of Yplus in Fluent 5.3 Luo FLUENT 24 April 11, 2000 07:07


All times are GMT -4. The time now is 01:51.