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

Error while compiling adjointShapeOptimizationFoam

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By fanny

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 6, 2016, 03:04
Default Error while compiling adjointShapeOptimizationFoam
  #1
New Member
 
changhee kim
Join Date: Feb 2014
Posts: 18
Rep Power: 12
changhee.kim is on a distinguished road
I wonder why this message occurs.

I use OpenFOAM-3.0.1 version.

adjointOutletPressure/adjointOutletPressureFvPatchScalarField.C: In member function ‘virtual void Foam::adjointOutletPressureFvPatchScalarField::upd ateCoeffs()’:
adjointOutletPressure/adjointOutletPressureFvPatchScalarField.C:112:11: error: ‘incompressible’ does not name a type
const incompressible::RASModel& rasModel =
^
adjointOutletPressure/adjointOutletPressureFvPatchScalarField.C:115:25: error: ‘rasModel’ was not declared in this scope
scalarField nueff = rasModel.nuEff()().boundaryField()[patch().index()];
^
changhee.kim is offline   Reply With Quote

Old   April 6, 2016, 06:13
Default
  #2
Member
 
Anurag
Join Date: Aug 2014
Location: Germany
Posts: 57
Rep Power: 11
anuragm is on a distinguished road
Dear Changhee Kim,

You have to give more details in order to get help. Please go through this post first.
anuragm is offline   Reply With Quote

Old   April 8, 2016, 07:48
Default Error while compiling adjointShapeOptimizationFoam
  #3
New Member
 
changhee kim
Join Date: Feb 2014
Posts: 18
Rep Power: 12
changhee.kim is on a distinguished road
I'd like to implement modified adjointShapeOptimizationFoam attached below.
(I use OpenFOAM-3.0.1)

The errors that I received is as follows.

I would appreciate if someone can help me.

UNAdjointShapeOptimizationFoam.C:50:22: fatal error: RASModel.H: No such file or directory
#include "RASModel.H"

In file included from UNAdjointShapeOptimizationFoam.C:75:0: createFields.H: In function ‘int main(int, char**)’: createFields.H:81:13: error: ‘incompressible’ was not declared in this scope autoPtr<incompressible::RASModel> turbulence
Attached Files
File Type: gz UNAdjointShapeOptimizationFoam.tar.gz (115.3 KB, 17 views)
changhee.kim is offline   Reply With Quote

Old   April 16, 2016, 15:29
Default
  #4
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quick questions:
  1. For which OpenFOAM version was this solver originally designed for?
  2. If you don't know, then from where did you get this solver?
Because if you got it from here: http://www.tfd.chalmers.se/~hani/kurser/OS_CFD_2013/

Quote:
Ulf Nilsson: Descriptions of adjointShapeOptimizationFoam and how to implement new objective functions.
Then you should follow the steps provided in the report document, because there were a lot of changes made to the original adjointShapeOptimizationFoam solver in OpenFOAM.


If you prefer to fix the solver you have, then you will need to follow the changes made to the original solver, as listed here: https://github.com/OpenFOAM/OpenFOAM...timizationFoam
__________________
wyldckat is offline   Reply With Quote

Old   July 22, 2016, 09:48
Default
  #5
New Member
 
Join Date: Feb 2016
Posts: 13
Rep Power: 10
fanny is on a distinguished road
Hi Changkee Kim,

The work of Ulf Nilsson has been developped for OpenFoam 2.2.x

In adjointOutletPressureUniFvPatchScalarField.C and adjointOutletVelocityUniFvPatchVectorField.C
replace
#include "RASModel"
by
#include "turbulentTransportModel.H"
which could more convenient for version 3.0.1
kk415 and FlyBob91 like this.
fanny is offline   Reply With Quote

Old   November 18, 2016, 11:23
Default
  #6
Senior Member
 
FlyBob91's Avatar
 
Join Date: Mar 2016
Location: Bergamo
Posts: 157
Rep Power: 10
FlyBob91 is on a distinguished road
Hello.

Same problem here.
Does the solution posted by fanny also work for OpenFOAM 4.1?

Best Regards,
Roberto
FlyBob91 is offline   Reply With Quote

Old   September 30, 2019, 10:48
Default nueff v6
  #7
New Member
 
Andrea Trotta
Join Date: Aug 2019
Posts: 14
Rep Power: 6
andrea5 is on a distinguished road
Hi,

do you have any idea on how to access nueff for openFoam v6?
andrea5 is offline   Reply With Quote

Old   October 22, 2019, 10:03
Default Solved: turbulence properties OpenFoam 6
  #8
New Member
 
Andrea Trotta
Join Date: Aug 2019
Posts: 14
Rep Power: 6
andrea5 is on a distinguished road
To access Turbulent properties, for example computing a Boundary Condition in OpenFoam 6:


const turbulenceModel& turbModel = db().lookupObject<turbulenceModel>
(
IOobject::groupName
(
turbulenceModel:ropertiesName,
internalField().group()
)
);

const tmp<volScalarField> nup = turbModel.nu();
const volScalarField& nute = nup();

const tmp<volScalarField> nupt = turbModel.nut();
const volScalarField& nutt = nupt();
andrea5 is offline   Reply With Quote

Reply


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with Compiling UDFs in Ansys Fluent 13 (lnx64) Ali.beh Fluent UDF and Scheme Programming 3 August 27, 2018 04:22
[OpenFOAM.org] Trouble Compiling OpenFOAM-dev using Intel Compiler 15 for use on Xeon Phi foamer123 OpenFOAM Installation 9 August 20, 2015 14:03
Error Compiling Paraview4.1.0 npel OpenFOAM Installation 7 April 10, 2014 15:07
paraview 3.10.1 compiling error (1.6-ext) vkrastev OpenFOAM Installation 7 October 28, 2011 03:17
Help with KIVA4 source code compiling geothokar Main CFD Forum 0 September 3, 2010 05:40


All times are GMT -4. The time now is 15:52.