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

non constant object moving velocity set in pointDisplacement

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 2, 2021, 02:05
Default how to do drivenLinearMotion set in pointDisplacement
  #1
New Member
 
cyh
Join Date: Feb 2021
Posts: 2
Rep Power: 0
cyhpku is on a distinguished road
Hi everyone,in short can anyone give an example of drivenLinearMotion?
below is its source code .H:
public solidBodyMotionFunction
{
// Private data

//- Name of the meshObject to dum CofG velocity
word CofGvelocity_;

//- Normal plane direction to restrict movement on a plane
vector normal_;

//- Uniform vector to follow
uniformDimensionedVectorField CofGvel_;

//- Last displacement
mutable vector displacement_;

and here is its .C:
Foam::septernion
Foam::solidBodyMotionFunctions::drivenLinearMotion ::transformation() const
{
scalar deltaT = time_.deltaT().value();

vector velocity = CofGvel_.value();

// Take out normal component
if (mag(normal_) > SMALL)
{
velocity = CofGvel_.value() - ((CofGvel_.value() & normal_)*normal_);
}

DebugInFunction << "Vel on plane :" << velocity << endl;

// Translation of centre of gravity with constant velocity
//const vector displacement = velocity*t;
displacement_ += velocity*deltaT;

my understanding is CofGvel is the object moving velocity and displacement is calculated each moment by +=velocity*deltaT,but when i set it and use pimpleFoam it report error like this:
--> FOAM FATAL ERROR:
Continuity error cannot be removed by adjusting the outflow.
Please check the velocity boundary conditions and/or run potentialFoam to initialise the outflow.
Total flux : 1e-300
Specified mass inflow : 5.60342e-28
Specified mass outflow : 4.12536e-28
Adjustable mass outflow : 0


From bool Foam::adjustPhi(Foam::surfaceScalarField&, const volVectorField&, Foam::volScalarField&)
in file cfdTools/general/adjustPhi/adjustPhi.C at line 110.
and here‘s my setting of pointdisplacement:
cylinder
{
type solidBodyMotionDisplacement;
solidBodyMotionFunction drivenLinearMotion;
CofGvelocity haak;
normal (0 0 1);
CofGvel (this->db().time().value() this->db().time().value() 0);
displacement (0 0 0);
}
my purpose is to make the object move with velocity (t,t,0),can anyone tell how should i set it or please give me an example of it?there’s no such example in tutorial files.Other parts are ok,if i set it like this the whole case run without problem:
cylinder
{
type solidBodyMotionDisplacement;
solidBodyMotionFunction linearMotion;
velocity (1 2 0);
}
So anyone help plz..

Last edited by cyhpku; February 2, 2021 at 23:14. Reason: i find something more exactly to describe my problem
cyhpku 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
serial udf to parallel udf radioss Fluent UDF and Scheme Programming 10 January 19, 2019 08:56
does Hyperthreading affect the application of UDF? SJSW Fluent UDF and Scheme Programming 11 October 10, 2018 22:28
[snappyHexMesh] determining displacement for added points CFDnewbie147 OpenFOAM Meshing & Mesh Conversion 1 October 22, 2013 09:53
How to show the transient case? H.P.LIU Phoenics 7 July 13, 2010 04:31
Terrible Mistake In Fluid Dynamics History Abhi Main CFD Forum 12 July 8, 2002 09:11


All times are GMT -4. The time now is 12:50.