CFD Online Logo CFD Online URL
Home > Forums > OpenFOAM Programming & Development

adjoint solver in OpenFOAM

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

LinkBack Thread Tools Display Modes
Old   May 13, 2014, 04:40
Default adjoint solver in OpenFOAM
Senior Member
Samuele Z
Join Date: Oct 2009
Location: Mozzate - Co - Italy
Posts: 490
Rep Power: 10
samiam1000 is on a distinguished road
Dear All,

I am trying to implement an adjoint solver for external flow.

I have implemented the sensitivity. Now I would need to implement the normals to a certain patch, but - while coding - I get an error. My idea is to write something like

	forAll(mesh.boundary(), patchi)
	     if(mesh.boundary()[patchi].name() == "ciao")
	         forAll(normal, i)
	             normal[i] = mesh.boundary()[patchi].nf();
What's wrong with this code?

Thanks for help,
samiam1000 is offline   Reply With Quote

Old   May 13, 2014, 15:08
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Deltares, Delft, The Netherlands
Posts: 1,629
Rep Power: 25
ngj will become famous soon enoughngj will become famous soon enough

It is more difficult, when you are not telling, what the compiler complains about. But, the problem at least lies in line 9, where you assign a vector field to a single element in a vector field.


Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.
ngj is offline   Reply With Quote


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
Can't get data from OpenFoam to external solver using externalCoupled perry OpenFOAM Running, Solving & CFD 4 May 26, 2014 08:09
FSI solver for openFoam 1.6 ext Whyman OpenFOAM 4 October 26, 2013 06:11
error compiling solver in OpenFOAM 1.6-ext: pimpleDymFoam tupe OpenFOAM 0 October 3, 2011 05:55
Working directory via command line Luiz CFX 4 March 6, 2011 21:02
Modified OpenFOAM Forum Structure and New Mailing-List pete Site News & Announcements 0 June 29, 2009 05:56

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