CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Programming & Development

convert dimensioned<double>’ to ‘double’

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

Like Tree1Likes

Reply
 
LinkBack Thread Tools Display Modes
Old   December 29, 2013, 17:24
Default
  #21
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 7,711
Blog Entries: 33
Rep Power: 75
wyldckat is a jewel in the roughwyldckat is a jewel in the roughwyldckat is a jewel in the roughwyldckat is a jewel in the rough
Greetings to all!

@Thamali: Unfortunately, I can't make figure out where the problem is in the file you had attached, just by looking at the source code

As for the latest error, seems to either it's a very strange problem. It suggests that it's missing an indication of a library that has got the object-class "Foam::fv::laplacianScheme", which should already be present in "libOpenFOAM" or "libfiniteVolume".

If possible, can you share the whole source code package of your modified solver?
And knowing which OpenFOAM version or variant you are using, as well as knowing how you installed it and in which Linux Distribution and version, would all come in handing as well, so that I can reproduce the same error.

Because from what I can deduce, the latest error can be related to any of the details I asked above, namely: OpenFOAM version, how it was installed, which Linux Distribution and version, and access to the source code.

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   December 30, 2013, 02:40
Default
  #22
Member
 
Thamali
Join Date: Jul 2013
Posts: 54
Rep Power: 3
Thamali is on a distinguished road
Thank you very much for the wishes and Wish you all a very happy new year.....!!
wyldckat,
I will send my code through a private message to you cannot attach all file at once.

If anyone interested pls send me a message.
I am eager for your reply wyldckat.
Thanks again.
Thamali is offline   Reply With Quote

Old   January 5, 2014, 12:47
Default
  #23
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 7,711
Blog Entries: 33
Rep Power: 75
wyldckat is a jewel in the roughwyldckat is a jewel in the roughwyldckat is a jewel in the roughwyldckat is a jewel in the rough
Hi Thamali,

I've finally managed to have a look into this. Here are the steps I've taken to diagnose and sort-of solve the problem:
  1. Prepared a copy of fireFoam from OpenFOAM 2.2.x for comparison with your modified solver. Conclusion: Too many changes were made, in order to figure out the problem.
  2. Tried building with other versions of OpenFOAM. Did not seem to be a version problem (although I didn't check with 1.6-ext nor foam-extend 3.0).
  3. Applied the technique of isolate-and-conquer. I commented out the entries for "laplacian", to see which one is triggering the problem. Had to comment out the inclusion of "YghgEqn.H" as well, since it's loaded with "laplacian" calls.
  4. After gradually removing the comments from the "laplacian" entries, the first one to pick up the problem was the one in the file "YshsEqn.H". Note: the file "YghgEqn.H" was not yet included.
  5. The problem line is this one:
    Code:
    fvm::laplacian(kappa,ts)
    Looking for its variable definitions within it:
    • "volVectorField kappa"
    • "volScalarField ts"
  6. Looking at the error message:
    Code:
    Foam::fv::laplacianScheme<double, Foam::Vector<double> >
    this indicates that it's trying to create a class instance based off the template characteristics "<double, Foam::Vector<double>". This is likely so that it is compatible with the structure of the preceding code:
    Code:
    fvm::div(phi2,ts)
    Where: "surfaceScalarField phi2"
  7. So, what is exactly the problem? If you have a look into the OpenFOAM Programmer's Guide (here's an indirect link for it: http://openfoamwiki.net/index.php/Op...s_Guide_Errata ), you'll see what the Divergence and Laplacian operators do:
    • Divergence will essentially reduce the rank by one, turning rank-1 tensors into vectors and vectors into scalars.
    • Laplacian does not change the rank, therefore a vector remains a vector and a scalar remains a scalar.
  8. The problem is that you are trying to add a scalar "div(phi2,ts)" with a vector "laplacian(kappa,ts)".
  9. The quick fix was to switch the "kappa" field into a scalar, by using "mag":
    Code:
    fvm::laplacian(mag(kappa),ts)
    This no longer gave any building problems.
  10. The big question is: what is the equation you are trying to solve here? Because the equation on paper should have given you the perfect notion that the ranks of each item were incompatible.
I did not continue with the diagnosis, since all of the other Laplacian problems are in the file "YghgEqn.H", which I assume of the same nature of problems.

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   January 7, 2014, 01:35
Default Thanking
  #24
Member
 
Thamali
Join Date: Jul 2013
Posts: 54
Rep Power: 3
Thamali is on a distinguished road
Dear Bruno,

I am very much grateful to you.
  • I always tried to find an answer to this error on searching about "ld returned 1 exit status".What I understood is some error on incompatibility of compiler versions vs OpenFoam versions(although it is not possible in Ubuntu 12.04LTS).
Therefore I never tried to looking to my code again.(my bad-sorry if I took your time on a foolish error.)
  • What I am trying to do here is making an anisotropic thermal conductivity field.The equation is for "enthalpy of solid phase" in a packed bed combusting wood chips.
  • In here I am trying to use a homogeneous model for the thermal conductivity of bed and therefore using same values for the gas phase too.
  • After changing same in the YghgEqn now my code is compiling.
  • If I went through the code at very early stage what exaclty happens when applying anisotropic thermal conductivity,I would not wasting time on developing a volVectorField and I will directly use a volScalarField with magnitude of volVectorField.(this will be a lesson for me and all new users as well)
Thank you very much again.
With Regards,
Thamali
wyldckat likes this.
Thamali is offline   Reply With Quote

Reply

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
How to convert DRM protected music and movies to MP4/AVI/MOV/MP3/WMV/AAC... urutyerid6 ANSYS 0 April 22, 2010 05:52
convert virtual volume to a real one djalil FLUENT 0 January 22, 2009 16:07
Convert Real edges to Virtual in Gambit Freeman FLUENT 6 October 24, 2005 16:14
Convert from StarCD 3.10 to StarCD 3.15 Jing CD-adapco 1 April 17, 2002 10:22


All times are GMT -4. The time now is 05:21.