|
[Sponsors] |
flowRateOutletVelocity BC for compressible application |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
June 26, 2019, 14:00 |
flowRateOutletVelocity BC for compressible application
|
#1 |
Member
Mat
Join Date: Jan 2012
Posts: 60
Rep Power: 14 |
Hi Foamers,
I would like to use the flowRateOutletVelocity boundary condition with a compressible fluid (I am using compressibleInterFoam). I want to impose a mass flow rate, so I am using the following specifications: Code:
type flowRateOutletVelocity; massFlowRate 0.03; rho rho; --> FOAM FATAL ERROR: Did not find registered density field rho and no constant density 'rhoOutlet' specified which is strange as the volScalarField rho is speficied in my time folder. I don't want to use a constant density to estimate the mass flow rate (as with rhoOutlet option), but I want to use the density field rho computed by the solver. Is it even possible ? Thanks for your help, Mat |
|
June 27, 2019, 06:18 |
|
#2 |
Senior Member
Joachim Herb
Join Date: Sep 2010
Posts: 650
Rep Power: 22 |
It might be thermo:rho or something like rho.air or even thermo:rho.air
|
|
June 27, 2019, 07:24 |
|
#3 |
Member
Mat
Join Date: Jan 2012
Posts: 60
Rep Power: 14 |
Good call, but unfortunately it's not working either. I have tried the different combinations.
|
|
June 27, 2019, 07:33 |
|
#4 |
Senior Member
Joachim Herb
Join Date: Sep 2010
Posts: 650
Rep Power: 22 |
Ok, then perhaps this helps:
First try a different boundary condition to get it to run at all. Then also add a writeObject funtion object to the controlDict with object "banana". This should show all available object in the internal database. https://github.com/OpenFOAM/OpenFOAM...s/writeObjects |
|
June 27, 2019, 08:55 |
|
#5 |
Member
Mat
Join Date: Jan 2012
Posts: 60
Rep Power: 14 |
Thanks for your help Joachim,
None of the fields in the list given by the writeObject funtion solves this error. Which is strange. I have tried also with the flowRateInletVelocity boundary condition, but it's the same problem. When I look to a tutorial example (for instance in tutorials/compressible/rhoPimpleFoam/RAS/squareBendLiq/0/U), we can see the following BC: inlet { type flowRateInletVelocity; massFlowRate constant 5; rhoInlet 1000; // Guess for rho } Perhaps the comment means that rhoInlet is only used as a guess for the first time step, and then the inlet velocity is adapted in function of the given flow rate and the calculated rho ? Should be the same with the outlet BC then. Regards, Mat |
|
June 27, 2019, 09:24 |
|
#6 |
Senior Member
Joachim Herb
Join Date: Sep 2010
Posts: 650
Rep Power: 22 |
This is the source code of the boundary condition:
https://github.com/OpenFOAM/OpenFOAM...orField.C#L185 So if it does not find a field with the name for rho, you have specified, it tries to use rhoOutlet (see also the description in the header file: https://github.com/OpenFOAM/OpenFOAM...hVectorField.H) It is not an initial guess but used as constant during the whole run. But I still do not understand, why it does not find rho: The field is defined in the solver: https://github.com/OpenFOAM/OpenFOAM...teFields.H#L44 But is this field (the weighted average density) what you want for your boundary? Otherwise, two density fields are references here: https://github.com/OpenFOAM/OpenFOAM...teFields.H#L41 If you modify this file, you might get the names by adding something like (not tested): Code:
Info<<"rho1: "<< rho1.name() << endl; Info<<"rho2: "<< rho2.name() << endl; Which version of OpenFOAM do you use? |
|
June 27, 2019, 09:47 |
|
#7 |
Member
Mat
Join Date: Jan 2012
Posts: 60
Rep Power: 14 |
I am using openfoam-6.
I got the names with your piece of code: --> rho1: thermo:rho.h2 rho2: thermo:rho.water Already tried them, and still the same error. |
|
July 2, 2019, 04:42 |
|
#8 |
Senior Member
Joachim Herb
Join Date: Sep 2010
Posts: 650
Rep Power: 22 |
One last idea: What is in the "object" name in the header of the files with the density stored in the time directory?
Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 5.x | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; location "200"; object XXXXXX; } |
|
July 2, 2019, 15:01 |
|
#9 |
Member
Mat
Join Date: Jan 2012
Posts: 60
Rep Power: 14 |
Hi
Thanks a lot for your time. The header specifies "rho", but it's still not working. I have made the test with the compressible/rhoPimpleFoam/RAS/squareBendLiq tutorial. By default for this tutorial, the inlet BC for U is using a constant density and reads: Code:
inlet { type flowRateInletVelocity; massFlowRate 5.0; rhoInlet 1000; // Guess for rho } And if I change it for a variable density with the lines below, it is working in this case! Code:
inlet { type flowRateInletVelocity; massFlowRate 5.0; rho rho; } So I think it is a problem of compatibility between the solver and the BC. Regards, Mat |
|
July 4, 2019, 06:22 |
|
#10 |
Senior Member
Joachim Herb
Join Date: Sep 2010
Posts: 650
Rep Power: 22 |
I guess your are right. You might try to get an answer from the OpenFOAM foundation by posting this problem on their bug tracker: https://bugs.openfoam.org/
You most probably get a request for funding to implement it, but perhaps also an explanation, why it does not work. You could try to call db().foundObject<volScalarField>(rhoName_) (or mesh.foundObject<volScalarField>(rhoName_) ) in the solver itself with different names and output, if something was found. Perhaps, the boundary conditions are evaluated the first time before the rho field exists. But this is just a guess. Another one is, that the name is not correct (some permutation of thermo/rho/rho1/rho.water/... You could try to add |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
SimpleFoam cannot open include file | Marija | OpenFOAM Running, Solving & CFD | 1 | October 28, 2020 11:35 |
Error in compute process - No Active Application | yetlyg | FLUENT | 8 | October 27, 2018 23:30 |
Ansys Licence Serve on Ubuntu 16.04 LTS | david.pasquale | ANSYS | 2 | January 20, 2017 12:52 |
Is Playstation 3 cluster suitable for CFD work | hsieh | OpenFOAM | 9 | August 16, 2015 15:53 |
what should we do for the application of CUDA in CFD? | aerosjc | Main CFD Forum | 6 | February 25, 2013 12:01 |