|
[Sponsors] |
November 18, 2022, 01:14 |
|
#41 |
New Member
Tamil Nadu
Join Date: Nov 2022
Posts: 2
Rep Power: 0 |
Thanks Jon for the response
But my first attempt was to try the code as it was posted in the forum. That itself didn't work. subsequently I tried out many options none of them worked. g=gunits*Foam::sin(runTime.value()*pi*2.0 *freq)*vector(0,0,1); g=gunits*vector(0,0,1); g=vector(0,0,1); All of them give a type mismatch. My understanding from the error message is that g is of the type gravity whereas the expression on the RH is of the type dimensioned vector. So it isn't able to assign. In fact the full error message is as below interFoam2.C:113:3: error: no match for âoperator=â (operand types are âconst Fo am::meshObjects::gravityâ and âFoam::dimensioned<Foam::Vector<double> >â) g=gunits*Foam::sin(runTime.value()*pi*2.0*freq)*ve ctor(0,0,1); ^ interFoam2.C:113:3: note: candidate is: In file included from /scratch/OpenFOAM/OpenFOAM-v1812/src/finiteVolume/lnInclud e/fvCFD.H:24:0, from interFoam2.C:38: /scratch/OpenFOAM/OpenFOAM-v1812/src/finiteVolume/lnInclude/gravityMeshObject.H: 53:7: note: Foam::meshObjects::gravity& Foam::meshObjects::gravity:perator=(co nst Foam::meshObjects::gravity&) <deleted> class gravity ^ /scratch/OpenFOAM/OpenFOAM-v1812/src/finiteVolume/lnInclude/gravityMeshObject.H: 53:7: note: no known conversion for argument 1 from âFoam::dimensioned<Foam::V ector<double> >â to âconst Foam::meshObjects::gravity&â On a different note do you have any idea on what Foam::sin() returns? I expected that it would return a double. So I had put it inside the vector definition. |
|
Tags |
gravity, time, variation |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Time step size and max iterations per time step | pUl| | FLUENT | 31 | October 23, 2020 23:50 |
Simulation of sloshing by time varying gravity | Manoj Kumar | FLUENT | 3 | June 13, 2011 04:34 |
PostChannel | maka | OpenFOAM Post-Processing | 5 | July 22, 2009 10:15 |
Problems with simulating TurbFOAM | barath.ezhilan | OpenFOAM | 13 | July 16, 2009 06:55 |
variation of gravity with time | rajani | FLUENT | 0 | February 16, 2005 03:45 |