-
-
March 23, 2021 at 2:01 pm
tahar
SubscriberMarch 23, 2021 at 3:04 pmYasserSelima
SubscriberI would try using CG_MOTION with GRID_MOTIONnMarch 23, 2021 at 6:42 pmYasserSelima
SubscriberYou might need to add this line at the end of your functions. BOTH OF THEM to avoid having different nodes working on both functions at the same time which would screw your geometrynPRF_GSYNC();nMarch 23, 2021 at 10:24 pmtahar
Subscribertank you very much Mr YasserSelima for your help whene i use CG_MOTION i alway have a negative cell volume even with small time step. and where i should put nPRF_GSYNC()nmy udfs are below and i use another udfs for data acquisition nDEFINE_GRID_MOTION(deflection,domain,dt,time,dtime) n{ n Thread *tf = DT_THREAD(dt); n face_t f; n Node *v; n real NV_VEC (velocity), NV_VEC (axis);n real NV_VEC (origin), NV_VEC (rvec);nn real x,y; n real c =0.05;n real freq = 4;n real alpha;n int n; n /* set deforming flag on adjacent cell zone */ n SET_DEFORMING_THREAD_FLAG(THREAD_T0(tf)); n NV_S (velocity, =, 0.0);n NV_D (axis, =, 0.0,0.0, 1.0);n begin_f_loop(f,tf) n { n f_node_loop(f,tf,n) n { n v = F_NODE(f,tf,n); if ( NODE_POS_NEED_UPDATE (v)) NODE_POS_UPDATED(v); alpha = 0.1; NODE_X (v)= NODE_X (v); n NODE_Y (v) = NODE_Y (v)- alpha*sin(2*M_PI*freq*time+M_PI/2);nn } n } end_f_loop(f,tf); n}nDEFINE_CG_MOTION(trans, dt, cg_vel, cg_omega, time, dtime)n{n Thread *t = DT_THREAD (dt);n face_t f;nn/*****************************************************/ n real corde = 0.1;n // real freq = 0.224;n real freq = 4;n real ho = 1;n real ao = 0.84811*(M_PI/2); /*76.33?*/n real phy = M_PI/2;n/*****************************************************/n cg_vel[0] = 0.0;n cg_vel[1] = (ho*corde*cos(2*M_PI*freq*(time+dtime)) - ho*corde*cos(2*M_PI*freq*time))/dtime; cg_omega[0] = 0.0;n cg_omega[1] = 0.0;}nnMarch 23, 2021 at 10:43 pmYasserSelima
SubscriberFor the CG_MOTION, nDo you have rotation or translational motion? nAnd why are you dividing by dtime? (Most probably you will get negative cell volume because this makes your velocity too large)nAlso you don't need to declare face_t f herenFor GRID_MOTIONnThe function gives the same NODE_X and NODE_Y formula for all points. This will result in pure translation of the airfoil, up and dowI recommend you apply one function and see the motion, then apply the second and see the motion .. then combine themnnThis line nPRF_GSYNC();nis basically asking all nodes to wait until the work of all nodes is complete before proceeding to the next line. I want you to add it at the end of both functions, so the solver does not start the second function until all nodes complete the work in the first function ... So, it is basically I am asking the solver to apply one function after the other and not to do them at the same timennMarch 24, 2021 at 8:46 amtahar
SubscriberTank you very much Mr YasserSelima for your helpnthe udfs work well in CG_MOTION UDF, The term cg_vel[1]= x-x0/dt it represent numerical velocity and it is OKnby using udf ZONE MOTION for translation the airfoil translate and deflect and evey think is fine but with Unphysical results.nby using GRID _MOTION without translation the airfoil deflectes only so it is OKnthe translation by CG MOTION is failed due to negative cell i no know why ???nMarch 24, 2021 at 1:45 pmYasserSelima
SubscriberI recommend you differentiate the equation instead of dividing by dt ... Sine / Cosine are not linear functions and approximating the derivatives like this may result in large numerical error and Large velocity which would cause negative cell volume.nnNegative cell volume might appear because of using large timestep , or because of the remesh settings.nViewing 6 reply threads- You must be logged in to reply to this topic.
Ansys Innovation SpaceEarth 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.
Trending discussions- Suppress Fluent to open with GUI while performing in journal file
- Floating point exception in Fluent
- What are the differences between CFX and Fluent?
- Heat transfer coefficient
- Getting graph and tabular data from result in workbench mechanical
- The solver failed with a non-zero exit code of : 2
- Difference between K-epsilon and K-omega Turbulence Model
- Time Step Size and Courant Number
- Mesh Interfaces in ANSYS FLUENT
- error in cfd post
Top Contributors-
2524
-
2066
-
1279
-
1096
-
457
Top Rated Tags© 2023 Copyright ANSYS, Inc. All rights reserved.
Ansys does not support the usage of unauthorized Ansys software. Please visit www.ansys.com to obtain an official distribution.
-