CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   My Object View Rotate During Simulation (PLEASE HELP ME) (https://www.cfd-online.com/Forums/fluent/248460-my-object-view-rotate-during-simulation-please-help-me.html)

clod995 March 15, 2023 17:32

My Object View Rotate During Simulation (PLEASE HELP ME)
 
hi, I'm a beginner with the use of Ansys Fluent. I'm doing some simulations on the Tesla valve and I can't understand why when I simulate transient on Ansys Fluent, the view of the valve on the animation of the velocity and pressure contour rotates time step after time step more and more until it is arranged from horizontal to vertical position.
Please, help me. I have to solve this problem as soon as possible to complete my thesis

NickFL March 16, 2023 02:33

We are going to need a bit more information on what you mean.


- Is the geometry moving or the view?
- How are you creating the animation? The "old" way using Calculation Activities or saving as an Animation sequence with the cxa file type.

clod995 March 16, 2023 03:59

1 Attachment(s)
The geometry view start to rotate, when i simulated the stationary case, this didn't happen. I need the pressure and velocity contour. So I initialized and created the two contours. Then I clicked on calculation activities --> solution animation --> right click --> new. I followed this short video:

https://www.youtube.com/watch?v=xNdfzyTFEkQ

I think it's an option activated on the animations but I have not activated anything and i don't know how solve this problem because I would like to put videos of the trends on the final presentation.
I simulated just one second and from horizontal, at the end of the animation, the valve is in this position (see photo).
Simulating 10 seconds, it gets to make a complete turn.
Thank you so much for your help :)

NickFL March 16, 2023 04:50

1 Attachment(s)
It looks like you are using the "new" animation sequence technique. Being old, I have always done it another way which would require you to rerun your simulation. Hopefully with the new way you will not have to (if you kept all the intermediate files).


What it looks like is you have a keyframe animation set up with the first and the last having different orientations. If you look at the triad (the x,y,z in the lower right), does this move during the video? What you want to make sure of is that the first view and the second view are at the same view point (/display/views/restore my-view). My understanding is the intermediate files for the animation sequence are 3D "images" that are saved that you can use to create a new animation without having the run the simulation over. But again, I am not an expert on this part as I haven't really used it.


EDIT: Do you have something saved here (see picture) under keyframes? Can you delete these?

clod995 March 16, 2023 07:25

1 Attachment(s)
The triad while I send the simulation does not appear. If I export the animation files to ansys fluent, it saves me the images time step after time step but in any case the valve, even in the images, is increasingly rotated. Now I'm trying to export solution data during simulation. Maybe I try to open them in paraview.
However this is what appears to me in display --> views, I can't find restore (see photo). Surely there is a way to make it stay still, I just can't find it :(
Thank You so much for your help. I am really grateful that you are spending your time to help me!

clod995 March 16, 2023 07:28

1 Attachment(s)
EDIT: I have no keyframes !

NickFL March 16, 2023 07:48

1 Attachment(s)
The /display/views/restore-view is from the TUI (I said I was old). But you are missing your standard left/right/front/back. Is this a 2D simulation? What is view-0?



Like I said, I don't use these animations, so my comments can only be general thoughts based upon update seminars and such. And since Fluent just started implementing these, I think they have adjusted where things are in the menus. What do you have under your pressure and velocity animations? Do they both animations rotate at the same speed? Are you working in Workbench?



I am not in front of Fluent now, so I cannot look for more until I get into the office in the morning.


EDIT: Ok I just watched a bit of your video and have an idea. See the image below. There is a checkbox that is filled in use stored view. What happens if you uncheck this? In theory, it should use the current view you have on the screen, right?

clod995 March 16, 2023 11:03

2 Attachment(s)
Yes, it's a 2D simulation. The view-0 is a view that the program created automatically, it is a too zoomed frontal view. I'm using "front" that is the centered horizontal view. The views of pressure and velocity contour rotate with the same velocity.
I'm working in Fluent.
Unfortunately once I close the simulation file, when I reopen it, I have to send it again to get the results back. Now I'm sending two, I tried to edit something but I'm already seeing from the preview that it keeps rotating. As soon as they end, when I open the playback, I try to remove the check you showed me in the image and I'll update you. Meanwhile I'll put you some of the settings that I can change when on the animation, maybe you recognize something.
Thank you so much again for your help :):)

NickFL March 17, 2023 03:00

Quote:

Originally Posted by clod995 (Post 846393)
Yes, it's a 2D simulation. The view-0 is a view that the program created automatically, it is a too zoomed frontal view. I'm using "front" that is the centered horizontal view. The views of pressure and velocity contour rotate with the same velocity.
I'm working in Fluent.
Unfortunately once I close the simulation file, when I reopen it, I have to send it again to get the results back. Now I'm sending two, I tried to edit something but I'm already seeing from the preview that it keeps rotating. As soon as they end, when I open the playback, I try to remove the check you showed me in the image and I'll update you. Meanwhile I'll put you some of the settings that I can change when on the animation, maybe you recognize something.
Thank you so much again for your help :):)


Ok it is a 2D simulation. That explains why there is only front & back. And it looks like you are running Fluent through ANSYS Workbench. That is likely why the Storage Directory is greyed out. With 2D I don't think the traid can be made to be visible.


- You are saving these as png files. These are static images. So you are re-running the simulation each time to get a new animation, correct? Otherwise it is simply reanimating the same images over again that have the rotation.
- The one I was thinking of was the hsf file type (with a corresponding cxa file) that saves the contour it as a 3D model. The orientation can then be change after the fact without re-running the model.
- Just as a sanity check, you don't have any Frame Motion in the cell zone condition.

NickFL March 17, 2023 04:32

3 Attachment(s)
First, thank you for making me interested in looking at this new Solution Animation technique. I think it will be useful. Sometimes doing it the old way is not always better :)


So what I did is, I created a Solution Animation object like you did (see first image). But I saved it using the hsf file extension. In Workbench it saves these files in the ~projectname\dp0\FLU\Fluent directory (this is why I avoid WB like the plague). Then I ran the transient simulation. Then under Results-> Animations-> Playback, I viewed the created animation. The first attempt had the Use Stored View selected (see image 2). This was full view that was seen on the window as the simulation ran. Afterwards I unchecked the Use Stored View box. In the viewer I then zoomed into the area that I was interested in. I then ran the animation and it used this zoomed view.



I think it was pretty cool because I didn't have to know before hand where/how I wanted to visualize the data. My old way I would have to guess and get the correct view/angle and then run the simulation and hope that it comes out nice.

clod995 March 17, 2023 10:40

1 Attachment(s)
Thank you so much again for the time you spent helping me :)
The problem is (as you can see in the picture) that I can't uncheck "Use Stored View" :confused:
I tried to open solution data (extrapolated during the simulation) in paraview and also there, the valve rotate for both velocity and pressure contours.
I'm desperate, I don't know what else to do anymore. I tried running a simulation of the single valve eyelet as well and it rotates anyway.
I'm starting to think that there is some boundary condition to set to fix the geometry :(:(

NickFL March 17, 2023 10:47

If that is greyed out, that is likely because you have it set to png and not hsf in the animation settings window. The png is a static image (like jpeg) so you cannot zoom in. You will need to rerun the full transient to create the hsf files.


Is there any motion set in the Cell Zone window?

clod995 March 17, 2023 10:53

1 Attachment(s)
Ok, thank you. I'm trying to send the simulation again putting hsf files and I will update you here. Let's hope so. Fingers crossed.
This is the screen of cell zone's settings
Thank you so much again.

NickFL March 17, 2023 10:55

THERE IT IS!!! You have 1.5 radians per second rotation. That is why it is rotating.

clod995 March 17, 2023 12:07

OMG, I didn't really notice it. I stopped every simulations and i'm re-running them. THANK YOU SO MUCH, I don't know how I would have done without you, I would never have noticed!!! :)
Now, I'm trying to solve other problems related to the fact that I need at least 10 seconds of simulation. At the moment I am working with 10000 time steps and each time step is 0.001 seconds. But I'm going to try because sometimes it gives me the Floating Point error. My professor told me not to touch the mesh just the time settings. The problem is that I trained on the stationary and I'm recently approaching the transitional which is not very simple.
I hope to be able to do everything in time!!

NickFL March 17, 2023 13:08

I am glad I could help. And like I said, there was some knowledge gain for me too.



Why do you need 10 seconds of physical time? I agree with your professor, don't change the mesh at all. What is the max CFL when working with Δt = 0.001 [s]? What is the mesh size (number of elements and minimum cell volume)?



When moving to transient, are you doing NITA (Non-Iterative Time Advancement) or are you allowing for multiple iterations per time step? Allowing several iterations per time step will help it converge better (but naturally take more wall clock time), and it will be less likely to diverge with a floating-point error.


Have a good weekend!

clod995 March 19, 2023 06:33

2 Attachment(s)
Good morning and Happy Sunday :)
I need to simulate 10 seconds to see if there is a repeatable trend over time. I'll show you two photos of the settings of two simulations I sent on different geometric structures of the valve. The one that has 0.0005 s (time step size), I had to lower it because with 0.001 s, it went into error (floating point). I'm trying to understand what affects the simulation because (from what I understand) the optimal situation would be to have the lowest possible number of time steps and the largest possible time step size. Right?
Again, thank you very much and happy Sunday to you too :)

EDIT: sorry for my english, it's not the best, I know !!

clod995 March 19, 2023 09:02

1 Attachment(s)
Now I'm trying to run a simulation with a different geometry. But I don't understand why when I try to import it, it gives me this error (see photo). This has never happened to me! :(:(:(

EDIT: I solved. Although I only used underscores, it was bothered by the long name of the geometry!!! I don't know this

NickFL March 19, 2023 11:17

Yes, that makes sense that a smaller time step will converge whereas a larger time step will diverge. Is it converging within 2-4 iterations per time step at the 0.0005 [s]? What is a rough estimate of the "Residence Time"? To do this, simply take the flow path length divided by the average velocity. How does this compare to the 10 seconds?



I am not sure what you mean by optimal. Smaller time steps are good to help converge, but of course they do take longer to solve. You could have a situation where you raise the time step to be too large, and you miss an important physical phenomenon that you are interested in.



And the CFL, look it up here: https://www.cfd-online.com/Wiki/Cour...Lewy_condition . In Fluent, we are not restricted to CFL < 1, but we don't want it to be too large either.

clod995 March 19, 2023 17:19

1 Attachment(s)
The valve is 140 mm and the average velocity is 0.55 m/s, so 0.25 s.
What is the use of going to compare the residence time with 0.25 seconds? I'm sorry if I ask you questions that may be stupid but I'm trying to understand.

Thank you for your help :)

Now I'm trying to set a sinusoidal law at the input speed of the valve that varies with time, i.e. v = 0.3*sin(2*PI*10*t), but it gives me this error "RuntimeError: sin: The argument should be either dimensionless or have units of Angle but it has units of [s]", I think it is due to the presence of the variable t. I assumed that the program understood by itself that as time varies, that t varies within the sine but perhaps it is not so...:confused:

EDIT: 10 is the frequency and 0.3 the value of inlet velocity. I need of a wave that oscillates between 0.3 and -0.3
This 0.3*sin(2*PI*10[Hz]*t)*1 [m s^-1] is the only way to write the equation without errors, with the final *1 but i don't know why


All times are GMT -4. The time now is 21:34.