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

rhoConst & no velocity: error

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 2, 2018, 05:27
Default rhoConst & no velocity: error
  #1
pod
New Member
 
Join Date: Jun 2015
Posts: 16
Rep Power: 11
pod is on a distinguished road
Hello everyone,
I'm using OpenFOAM version 3.0.1 and the solver chtMultiRegionFoam.
I've noticed that using rhoConst as thermoType in equationOfState in a case where there's no inlet/outlet flow makes the simulation diverge. This does not happen if an inlet velocity is applied to a boundary. Even in the tutorial case multiRegionHeater, if you set the water velocity (at the bottom of the domain) to 0, the simulation gives strange results and eventually diverges if you have constant density. If you rather set the equationOfState to perfectGas, the case works even with 0 velocity (wall condition).
Does anybody know why and how to change settings to make this solver work with static fluid (basically wall conditions without any inlet/outlet flow) and rhoConst?
Thank anyone who is willing to answer
pod is offline   Reply With Quote

Old   July 2, 2018, 16:56
Default
  #2
Member
 
Robin Kamenicky
Join Date: Mar 2016
Posts: 74
Rep Power: 11
Robin.Kamenicky is on a distinguished road
Hi pod,

Could you please share more information about your case? I am interested in it.

Anyway, what does drive your flow? You do not have any inlet, outlet, stationary internalField, constRho. Do you have some potential energy or pressure difference? In another words, are those conditions physical? I think there is quite a number of things which can go wrong. Zeros are not friendly sometimes. It leads more often to floating point errors, which is quite logical because its behavior in multiplication and division. Sometime is better to setup very low number.

Regarding the tutorial ( I use OF-5.0), if you set the velocity to be zero. There is nothing to solve. Is not it as having closed box of stationary fluid? What should OF compute?

Cheers,
Robin
Robin.Kamenicky is offline   Reply With Quote

Old   July 3, 2018, 04:47
Default
  #3
pod
New Member
 
Join Date: Jun 2015
Posts: 16
Rep Power: 11
pod is on a distinguished road
Thank you for your answer.



Quote:
Originally Posted by Robin.Kamenicky View Post

Regarding the tutorial ( I use OF-5.0), if you set the velocity to be zero. There is nothing to solve. Is not it as having closed box of stationary fluid? What should OF compute?

well, there's the heat transfer problem to solve. From the attachment you can see the geometry of my problem. The domain is divided in two parts: a solid one (one the left) and a fluid one (one the right). The boundaries are: supportExt (left surface of solid part), bottomPlate and topPlate, wedge_1 and wedge_2 (lateral), bath (on the right surface of the fluid part). The supportExt is meant to be at a fixed T higher than the rest of the domain. The bath is the only surface not being a wall and the fluid, there, is free to move even though there's no flow coming in or out. This configuration seems to work with perfectGas as thermoType, as I mentioned in the first post. However, once I change it to rhoConst, the simulation crashes.



Below the boundary conditions:
(solid)
dictionaryReplacement
{
boundary
{
bottomPlate
{
type patch;
}
topPlate
{
type patch;
}
wedge_1
{
type patch;
}
wedge_2
{
type patch;
}
supportExt
{
type patch;
}
}

T
{
internalField uniform 300;

boundaryField
{
".*"
{
type zeroGradient;
}
"support_to_.*"
{
type compressible::turbulentTemperatureCoupledBaffleMix ed;
Tnbr T;
kappa solidThermo;
kappaName none;
value uniform 300;
}
supportExt
{
type fixedValue;
value uniform 320;
}
}
}
}


/////////////////////////////////////////////////////
(fluid)
dictionaryReplacement
{
U
{
internalField uniform (0 0 0);

boundaryField
{
".*"
{
type fixedValue;
value uniform (0 0 0);
}

bath
{
type zeroGradient;
}
}
}

T
{
internalField uniform 300;

boundaryField
{
".*"
{
type zeroGradient;
value uniform 300;
}

"helium_to_.*"
{
type compressible::turbulentTemperatureCoupledBaffleMix ed;
Tnbr T;
kappa fluidThermo;
kappaName none;
value uniform 300;
}

bath
{
type fixedValue
value uniform 300;
}
}
}

epsilon
{
internalField uniform 0.01;

boundaryField
{
".*"
{
type epsilonWallFunction;
value uniform 0.01;
}

bath
{
type zeroGradient;
}
}
}

k
{
internalField uniform 0.1;

boundaryField
{
".*"
{
type kqRWallFunction;
value uniform 0.1;
}

bath
{
type zeroGradient;
}
}
}

p_rgh
{
internalField uniform 1e5;

boundaryField
{
".*"
{
type fixedFluxPressure;
value uniform 1e5;
}

bath
{
type zeroGradient;
}
}
}

p
{
internalField uniform 1e5;

boundaryField
{
".*"
{
type calculated;
value $internalField;
}
}
}
}
Attached Images
File Type: jpg geometry.jpg (33.6 KB, 10 views)
pod is offline   Reply With Quote

Old   July 3, 2018, 09:09
Default
  #4
pod
New Member
 
Join Date: Jun 2015
Posts: 16
Rep Power: 11
pod is on a distinguished road
here's the case file.
Can anybody figure out what's wrong?
with perfectGas it works fine; with rhoConst it results in crazy T and then diverges but the Courant number is still low enough.
thanks
Attached Files
File Type: gz channelFlow.tar.gz (7.2 KB, 4 views)
pod is offline   Reply With Quote

Old   July 3, 2018, 11:36
Default
  #5
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,761
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
My suspicion is here:
Code:
p
    {
        internalField   uniform 1e5;

        boundaryField
        {
            ".*"
            {
                type            calculated;
                value           $internalField;
            }
        }
    }
}

Is it right to use the calculated type?


I'm not familiar with this solver and setup, but check all your boundary conditions (the non U ones).
LuckyTran is offline   Reply With Quote

Old   July 4, 2018, 14:24
Default
  #6
Member
 
Robin Kamenicky
Join Date: Mar 2016
Posts: 74
Rep Power: 11
Robin.Kamenicky is on a distinguished road
Hi pod,

sorry for quite late answer.

What I was trying to say previously is that with velocity prescribed to (0 0 0), no pressure difference and rhoConst there will not be any flow. I would assume, It works with perfectGas since with that equation of state rho is temperature dependent and you get buoyancy force. That is not the case with rhoConst. So you end up with computing only conduction and for that Fourier's law is satisfactory. Does it run when you define perfectGas and g = (0 0 0)? If I am missing something please let me know.

Anyway p condition to be calculated make sense since you define p_rgh and p is calculated in a way p = p_rgh +rho*g*h.

I had also very very quick look at the case setup. Do you define g field? In the case is (0 0 0).

Kind regards,
Robin
Robin.Kamenicky is offline   Reply With Quote

Reply

Tags
chtmultiregionfoam, multiregionheater, rhoconst


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
[blockMesh] blockMesh with double grading. spwater OpenFOAM Meshing & Mesh Conversion 92 January 12, 2019 10:00
error compiling modified applications yvyan OpenFOAM Programming & Development 21 March 1, 2016 05:53
[OpenFOAM] Native ParaView Reader Bugs tj22 ParaView 270 January 4, 2016 12:39
Errors in UDF shashank312 Fluent UDF and Scheme Programming 6 May 30, 2013 21:30
[swak4Foam] installing funkySetFields igo OpenFOAM Community Contributions 1 November 20, 2012 21:16


All times are GMT -4. The time now is 15:45.