CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   Can you statically rotate fluid mesh through TUI? (https://www.cfd-online.com/Forums/fluent/231649-can-you-statically-rotate-fluid-mesh-through-tui.html)

tricha122 November 12, 2020 20:00

Can you statically rotate fluid mesh through TUI?
 
Hi,

I’m having issues with unsteady solutions (https://www.cfd-online.com/Forums/fl...flow-wall.html) and i figured I could probably achieve my goals by just solving a steady state solution in various orientations of the rotating body, write out the data, and average the results.

My question is as follows: is it possible to use the TUI solve my steady state solution, and then to rotate one of the bodies in my model by X degrees, then issue another steady state solve, and so on? I would prefer to keep this all in one journal file rather than create a bunch of models.

Alternatively, if it’s possible I could solve a steady state solution, then run it unsteady / transient until it gets into position, and then run the steady solution again?

Any help greatly appreciated

GregCFD November 12, 2020 23:09

I don't think there is a way to do it directly, the modify mesh commands seem to apply to the whole domain instead of individual zones. But you can move the mesh without updating the solver using the pre-view mesh motion feature. This does mean turning on transient->mrf-to-sliding and back again but it's not much more work in a journal file (:

the command to do the 'preview' is, whats in the square brackets are the questions you get from fluent after the command.

solve/mesh-motion [time step size] [number of time steps] [display grid] [display frequency] [save picture] [enable autosave] [update monitors]

tricha122 November 13, 2020 11:15

Quote:

Originally Posted by GregCFD (Post 787610)
I don't think there is a way to do it directly, the modify mesh commands seem to apply to the whole domain instead of individual zones. But you can move the mesh without updating the solver using the pre-view mesh motion feature. This does mean turning on transient->mrf-to-sliding and back again but it's not much more work in a journal file (:

the command to do the 'preview' is, whats in the square brackets are the questions you get from fluent after the command.

solve/mesh-motion [time step size] [number of time steps] [display grid] [display frequency] [save picture] [enable autosave] [update monitors]

Thanks for the idea!

i tried to implement this today, and while i was "successful" at rotating the body in between steady state solutions, i noticed my written out nodal results dont reflect the intended rotation (and actually does not provide a consistent rotation across the nodes)

This makes me wonder if Fluent is consistent in its numbering when writing out data as follows:

;#################################################
;### Solve initial position
;
/solve/init/hyb
/solve/execute-commands/add-edit execUDF (rpgetvar'storeudm) "iteration" "/define/user-defined/execute-on-demand "on_demand_calc::HsgUDF""
/solve/execute-commands/add-edit execWRITE (rpgetvar'storeudm) "iteration" "/file/export/ascii hconv_data_stdy_rot0_%i.csv inflation () yes udm-0 udm-1 udm-2 udm-3 udm-4 udm-5 udm-6 udm-7 udm-8 udm-9 () no"
/solve/iterate 1000


;# Switch to unsteady
/define/models/unsteady-1st-order? yes
;### Rotating Fluid Zone -> 45 deg / s
/define/boundary-conditions/fluid body
; frame motion
no no no yes -1 no (rpgetvar'rz1speed) no 0 no 0 no 0 no 0 no 0 no 0 no 0 no 0 no 1 "none" no no no no no no

; mesh motion
;no no no no no 0 no 0 no 0 no 0 no 0 no 1 yes -1 no (rpgetvar'rz1speed) no 0 no 0 no 0 no 0 no 0 no 0 no 0 no 0 no 1 "none" no no no no no
;# Rotate by 45 degrees
/mesh/modify-zones/mrf-to-sliding-mesh body
/solve/mesh-motion 0.1 10 yes 1 no no no
;
;# Switch to steady state
/define/models/steady? yes
;### Rotating Fluid Zone -> 0 rpm
/define/boundary-conditions/fluid body
; frame motion
no no no yes -1 no 0.0 no 0 no 0 no 0 no 0 no 0 no 0 no 0 no 0 no 1 "none" no no no no no
;
;yes oil no no no no 0 no 0 no 0 no 0 no 0 no 1 yes -1 yes yes no 0 no 0 no 0 no 0 no 0 no 0 no 0 no 0 no 1 0 no no no no no
;
;#################################################
;### Solve position 1 (45 deg)
;
/solve/init/hyb
/solve/execute-commands/add-edit execUDF (rpgetvar'storeudm) "iteration" "/define/user-defined/execute-on-demand "on_demand_calc::HsgUDF""
/solve/execute-commands/add-edit execWRITE (rpgetvar'storeudm) "iteration" "/file/export/ascii hconv_data_stdy_rot1_%i.csv inflation () yes udm-0 udm-1 udm-2 udm-3 udm-4 udm-5 udm-6 udm-7 udm-8 udm-9 () no"
/solve/iterate 1000



would one expect the node "numbering" from position 0 to position 1 to remain consistent? or do i need to sort this myself at the end of the process? I was kind of hoping that the node "numbers" would remain the same, and positions change, so that i could use the positions at time = 0 for my mapping


All times are GMT -4. The time now is 07:17.