hello,
I have a time dependent boundary conditions (Temperature for wall). First I started by simulating my problem in a steady state (time independent). Then I simulated the problem in a transient case with time independent boundary conditions (with restartfile). After that I have tried to simulate the problem in transient case with time dependent boundary conditions (I have imposed a function). However, I have notice that the program does not take into account the variation (time variations) of boundary conditions.
regards.
Time dependent in code_saturne 2.0.0
Forum rules
Please read the forum usage recommendations before posting.
Please read the forum usage recommendations before posting.
-
- Posts: 4208
- Joined: Mon Feb 20, 2012 3:25 pm
Re: Time dependent in code_saturne 2.0.0
Hello,
I assume you are using the GUI (and MEI expressions) to define your boundary conditions.
We will try to find and fix the bug, but if you post your XML file here, it may help.
In the meantime, I would recommend using a Fortran user subroutine (usclim.f90 if not using specific physics) to define your boundary conditions. It may be less comfortable, but should be assured of working while we take the time to try to reproduce and fix for the bug you describe.
Best regards,
Yvan
I assume you are using the GUI (and MEI expressions) to define your boundary conditions.
We will try to find and fix the bug, but if you post your XML file here, it may help.
In the meantime, I would recommend using a Fortran user subroutine (usclim.f90 if not using specific physics) to define your boundary conditions. It may be less comfortable, but should be assured of working while we take the time to try to reproduce and fix for the bug you describe.
Best regards,
Yvan
Re: Time dependent in code_saturne 2.0.0
Hello,
I use a Fortran user subroutine (usclim.f90) where the temperature at the wall is a function of time. Simulation works well if the case is the input of velocity time dependent.
Best regards,
Hakim.
I use a Fortran user subroutine (usclim.f90) where the temperature at the wall is a function of time. Simulation works well if the case is the input of velocity time dependent.
Best regards,
Hakim.
-
- Posts: 4208
- Joined: Mon Feb 20, 2012 3:25 pm
Re: Time dependent in code_saturne 2.0.0
Hello,
It is strange that time-dependent boundary conditions should work for velocity but not for temperature.
Since temperature is prescibed at the wall, I assume you used itypfb(ifac) = iparoi, and define the wall temperature using rcodcl(ifac, isca(iscalt), 1) using a wall law (setting icodcl(ifac, isca(iscalt), 1) to 5 is safe in this case). If you are not using a wall law, rcodcl(ifac, isca(iscalt), 2) contains the exchange coefficient and icodcl(ifac, isca(iscalt), 1) = 1)
In any case, if the exchange coefficient is not huge, you might have temperature inertia effects, so the change due to the time-dependent conditions might not be immediately visible
(you may force a change of wall modelling or use a higher heat transfer coefficient to test this).
Best regards,
Yvan
It is strange that time-dependent boundary conditions should work for velocity but not for temperature.
Since temperature is prescibed at the wall, I assume you used itypfb(ifac) = iparoi, and define the wall temperature using rcodcl(ifac, isca(iscalt), 1) using a wall law (setting icodcl(ifac, isca(iscalt), 1) to 5 is safe in this case). If you are not using a wall law, rcodcl(ifac, isca(iscalt), 2) contains the exchange coefficient and icodcl(ifac, isca(iscalt), 1) = 1)
In any case, if the exchange coefficient is not huge, you might have temperature inertia effects, so the change due to the time-dependent conditions might not be immediately visible
(you may force a change of wall modelling or use a higher heat transfer coefficient to test this).
Best regards,
Yvan
Re: Time dependent in code_saturne 2.0.0
Hello,
Thank you for your clarification, but I am trying with a reduced temperature variation and I am expecting the result. At first sight, it works but I will wait and see what will happen once the temperature value decreases and eventually I will let you know. It will take a big time because the time step is very small (0.1second). By the way, I would like to ask you one question, why the simulation diverges if I increase the time step and is there a solution so that I can work with a higher time step (60 second for instance)?
best regards,
Hakim
Thank you for your clarification, but I am trying with a reduced temperature variation and I am expecting the result. At first sight, it works but I will wait and see what will happen once the temperature value decreases and eventually I will let you know. It will take a big time because the time step is very small (0.1second). By the way, I would like to ask you one question, why the simulation diverges if I increase the time step and is there a solution so that I can work with a higher time step (60 second for instance)?
best regards,
Hakim
Re: Time dependent in code_saturne 2.0.0
Hello,
In fact, that by reducing the temperature variation, I get the results that I expect.
I am still waiting for your answer about the time step; there is there a way to increase the time step without risk of divergence in our simulation.
Best regards,
Hakim
In fact, that by reducing the temperature variation, I get the results that I expect.
I am still waiting for your answer about the time step; there is there a way to increase the time step without risk of divergence in our simulation.
Best regards,
Hakim
-
- Posts: 4208
- Joined: Mon Feb 20, 2012 3:25 pm
Re: Time dependent in code_saturne 2.0.0
Hello,
You can increase the time step up to a CFL number of 10 to 20 without too many risks. Beyond that, a crash becomes quite probable.
If a flow is steady, you may opt for the "steady flow" of "variable in time and space" time step option, which generally lead to much faster convergence than waiting to reach a steady flow regime with an unsteady algorithm. In your case, since you are using variable in time boundary conditions, this is not possible, but you may get accelleration by first initializing a "media" flow in steady regime using variable in time and space time step, then restarting the computation in "unsteady" mode, with a fixed or time-varying time step, using your time-varying boundary conditions.
And in any case, robustness of a calculation depends on many factors, notably mesh quality, but the CFL should remain below 20 (though choosing a very small time step to avoid a large CFL in only a few cells, leading to a CFL << 1 elsewhere, is not always a good option either).
So to accelerate convergence, I would recommend checking your CFL values in the "listing" file and in the postprocessing output, and once the time step is well adjusted (not need for a "too small" time step), there is not much more you can do.
For faster computation, you can, though, reduce the convergence criteria of linear solvers from the default of 1.e-8 to a more reasonble value of 1.e-5. This is usually quite sufficient, will require less iterations for each linear equation resolution, and is much less risky than using a too large time step.
Best regards,
Yvan
You can increase the time step up to a CFL number of 10 to 20 without too many risks. Beyond that, a crash becomes quite probable.
If a flow is steady, you may opt for the "steady flow" of "variable in time and space" time step option, which generally lead to much faster convergence than waiting to reach a steady flow regime with an unsteady algorithm. In your case, since you are using variable in time boundary conditions, this is not possible, but you may get accelleration by first initializing a "media" flow in steady regime using variable in time and space time step, then restarting the computation in "unsteady" mode, with a fixed or time-varying time step, using your time-varying boundary conditions.
And in any case, robustness of a calculation depends on many factors, notably mesh quality, but the CFL should remain below 20 (though choosing a very small time step to avoid a large CFL in only a few cells, leading to a CFL << 1 elsewhere, is not always a good option either).
So to accelerate convergence, I would recommend checking your CFL values in the "listing" file and in the postprocessing output, and once the time step is well adjusted (not need for a "too small" time step), there is not much more you can do.
For faster computation, you can, though, reduce the convergence criteria of linear solvers from the default of 1.e-8 to a more reasonble value of 1.e-5. This is usually quite sufficient, will require less iterations for each linear equation resolution, and is much less risky than using a too large time step.
Best regards,
Yvan
code-saturne with syrthes
Hello everybody,
Is there anyone who can give me the procedure to install code-Saturne and syrthes code, especially code syrthes? The code saturne I have already installed.
Regards,
Hakim.
Is there anyone who can give me the procedure to install code-Saturne and syrthes code, especially code syrthes? The code saturne I have already installed.
Regards,
Hakim.