heated square cavity: compressible
Forum rules
Please read the forum usage recommendations before posting.
Please read the forum usage recommendations before posting.
heated square cavity: compressible
After managing to run the heated square cavity with the Boussinesq approximation with version 4.0 - see previous post -, I would like to set up the same case using the compressible solver. So far I'm having a hard time, I can only run with an extremely small timestep. Any advise would be appreciated, see case posted. Thanks in advance.
- Attachments
-
- postCompressibleCavity.tgz
- (1010.42 KiB) Downloaded 334 times
Re: heated square cavity: compressible
I changed the case setup to use a user defined initialization. When I run the case with the cs_user_initialization.f90
only one iteration is performed. Looking at the solution the results are very strange: While I impose a hot wall at the left side of the domain and a cold wall at the right side, the solution shows a hot wall at both sides.
Also, there seems to be a zero density gradient, while I would have expected a zero-pressure gradient at the wall.
Maybe someone can tell me what I'm doing wrong here, or can provide me with a working example for the compressible solver...
only one iteration is performed. Looking at the solution the results are very strange: While I impose a hot wall at the left side of the domain and a cold wall at the right side, the solution shows a hot wall at both sides.
Also, there seems to be a zero density gradient, while I would have expected a zero-pressure gradient at the wall.
Maybe someone can tell me what I'm doing wrong here, or can provide me with a working example for the compressible solver...
- Attachments
-
- compressibleNew.tgz
- (743.19 KiB) Downloaded 356 times
-
- Posts: 4208
- Joined: Mon Feb 20, 2012 3:25 pm
Re: heated square cavity: compressible
Hello,
The limitation of the compressible solver to small time steps might be "normal", though I'm not sure. The main developer for the compressible solver won't be available for 2 weeks, so I'm not sure I can confirm before that...
I'm not familiar with the compressible model, but checking the cs_user_boundary_conditions-compressible.f90 file in user examples, I see that izone and izfppp(ifac) = izone are set also, which s not the case in your file (not sure how important this is).
Also, most of what you do in cs_user_initialization is not so useful, as variables are initialized to 0 by default (so only the temperature initialization is useful).
I also recommend doing as much as possible (or everything) with the GUI, then adding code in user subroutines in an incremental fashion. This certainly helps debugging.
Regards,
Yvan
The limitation of the compressible solver to small time steps might be "normal", though I'm not sure. The main developer for the compressible solver won't be available for 2 weeks, so I'm not sure I can confirm before that...
I'm not familiar with the compressible model, but checking the cs_user_boundary_conditions-compressible.f90 file in user examples, I see that izone and izfppp(ifac) = izone are set also, which s not the case in your file (not sure how important this is).
Also, most of what you do in cs_user_initialization is not so useful, as variables are initialized to 0 by default (so only the temperature initialization is useful).
I also recommend doing as much as possible (or everything) with the GUI, then adding code in user subroutines in an incremental fashion. This certainly helps debugging.
Regards,
Yvan
Re: heated square cavity: compressible
Thank you Yvan for your reply. Is your colleague who is the developper of the compressible module available to ask him this question. The problem is the case with the current settings doesn't run at all. I think this is a very basic case so I'm wondering what I'm doing wrong !
-
- Posts: 4208
- Joined: Mon Feb 20, 2012 3:25 pm
Re: heated square cavity: compressible
Hello,
OK, I'll remind him to check the forum...
Regards,
Yvan
OK, I'll remind him to check the forum...
Regards,
Yvan
Re: heated square cavity: compressible
it seems no-one has an answer to this question, I'm looking for a tool to perform natural convection
computation using a compressible modelling since the Boussinesq approximation is not valid for my case.
computation using a compressible modelling since the Boussinesq approximation is not valid for my case.
-
- Posts: 4208
- Joined: Mon Feb 20, 2012 3:25 pm
Re: heated square cavity: compressible
Hello,
Sorry, I've been very busy lately, and forgot to remind my colleague to check this thread.
I just sent him an e-mail a few minutes ago, so you can hope for a reply within a few days...
Best regards,
Yvan
Sorry, I've been very busy lately, and forgot to remind my colleague to check this thread.
I just sent him an e-mail a few minutes ago, so you can hope for a reply within a few days...
Best regards,
Yvan
-
- Posts: 45
- Joined: Sun Sep 08, 2013 8:50 pm
Re: heated square cavity: compressible
Hello
Sorry for the late answer, I didn't see that message before.
Which Rayleigh do you intend to simulate?
I think in the tutorial of the heated square cavity with the Boussinesq approximation, the Rayleigh number is imposed by setting a value to the thermal expansion coefficient (beta), whereas when using the compressible module this is not possible (beta is given by the ideal gas law) and the Rayleigh number is imposed by setting the box side length.
Could you explain how the run stops when you only have one iteration?
edit:
[Could you send your mesh? I don't know your box side length and refinement level.] I got it.
Regards,
Erwan.
Sorry for the late answer, I didn't see that message before.
Which Rayleigh do you intend to simulate?
I think in the tutorial of the heated square cavity with the Boussinesq approximation, the Rayleigh number is imposed by setting a value to the thermal expansion coefficient (beta), whereas when using the compressible module this is not possible (beta is given by the ideal gas law) and the Rayleigh number is imposed by setting the box side length.
Could you explain how the run stops when you only have one iteration?
edit:
[Could you send your mesh? I don't know your box side length and refinement level.] I got it.
Regards,
Erwan.
-
- Posts: 45
- Joined: Sun Sep 08, 2013 8:50 pm
Re: heated square cavity: compressible
Hello again,
At the first iteration, the internal energy is negative, that's why the computation stops.
It is though because the total energy initialisation is done both in the GUI and in the subroutine, but it is not consistant.
Two properties are defined in the GUI, and two in the user subroutines, so the indicator allowing to retrieve which of the four properties the user has initialised (through the GUI or the subroutine) is set to unexpected value and the total energy is simply not initialized.
(I'll add a more explicit warning for such issues)
You can define two properties in the GUI, or one property in the GUI and one in the user subroutine, or two properties in the user subroutine.
After that, your case doesn't seem to converge anyway even by setting a small time step, but it should work if you reduce the box side length and keep the Rayleigh similitude by adapting the temperature delta or another parameter.
Regards,
Erwan.
At the first iteration, the internal energy is negative, that's why the computation stops.
It is though because the total energy initialisation is done both in the GUI and in the subroutine, but it is not consistant.
Two properties are defined in the GUI, and two in the user subroutines, so the indicator allowing to retrieve which of the four properties the user has initialised (through the GUI or the subroutine) is set to unexpected value and the total energy is simply not initialized.
(I'll add a more explicit warning for such issues)
You can define two properties in the GUI, or one property in the GUI and one in the user subroutine, or two properties in the user subroutine.
After that, your case doesn't seem to converge anyway even by setting a small time step, but it should work if you reduce the box side length and keep the Rayleigh similitude by adapting the temperature delta or another parameter.
Regards,
Erwan.
Re: heated square cavity: compressible
Thank you Erwan, I understand the issue now, I thought the subroutine would override the information specified in the user interface.In the first case I send you I adjusted the Rayleigh number by changing the density, I want a Rayleigh of about 1e6. I also ran as you suggested the case on a 10x smaller mesh, and another one adapting the gravity.
None of them worked, they seem to diverge since my temperatures keep on diminishing and I have a strange overpressure in the lower right corner.
None of them worked, they seem to diverge since my temperatures keep on diminishing and I have a strange overpressure in the lower right corner.
- Attachments
-
- cavity.tgz
- case setup
- (778.27 KiB) Downloaded 321 times