|
[Sponsors] |
Convective outlet boundary condition for Unsteady flows |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
February 13, 2007, 04:02 |
Hello Luca,
Boundary condit
|
#21 |
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33 |
Hello Luca,
Boundary conditions (and many other things in OpenFOAM) are selected using a run-time selection mechanism). Here, all available b.c.-s register themselves to a table when you start the code and are chosen by the name in a dictionary (in your case, the type of patch field). Specifically for patch fields, if the boundary condition is not found, a "default" patch field is created for you (this helps with post-processing). There are 3 reasons why your boundary condition would not be picked up: - you mis-spelled its name. Check it carefully in the field file and the header file of the patch field code - you did not compile it correctly. For examples, look at some other boundary conditions in the library. Depending on twhat you are doing, you will need one of the following in the file you compile: makePatchFields(fixedValue); makePatchTypeField(fvPatchScalarField, pressureTransmissiveFvPatchScalarField); or similar. - the third option is that you have not linked the object or library file with the solver you are trying to use. I suspect you know how to fix this. Hope this helps, Hrv
__________________
Hrvoje Jasak Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk |
|
February 13, 2007, 04:24 |
Hello Hrvoje,
I understood
|
#22 |
Member
Luca Gasparini
Join Date: Mar 2009
Location: Italy
Posts: 37
Rep Power: 17 |
Hello Hrvoje,
I understood the "default" mechanism and I checked the name many times; also the newBC.C file ends with something like: makePatchTypeField(fvPatchScalarField, newBCFvPatchScalarField); About compiling, the bc code is compiled to a library using wmake lib or wmake libso, and I looked at rhopSonicFoam/BCs for files and options. About linking I added the -lxxx option to the EXE_LIBS list of the solver makefile. However, I wonder how can the library get actually linked to the solver if nothing references it. By the way, I'm working under cygwin. Regards, Luca |
|
February 13, 2007, 04:39 |
Aha, one of those. :-)
The
|
#23 |
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33 |
Aha, one of those. :-)
The definition of C++ language says that all static symbols in all linked libraries will be executed before the first line of the main code - this is what we use to populate the run-time selection tables. Therefore, according to the definition all should be well. However, we are talking about a Billy-boy box (that's Gates, BTW) rather than a real computer :-) so try doing an explicit dllopen() on your library at the start of the code. I'm pretty sure this would do it. Alternatively, just link the object file from your new boundary condition straight with the top-level code, which should avoid all problems. In any case, that would be a good test. Hrv
__________________
Hrvoje Jasak Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk |
|
February 13, 2007, 07:51 |
Thank you Hrvoje,
I linked
|
#24 |
Member
Luca Gasparini
Join Date: Mar 2009
Location: Italy
Posts: 37
Rep Power: 17 |
Thank you Hrvoje,
I linked directly the object file and it works.. Any comment about the definition of FoamX types (although this is the wrong thread..) ? Regards, Luca |
|
July 2, 2007, 04:00 |
Hi all,
I 'm trying to use th
|
#25 |
Senior Member
Cedric DUPRAT
Join Date: Mar 2009
Location: Nantes, France
Posts: 195
Rep Power: 17 |
Hi all,
I 'm trying to use the convectiveOutlet boundary condition but ...just trying. I put it in src/finiteVolume/fields/fvPatchFields/basicFvPatchFields and compile it, there every thing seems to be Ok. Then, in my case, I modified the O/U and in the outlet patch I add: type convectiveOutlet; gradient UNIFORM 0; convectiveVelocity uniform 11.3; snGradScheme normal; ddtScheme Euler; updateValue 0; writeValue 0; starting FoamX, I got this error Invalid patch field type 'convectiveOutlet' for patch 'outlet' in field dictionary 'U' Maybe I forgot to do something, any idea or hints ? Thank you for helping ... |
|
July 2, 2007, 06:14 |
Yes, for FoamX to recognize ne
|
#26 |
Senior Member
Srinath Madhavan (a.k.a pUl|)
Join Date: Mar 2009
Location: Edmonton, AB, Canada
Posts: 703
Rep Power: 21 |
Yes, for FoamX to recognize newly build B/C you need to edit some of its config files. My suggestion is to simply edit all dictionaries from the command line and proceed. Ignore FoamX. When I started using OpenFOAM 1.2, I used FoamX for the first week or so. Later I found that all it did was provide a graphical interface to edit dictionary entries. So I started editing all dictionaries using emacs directly. In my opinion, FoamX is a very useful application for beginners to OpenFOAM. But as you develop new solvers, boundary conditions etc., it is usually more productive to move straight to the command line.
|
|
July 2, 2007, 08:02 |
Ok, Srinath thank you for rep
|
#27 |
Senior Member
Cedric DUPRAT
Join Date: Mar 2009
Location: Nantes, France
Posts: 195
Rep Power: 17 |
Ok, Srinath thank you for replying, I will try like that ...
and hope that it will work correctly and if I have question(s) ... I won't hesitate :o) |
|
July 18, 2007, 04:24 |
Hi again, few days later,
|
#28 |
Senior Member
Cedric DUPRAT
Join Date: Mar 2009
Location: Nantes, France
Posts: 195
Rep Power: 17 |
Hi again, few days later,
I'm trying to run my case on parallel, without FoamX , but when I tryed to decompose my geometry (decomposePar), I got this error: FOAM FATAL IO ERROR : Cannot find 'value' entry which is required to set the values of the default patch field. (Actual type convectiveOutlet) my problem is that there is no "value" defined in convectiveOutlet (this is the aim of this method ...), so, is there any file I have to change to run parallel computation with other BC ? Thanks for replying, Cedric |
|
July 18, 2007, 04:39 |
Check this thread. Are you sti
|
#29 |
Senior Member
Srinath Madhavan (a.k.a pUl|)
Join Date: Mar 2009
Location: Edmonton, AB, Canada
Posts: 703
Rep Power: 21 |
Check this[1] thread. Are you still using FoamX at some point after setting up the case, because FoamX can then overwrite your settings.
[1] http://www.cfd-online.com/OpenFOAM_D...es/1/1057.html |
|
July 18, 2007, 04:45 |
Hi Srinath,
Thank for replyi
|
#30 |
Senior Member
Cedric DUPRAT
Join Date: Mar 2009
Location: Nantes, France
Posts: 195
Rep Power: 17 |
Hi Srinath,
Thank for replying so fast, ... yes, I use FoamX for all my "normal" BC and then I change my "home made" BC. You are right, change my BC first then FoamX is .... not a good idea. thank you for the link, I didn't find it ... so, let's try like that and ....see you in one week for an other problem ... :-) Cedric |
|
August 13, 2007, 10:36 |
hello,
I would like to know
|
#31 |
Senior Member
Cedric DUPRAT
Join Date: Mar 2009
Location: Nantes, France
Posts: 195
Rep Power: 17 |
hello,
I would like to know if someone tried the convectiveOutletPatch in a parallel run. Cause in my case, It's running well on a coarse grid (one processor) but, with a finer grid, It stop a the second iteration (parallel run). what is strange is that the first iteration works correctly. (maybe no link with the convectiveOutlet patch ...but, I ask the question to confirm,.... or not) I used decomposePar so I don't know where are the borders of my sub-domains, if the oultet patch is cut in two parts, there is a problem with the BC ... how to check this? any idea(s) ? Thanks, Cedric |
|
August 16, 2007, 21:02 |
Hi all,
I also confirmed some
|
#32 |
Super Moderator
Takuya OSHIMA
Join Date: Mar 2009
Location: Niigata City, Japan
Posts: 518
Blog Entries: 1
Rep Power: 20 |
Hi all,
I also confirmed some numerical oscillations on the convectiveOutlet boundary with my solver in a parallel case... I have never tried any parallel case till now with the code. I haven't found what's the problem as of now but have a feeling that if I could sort it out that should be quite trivial. Do anyone know what a parallel-ready b. c. code which relies only on the time-histories of boundary and patchInternalField values must satisfy? Takuya |
|
August 17, 2007, 07:49 |
Is the code still the same as
|
#33 |
Senior Member
Eugene de Villiers
Join Date: Mar 2009
Posts: 725
Rep Power: 21 |
Is the code still the same as your last post (9/2/2007)? If you can confirm or post the latest I will take a quick look to see if I can spot any obvious issues.
|
|
August 17, 2007, 09:51 |
Hi Takuya and Eugene,
I als
|
#35 |
Senior Member
Cedric DUPRAT
Join Date: Mar 2009
Location: Nantes, France
Posts: 195
Rep Power: 17 |
Hi Takuya and Eugene,
I also used this code, with difficulties in parallel. I think that we can decrease the possibility of mistakes if we use OF's numerical scheme whereas these avaiable from Takuya's code but it's just an optimisation and no link with our parallel problem. I just want to add that it is working properly on 1 processor with a fine mesh also. Thank you for helping, Cedric |
|
September 5, 2007, 08:46 |
Hi,
I think I have solved the
|
#36 |
Super Moderator
Takuya OSHIMA
Join Date: Mar 2009
Location: Niigata City, Japan
Posts: 518
Blog Entries: 1
Rep Power: 20 |
Hi,
I think I have solved the problem.
convectiveOutlet-20070905.tar.gz Takuya |
|
September 25, 2007, 12:45 |
Hi Takuya,
thank you for the
|
#37 |
Senior Member
Cedric DUPRAT
Join Date: Mar 2009
Location: Nantes, France
Posts: 195
Rep Power: 17 |
Hi Takuya,
thank you for the new version of you code. I am strating to use it now. so, I copied it in /applications/utilities/preProcessing/ It compile well (without any problems); `/craya/big/duprat/OpenFOAM/duprat-1.4.1/lib/linuxGccDPOpt/libconvectiveOutlet.s o' is up to date. then, when I tryied to run it on a case, with OF 1.4.1, I got this message: Starting time loop Time = 0.001 --> FOAM FATAL ERROR : gradientInternalCoeffs cannot be called for a defaultFvPatchField (actual type convectiveOutlet) on patch sortie of field U in file "/craya/data/duprat/cylindre/0/U" You are probably trying to solve for a field with a default boundary condition. From function defaultFvPatchField<type>::gradientInternalCoeffs( ) const in file fields/fvPatchFields/basic/default/defaultFvPatchField.C at line 694. FOAM exiting I added the lib in controlDict as you mensionned on your README: ("libconvectiveOutlet.so"); Well, I'm quite lose now,am I missing something? I found a thread http://www.cfd-online.com/OpenFOAM_D....html#POST8728 with the same problem and Hrv focus on a wrong compile method but, I can't find what I did wrong ... Any idea ? thank you for helping, Regards, Cedric PS: notice that my case worked with the last version of convectiveOutlet. |
|
September 25, 2007, 19:58 |
Hi Cedric,
I just would like
|
#38 |
Super Moderator
Takuya OSHIMA
Join Date: Mar 2009
Location: Niigata City, Japan
Posts: 518
Blog Entries: 1
Rep Power: 20 |
Hi Cedric,
I just would like to make sure you wrote libs, not lib as the keyword in controlDict. It's the standard procedure to load user libraries; see ReleaseNote-1.4.1 included in your copy of OF distribution. Takuya |
|
September 3, 2008, 14:01 |
Hi Takuya!
I am using OpenF
|
#39 |
Senior Member
Daniel WEI (老魏)
Join Date: Mar 2009
Location: Beijing, China
Posts: 689
Blog Entries: 9
Rep Power: 21 |
Hi Takuya!
I am using OpenFOAM-1.5 now. ParaFoam can't handle convectiveOutlet BC....Crashhhhhhhh Any ideas? Regards, Daniel
__________________
~ Daniel WEI ------------- Boeing Research & Technology - China Beijing, China |
|
September 3, 2008, 22:24 |
Hi Daniel,
I'm not seeing any
|
#40 |
Super Moderator
Takuya OSHIMA
Join Date: Mar 2009
Location: Niigata City, Japan
Posts: 518
Blog Entries: 1
Rep Power: 20 |
Hi Daniel,
I'm not seeing any crashes so far... but on the Mac port. Do you get any error messages or whatever? p.s. Did anyone try the new advection b.c. in 1.5? Takuya |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
convective boundary condition | Mani | CFX | 8 | March 21, 2017 10:59 |
Convective boundary condition | andrea_barbera | OpenFOAM Running, Solving & CFD | 4 | March 4, 2010 05:36 |
Convective Boundary Condition | garni | FLUENT | 0 | September 25, 2005 14:00 |
Convective boundary condition | STN | Main CFD Forum | 5 | May 29, 2002 09:47 |
convective boundary condition | frederic felten | Main CFD Forum | 1 | April 25, 2001 02:20 |