CFD Online Logo CFD Online URL
Home > Forums > OpenFOAM

File type of "U.oldTime()"

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Display Modes
Old   July 26, 2011, 19:53
Default File type of "U.oldTime()"
New Member
Frank Yu
Join Date: Jun 2011
Location: Toronto, ON
Posts: 15
Rep Power: 8
frankyux is on a distinguished road
I am trying to modify some ddt schemes in 'src', i want to add the previous time step value of U into ddt(k) and ddt(epsilon), therefore I added a new 'template' in EulerDdtScheme.C for example as following:

template<class Type>
tmp<fvMatrix<Type> >
const volVectorField& Uold,
const GeometricField<Type, fvPatchField, volMesh>& vf

and also modified its head files and ddtscheme.H. I have no problem with compiling the /finiteVolume/ folder so far.

And then, I modified the pisoFoam.C just for a quick try, I changed 'ddt(U)' term to 'ddt(U.oldTime(), U)', and here comes the problem, it says,

pisoFoam.C:66: error: no matching function for call to ‘ddt(Foam::GeometricField<Foam::Vector<double >, Foam::fvPatchField, Foam::volMesh>&, Foam::volVectorField&)’

Now, I think I made a mistake on the type of 'U.oldTime()', but couldn't know the correct type. Thanks for your time.

frankyux is offline   Reply With Quote

Old   July 27, 2011, 16:31
Senior Member
David Gaden
Join Date: Apr 2009
Location: Winnipeg, Canada
Posts: 436
Rep Power: 15
marupio is on a distinguished road
You are creating a new function in EulerDdtScheme.C...

I don't know exactly what you are trying to do, so I'll only comment on the coding. If you want a new function in EulerDdtScheme.C, you also have to have it defined in EulerDdtScheme.H. Once you do that, your solver will likely not run the way you expect. EulerDdtScheme is called using runTimeSelection. So, you will never be able to call your new ddt function unless you explicitly create a EulerDdtScheme object in your solver.

Otherwise, you also have to have it defined in ddtScheme.H (you may have to change the macros they've got in there... I don't know), and fvmDdt.H... for starters!
marupio is offline   Reply With Quote

Old   July 29, 2011, 13:35
New Member
Frank Yu
Join Date: Jun 2011
Location: Toronto, ON
Posts: 15
Rep Power: 8
frankyux is on a distinguished road
I think I forgot to modify the corresponding template in 'fvmDdt.H' and 'fvmDdt.C', now it seems fine, but I need to do some more tests, thanks for remind me.
frankyux is offline   Reply With Quote


Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
BlockMesh FOAM warning gaottino OpenFOAM Native Meshers: blockMesh 7 July 19, 2010 14:11
Problem installing on Ubuntu 9.10 -> 'Cannot open : No such file or directory' mfiandor OpenFOAM Installation 2 January 25, 2010 10:50
Compiling gmshFoam with OpenFOAM-1.5 BlGene Open Source Meshers: Gmsh, Netgen, CGNS, ... 10 August 6, 2009 04:26
DxFoam reader update hjasak OpenFOAM Post-Processing 69 April 24, 2008 01:24
Regarding FoamX running Kindly help out hariya03 OpenFOAM Pre-Processing 0 April 18, 2008 04:26

All times are GMT -4. The time now is 02:49.