saying better i have a total pressure inflow bc that U goes very high(supersonic) on it.
May limitation of U have bad effect on totalpressure result?mean p0 may change indirectly? |
dear Simone and others whats your opinion about this?
Does anyone has experience in limiting on velocity?whats its effect?when we can(its true)to do that? |
In my experience, manually limiting of the velocity destroyed the continuity conservation, which always caused the solution to blow up. This is just a guess though. Have you tried running the same case in commercial software like fluent? The compressible solver of fluent is much more stable.
|
what if only constraint velocity on inflow patch in your opinion?
I have set a total pressure in inflow patch but velocity goes very high. |
why total pressure is unstable in inflow as well as outflow?
pressure after inflow patch goes low but velocity turns very high. has anyone had any experience related? |
I'm sorry I haven't. :(
|
Hello,
To answer your question about limiting the velocity or other variable, I would say that it can be a helpful thing to go through the first iterations. It can help to avoid some crazy values leading to divergence. However, as many people said, limiting the velocity can lead to continuity error (and many others). The limitation of a value is only good to help you to reach the actual state of your problem. The limitation of any variable can only be temporary ! It cannot be used during your computation. So, once you converge your case, you must use a solver that doesn't have any fake limiting process. I see that you use rhoPimpleFoam. I had lots of trouble to use this solver so the best is to share some cases. For subsonic flow, I use a fixedValue for the velocity at the intet and a fixeValue of pressure at the outlet. Usually, I use this technic: 1) I run my case with rhoSimplecFoam with very small relaxation number if needed (can go down to 0.1 or even 0.01). This is just to get a first field. You have to know that those low relaxation numbers will lead to unphysical results because it doesn't satisfy continuity and other. I usually run for few hundred or thousand of iterations. http://www.fredo490.fr/public/rhoSim...aca12-AOA4.zip 2) I run the previous case with higher relaxation number. So I use the final results from the previous solver as initialization of this solver. I usually increase all the relaxation numbers over 0.5. This should immediately converge your case and remove all unphysical behavior. http://www.fredo490.fr/public/rhoSim...a12-AOA4_2.zip 3) Finally, I use the second solver data to initialize the unsteady solver. I have found that rhoLTSPimpleFoam is more stable that rhoPimpleFoam. If you run OpenFoam 2.2, rhoLTSPimpleFoam is now a solver. If you run OpenFoam 2.1, you can use rhoPorousMRFLTSPimpleFoam where you remove all Porous zones. http://www.fredo490.fr/public/rhoLTS...aca12-AOA4.zip I have another case with a cylinder which is already in an unsteady solver: http://www.fredo490.fr/public/rhoLTS...m-Cylinder.zip I have found that for "coarse" mesh, this strategy is quite robust. However, for fine mesh you might have to play with the different relaxation number to get the data you want. Also, don't be afraid to use paraview to choose the best (the most realistic I would say) timeStep between the 1 and 2 solver. By the way, I've found your topic because I'm also looking for a velocity limiter (for a custom solver) but I don't like the hard coding you have made. I want to get something like Code:
U[cellI].component(0)=min(U[cellI].component(0), Umax); Code:
U[cellI].component(0)=min(U[cellI].component(0), T[cellI]); Code:
dimensionedScalar Umax(pimple.dict().lookup("Umax")); |
hi
thank you very much.did you resolve it? how can change the solver code to limit velocity in a few first time steps?what the loop looks like? and also what are: Code:
rDeltaTSmoothingCoeff 0.1; |
No I didn't think about it.
You can set a condition over iterations but I don't think it is good. The best is to use two different solver. Or you can also plot a warning if the velocity is too high. The two variables you showed are used in the local Euler theory. You have to study the code to see what they do. |
I had seen the code before but didn't figure out what they do.then they use in steady problems,right?
if its so so i don't need them. |
could you tell me briefly what does "Flow time scale min/max"do?
Code:
Courant Number mean: 2.352854271e-05 max: 0.01998727105 |
and why did you use localEuler in unsteady cases?isn't it only for steady state cases?
|
With the localEuler, the time becomes a variable. You can see a rDeltaT in the output files. This allows to "slow down" the time step in the area where the cells are very small.
The flow scale is relative to the local time step of the cell. It's like each cell has its own time step. The number is 1/LocalTimeStep. By the way, I think your settings have some problems. It looks like the simulation you show has a modifiable time step (or do you really use "deltaT = 2.350645117e-09" ?!). You can remove it and use a fixed time step because it is the localEuler that manage the time stepping (not anymore the solver based on the Courant Number). The localEuler is an unsteady method that helps you to reach the steady state of your simulation. It is different from a steady solver because you still have the unsteady terms in the equation. But the unsteady term is modified/smoothed to reach the steady state. It's not right to use the localEuler scheme for a real unsteady case but if your settings are good, it is a very good approximation for a low computer power cost. |
thanks.yes I use modifiable with low Co (almost .02) to residuals be small(is this work correct?)
could you briefly explain me about what does the coefficients do? Code:
rDeltaTSmoothingCoeff 0.1; (isn't it more appropriate to set rDeltaTSmoothingCoeff to .9 rather than .1 and damping to 1 in my case thats really unsteady?) and also do these coeffs work if i select another time scheme except of localEuler? thanks |
dear Heckmann my case is like shock tube but some essential differences:
1)flow in the tube is the same and homogenous everywhere at rest at start. 2)left wall starts gradually(cell by cell) to open and a high pressure flow(by boundary condition) starts to flowing in the rest flow in tube.so a shock is originated. (in fact diaphragm is replaced by gradually opening wall) so in spite of your nice algorithm I don't know how to perform that in my case. do you or anybody have some piece of advice related this subject? thanks. |
People usually use SonicFoam to run simulation of ChockTube. You need to run with small time step and try to avoid the adaptive time stepping. Choose a small enough time step and keep it constant (at least at the beginning).
|
sonicFoam doesn't have control options that rhoPimpleFoam has.
I now using rhoLTSPimpleFoam does it use adaptive time step?I have disabled rDeltaT damping and smoothing coeffs.(or do you mean maxCo by adaptive time?) |
You've mixed everything
1) rhoPimpleFoam: has one time step for all your domain. This time step can be dynamically controlled to match a criteria. In your case you use the Courant Number. So Openfoam will try to get the biggest time step possible while respecting your maximum Courant Number at the same time. (cf. Definition of Courant Number). 2) rhoLTSPimpleFoam: has many time step in your domain. Basically each cell has it own time step... You don't have one time step but many. Each local time step is automatically computed to respect a given Courant Number (different from the maxCo of rhoPimpleFoam). It is why you get the rDeltaT variable in your output which is actually your local time step value. The LTS algorithm takes 1 global time step as reference and then from this one creates many local time steps. It is stupid to ask the LTS to respect the maxCo of rhoPimpleFoam because it already respect this criteria using the local time steps. Plus, if you do so, OpenFoam is lost and it doesn't know what to do... You often finish with crazy time step (infinitely small). So in the LTS algorithm, DO NOT PUT THE ADAPTIVE TIME STEP ! |
thanks.but i'm still mixed up about rhoLTSFoam.
1)if i use cranckNicolson .5 Then still local time step is used?or only when use localEuler? 2)is using local time step good or bad for my case that's really unsteady and because of change of BC's it doesn't reach a steady-state at all and shouldn't reach. 3)how to assign damping and smoothing(and maybe other related) coefficients? It'll be very valuable for me if clarify these for me. Thanks. |
1) The LTS algorithm is only used if you set the ddt scheme a localEuler. For example in my custom mutiphase solver, I have:
Code:
ddtSchemes 2) local time stepping has the same effect as a relaxation number. When you use it, you actually make mistakes on your fields because continuity is no guaranty ! The quantity of mistake you get is somehow related to the reference time step you choose. If your reference time step is small enough, the LTS actually becomes close to a simple Euler and so you don't get extra mistake (continuity is respected). The idea while using LTS is that you need to balance the Stability vs Accuracy vs Time Step Length. The goal of LTS is to give a very good stability in your computation. The solver is so stable that it will not crash but it will give you nonphysical results. If you use a reference time step lower than the required (based on Courant Number < 0.2), the algorithm will work almost like a Euler and your results will be good. The advantage over a pure Euler, it is that your simulation will not blow up if the Courant Number temporary goes over 1. 3) those factors are based on your feeling and your case :D It is like the relaxation number, there is no universal rule. The tutorial values are usually given as "well balanced". Ps. if your goal is to get a great unsteady accuracy, definitely forget localEuler ! You need to find good global settings and a specific convergence strategy. |
All times are GMT -4. The time now is 18:49. |