Problem with boundary conditions (heatTransfer)
Hi there,
i'm new at this forum and also realtively new to OpenFoam. So here is my Problem: I want to solve a HeatTransfer problem, i want to examine the cooling of a cylinder in a wind tunnel. I have a .stl file of the cylinder and my wind tunnel is a hexagon made in the blockMeshdict. I used snappyHexMesh for the .stl file. Now i have the boundaries of the wind tunnel with the walls and the inlet and outlet as well as the boundaries windtunnel_to_cylinder and cylinder_to_windtunnel. First of all i only want to look at the cooling, without any turbulence models, so i set the turbulence to off. My Problem now is by using the chtMultiRegionFoam solver, that the temperature of the cylinder isn't changing. I think, that i don't set the boundary conditions for the temperature right. So here are the initial value files for the temperature of the wind tunnel and the cylinder. Code:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Code:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // greetings Wirman |
Hi,
you should make a sketch of your setup where you show all boundaries with their names. What means windtunnel_to_cylinder and cylinder_to_windtunnel? So there is a cylinder inside your wind tunnel, and cool air flows around that cylinder? Do you resolve the solid body (cylinder) with a mesh and solve for heat conduction in the solid? From what I can guess with the few information: Yes, your boundary conditions seem to be wrong. You have two general possibilities: 1) Fix the temperature at the surface. This means that the simulation can not change the temperature because it is a boundary condition for all time. Even with the highest cooling it will not change. This is what I think what happens here, because your cylinder seems to have a fixed temperature boundary condition. But: The heat flux inside / outside the cylinder can change. This is the temperature gradient at the surface. 2) Fix the gradient of the temperature. If you set the heat flux to zero that means, that your body will heat (or cool) until it gets the temperature of the surrounding fluid. |
1 Attachment(s)
Hi,
thanks for your response. Sorry for being a bit vague, so here are some explanations. As an attachement i made a little image of my model in 2D, front and back Walls are the 3D-case and the cylinder doesn't touches the front and the back wall (so it is complete in the wind tunnel, without touching any walls) In the .stl file of the cylinder i have only one region, named cylinder_to_windtunnel (so the points in the .stl file are all boundary points of the cylinder) - i think it could be a problem that there are no inner nodes?!? - this .stl file will be meshed with snappyHexMesh out of the blockMesh from the wind tunnel. I made the same with the wind tunnel to set up the wind tunnel without the cylinder. So i have the following boundaries in the polyMesh folders of Windtunnel and Cylinder: Code:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Code:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // I see the point with the fixed Value, so i tried to change the boundary conditions to fixedGradient. So my new 0/cylinder/T file is the following: Code:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // So here is a snapshot what chtMultiRegionFoam does: Code:
Solving for fluid region windtunnel i hope you have now enough information. Thanks for your effort. greetings Wirman |
I don't know the details of that solver, but the log output sounds like you have the region "windtunnel" where the fluid flows and the region "cylinder" which is solid inside the cylinder. Is that correct?
PS: Wohoooo, this is my 1000th post. |
yes that is correct.
i tried something that i found in the planeWall2D case, which is an example for the chtMultiRegionFoam solver. i set the boundaries windtunnel_to_cylinder and cylinder_to_windtunnel to mappedWall instead of wall and then i used for the 0 files: Code:
boundaryField Code:
boundaryField here is the log of chtMultiRegionFoam Code:
Solving for fluid region windtunnel |
Ok, again: I never used that solver, but you need a coupled boundary condition for this fluid / solid intersection. This sounds familiar and makes sense. Glad it works now.
The other problem sounds like a numerical failure. Some questions: 1) Is this a transient solver? 2) Can you post more than one time step log output? 3) Can you post fvSchemes and fvSolution? |
sure i can ;-)
1.) chtMultiRegionFoam is a transient solver, the steady-state version is the chtMultiRegionSimpleFoam. 2. ) Here is the complete log of the solver. Unfortunately it terminates after 3 time steps: Code:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // fvSchemes windtunnel Code:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Code:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Code:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Code:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // |
Ok, tell me if you don't get me. The fluid solver part is something like PIMPLE. Currently you run PIMPLE in PISO mode, because you did not set nOuterCorrectors to anything higher than "1" (actually, you didn't set it at all, thus I see from your log it is set to "1").
Now, your max. Courant number is much too high for the PISO solver. Normally, this leads to numerical instabilities. I recommend to make the time step 20 times smaller, so the max. Co becomes about "0.5". See what happens. |
i think i can follow you, but i haven't dealt with the theory behind the solvers. Are there any manuals of the theory behind e.g. the chtMultiRegionFoam?
To your suggestion: There is another fvSolution file in the system ordner and there the nOuterCorrectors is set to 1. 1 or lower is PISO Mode, what are other numbers? When i make the time steps about 100 times smaller the Courant number looks good (<0.5, beetween something about 0.04 at the beginning and 0.3 at the end where it terminates) but it terminates nevertheless at a t about 0.0004. Moreover the change in temperature in the solid is very small, but that is maybe because of the short time. But the heavily decrease of the temperature in the fluid is still there... |
Your "min" value in the fluid should not become less than 300, is that what you say?
Try setting laplacian scheme to "uncorrected". Sometimes this can lead to negative wiggles. |
yep, thats what im saying ... there is a fixed temperature of 300 at the inlet and the cylinder has a temperature of 500, so why should the minimum temperature be under 300? Correct me if i overlook something ...
Setting the laplacian schemes to uncorrected doesn't help :( |
What does "checkMesh" show you?
|
checkMesh gives me an FOAM FATAL ERROR:
Code:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Code:
-- constant |
I don't know how to use checkMesh for these kind of meshes, sorry.
|
any other ideas? i thought it is actually a primitive case, so it can't be that difficult to make the solver run correctly :confused: i really dislike openFoam :mad: maybe im too stupid to use it ...
|
Don't give up that fast...
You need to spot the points where the temperature goes down in paraview. The numerics seem to be ok, so maybe it's some boundary condition error. Whatever, finding it will probably help. Edit: And you need to get checkMesh running... |
Quote:
the other thing worth looking into is how you set your thermophysicalProperties for your fluid/solid regions. |
okay, so new try:
first of all i got checkMesh running with the region option (thanks to zhengzh5) it says that the mesh is ok, but i don't know exactly what it does, so here are the log files: checkMesh cylinder: Code:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Code:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // thermophysicalProperties windtunnel (air) Code:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Code:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // |
All times are GMT -4. The time now is 03:58. |