|
[Sponsors] |
July 18, 2012, 11:37 |
fvm::ddt(eigenVectors(S)) ????
|
#1 |
Member
Hai Yu
Join Date: Mar 2009
Location: Harbin
Posts: 67
Rep Power: 17 |
Dear Foamers,
In my transport equation, I need to calculate "fvm::ddt(eigenVectors(S))", S here is a 3x3 tensor. when I compile, system gives error: --------------------------- no matching function for call to ‘ddt(Foam::tmp<Foam::GeometricField<Foam::Tensor<d ouble>, Foam::fvPatchField, Foam::volMesh> >)’ --------------------------- if I write: ..................... S = eigenVectors(S); fvm::ddt(S); .................... I can compile it. But in the latter way, it seems that I can not include the calculator "eigenVectors()" into the "SEqn.solve()". Can you give some advice? Thanks in advance. H.Y. Last edited by yuhai; July 18, 2012 at 12:59. |
|
July 19, 2012, 05:43 |
|
#2 |
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,900
Rep Power: 37 |
Good day,
It looks like eigenVectors(S) returns a tmp format. So can you compile the following: Code:
fvm::ddt( eigenVectors(S)() ) Kind regards, Niels |
|
July 19, 2012, 10:59 |
|
#3 |
Member
Hai Yu
Join Date: Mar 2009
Location: Harbin
Posts: 67
Rep Power: 17 |
thank you for the fast help,
but I got new problems, (sorry, i am a so "new" C++ coder....) I try to multiply in this way: ----------------------------- (eigenVectors(S)()) & fvm::ddt(eigenVectors(S)()); ............................. and got error as: ________________ SEqn.H:3: error: no match for ‘operator&’ in ‘Foam::eigenVectors(const Foam::GeometricField<Foam::Tensor<double>, PatchField, GeoMesh>&) [with PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh]().Foam::tmp<T>:perator() [with T = Foam::GeometricField<Foam::Tensor<double>, Foam::fvPatchField, Foam::volMesh>]() & Foam::fvm::ddt(const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&) [with Type = Foam::Tensor<double>]()’ ________________ and can you give also some advice of it? Thanks. H.Y. |
|
July 19, 2012, 11:16 |
|
#4 |
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,900
Rep Power: 37 |
Hi,
You are trying to do an inner product of a tensor (?) and the matrix coefficients in your linear set of equations. That kind of operator is not supported by OpenFoam, at least not if you want to solve the 6 or 9 equations in a segregated approach, because you directly couple all the equations by that approach. You might be able to address the problem with a block-coupled solver, however, that is far beyond my expertise, or you should formulate you problem as a segregated one. Good luck, Niels |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|