|
[Sponsors] |
February 2, 2015, 10:29 |
Min or Max Value in CFX-Pre
|
#1 |
New Member
Andreas
Join Date: Dec 2014
Posts: 16
Rep Power: 11 |
Hello Guys,
i have a problem simulating scour around a cylindric pile. I want to calculate a dynamic timestep with an empirical equation. for this i need the maximum value of the wall shear stress at the ground for the prevailing moment. CFX says, that it is not possible, to use maxVal(Wall Shear)@... in CFX-Pre. So how is it possible, the get a max or min value for a variable? I did a steady state simulation first, which i load as an initial .res-file for the following transient simulation, just to have initial values to read out. But as i said, i dont know a code to get the maximum of a variable in pre. Is there anybody who knows how to do it??? thanks in advance! greets flashi |
|
February 2, 2015, 16:51 |
|
#2 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,703
Rep Power: 143 |
First a comment - you will find the value of maxVal(Wall Shear) is a very noisy parameter. I think you will find it is not a good parameter to link to time step size.
I suspect you will find your equation using maxVal(Wall Shear)@... will work in the solver despite the error in CFX-Pre. CFX_Pre does not have a full CEL parser so does say some expressions are in error when they are correct and work in the solver. |
|
February 3, 2015, 03:19 |
Error in Solver
|
#3 |
New Member
Andreas
Join Date: Dec 2014
Posts: 16
Rep Power: 11 |
Hey ghorrocks,
i forgot to write that i get an error in cfx-pre (reason: maxVal) and the main error in the solver: +--------------------------------------------------------------------+ | ERROR #001100279 has occurred in subroutine ErrAction. | Message: | Invalid iteration, simulation time or timestep specifications fou- | nd. Please review these settings and restart the simulation. +--------------------------------------------------------------------+ | ERROR #001100279 has occurred in subroutine ErrAction. | Message: | Stopped in routine ALG_TIMSTEP_INFO The mesh quality < 0,2 is about 0,4%. Is it still ok? This is because i built a structured mesh for a cylinder, so 4 critical areas appear at perimeter (see attachement). the cylinder is connected per GGI to the surroundings. I can reduce Mesh-Size, but the critical quality zones will stay. I cannot reduce the timesteps, because it is to be calculated dynamically, which is the problem Maybe i should work with an unstructured mesh to improve mesh quality? What do you mean with wall shear is a noisy parameter? I could calculate Wall Shear Stress with equations and surface velocity, but i would prefer to read out the simulated values for it. thanks in advance Best regards Flashi |
|
February 3, 2015, 18:26 |
|
#4 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,703
Rep Power: 143 |
Your mesh does look pretty bad. Those very squashed elements at the boundary need fixing. Things will improve significantly when you fix that.
Wall shear stress is a derivative of the velocity field. Derivatives amplify noise. Max and min are noisy functions as they are affected by isolated spurious spikes. You are taking the max of a derivative function - I bet the result of this function is so noisy as to be useless. Average and medians reduce noise, as does integrated quantities. By the way: what is the empirical function you want to use to control time step and why do you want to use it? |
|
February 4, 2015, 01:36 |
|
#5 |
New Member
Andreas
Join Date: Dec 2014
Posts: 16
Rep Power: 11 |
Hello,
i have to develop a scour model for an offshore-structure. the first step was to develope a simple model with one phase and a dynamic mesh. So i found out, that there are papers showing how to do it with a displacement of mesh. My displacement for the z-coordinate is Dsoilnew = Dsoilold - DeltaZ where Dsoilold = areaAve(Mesh Displacement Z)@Soil and DeltaZ = MeshvelocityZ * Deltat and Deltat = DeltaZmax (here diameter of a sand particle) / MeshvelocityZmax and MeshvelocityZmax is an empirical function and includes taumax/taucrit. So i planned to import the max value of wall shear stress. Furthermore I changed taubed from an areaAve - command to a calculation taubed = sqrt(taux^2+tauy^2+tauz^2) with taux = Nx*Mu*(Velocity u.Gradient X ...) commands, and so on. Think this is the better way and hope this will work. But the maxVal problem stays. To turn the structure and to simulate easily different current-angles i built the cylindric mesh and connected it per GGI. I will try to get a better mesh then or to bury the idea of a rotating cylinder. Thank you very much for your help. Greetings Flashi |
|
February 4, 2015, 03:54 |
|
#6 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,703
Rep Power: 143 |
With regard to time step, you have two criteria to consider. You need the time step size to be small enough for your scour/mesh motion stuff to be stable and accurately model the scour, and you need the time step to be small enough for the Navier-Stokes solver in CFX to be accurate and stable. I bet the time step size you are talking about only considers the scour modelling, and I further bet the time step size CFX requires is more restrictive. In other words, if you use your proposed time step size the time step will be too big for CFX to be accurate.
If what I am saying is correct then you should use the normal CFX time step size, not your proposed one - And your problem of maxVal(Wall Shear) disappears. Have you shown that your scour model requires a finer time step than CFX requires? |
|
February 4, 2015, 04:52 |
|
#7 |
New Member
Andreas
Join Date: Dec 2014
Posts: 16
Rep Power: 11 |
I'll use a fixed small timestep now instead of a resetting dynamic one and hope to get it work. I'll post some results then.
(Next BIG problem for me is a remeshing option, but only if the previous steps will be fine. I couldnt find good info for remeshing though.) I saw your forum-engagement and want to say thanks again |
|
February 9, 2015, 11:09 |
Derivatives
|
#8 |
New Member
Andreas
Join Date: Dec 2014
Posts: 16
Rep Power: 11 |
Hello again,
my work was not successful. I start the solver for a dynamic mesh run with initial values and always get errors. I replaced the old Geometry and structured Mesh with an unstructural one for better quality of mesh. Besides I declared some Additional Variables to build the spatial derivatives of the Velocity-components which i want to use to calculate the shear stress later. LIBRARY: &replace ADDITIONAL VARIABLE: ugradxyz Option = Definition Tensor Type = VECTOR Units = [s^-1 ] Variable Type = Unspecified END END LIBRARY: &replace ADDITIONAL VARIABLE: vgradxyz Option = Definition Tensor Type = VECTOR Units = [s^-1 ] Variable Type = Specific END END LIBRARY: &replace ADDITIONAL VARIABLE: wgradxyz Option = Definition Tensor Type = VECTOR Units = [s^-1 ] Variable Type = Specific END END I found out that Vector Additional Variables cannot be directly referenced in CEL expressions. But the syntax for referencing a component of a vector Additional Variable is as follows: <Component Name>.<Additional Variable Name>_x What does <Component Name> mean for my case du/dx and du/dy and du/dz? The manual says: If an Additional Variable is defined as type Vector, the components of a vector algebraic equation can be defined at the domain level. yeah, i did that before. but here i think, component is not component I wrote this, but thats wrong: Vector xValue. ugradxyz_x Vector yValue. ugradxyz_y Vector zValue. ugradxyz_z I cant find a example with <Component Name> that makes sense for me, maybe "fluid" or something like that?. If that works, i want to use the syntax for my expressions of Taux, Tauy and TauZ. for example taux = (Normal X *viscositydyn *(2*Vector xValue. ugradxyz_x)) + (Normal Y *viscositydyn *(Vector yValue. ugradxyz_y + Vector xValue. vgradxyz_x)) + (Normal Z*viscositydyn *(Vector zValue. ugradxyz_z + Vector xValue. wgradxyz_x)) Can i calculate taubed with these expressions or do i have to use some user routines and user functions, which i dont understand well? Because sometimes i got an error like this: non scalar expression's ugradxyz only to use in integrated user functions... In addition, here are some expressions for my displacement dsoilnew in z-direction: dsoilnew = dsoilold - deltaz dsoilold = areaAve(Mesh Displacement Z)@Soil deltaZ = MeshVelo * timestep Meshvelo = constants... * taubed / taucrit Does i have to create an Additional Variable for dsoilold with an Update Loop = Trans_loop function? Im not sure about this. Normally it should get the momentary displacement with my areaAve(Mesh Displacement Z)@Soil expression, right? I know, this must be chaotic to read, as it is for me. If anything isnt clear, tell me please. I often thought, this must be logic, but it isnt and cfx always moan. Its horrible thanks in advance for any help you can give me. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
only 1 of many named selections not showing up in cfx pre | mihirbhagat | CFX | 2 | April 26, 2019 04:56 |
multiphase turbulance case floating error | harsha_kulkarni | OpenFOAM Running, Solving & CFD | 3 | February 18, 2016 05:06 |
Defining a domain in CFX Pre | ashtonJ | CFX | 1 | June 13, 2011 02:34 |
On the damBreak4phaseFine cases | paean | OpenFOAM Running, Solving & CFD | 0 | November 14, 2008 21:14 |
CFX 5.7.1 PRE and solver won't start | daniel | CFX | 1 | January 20, 2006 10:09 |