|
[Sponsors] |
![]() |
![]() |
#1 |
New Member
Frank Yu
Join Date: Jun 2011
Location: Toronto, ON
Posts: 15
Rep Power: 15 ![]() |
Hello,
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> > EulerDdtScheme<Type>::fvmDdt ( 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. Frank. |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Senior Member
David Gaden
Join Date: Apr 2009
Location: Winnipeg, Canada
Posts: 437
Rep Power: 22 ![]() |
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! |
|
![]() |
![]() |
![]() |
![]() |
#3 |
New Member
Frank Yu
Join Date: Jun 2011
Location: Toronto, ON
Posts: 15
Rep Power: 15 ![]() |
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.
|
|
![]() |
![]() |
![]() |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[blockMesh] BlockMesh FOAM warning | gaottino | OpenFOAM Meshing & Mesh Conversion | 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 09:50 |
[Gmsh] Compiling gmshFoam with OpenFOAM-1.5 | BlGene | OpenFOAM Meshing & Mesh Conversion | 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 |