Jump to content

Talk:Computer simulation

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Rublamb (talk | contribs) at 16:26, 31 October 2023 (OneClickArchived "Adding a Link into Examples section" to Talk:Computer simulation/Archive 1). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Template:Vital article

Re Grey box completion and validation

“See also“ “Grey box completion and validation“ has been removed from this and several other topics. Following advice from Wikipedia if there are no objections (please provide your name and reasons), I plan to reinstate the reference in a weeks time.

The removed reference provides techniques for computer model development as is needed for many computer simulations. In particular most models are incomplete (i.e. a grey box) and thus need completion and validation. This reference seems to be within the appropriate content of the “See also” section see Wikipedia:Manual_of_Style/Layout#See_also_section. BillWhiten (talk) 09:31, 4 April 2015 (UTC)[reply]

Reinstated SolidPhase 5 April 2015 thanks BillWhiten (talk) 05:58, 11 April 2015 (UTC)[reply]

according to the book, you can never know the degree of elasticity

Some excerpts :

struct
{
 int elec_or_prot;
 float x,y,z; /* coordinates */
  float xv,yv,zv; /* vector components */

} atom[num_of_atoms];


while (1 ) {

/* receive the forces affecting each atom */ 
n=0;
while ( n < num_of_atoms )
{
  x_buf2=0, y_buf2=0, z_buf2=0;
  x_add=0; y_add=0; z_add=0;
  n2=0;
  while ( n2 < num_of_atoms )
  {
   if ( n2==n ) n2++;
   if (  n2 >= num_of_atoms ) break;
  
  power=
  sqrt ( 
   ( atom[n].x - atom[n2].x)  *
   ( atom[n].x - atom[n2].x )+
      ( atom[n].y - atom[n2].y) *
   ( atom[n].y - atom[n2].y)+
    ( atom[n].z - atom[n2].z) *
   ( atom[n].z - atom[n2].z) );
 
   old_power=power; /* the distance of the current atom from the foreign          atom (3D-Pythagoras)*/
  x_buf=(atom[n].x - atom[n2].x); /* distance components */
  y_buf=(atom[n].y - atom[n2].y);
  z_buf=(atom[n].z - atom[n2].z);
 
 if ( power-SCHEITEL < 0.0 ) sign= -1.0; else sign= 1.0;
  power=power-SCHEITEL; /* there's a ball around each atom and on it's edge
                          the direction of the force is inverted */
  if ( fabs(power) < 0.01 ) power=0.01*sign;
   power= ( FORCE / ((power*power)+MAXPOWER) *sign  ) ;
  if ( fabs ( power) >= FORCENULL ) power=0;

/* calculate the force that results from the distance */


         if ( old_power != 0 ) /* part the force on x, y, and z components */
         {
         y_buf*=power/old_power;
         x_buf*=power/old_power;
         z_buf*=power/old_power;
       } else x_buf=0, y_buf=0, z_buf=0;


   if ( ( atom[n].elec_or_prot==PROT
       && atom[n2].elec_or_prot==ELEK ) ||
       ( atom[n].elec_or_prot==ELEK
       && atom[n2].elec_or_prot==PROT )
      
       ) {  y_buf*=-1.0; x_buf*=-1.0; z_buf*=-1.0; } /* opposed forces
 pull together, same forces push away */


       if ( (old_power=sqrt ( x_buf*x_buf+y_buf*y_buf +z_buf*z_buf)) > TRAEGSCHWELLE )
  {
     power= (old_power-TRAEGSCHWELLE)/ old_power;
     x_buf*=power; y_buf*=power; z_buf*=power;
   }  else x_buf=0, y_buf=0, z_buf=0;  /* the vector is only changed,
   when the force has a certain minimum of strength */
  if ( old_power > 0 && old_power > TRAEGSCHWELLE)
    {
     x_buf2+=(x_buf*ELANLOSS/TIMESLICE);
     y_buf2+=(y_buf*ELANLOSS/TIMESLICE);
     z_buf2+=(z_buf*ELANLOSS/TIMESLICE);
    } /* change coordinates in force direction so the force isn't added to          the vector. This is tha actual problem. */


  x_add+=x_buf; y_add+=y_buf; z_add+=z_buf;
   n2++;
  }
         atom[n].xv+=x_add;  /* now change the vector components */
         atom[n].yv+=y_add;
         atom[n].zv+=z_add;
         atom[n].x+=x_buf2,
         atom[n].y+=y_buf2,
         atom[n].z+=z_buf2;
 n++;
}


n=0;

 while ( n < num_of_atoms )
 {
  atom[n].x+=atom[n].xv/TIMESLICE; atom[n].y+=atom[n].yv/TIMESLICE ;
   atom[n].z+=atom[n].zv/TIMESLICE;
  n++;  /* move the atoms according to their vectors */
 } 

}

That's what i made up. It's still not at an usable stage, it only simulates some collision conditions, but google for "QT Elastic Nodes Example" and you will find that the professional, working solution isn't much different from that. If you would calculate the rotation and position of a graphical depiction of a racing car from such an atom grid, for example, it would be even more impressive.

But the real problem is elasticity. In an unelastic collision, a part of the energy gets lost and is transformed into light (which then causes heat). And you can perhaps never know the amount of energy that gets lost because this also depends on the collision speed or depth. Think about it. If this does not work correctly with an algorithm, it is not possible to prove anything at all. Then not only a computer simulation would not work. — Preceding unsigned comment added by 87.143.84.134 (talk) 21:03, 9 May 2015 (UTC)[reply]

Distracting animating image

the animating image is very distracting while trying to read the text of the article, please remove the animation. Sofia Koutsouveli (talk) 13:14, 23 November 2016 (UTC)[reply]

Hello fellow Wikipedians,

I have just modified one external link on Computer simulation. Please take a moment to review my edit. If you have any questions, or need the bot to ignore the links, or the page altogether, please visit this simple FaQ for additional information. I made the following changes:

When you have finished reviewing my changes, you may follow the instructions on the template below to fix any issues with the URLs.

This message was posted before February 2018. After February 2018, "External links modified" talk page sections are no longer generated or monitored by InternetArchiveBot. No special action is required regarding these talk page notices, other than regular verification using the archive tool instructions below. Editors have permission to delete these "External links modified" talk page sections if they want to de-clutter talk pages, but see the RfC before doing mass systematic removals. This message is updated dynamically through the template {{source check}} (last update: 5 June 2024).

  • If you have discovered URLs which were erroneously considered dead by the bot, you can report them with this tool.
  • If you found an error with any archives or the URLs themselves, you can fix them with this tool.

Cheers.—InternetArchiveBot (Report bug) 21:18, 11 August 2017 (UTC)[reply]