-
-
May 27, 2023 at 1:44 pm
Paolo Melidoro
SubscriberHi,
I am currently simulating blood flow in the left atrium using Fluent and have coordinates from imaging data for the position of each node on the wall at every time step. So far I have tried prescribing these coordinates (done in 2D for now) using the define_grid_motion macro however when I preview mesh motion there seems to be no change to the mesh.
//credit to Matt Fig for code
#include "udf.h"
#include "unsteady.h"
#include "dynamesh_tools.h"
DEFINE_GRID_MOTION(UFD_MOV_WALL, domain, dt, time, dtime)
{
Thread *tf = DT_THREAD(dt);
face_t f;
Node *v;
int n,ii;
double Vx1[500] = { node position at every time step} //done for all x and y nodesSET_DEFORMING_THREAD_FLAG(THREAD_T0(tf));
begin_f_loop(f, tf)
{
f_node_loop(f, tf, n)
{
v = F_NODE(f, tf, n);
if (NODE_POS_NEED_UPDATE(v))
{
for (ii=0; ii<302;ii++)
{
if (fabs(NODE_X(v) - Vx1[ii]) < (1e-12) && fabs(NODE_Y(v) - Vy1[ii]) < (1e-12))
{
NODE_X(v) = Vx1[N_TIME % 302];
NODE_Y(v) = Vy1[N_TIME % 302];
NODE_POS_UPDATED(v);
break;
}}
}
}
}
end_f_loop(f,tf);
} -
May 31, 2023 at 12:07 pm
Prashanth
Ansys EmployeeHi,
Double check the remeshing settings, smoothing methods etc.
-
May 31, 2023 at 1:55 pm
Paolo Melidoro
SubscriberI worked out that the problem may have been that I was using the built-in compiler when compiling the UDF which was giving me a warning about not finding visual studio compiler. I am now not using the built-in compiler however now I get this error message 'fatal error C1128: number of sections exceeded object file format limit: compile with /bigobj'. This is because I need to include a large number of arrays with all the coordinates at each time step in the UDF.
I found a solution for this here - https://social.msdn.microsoft.com/Forums/vstudio/en-US/5043c081-a317-4528-a02d-d4b6e6d21543/problem-with-bigobj-when-compiled-by-other-software?forum=msbuild however when I try to include /bigobj in the makefile_nt.udf file I cannot save it as it gives me an error message about permissions.
This thread https://www.researchgate.net/post/Is-there-any-FLUENT-UDF-macro-to-replace-the-new-mesh-in-each-time-step summarises quite thoroughly what I'm aiming to do with prescribing the node position at each time step,
-
-
- You must be logged in to reply to this topic.

Boost Ansys Fluent Simulations with AWS
Computational Fluid Dynamics (CFD) helps engineers design products in which the flow of fluid components is a significant challenge. These different use cases often require large complex models to solve on a traditional workstation. Click here to join this event to learn how to leverage Ansys Fluids on the cloud, thanks to Ansys Gateway powered by AWS.

Earth Rescue – An Ansys Online Series
The climate crisis is here. But so is the human ingenuity to fight it. Earth Rescue reveals what visionary companies are doing today to engineer radical new ideas in the fight against climate change. Click here to watch the first episode.

Ansys Blog
Subscribe to the Ansys Blog to get great new content about the power of simulation delivered right to your email on a weekly basis. With content from Ansys experts, partners and customers you will learn about product development advances, thought leadership and trends and tips to better use Ansys tools. Sign up here.
- Floating point exception in Fluent
- What are the differences between CFX and Fluent?
- Heat transfer coefficient
- Difference between K-epsilon and K-omega Turbulence Model
- Getting graph and tabular data from result in workbench mechanical
- The solver failed with a non-zero exit code of : 2
- Suppress Fluent to open with GUI while performing in journal file
- Mesh Interfaces in ANSYS FLUENT
- Time Step Size and Courant Number
- error: Received signal SIGSEGV
-
7626
-
4456
-
2955
-
1427
-
1322
© 2023 Copyright ANSYS, Inc. All rights reserved.