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

Compilation error when trying to interpolate a dimensionedScalar&

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

Reply
 
LinkBack Thread Tools Display Modes
Old   October 2, 2013, 04:52
Default Compilation error when trying to interpolate a dimensionedScalar&
  #1
Member
 
Thomas Vossel
Join Date: Aug 2013
Location: Germany
Posts: 45
Rep Power: 3
ThomasV is on a distinguished road
Hi!

I ran into another problem and don't know what I did wrong when writing my solver...
I want to do a fvc::interpolate() command on a dimensionedScalar. The scalar is created similar to the twoPhaseEulerFoam solver:
Code:
    const dimensionedScalar& rhoa = phasea->rho();
The interpolation command looks like this:
Code:
    surfaceScalarField rhoaf = fvc::interpolate(rhoa);
I now get the following error when compiling though:
Quote:
pEqn.H:30:53: Fehler: keine passende Funktion für Aufruf von »interpolate(const Foam::dimensionedScalar&)«
That is the compiler is unable to get a function which fits to the interpolate call of the dimensionedScalar&. I don't know at which point I did something wrong as even in the twoPhaseEulerFoam code rhoa is used within an interpolate command...
ThomasV is offline   Reply With Quote

Old   October 2, 2013, 07:49
Default
  #2
Member
 
Thomas Vossel
Join Date: Aug 2013
Location: Germany
Posts: 45
Rep Power: 3
ThomasV is on a distinguished road
I think I got closer to the solution. I guess it's not possible to interpolate a dimensionedScalar as its meant for volScalarFields only. As rhoa never shows up alone in an interpolation command of the twoPhaseEulerFoam solver I guess it cancels itself with some other components thus forming a valid interpolate statement...

I also found this definition of rhoa in one of the papers I'm reading:
Code:
    rhoa = phasea->rho();
Maybe it can work this way but unfortunately this seems to have problems in terms of the scope making its usage invalid. I'll see if I can figure out a way around that problem...
ThomasV is offline   Reply With Quote

Old   October 5, 2013, 07:07
Default
  #3
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,251
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Greetings Thomas,

I didn't manage to properly read your questions, but I read that you mentioned "fvc::interpolate", so perhaps this little example of mine can help: https://github.com/wyldckat/reconstr...rpolate-fields

Best regards,
Bruno
wyldckat 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
Compilation error for OpenFOAM-ext on Ubantu 10.04 32 bit Sargam05 OpenFOAM Installation 13 March 22, 2014 06:21
Compilation error with OF 2.1.x GerhardHolzinger OpenFOAM Installation 5 September 18, 2012 09:04
Compilation Error (V 1.7.1; Icc 12.1.0, OpenMPI 1.4.3) floydfan OpenFOAM Installation 7 December 20, 2011 06:56
Interpolate in some points ivan_cozza OpenFOAM Post-Processing 2 April 22, 2009 08:58
Compilation Error.... Arnab CD-adapco 4 September 12, 2004 15:54


All times are GMT -4. The time now is 23:10.