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

adjointShapeOptimizationFoam - New Objective Function

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 3 Post By C. Okubo

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 18, 2017, 16:49
Default adjointShapeOptimizationFoam - New Objective Function
  #1
New Member
 
Join Date: Jan 2017
Posts: 22
Rep Power: 9
C. Okubo is on a distinguished road
Hello!

I am trying to implement the objective function that minimizes power loss in the adjointShapeOptimizationFoam as described in:

http://www.tfd.chalmers.se/~hani/kur...ortAdjoint.pdf

The new solver compiled and everything should be working well, but when I try to solve a case, I get the following error:

--> FOAM FATAL ERROR:

request for RAS RASProperties from objectRegistry region0 failed
available objects of type RAS are
1(turbulenceProperties)

From function const Type& Foam:bjectRegistry::lookupObject(const Foam::word&) const [with Type = Foam::RASModel<Foam::IncompressibleTurbulenceModel <Foam::transportModel> >]
in file /opt/openfoam4/src/OpenFOAM/lnInclude/objectRegistryTemplates.C at line 193.

FOAM aborting

#0 Foam::error:rintStack(Foam::Ostream&) at ??:?
#1 Foam::error::abort() at ??:?
#2 ? at ??:?
#3 ? at ??:?
#4 Foam::fvMatrix<Foam::Vector<double> >::fvMatrix(Foam::GeometricField<Foam::Vector<doub le>, Foam::fvPatchField, Foam::volMesh> const&, Foam::dimensionSet const&) at ??:?
#5 ? at ??:?
#6 ? at ??:?
#7 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#8 ? at ??:?

I am stuck at this and any help will be appreciated!

Note: my version is 4.1.

Regards,

C. Okubo
C. Okubo is offline   Reply With Quote

Old   July 19, 2017, 12:46
Default
  #2
New Member
 
Join Date: Jan 2017
Posts: 22
Rep Power: 9
C. Okubo is on a distinguished road
I was able to figure that out. On OF version 4.1, two changes are needed:

1) When the tutorial says to include:

#include "RASModel.H"

It is necessary to include:

#include "turbulentTransportModel.H"

Note: this was in another thread -> Error while compiling adjointShapeOptimizationFoam

2) When the tutorial says to include:

db().lookupObject<incompressible::RASModel>("RASPr operties");

It is necessary to change it to:

db().lookupObject<incompressible::RASModel>("turbu lenceProperties");

At least, this worked fine for me!

Hope this is of help to other people!

Regards,

C. Okubo
kiddmax, jvinuales and dyle like this.
C. Okubo 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
[Other] Contribution a new utility: refine wall layer mesh based on yPlus field lakeat OpenFOAM Community Contributions 58 December 23, 2021 02:36
channelFoam for a 3D pipe AlmostSurelyRob OpenFOAM 3 June 24, 2011 13:06
latest OpenFOAM-1.6.x from git failed to compile phsieh2005 OpenFOAM Bugs 25 February 9, 2010 04:37
Compilation errors in ThirdPartymallochoard feng_w OpenFOAM Installation 1 January 25, 2009 06:59
Problem with compile the setParabolicInlet ivanyao OpenFOAM Running, Solving & CFD 6 September 5, 2008 20:50


All times are GMT -4. The time now is 08:14.