Fluids

Fluids

The 6 dof results are different between using the Properties Dialog Box and the UDF function

    • kzqing
      Subscriber

      Hello. I am using Fluent to do a six dof (rigid body) simulation. The model is a valve located in a channel flow. It is a 2D model. The rigid body (the valve ) has only one DOF translation (Y direction in this case) with a spring force. I found that when setting the six dof properties in the "the six dof properties dialog box",  the results are different from that when I define the six dof properties in the UDF. 


      In the "the six dof properties dialog box", I checked "One DOF Translation", enter a value for mass (1kg for example), one DOF direction as X=0 and Y=1, Spring preload=0,  Spring constant = 100 n/m, no constrained. Then I set the CG location in the dynamic mesh zones,


      While when using the UDF, I defined the followings:


      prop[SDOF_MASS]= 1, 


      prop[SDOF_ZERO_TRANS_Y] = FALSE, 


      valve_movement_y = (DT_CG(dt)[1] - original_valve_cg_y); /* original_valve_cg_y is the original cg y location */


      net_force = (-100 * valve_movement_y); 


      prop[SDOF_LOAD_F_Y] = net_force;


      The results from the udf method show the valve can oscillate up and down, but it didn't do so when using the other method. I can't figure out the problem. Please help me here. Thank you.


       

    • Raef.Kobeissi
      Subscriber

      Hi can you please upload your case with the UDF file.


      Regards

    • kzqing
      Subscriber

      Hello. I uploaded the udf file. And the six DOF properties definition is shown in the figure. As for the case file, sorry I can't share it right now. Hope you can understand. Thank you.


    • Karthik R
      Administrator

      Hello,


      Are you trying to use the UDF to exactly replicate your original set-up using the 'Six DOF properties' settings? Is that your final goal? I guess I am trying to understand your motivation behind this UDF. Could you please elaborate?


      Thank you.


      Best Regards,


      Karthik

    • kzqing
      Subscriber

      Yes, I want to figure out why the two methods have different results. It should be the same, as long as my setup and udf are correct, right? Can you give me some hint where I did it wrong. I would appreciate it. The other settings are all the same. 


       


      Thanks,

    • kzqing
      Subscriber

       Hello. May I ask if there is any ANSYS support engineer who can help me with my question?


       


      Thanks,


       


       


       

    • Keyur Kanade
      Ansys Employee

      Hello, 


      As ANSYS employee, we can not download the attachments. Raef can download and check it. 


      Can you please insert udf in the form of an image. Also please insert images of the case/mesh you are using. 


      Thanks!


      Regards,


      Keyur

    • DrAmine
      Ansys Employee

      Hi, Just to check is your first CG position the same as in the UDF?

    • kzqing
      Subscriber

      The first CG position is the same. The only difference is the "six dof udf/properties" that I hook in the dynamic mesh zone. And I used overset mesh. Please check the images. Thank you!


      Mesh


      SixDOFproperties


      udf


      DynamicMeshZone

    • klu
      Ansys Employee

      Hi,


      Could you please double check if both cases have the inlet velocity profile hooked? I think the UDF and 6DOF panel basically are equivalent. Thus please make sure all the other settings are the same.

    • kzqing
      Subscriber

      Hi,


      I double and triple checked. I am 100% sure the inlet velocity profile is the same, as well as the other settings except for the "six dof udf/properties". That is why I am confused why the results are different. Hope you can help me here.


      Thank you.

    • kzqing
      Subscriber

      FYI. One thing I noticed during the calculation is that when using the 'Six DOF properties' panel setting, I need to decrease the time step size from 5e-5s (for the udf method) to 3e-6s (for the "six DOF properties" panel setting), only that the residuals of the dynamic mesh can drop the the value (1e-5) I set. 

    • DrAmine
      Ansys Employee

       Can you verify what the reference length is for the simulation? If not 1m, can you try setting it as such as see if there is still an issue?

    • Keyur Kanade
      Ansys Employee

      Hi, 


      Can you please cross check your overset and dynamic mesh settings. You can have a look at following video. 



      Can you please please create test case without spring constant and check. 


      Regards,


      Keyur

    • kzqing
      Subscriber

      Hello Keyur,


      I monitored the overset mesh verbosity, there is no orphan cell during the calculation, no dead cell to solve cell reported either. And I did try to run the test case without spring constant according to your suggestion, the results between the two methods become the same. But with spring constant, they are different. So the problem is possibly the spring constant. As for the reference length, the "Depth" showing in the reference values panel is "1m"


      Thanks,


      kzqing

    • kzqing
      Subscriber

      Hello Keyur,


      Do you know what is the problem here? Your help is greatly appreciated.


      Thank you,


      kzqing

    • DrAmine
      Ansys Employee

      Can you please test with the most actual release?

    • Konstantine Kourbatski
      Ansys Employee

      could it be the sign convention which is different between the UDF and built in method? Do a quick test by setting Y = -1 in the panel.

    • kzqing
      Subscriber

      Hello Amine,


      I tried Fluent 19.2. It didn't solve the problem. Neither did setting Y=-1 in the panel. I don't know which method is correct now. 


      Regards,


      kzqing

    • Keyur Kanade
      Ansys Employee

      Hello Kzqing, 


      Ok. So you tested without spring constant and the results are same. 


      Now, can you please test it by  giving a constant net force in UDF instead of using any formula. 


      Also request you to test first without overset mesh. Please use a simple test case. 


      Lets simplify the problem and go step by step to identify reason for difference. 


      Regards,


      Keyur


       


      Best practices to fully leverage the ANSYS Academic Community:


      Be efficient - As our community grows it is becoming more likely that you are not the first to ask this question. Please search before creating a new post. 


      Be clear - Provide supporting screenshots, error messages, and background information. No simulation files will be opened by ANSYS support engineers. 


      Be precise  - Please use the right tags to help our engineers find your question.


      Be patient - Please allow three days for someone to get back to you, if you have an urgent question, please email your ANSYS Account Manager. 


      Be helpful - Please help our community grow by answering other's questions and telling your academic colleagues about this resource.

    • kzqing
      Subscriber

      Hello Kzqing, 


      Ok. So you tested without spring constant and the results are same. 


      Now, can you please test it by  giving a constant net force in UDF instead of using any formula. 


      Also request you to test first without overset mesh. Please use a simple test case. 


      Lets simplify the problem and go step by step to identify reason for difference. 


      Regards,


      Keyur



       


      Hello Keyur,


      I tried a constant net force in udf and in the panel with the same preload force but with a spring constant of 0. The displacement of the CG between this two methods are still the same.


      Thanks,


      Zhaoqing

    • Keyur Kanade
      Ansys Employee

      Did you change any constraints in the panel? 

    • kzqing
      Subscriber

      No one knows the answer? Is it a Fluent's bug?

    • Keyur Kanade
      Ansys Employee

      Hi,


      Checked with developer. There shouldn't be any difference between the built in method and UDF, providing the initial spring anchor is identical. When the built-in panel is used, the spring anchor is saved when the user clicks Create in Dynamic Mesh Zones. The CG value specified at this point is saved.


      So please check your constraints in 6dof panel and CG in dynamic zones. Also I suggest to use simple test case without any overset mesh. 


       


      Regards,


      Keyur

    • kzqing
      Subscriber

      Hi,


      Checked with developer. There shouldn't be any difference between the built in method and UDF, providing the initial spring anchor is identical. When the built-in panel is used, the spring anchor is saved when the user clicks Create in Dynamic Mesh Zones. The CG value specified at this point is saved.


      So please check your constraints in 6dof panel and CG in dynamic zones. Also I suggest to use simple test case without any overset mesh. 


      Regards,




      Keyur



      Hello Keyur,


      I have changed the test case without overset mesh. The two methods still have different results. I don't know what else constraints you would like me to check. I have attached the setting in the figures, please check. Thank you.



    • Keyur Kanade
      Ansys Employee

      Hi, 


      I will be out till Monday, 12 Nov. After that I will check this with a test case and will let you know. 


      Till then others can pitch in. 


      Regards,


      Keyur

    • Keyur Kanade
      Ansys Employee

      Hello, 


      I tested with simple case without overset. I tested with GUI option as well as with UDF. 


      I got same results with both. 


      Regards,


      Keyur

    • Keyur Kanade
      Ansys Employee

      I tested all with GUI and UDF options. I posting images with using 'constant'. 




    • Keyur Kanade
      Ansys Employee


    • Keyur Kanade
      Ansys Employee

      Hi, 


      As the results are same, request you to check your other settings. 


      Regards,


      Keyur

    • kzqing
      Subscriber

      Hello Keyur,


      Thank you very much. I think I found the reason. When I tested both cases with steady state solution as initial conditions, they become the same, but when the initial conditons are both 0, their results are different, i.e. the udf method shows the oscillation of the valve while the panel method does not. It is kind of weird.


      Regards,


       

    • DrAmine
      Ansys Employee

      Hello,


      Which initialization method did u use for the case both results were not matching? Standard? Please add a screenshot.


       

    • linus2
      Subscriber

      Hi,


      I am simulating a damper model. In the 6dof method, I have given mass and gravity as the input for force and have given spring constant. my piston is also moving.

      but the problem is it goes down(-3cm in y-direction) and comes back to its initial position (0,0). after, it is not going upwards instead it goes downwards again(in real case, it should go upwards that is +3 cm in y-direction).


      how can I solve this

Viewing 32 reply threads
  • You must be logged in to reply to this topic.