Help with DEFINE_GRID_MOTION
I'm having trouble getting DEFINE_GRID_MOTION to work. The example for grid motion in section 2.6.3 of the manual includes some macros for which I cannot find documentation but are important:
NV_VEC() SET_DEFORMING_THREAD_FLAG() NODE_POS_NEED_UPDATE() NODE_POS_UPDATED() I'm having trouble understanding how the node positions are updated. Where does the write occur? Is there are simple function for writing a new position to a node? Sample code from UDF manual 2.6.3 follows: Code:
/********************************************************** |
I'll answer my own question since I'm certain someone else will have the same question.
Operations on node geometry happen using vectors declared as real NV_VEC. Values are assigned with NV_S for scalars and NV_D for three component lists. Thus NV_S(omega, =, 0.0) gives the omega NV_VEC a scalar value of 0.0 and NV_D(axis, =, 0.0, 1.0, 0.0) makes axis = [0,1,0]. The node value is changed later with NV_V(NODE_COORD(v),+=,dx) which has the effect of adding dx to the coordinates of node v. Maybe this is obvious to other people, but it took some time for me to figure out. |
Hi TDi !
Have you understand how can you move the domain? I have to deform a flat-plate to a given geometry, where deformation is imposed by user. Can you help me? Thanks a lot. |
I didn't find cyl3d.msh in my tutorial files.
|
Here's how I did this:
In my geometry, there are multiple zones on the surface to be moved, so I keep track of the last time each was moved with a static global variable. I have changed some of the variable names due to IP concerns and have not tested this code as shown below, so I can't promise that it's free of syntax errors. In my application, the zones are moved automatically at a specified interval, but you can easily adapt this to other uses. Hope this helps. Code:
# include "udf.h" |
Hi TDi,
I'm new to this area. May I know this CG_MOTION is applicable for 3D problem ?? If I want to move a face, how should I proceed ?? Please advise !! Thanks in advance. |
dynamic mesh
i want to write a udf that it can fluctuates a diaphragm but not as a piston(rigid body). two ends of diaphragm are fixed.
which of macros of dynamic mesh must be used? please advise. |
Quote:
Have u solve thos problem? |
All times are GMT -4. The time now is 09:09. |