|
[Sponsors] |
May 13, 2014, 04:40 |
adjoint solver in OpenFOAM
|
#1 |
Senior Member
Samuele Z
Join Date: Oct 2009
Location: Mozzate - Co - Italy
Posts: 520
Rep Power: 18 |
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 Code:
forAll(mesh.boundary(), patchi) { if(mesh.boundary()[patchi].name() == "ciao") { normal.setSize(mesh.boundary()[patchi].size()); forAll(normal, i) { normal[i] = mesh.boundary()[patchi].nf(); } } } Thanks for help, Samuele |
|
May 13, 2014, 15:08 |
|
#2 |
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,900
Rep Power: 37 |
Hallo,
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. Cheers, Niels
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request. |
|
|
|
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 20:02 |
Modified OpenFOAM Forum Structure and New Mailing-List | pete | Site News & Announcements | 0 | June 29, 2009 05:56 |