CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT

moving interior nodes by udf

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By vinerm

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 8, 2018, 08:12
Default moving interior nodes by udf
  #1
New Member
 
anonymous
Join Date: Dec 2015
Posts: 14
Rep Power: 11
chris_aut is on a distinguished road
Hello everyone,

I managed to move the nodes of a boundary by using a udf.

As the geometry gets bigger by this movement I want to move the nodes of the interior as well so that the cells next to the moving boundary stay as small as wished.

Unfortunatelly the nodes move in an order I don't understand and when the movement is bigger than the size of the node there is a negative cell volume error.

To avoid this I always look for the closest nodes to the wall and let them move first. By getting the coordinates of the node I know I get the right one but the command NODE_X (v) = new x-pos. doesn't do anything. The nodes of the interior do not move at all.

Any ideas how this will work?

Thanks for your help
chris_aut is offline   Reply With Quote

Old   April 1, 2020, 05:02
Default
  #2
New Member
 
Roberto
Join Date: May 2016
Posts: 17
Rep Power: 10
RobertoCirolini is on a distinguished road
Dear chris_aut,

could you manage to solve your problem? If yes, could you tell me how you have done it?

Best regards
RobertoCirolini is offline   Reply With Quote

Old   April 1, 2020, 05:22
Default Interior Node Movement
  #3
Senior Member
 
vinerm's Avatar
 
Vinerm
Join Date: Jun 2009
Location: Nederland
Posts: 2,946
Blog Entries: 1
Rep Power: 36
vinerm will become famous soon enough
Fluent does not allow movement of interior nodes since this can lead to degenerate mesh. Only boundary nodes can be moved. Fluent uses its own algorithm to move interior nodes.
__________________
Regards,
Vinerm

PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority.
vinerm is offline   Reply With Quote

Old   April 1, 2020, 05:43
Default
  #4
New Member
 
Roberto
Join Date: May 2016
Posts: 17
Rep Power: 10
RobertoCirolini is on a distinguished road
Quote:
Originally Posted by vinerm View Post
Fluent does not allow movement of interior nodes since this can lead to degenerate mesh. Only boundary nodes can be moved. Fluent uses its own algorithm to move interior nodes.

Dear Vinerm,



thank you for your answer. Do you know if it is possible to reposition the nodes of a mesh in fluent using UDFs? I have in txt. file the new position of some region (with ID, X, Y and Z) and I am trying to import it or use a UDF to perform such task. I have read that the UDF DEFINE_GRID_MOTION would do the trick, but I could not manage it.



Any advice will be very appreciated.


Regards
RobertoCirolini is offline   Reply With Quote

Old   April 1, 2020, 05:45
Default Node repositioning
  #5
Senior Member
 
vinerm's Avatar
 
Vinerm
Join Date: Jun 2009
Location: Nederland
Posts: 2,946
Blog Entries: 1
Rep Power: 36
vinerm will become famous soon enough
Only the nodes on the external boundaries can be repositioned. You can use DEFINE_GRID_MOTION or profile for that. Do note that this repositioning should not involve sudden large movements. What's the objective of this repositioning that you want to do?
__________________
Regards,
Vinerm

PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority.
vinerm is offline   Reply With Quote

Old   April 1, 2020, 06:34
Default
  #6
New Member
 
Roberto
Join Date: May 2016
Posts: 17
Rep Power: 10
RobertoCirolini is on a distinguished road
Quote:
Originally Posted by vinerm View Post
Only the nodes on the external boundaries can be repositioned. You can use DEFINE_GRID_MOTION or profile for that. Do note that this repositioning should not involve sudden large movements. What's the objective of this repositioning that you want to do?

Dear vinerm, thank you again for your answer.



Basically I want to perform a FSI simulation. In my problem, there is a fluid passing through at green region (flow from the left to the right), generating body forces on the green zone, please see the attached figure. Thus I use ANSYS APDL to simulate the body forces acting on the green zone only (as i can export from fluent the body forces acting on each node). Moreover, I export from APDL the position of the nodes of the deformed in a txt. file. Now I want to "close the loop", so my idea was to reposition the nodes of the green area after it was deformed by the body forces.



Would you give any other suggestion?


Best regards,
Attached Images
File Type: png picture 1.png (112.7 KB, 13 views)
RobertoCirolini is offline   Reply With Quote

Old   April 1, 2020, 06:40
Default Fsi
  #7
Senior Member
 
vinerm's Avatar
 
Vinerm
Join Date: Jun 2009
Location: Nederland
Posts: 2,946
Blog Entries: 1
Rep Power: 36
vinerm will become famous soon enough
Use FSI within WB. If you do not want to use that, then load deformed mesh from APDL instead of moving nodes.
__________________
Regards,
Vinerm

PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority.
vinerm is offline   Reply With Quote

Old   April 1, 2020, 07:08
Default
  #8
New Member
 
Roberto
Join Date: May 2016
Posts: 17
Rep Power: 10
RobertoCirolini is on a distinguished road
Quote:
Originally Posted by vinerm View Post
Use FSI within WB.

Dear vinerm,

I have tried to use FSI from WB, however the system coupling function just allow interaction between walls, such as pressure distribution on walls. In my problem, the flow pass through the green region, which is a porous region. Therefore, this process generates body forces on each element of the porous region. So far I could not manage to use body forces in system coupling.



Quote:
Originally Posted by vinerm View Post
If you do not want to use that, then load deformed mesh from APDL instead of moving nodes.

As a FSI, if the porous region deforms, the fluid region should deform as well. Do you know if it is possible to load the deformed mesh (porous zone) from APDL and "match" with the fluid zones? Because I cannot see how this could be done.


Best regards
RobertoCirolini is offline   Reply With Quote

Old   April 1, 2020, 07:27
Default Fluid Structure Interaction
  #9
Senior Member
 
vinerm's Avatar
 
Vinerm
Join Date: Jun 2009
Location: Nederland
Posts: 2,946
Blog Entries: 1
Rep Power: 36
vinerm will become famous soon enough
It does not matter whether the zone is porous or not, fluid and structure always interact at the solid walls. In case of porous zone, those solid walls are inside the porous zone. However, if you want to perform FSI on a porous zone, you cannot model it as a porous zone, you have to create a geometry that represents the holes. This could be very resource intensive. If you want to model the shape change but still want to use the porous domain approach, then it is not FSI or deforming mesh that is useful. Rather you should define the resistance coefficients as a function of this shape change. Of course, the size of the domain can change as well but that does not require FSI either .
__________________
Regards,
Vinerm

PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority.
vinerm is offline   Reply With Quote

Old   April 1, 2020, 08:05
Default
  #10
New Member
 
Roberto
Join Date: May 2016
Posts: 17
Rep Power: 10
RobertoCirolini is on a distinguished road
Dear vinerm,

Thank you for your answer. It helped me a lot to understand better my problem.



Quote:
Originally Posted by vinerm View Post
If you want to model the shape change but still want to use the porous domain approach, then it is not FSI or deforming mesh that is useful. Rather you should define the resistance coefficients as a function of this shape change. Of course, the size of the domain can change as well but that does not require FSI either .

I am using the porous domain approach as I know the resistance coefficients and I can, therefore, know the body force on each element. Regarding the function you have suggested, I am not sure how to create it. At the very beginning, I thought I could create a UDF function based on the Biot formulation, however I have spent time on it and I could not figure it out.


Would you please give me some suggestions?


Regards
RobertoCirolini is offline   Reply With Quote

Old   April 1, 2020, 08:23
Default Resistance Coefficients
  #11
Senior Member
 
vinerm's Avatar
 
Vinerm
Join Date: Jun 2009
Location: Nederland
Posts: 2,946
Blog Entries: 1
Rep Power: 36
vinerm will become famous soon enough
If you know the equation or formulation that you want to use to define resistance coefficients as the simulation proceeds, you can use DEFINE_PROFILE option with C_PROFILE. This way you can change resistance coefficients in each cell after each iteration.
__________________
Regards,
Vinerm

PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority.
vinerm is offline   Reply With Quote

Old   April 1, 2020, 09:54
Default Deforming porous domain
  #12
New Member
 
Roberto
Join Date: May 2016
Posts: 17
Rep Power: 10
RobertoCirolini is on a distinguished road
Quote:
Originally Posted by vinerm View Post
If you know the equation or formulation that you want to use to define resistance coefficients as the simulation proceeds, you can use DEFINE_PROFILE option with C_PROFILE. This way you can change resistance coefficients in each cell after each iteration.

Dear vinerm,

the resistance coefficients of the porous media does not change as the simulation proceeds. The only thing that happens is a deformation of the whole porous domain caused by the body forces generated by the flow passing through it. Therefore I do not know if the UDF DEFINE_PROFILE could help.



The only way I have found to determine the deformation the porous domain is using ANSYS APDL, as I have the mechanical properties of my porous material and I know the body forces (obtained by fluent). From what I know, the UDF DEFINE_PROFILE does not allow to create a function that correlates body forces and shape change. Do you think there is another way? Please see attached a figure of what I tried to explain before. "A" is what happens before the body forces act on the porous media, and "B" is the deformed porous media.



A compression of the porous media might occur, which will change the resistance coefficient, based on Darcy law. However experiments have shown that compression for this simple case is irrelevant. Your idea of using the UDF DEFINE_PROFILE will definetly help me in the future, for a complex geometry, when compression might happen.


Best regards
Attached Images
File Type: png Untitled.png (7.7 KB, 4 views)
RobertoCirolini is offline   Reply With Quote

Old   April 1, 2020, 10:03
Default Porous Modeling and Porous Simulation
  #13
Senior Member
 
vinerm's Avatar
 
Vinerm
Join Date: Jun 2009
Location: Nederland
Posts: 2,946
Blog Entries: 1
Rep Power: 36
vinerm will become famous soon enough
What you intend to do can be done by simulating the porous medium and not by modeling it. Simulation means, as suggested in my previous post, creating a domain with real holes. Modeling on the other hand does not have any holes. As the shape changes, the outcome, as far as the fluid flow is concerned, is change in resistance coefficients as well as size change of the whole domain. That's why I mentioned modifying the resistance coefficients. If you want to do it brute force way, then APDL is the way to go, however, it has to be real domain, mix of complicated solid and fluid, and not a fluid domain representing porous model based on resistance coefficients.
RobertoCirolini likes this.
__________________
Regards,
Vinerm

PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority.
vinerm is offline   Reply With Quote

Old   April 1, 2020, 10:36
Default
  #14
New Member
 
Roberto
Join Date: May 2016
Posts: 17
Rep Power: 10
RobertoCirolini is on a distinguished road
Alright, thank you very much for your help. I will try to manage it.


Best regards
RobertoCirolini is offline   Reply With Quote

Old   October 2, 2024, 08:41
Default
  #15
New Member
 
Weisheng
Join Date: Nov 2019
Posts: 9
Rep Power: 7
cweisheng is on a distinguished road
Quote:
Originally Posted by chris_aut View Post
Hello everyone,

I managed to move the nodes of a boundary by using a udf.

As the geometry gets bigger by this movement I want to move the nodes of the interior as well so that the cells next to the moving boundary stay as small as wished.

Unfortunatelly the nodes move in an order I don't understand and when the movement is bigger than the size of the node there is a negative cell volume error.

To avoid this I always look for the closest nodes to the wall and let them move first. By getting the coordinates of the node I know I get the right one but the command NODE_X (v) = new x-pos. doesn't do anything. The nodes of the interior do not move at all.

Any ideas how this will work?

Thanks for your help
Hi Chris, can I ask if you were able to get the global node number from Fluent when you said that you are able to move the boundary nodes? I had been searching for a way to do that and came across your post here. Thanks.
cweisheng is offline   Reply With Quote

Old   October 3, 2024, 03:11
Default
  #16
New Member
 
Join Date: Oct 2024
Posts: 1
Rep Power: 0
BarbaraBelgrave is on a distinguished road
When moving nodes in the simulation, make sure that the nodes near the boundary are processed first to avoid negative volume errors. However, if the NODE_X(v) = new x-pos command does not work as expected, check the order of execution and update the nodes logically. Try to find a solution by experimenting with io games, which will help you relax and be more creative when solving the problem.
__________________
io games
BarbaraBelgrave is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
moving wall by UDF lyf FLUENT 15 August 17, 2017 08:24
Moving heat source - UDF or not? Kwiaci FLUENT 1 February 2, 2017 06:09
Moving Reference Frame (MRF) with UDF Tobard FLUENT 0 April 14, 2011 16:18
Moving Reference frame - UDF - Moving mesh modisa FLUENT 0 April 18, 2008 14:31
UDF for moving mesh sawa FLUENT 1 March 23, 2005 09:47


All times are GMT -4. The time now is 12:41.