搜档网
当前位置:搜档网 › Easily Programmable Shared Objects For Peer-To-Peer Distributed Applications

Easily Programmable Shared Objects For Peer-To-Peer Distributed Applications

Easily Programmable Shared Objects For Peer-To-Peer Distributed Applications
Easily Programmable Shared Objects For Peer-To-Peer Distributed Applications

Easily Programmable Shared Objects For Peer-To-Peer

Distributed Applications

John Huebner School of Computer Science Carnegie Mellon University Pittsburgh, PA 15213 USA jh6p@https://www.sodocs.net/doc/8d5395505.html, https://www.sodocs.net/doc/8d5395505.html,/~jh6p

Brad A. Myers

Human Computer Interaction Institute Carnegie Mellon University

Pittsburgh, PA 15213 USA

+1 412-268-5150

bam+@https://www.sodocs.net/doc/8d5395505.html,

https://www.sodocs.net/doc/8d5395505.html,/~bam

ABSTRACT

This paper presents our experiences in implementing PERSON, a toolkit for adapting single user applications into multi-machine multi-user applications. This is achieved by providing a way to share objects in a peer-to-peer model using a programming model that emphasizes values rather than functions and ties the values together with constraints. This encourages a modular and declarative style of program design.

Keywords

Toolkits, Distributed Applications, Amulet, CSCW, Constraints

INTRODUCTION

Programming a multi-user, distributed application is significantly harder than writing an application that executes on a single machine for a single user [11]. If not using a groupware toolkit, the programmer has to explicitly create, open, and close sockets. Once the sockets are open, the programmer often has to deal with converting local data structures into byte streams to be sent over the network. This is called marshalling the data. On the receiving end, the programmer will have to unmarshall data. PERSON, which stands for PeeR-to-Peer Shared Object Network toolkit, is able to convert constraint-based single-user applications to multi-user applications with only a few lines of code. It uses a peer to peer networking model to simplify application design. Users can join and leave at any time in any order without waiting for a moderator. There is no master server. The freedom from central authority is useful for a spontaneous gathering, however, PERSON also supports a client/server relationships by allowing one host to become the central hub through which all messages pass. When a participant drops out, the system cleans up automatically. Sharing is achieved by distributing copies of the important objects in the application, one per machine, and using cross-machine equality constraints to keep the important values of the objects the same on all machines. PERSON uses an optimistic consistency strategy, of conflict detection rather than conflict avoidance, to allow reads and writes to be executed immediately. Conflicts detected using Lamport’s logical clocks[6] to detect stale data. A deterministic algorithm is used to determine the final state after stale data is received.

The process of contacting a new participant, and getting all of the current versions of the objects to them is handled transparently by PERSON. The object name space is shared across a group of hosts. The programmer need not manage multiple copies of objects, or send updates since this is handled by PERSON.

Amulet

PERSON is written in the Amulet user interface toolkit [8] in C++. Amulet has structured graphics, which is a drawing model that requires every image on the screen have an object associated with it. This allows the toolkit to take over many routine maintenance tasks such as refreshing the screen. Amulet objects have lists of value pairs called slots.

A slot has a name and can hold any type of value. Amulet is designed so that programmer’s can specify the relationships between values using arbitrary constraints. Most of a program in Amulet is defined by the values of the object slots. With this approach, there is little need for callback methods.

To the Amulet toolkit, we added a shared object system that allows the programmer to network an application simply by specifying which objects and which slots in those objects need to be shared. For example, one way to get a start button to become invisible when the game starts would be to write a constraint that makes the start button invisible when the ball becomes visible. Instead of needing a remote procedure call to tell the remote player to begin, the programmer can just make the ball visible. PERSON will propagate this change to the remote players, where the constraints on those machines will cause their start buttons to disappear.

Since we already had a large body of programs written in Amulet, we were able to convert some of them to be distributed, and observe the difficulties. The largest difficulty resulted when the variables that needed to be shared were in global variables of built in types rather than in the slots of objects. Conversion was notably easier when the original application had been programmed to have Save and Open commands, because the list of slots to save could be reused.

Peer-to-Peer

There are two major design approaches for distributed applications: peer-to-peer and client/server. In the peer-to-peer model, all communicating hosts share equal responsibility for maintaining network services. In the client/server model, central servers provide services to the client. Client/sever is the dominant model for most toolkits today. There are social consequences to any network architecture. One consequence of client/server is that the central authority, in charge of the server, has a great deal of control over how, and when, the system is used.

Although the benefits of client/server are widely known, the maintenance of a central server can sometimes be a burden. The end user may not have access to a machine with high availability and an unchanging address. If such a machine is available, the users may need to request permission to run their software on it. In addition, client/server lends itself to designs where the server user must make decisions that strongly affect how the client users may use the system. This is useful for hierarchical organizations, but inappropriate for a group of peers collaborating or playing together.

In the strict client/server design, objects are stored separately from the host that uses them. For example, CORBA stores objects in one location and does remote procedure calls on the methods [9].

A peer-to-peer model enables designs where each user is responsible for their local resources and views. For many programming tasks, such a cooperative authoring, it makes more sense for the authors to manage communications themselves with all members as peers. Peer-to-peer is also a natural model for designing games, where, each player is often equal to the others.

In PERSON, responsibility for shared state is shared equally among the peers. Once an object is shared, a copy of all shared objects on each local machine which is viewing the object. All machines are equally responsible for storing or updating that object. In contrast, many peer-to-peer systems, such as Microsoft or Apple local file sharing, are constructed as distributed client-server systems, in which each peer accesses remote resources as a client and serves its own resources for others.

Although shared objects are stored on each machine, PERSON still allows the programmer to connect the hosts in whatever way he sees fit. By programming one host to always wait for the other hosts to connect first, and requiring the other hosts to connect to a known address, the programmer could create a client/server network topology. However, the objects would still be shared between the server and the client, rather than the server having full control over the objects. Since there is no need for a central server, the programmer can write one application instead of two, which simplifies the problem of maintaining consistent state on each application.

In order to allow existing Amulet programs to be quickly and easily converted to multi-user distributed applications, we wanted to ensure the freedom of a programmer to write a program without any concern for how information is sent. To meet this goal, PERSON hides both send and receive messages, as well as the connection process. PERSON also supports manipulating arbitrary types of data so that values can be sent across networks and among different types of platforms (Windows, Macintosh, and Unix). The programmer only needs to call one procedure for each peer added and one for each object shared. The rest is managed by the system. A programmer who is concerned about performance can concentrate on minimizing the amount of shared data, rather than designing network protocols.

The next section discusses related work. The section after that highlights the important features of our system. This is followed by an example illustrating how a single machine pong game was converted into a distributed application running on multiple machines. The sections following that will review the details of the implementation, beginning at the lowest level and continuing to the type of applications that can be written with our toolkit.

Constraints

Amulet programs are declarative in nature and rely heavily on constraints to maintain the proper relationships between values. This declarative nature hides the value propagation mechanism, which allows PERSON to include network propagation transparently. For example, The ball in the pong game is constrained to be invisible if and only if the start button is visible. The start button is networked. Thus when one user presses the start button, it becomes invisible, and the local ball becomes visible. Because the start button is networked, the remote start button also becomes invisible and triggers the same constraint on the remote machine. Even relatively complex cases are handled adequately. For example, consider the case with the start button and ball above. As shown in figure 2, when the start button on machine A (labeled Button A) is made invisible, then the update will be sent to the start button on machine B (labeled Button B) and the constraint will update the ball on A (labeled Ball A).

If the network update of the Ball B arrives before the network update of Button B, then the constraint will simply re-set the same value, and propagation will stop.

If the update to Button B triggers the constraint before the network update to Ball B arrives, then the constraint will trigger an update from Ball B to Ball A. This will result in both Ball A and Ball B being updated by the network. Since the values will be the same, no constraints will be triggered, and the propagation will stop because it is prohibited from traveling back across the share it came in on.

Topology

The network topology is an arbitrary, undirected, graph, where each machine is only connected to the other machines that it names explicitly in a call to the Add method.

A star topology could be created if users agreed to all connect to one central machine that waited with Wait calls. This would approximate client/server.

The more interesting topology that we allow is chains. In a chain, each machine connects to the next. Even loops are permitted.

Under the current implementation, leaves of the graph may come and go, but nodes that connect two or more other nodes could cause a partition in the network if they dropped out. Each node only relays changes to the immediately adjacent nodes.

Conflict resolution

The current system has simple equality constraints that guarantee that the value chosen by all hosts will be the same, and will be a value sent by one of the hosts. Although this does not prevent one host from overriding another’s changes, it does prevent corrupted data. Inconsistencies may not matter and people may mediate their own actions, as noted in early GroupKit work, [5]. That paper also notes that if visible feedback of conflicts is presented, then people are able to resolve the conflict. Our policy ensures that the result converges to some host’s input. If the local machine did not win, the user will perceive the presence of the other users and act to coordinate with (or over-rule) them.RELATED WORK

One issue with multi-platform distributed applications is the marshaling and unmarshalling of data to support varying data storage designs such as byte ordering. GroupKit avoids marshalling data into byte streams by requiring the programmer to use Tcl/Tk, a language where all types are represented as character [10]. VisualOblique [2] and Programmer’s Playground [4] both provide abstractions that transparently transport data from one host to another, but both require that the application be written in from scratch in a new language. In contrast, we had written applications in amulet before the addition of network capacity and concentrated on converting these programs rather than writing new ones.

Another important issue in distributed Applications is the design of the naming services to allow applications to find the remote resources they need. For systems that share values rather than remote procedures, this takes the form of the data name space used in expressions and assignments. VisualOblique uses top level windows, which it calls forms, as collections of widgets as well as the basic unit of distribution. Values are stored as properties of widgets in form instances. The server keeps an array of handles to instances of forms, forming a hierarchical name space. Programmer’s Playground allows the programmer to package code into modules, which are components with public data that can be accessed by other modules, called published interfaces. Programmer’s Playground allows programmers to connect modules using a graphical user interface. Two modules are connected by sharing elements from the public interfaces of each module. The programmer can specify callback functions for each public data structure. A connection manager module enforces access privileges.

PERSON allows grouping objects into sets, called network groups, which are only visible to hosts who are members of that group. Within network groups, our namespace

One of the most difficult challenges of distributed shared data systems is the maintenance of consistency with respect to cause and effect when changes affect distant data. Bharat & Hudson were able to achieve a concurrency in all but read operations in their Doppler distributed constraint system, without sacrificing any causal consistency. To achieve this, they built an elaborate infrastructure into Doppler that tracked state changes with vector clocks, in a data structure that kept copies of previous states for reference, [3]. However, Doppler still required locking data during reads, which requires messages to make a round trip between hosts before a read can proceed.

There are also attempts to create high-level programming abstractions for client/server systems. Tools such as Java’s Remote Method Invocation [12] and CORBA [9] support abstractions that hide the byte stream behind local stub (client side) or skeleton (server side) proxy objects that convert to and from local data structures. These

Figure 1: Overlapping Constraints and Links

frameworks introduce as much complexity as well as hiding it, however. The setup for these frameworks often involves two or more objects and several method calls on the client side, and the server can be as complex. The main improvement is that these tools can be used for a variety of objects. Furthermore, the programmer still has to invent a protocol of method invocations and or messages to pass back and forth.

Microsoft’s DirectX gaming toolkit, uses a Lobby server for establishing connections. Even for peer-to-peer messaging [7] requires a lobby server to establish a connection. GroupKit uses a Registrar to connect its clients [11].

EXAMPLE

In a sample program, a Pong Game was converted from single machine to networked by adding a few lines of code. First the programmer specifies how the objects are to be shared and then shares the objects. Other hosts may be added before or after objects have been shared as shown below:

Am_Network.Share(paddle1,”pad1”);

Am_Network.Add(hostname)

Am_Network.Share(paddle2,”pad2”);

Am_Network.Share(ball,”netball”); The hostname is just a string which can be entered by the user as either a machine name (e.g.: https://www.sodocs.net/doc/8d5395505.html,) or its dotted decimal form, (e.g.: 128.2.209.79). The Add method can appear anywhere in a program. The human readable Internet address format has become widely used with the spread of the World Wide Web which uses it as part of the Universal Resource Locators. Even Microsoft has added IP addressing as an optional part of its file-sharing IDs.

When paddle1 is shared, it is registered with the low level as an object to share across machines.

When the value of a slot in an object changes, the new values of the object’s slots are sent to the other machines that are sharing that object. Whole objects are not sent during these updates. Amulet has a predefined slot called Am_SLOTS_TO_SAVE, which is a list that can be added to any object to indicate the slots on that object that should be stored when the object is saved to a file. The list usually includes properties that change from object to object such as color or position information. There are many slots that are omitted such as the object’s the line thickness, or border color, which are never changed within that particular application and can get their values from the parent object. PERSON uses the Am_SLOTS_TO_SAVE list to determine which parts of an object’s state need to be saved to disk. Thus, if the program was written with a “Save”command, there is no need to specify Am_SLOTS_TO_SAVE. The network system will send the slots already specified in Am_SLOTS_TO_SAVE. However, since Pong does not normally save games, these lists had to be added. The following code is added:

ball.Add(Am_SLOTS_TO_SAVE, Am_Value_List()

.Add(X_VELOCITY)

.Add(Y_VELOCITY)

.Add(Am_VISIBLE)

)

IMPLEMENTATION

The following sections detail the design used by PERSON and the lessons learned. First the underlying Connection layer that supports the network abstractions in the toolkit is described. This is followed by a description of how different values are sent across the network. The next section explains how lists and other composite types can be easily constructed using high-level functions. The Object section presents the sending and maintenance of objects. The section after that explains how the objects are kept consistent using demons which trigger in response to changes in values. Finally, here is a brief discussion about the network topology and our conflict resolution strategy. Connection Layer

The Am_Network.Add method used in the example, relies on an underlying connection service which we also wrote. The connection service handles the establishment and maintenance of the connections between all the participating machines. A socket is opened for each connection and maintained as long as the machines need to communicate. Since each connection between two hosts will have a separate socket, there is no cross-talk and data can come in from multiple hosts simultaneously without difficulty.

To establish a connection with a remote machine, Am_Network.Add calls the static method Am_Connection::Open,which returns a connection. There are two ways to call Open. If it is called with a hostname string, it will try to establish a connection with the application on the machine with that hostname, and fall back to listening for incoming connections from any host if that fails. If it is called without any parameters, it will immediately begin to listen for any incoming connection.

Figure 2: Pong-A sample networked application

This has the convenient result that if both sides call Open with the other’s address, a connection will be established regardless of who calls Open first.

The passive form of Open can be used to create a server like behavior where the application will wait for unknown incoming connections.

Sending Values

PERSON supports a strong but flexible type system, where all variables can be stored in a generic union type: Am_Value, which has an attribute that can be used to determine the type of data that it contains. This allows us to have an Am_Value_List type that can store different types of data in each position of the list, and allows us to have object slots that can store any data type.

Before a new data type may be sent or received, its type is registered. We register all of the built in types such as char, bool, short, int, long, float, double, and string as well as the composite types Am_Value_List and Am_Object. In most cases this will be all that the programmer will need, because new values of any type can be added to an object or list dynamically. If the programmer wishes to send a new type, he may write a marshaller and register it. To write a new marshaller for a composite type, the programmer must use the connection’s Send and Receive methods to send the primitive types that make up the composite type. This is how the Am_Value_List and Am_Object marshallers are written. For example, the programmer could use this technique to implement Complex Numbers by sending a pair of floats. A marshaller for the Complex Number type would extract the real and imaginary components from the custom data structure and send them, in order, by using:

my_connection.Send(my_real_float);

my_connection.Send(my_imag_float);

The unmarshaller would then receive the basic types using my_real_float=my_connection.Receive(); my_imag_float=my_connection.Receive();

A type is registered with a single method, which has three parameters: the type code that is identifies the type, and the functions to marshal and unmarshall that type. These are stored in association lists. Since the two functions are registered together in the same call as the type information, every registered type is assured both a marshaller and an unmarshaller that are consistent.

Only the marshallers for built-in types use the sockets layer. The Am_Connection::Handle_Input method, called from the main loop, checks sockets for incoming data and calls the marshallers. This is the only method, besides marshallers, in Am_Connection that uses socket calls to perform its duties. Marshallers for composite types use the Send and Receive services.

Once a connection is established, the marshaller is able to send any value supported by the system via the same Send method, and receive any supported value using Receive method. The Send method sends the type code across the network, then calls the appropriate function pointer for sending that type.

At the receiving side, when a new value is received, the type is used to find the appropriate the unmarshaller function, using another association list. This function is called to build the correct value from the network stream. Once a new variable is received it is put onto a queue for the connection that it came in on and the callback function that is registered for that connection is called to process the variable

The callback function may use Receive to get the value off the queue. The default marshallers for integers use the BSD network order functions. We wrote similar functions for float and double, which assume IEEE format, since no network order functions were implemented for floating point types. Strings are sent as lengths followed by the character streams.

For example, if a program called Send with a four byte integer as a parameter, the Send method would detect that the type was 32 bit integer and send the type-code over the network to signal the arrival of a new integer. It would then call the marshaller registered for 32-bit integers. This marshaller would use the BSD function htonl to convert the integer to network byte order and then send the reordered four bytes over the socket. On the receiving end, the incoming data would trigger the handler for socket input, Am_Connection::Handle_Input,which would detect the type-code for a 4 byte integer, and call the unmarshaller for 4 byte integers. This unmarshaller would read in the integer and use the BSD function ntohl to convert the network byte order to host byte order. The newly received integer value would then be wrapped in an Am_Value union type and placed on the queue to be used by the callback function registered with that connection

Callback functions are responsible for popping the value off the connection’s queue and acting upon it. The Am_Network layer’s callback function does nothing but pop the object off of the queue, since the real action happens as a result of constraints that depend on the values of the object’s attributes.

Lists (an example of a composite type)

Types that could contain other types, such as Lists and objects, required special attention to handle recursion such as lists within lists, or objects within objects. We also want to prevent the system from blocking while additional data was on its way. In addition, both objects and lists needed to contain items of arbitrary type. To implement this we overrode the user-defined receiver callback function so that we could re-use the receiving system. The new list simply stores the handler for the parent list, along with the partially constructed parent list on a queue in the Connection. The unmarshaller constructs the child list and returns control to its parent’s receiver callback function as its last action. The

parent list handler then takes the newly generated child list from the queue, and inserts the child list into a slot in the parent list. Construction of the parent list continues where it left off. This supports arbitrary levels of recursion. Objects

The Am_SLOTS_TO_SAVE list contains an ordered series of slot keys. This list must be in the same order on each machine that shares the object. PERSON does not depend on the slot keys being the same, which is important, since users may request slot keys dynamically to add new slots. These dynamically allocated slots may be different on different machines.

Application Level Semantics

PERSON uses network groups to determine which machines share a group of objects. A default group, Am_Network, is provided. A network group is a collection of machines that share a set of objects. When a program wants to start communicating with another program, it must add the internet address of the other program to one of its network group using the Network_Group.Add method.

The Add method takes a string argument as discussed in the example. The address can be entered in by the user, allowing these programs to be run even when there is no dedicated server, unlike the server required in GroupKit, VisualOblique, DirectPlay, and others. So long as the participants know the address of the machine of one other participant, they are able to join the group. There is no need to designate one user as the server user.

If the programmer wishes to wait for a connection without specifying a machine name, he may call Am_Network.Wait. This has the same affect as calling Add without an address, but is less confusing to read.

One potential use for network groups is in the division of labor as shown in figure #2. Network groups would allow a team of users on separate machines to divide a workspace into parts, and have group A share the objects they are working on which are distinct from the objects that group B are working on. A small moderator group C could share all the objects.

It is necessary to Share an object to each group with which the programmer wishes to share the object. When the programmer calls Share on an object, it remains shared until the programmer calls Unshare.

The Share function is a method of the network group rather than the object so that objects need not be modified in any way. Share takes an object as a parameter. For example, the command to share the object paddle1 is: Am_Network.Share(paddle1,”pad1”);

The arbitrary string in the above example serves to uniquely identify the object across all participating peers. There is no required format, but it must be unique across all machines in the network group. When an object is shared, it is registered in an association list so that it can be referred to later. Both sides require the same registered object for the system to keep a shared object consistent. When an object is received, the slots specified in Am_SLOTS_TO_SAVE are overwritten with data from the network.

Synchronize objects by using demons

When an object is shared, a reference to the object is stored and a demon is set on each of the slots listed in the Am_SLOTS_TO_SAVE list. If one of the slots in an object’s Am_SLOTS_TO_SAVE list contains another object, the network demon is set on the contained object as well and so on recursively.

When the value of a shared object’s slot changes, its demon is put into an execution queue. If multiple changes are made to the slots of that object, the demon waits in the queue until some other operation is performed such as requesting the value of one of the slots of the object, operating on a different object, or reaching the end of the event loop. At that time, the demon activates and sends the object to each of the participants in turn.

Before an object is received, it should be Shared. Once the object is shared on both sides, all subsequent references to that name will refer to the same object, regardless of which side sent the update. This way the system knows what to do with the new information. For example, it knows what constraints should be alerted of changes in slot values. If the programmer wants to be able to dynamically create objects on a remote screen, they program also needs to know that these new objects need to be part of the screen. In our design, this could be done by creating a group on both sides and adding the group to the desired window. Then objects could be added and removed from the group and appear on the screen as they would be expected to do.

When a shared object is received, a new slot called Am_NET_IN_PROGRESS is added which contains the address of the connection that sent the update. The network demons check for the presence of this slot and do not send

Figure 3: Moderated Parallel Work.

updates to connections named in the Am_NET_IN_PROGRESS slot of the object being updated. This prevents loops involving an incoming update from triggering an update back to the host that sent the original update. This slot is deleted once the object is completely constructed and placed on the connection queue.

FUTURE WORK

At the time of the writing of this paper, we have implemented the marshallers for all basic types as well as Strings, Am_Value_Lists and Objects. The establishment of connections and sending and receiving supported types are complete for the Am_Network_Group.

One way we hope to increase performance is by sending partial updates. Currently all slots in the Am_SLOTS_TO_SAVE list are sent every time the object is changed. In the future we may implement sending only the changed slots with their slot key and analyze the performance benefits.

In the future we plan to add more robust networking in the form of a new network group type that is fully connected, called Am_Fully_Connected_Network_Group. This new network group would ensure that all participants

in a group see the same members in that group. The new group, which will be called, will demand that each node send updates directly to all the other nodes in its group. This design would require each machine to pass along the list of all members of that group so that each member could directly communicate with the others. This would provide fault tolerance for node failures and increased availability. For example, if host A connected to host B and machine B connected to machine C, machine B could drop out and leave machine A connected to machine C.

This is illustrated in figure 4, where Step 1 shows the initially unconnected nodes. Step 2 shows A connecting to B. Step 3 Shows B Connecting to C. In step 4, the current Am_Network_Group simply completes the connection between B and C, whereas Am_Fully_Connected_Network_Group would establish an additional connection between C and A. In step five, B looses its network connection. In step six, A and C are isolated under the current design, but still have a working connection in the fully connected design

We would also like to expand the types of objects that are supported to include automatic sharing of objects created from objects that are already shared. Other enhancements would include supporting the deletion of shared objects, either by simply unsharing them or providing some mechanism for safely deleting remote objects. We would like to be able to add slots to the Am_SLOTS_TO_SAVE list while an object is shared. We would also like to explore the implications of sharing visible windows directly rather than their parts as well as supporting updates to lists where list members are added or deleted. Also applies to objects who have new sub-objects set in a shared slot.

.Other directions that we might take PERSON include sending command objects to support network undo as a concurrency control mechanism, as GINA [1] does, or making our naming scheme hierarchical.

Conclusion

Our experiences support the evidence presented by VisualOblique and Programmer’s Playground that the declarative programming style provides an excellent method for abstracting the complexities of designing distributed multi-user applications. In addition, we also demonstrated the usefulness of constraints in a distributed setting. Unlike VisualOblique which had a large number of callbacks, our system used constraints (Reference spaghetti code paper?). We simplified the naming process, while supporting information hiding through the use of network groups. Our session establishment process is basic, but capitalizes on the recent public familiarity with internet addresses because of the proliferation of the world wide web.

The largest problem we are experiencing is poor performance. We found that the choice of which slots to send was crucial to acceptable performance. In an early version of the pong game, we simply shared the position slots of the ball. This resulted in updates arriving a few seconds late, even on a our local LAN, which caused synchronization problems. When we shared the velocity of the ball rather than the position, the game became playable.

Figure 4: Advantages of a Fully Connected Design

ACKNOWLEDGMENTS

This research was partially sponsored by NCCOSC under Contract No. N66001-94-C-6037, Arpa Order No. B326. The views and conclusions contained in this document are those of the authors and should not be interpreted as representing the official policies, either expressed or implied, of the U.S. Government.

REFERENCES

1. Berlage, T. and Genau, A., “A Framework for Shared Applications with a Replicated Architecture,” in Proceedings of the ACM SIGGRAPH Symposium on User Interface Software and Technology, 1993, pp. 249-257.

2. Bharat, K. and Brown, M.H. “Building Distributed, Multi-User Applications by Direct Manipulation,” in Proceedings UIST’94: ACM SIGGRAPH Symposium on User Interface Software and Technology. 1994. Marina del Rey, CA: pp. 71-81.

3. Bharat, K. and Hudson, S.E. “Supporting Distributed, Concurrent, One-Way Constraints in User Interface Applications” in Proceedings UIST’95: ACM SIGGRAPH Symposium on User Interface Software and Technology. 1995, pp. 121-132

4. Goldman, K.J., et al., “The Programmer's Playground: I/O Abstraction for User Configurable Distributed Applications.” IEEE Transactions on Software Engineering, 199

5. 21(9): pp. 735-74

6. http;//https://www.sodocs.net/doc/8d5395505.html,/cs/playground/papers.html.5. Greenberg, S. and Marwood, D., “Real Time Groupware as a Distributed System: Concurrency Control and its Effect on the Interface,” in Proceedings of ACM CSCW’94 Conference on Computer-Supported Cooperative Work, 1994, pp. 207-21

7.

6. Lamport, L. “Time, Clocks, and the Ordering of Events in a Distributed System.” Communications of the ACM, 1978. 21 (7): pp. 558-56

7. Microsoft, “DirectX Online Help.” 1997. https://www.sodocs.net/doc/8d5395505.html,.

8. Myers, B.A., et al., “The Amulet Environment: New Models for Effective User Interface Software Development.” IEEE Transactions on Software Engineering, 1997. 23(6): pp. 347-365.

9. OMG, “CORBA 2.2 Specification.” 1998. OMG Technical Document formal/98-02-01

https://www.sodocs.net/doc/8d5395505.html,/corba/corbaiiop.htm.

10. Roseman, M. “Tcl/Tk as a basis for groupware,” in Tcl/Tk Workshop. 1993.

11. Roseman, M. and Greenberg, S., “Building Real Time Groupware with GroupKit, A Groupware Toolkit.” ACM Transactions on Computer Human Interaction, 1996. 3(1): pp. 66-106.

12. Sun, “Java RMI reference.” https://www.sodocs.net/doc/8d5395505.html,

PDMS中文教程结构建库

VPD VANTAGE Plant Design System 工厂三维布置设计管理系统 PDMS结构建库 培训手册

型钢库 PDMS已经提供了较完善的元件库,包括型材截面、配件和节点库。但不一定十分齐全,所以PDMS提供了非常方便的建库工具,这些功能都可在PARAGON中实现。 设计库、元件库和等级库之间的关系 等级库(Specificaion)是设计库与元件库之间的桥梁。设计者在等级库中选择元件后,等级中的元件自动找到对应的元件库中的元件;元件库中的几何形状和数据被设计库参考。如下图。 型钢库层次结构 型钢库World下包含了许多元件库和等级库,它们也是一种树状结构库。下图就是型钢库层次结构: 型钢等级库层次结构 等级库相当于元件库的索引,其目的是为设计人员提供一个选择元件的界面,它的层次结构既与界面的关系如下图所示。 本章主要内容: 1.定义型钢截面(Profile) 2.定义型钢配件(Fitting) 3.定义节点(Joint) 定义型钢截面(Profile) 练习一:定义型钢截面库 1.元件库最终的层次结构如下: 2.以管理员身份(如SYSTEM)登录PARAGON模块,再进入Paragon>Steelwork子模块。 3.在 4.选择菜单Create>Section,创建新的STSE, 5.在刚创建的STSE下,选择菜单Create>Element,创建三个元素:“ref.DTSE”、“ref.GMSS”和“ref.PTSS”。 现在的数据库结构如下: 6.设置。选择Settings>Referance Data… 和Display>Members…按下图设置: 7.鼠标指向CATA层,选择菜单Create>Section,创建新的STSE:example/PRFL/BOX。8.选择菜单Create>Category>For Profiles,创建新的STCA,如下图: 9.鼠标指向STCA:example/PRFL/REF.DTSE层,在命令行中键入命令:“NEW DTSE /BOX/EQUAL/DTSE”,这样新建了一个DTSE,如下图。 10.创建截面本身。选择菜单Create>Profile,按下图设置:

Plaxis中常见问题集锦

1 问:Geo FEM,Plaxis,Z-Soil软件比较? 2008/6/5 9:34:48 答:三者针对某个算例计算结果相差不大,误差在可接受范围之内。 就易用性来说,Plaxis好于Z-Soil好于GEO。Plaxis大家都用得很多了,Z-Soil的建模可以在前 处理模块中用CAD元素绘制,或者通过dxf文件导入;GEO4只能输入剖面线的坐标,比较烦琐。 Plaxis和Z-soil基本可以解决岩土工程所有问题,但GEO4由于建模功能的限制,只能解决隧道、 边坡等相关问题;Plaxis和Z-Soil可以进行渗流分析(非饱和)包括流固偶合分析。 总的来说,Plaxis和Z-Soil是专业的岩土工程有限元程序;GEO FEM是GEO4里面的一个工具 包,而GEO4类似于国内的理正一样,是遵循Eurocode的设计软件。 2 问:在plaxis中,用折减系数作出它的几个滑裂面,如何查看滑裂面的角度、圆心、半径等 这些滑裂面的相关参数呢? 2008/6/5 9:36:26 答:使用强度折减法,不用假定slip surface,故不会有这些数据。 3 问:Plaxis怎么模拟路堤分步填筑?在实际施工中,填筑不是一次加载的,可能先填一半, 过个月再填一半,而且这一半也不是一次填完,要在几天内完成,请问怎么在Plaxis中模拟,怎 么设置可以反应填筑速率,请高手指教? 2008/6/5 9:47:25 答:手册里有相关例子,你可以参考一下lesson 5。 堆载速率可以通过设置堆载这个stage的时间间隔来设置。如果只有基本模块,可以设置mstage 的数值。mstage=1.0,说明100%施加上去了,mstage=0.1,说明只有10%的荷载。由于Plaxis 不能设置load function,比较麻烦。当然,你可以将一层土细分成几个stage完成,也可以实现。 4 问:Plaxis 3D 用这个软件分析基坑时,基坑是钢格栅喷混凝土支护,支护用板来模拟,EI 和EA中的I和A分别指哪个面的惯性矩和面积,以及单位后面的/m应该是哪个长度? 2008/6/5 9:49:13 答:应该是:A=沿着洞轴方向L×厚度d E是弹性模量I是惯性矩 5 问:在网上看到有人怀疑Plaxis 3D Foundation和3D Tunnel的真三维性,有人说它们不是 真正的三维计算,有谁知道是怎么回事吗? 2008/6/5 9:59:42 答:Plaxis 3D Tunnel计算内核是三维的。但是目前只支持平面拉伸建模,建附加模型还存在困 难。3D Tunnel的确不能生成复杂的斜交隧道。 3D Foundation是专门解决基础问题的三维有限元计算软件。其解决基础问题要比FLAC3D要专 业,特别是考虑了一些工程实际,但开放性不如FLAC3d。近期3D Foundation将在此方面有重 大改进,新版本前处理借用GID作为前处理工具。Plaxis 系列优点长处是其理论,尤其是hs和 hs-small模型。 6 问:最近在算一个基坑,很好的地质条件,桩、撑刚度都取得很大,居然算出来水平位移始终 都有70mm左右,但用同济启明星算水土分算,并且参数都没有取最大值,算的结果只有17mm 左右。深圳规范要求水平位移不超过30mm,要是用Plaxis是很难算出小于规范值的结果的,事 实上,也不至于有那么大的位移的? 2008/6/5 10:05:32 答:主要问题是现在很多地质报告都不提供三轴的试验参数:例如E50模量,Eur模量,Es模量, 有效强度指标等;土体的本构参数比较特殊,要做特殊的试验,因此一般的项目参数方面的确有 问题。不过,即便是只有Es模量和直剪固快指标,通过换算和引入K0、孔隙比、Cc,Cs等其 他参数,也是可以得到其他需要的参数,不过这需要比较扎实的本构模型方面的知识和岩土工程 经验,知道不同的本构适合模拟什么土层,知道本构的优点和局限性,这对使用者的要求的确比 较高。 7 问:隧道已经组成一个类组,所以一定要对其进行材料定义。如果不定义得话,就不能对其 进行网格划分,这要怎么解决呢? 2008/6/5 10:08:42 答:你是不是只想模拟基坑开挖对既有隧道结构的影响,而省略掉前面隧道开挖过程的模拟。 这样的话,结果恐怕很难正确,而且会碰到你所说的问题。因为隧道在基坑开挖前,有一定的受

C++中函数调用时的三种参数传递方式

在C++中,参数传递的方式是“实虚结合”。 ?按值传递(pass by value) ?地址传递(pass by pointer) ?引用传递(pass by reference) 按值传递的过程为:首先计算出实参表达式的值,接着给对应的形参变量分配一个存储空间,该空间的大小等于该形参类型的,然后把以求出的实参表达式的值一一存入到形参变量分配的存储空间中,成为形参变量的初值,供被调用函数执行时使用。这种传递是把实参表达式的值传送给对应的形参变量,故称这种传递方式为“按值传递”。 使用这种方式,调用函数本省不对实参进行操作,也就是说,即使形参的值在函数中发生了变化,实参的值也完全不会受到影响,仍为调用前的值。 [cpp]view plaincopy 1./* 2. pass By value 3.*/ 4.#include https://www.sodocs.net/doc/8d5395505.html,ing namespace std; 6.void swap(int,int); 7.int main() 8.{ 9.int a = 3, b = 4; 10. cout << "a = " << a << ", b = " 11. << b << endl; 12. swap(a,b); 13. cout << "a = " << a << ", b = " 14. << b << endl; 15.return 0; 16.} 17.void swap(int x, int y) 18.{ 19.int t = x; 20. x = y; 21. y = t; 22.}

如果在函数定义时将形参说明成指针,对这样的函数进行调用时就需要指定地址值形式的实参。这时的参数传递方式就是地址传递方式。 地址传递与按值传递的不同在于,它把实参的存储地址传送给对应的形参,从而使得形参指针和实参指针指向同一个地址。因此,被调用函数中对形参指针所指向的地址中内容的任何改变都会影响到实参。 [cpp]view plaincopy 1.#include https://www.sodocs.net/doc/8d5395505.html,ing namespace std; 3.void swap(int*,int*); 4.int main() 5.{ 6.int a = 3, b = 4; 7. cout << "a = " << a << ", b = " 8. << b << endl; 9. swap(&a,&b); 10. cout << "a = " << a << ", b = " 11. << b << endl; 12. system("pause"); 13.return 0; 14.} 15.void swap(int *x,int *y) 16.{ 17.int t = *x; 18. *x = *y; 19. *y = t; 20.} 按值传递方式容易理解,但形参值的改变不能对实参产生影响。 地址传递方式虽然可以使得形参的改变对相应的实参有效,但如果在函数中反复利用指针进行间接访问,会使程序容易产生错误且难以阅读。

中文参考手册-PLAXIS 2D--岩土三维建模分析

参 考 手 册

目录 1简介 (7) 2 一般说明 (7) 2.2 文件处理 (9) 2.3 帮助工具 (9) 2.4 输入方法 (10) 3 输入前处理 (10) 3.1 输入程序 (10) 3.5 荷载和边界条件 (28) 4 材料属性和材料数据组 (33) 4.1 模拟土体及界面行为 (35) 4.1.1 一般标签页 (35) 4.1.2 参数标签页 (39) 4.1.3 渗流参数标签页 (50) 4.1.4 界面标签页 (56) 4.1.5 初始标签页 (61) 4.2 不排水行为模拟 (63) 4.2.1 不排水(A) (64) 4.2.2 不排水(B) (64) 4.2.3 不排水(C) (64) 4.3 土工试验模拟 (64) 4.3.1 三轴试验 (67) 4.3.2 固结仪试验 (68) 4.3.3 CRS (68) 4.3.4 DDS (69) 4.3.6 结果 (70) 4.4 板的材料数据组 (70) 4.4.1 材料数据组 (71) 4.4.2 属性 (71)

4.5.1 材料数据组 (74) 4.5.2 属性 (74) 4.6 锚杆的材料数据组 (75) 4.6.1 材料数据组 (76) 4.6.2 属性 (76) 4.7 几何构件的材料数据组赋值 (76) 5 计算 (77) 5.1 计算程序界面 (77) 5.2 计算菜单 (78) 5.3 计算模式 (79) 5.3.1 经典模式 (80) 5.3.2 高级模式 (80) 5.3.3 渗流模式 (81) 5.4 定义计算阶段 (81) 5.4.1 计算标签页 (81) 5.4.2 插入或删除计算阶段 (82) 5.4.3 计算阶段的标识和顺序 (82) 5.5 分析类型 (83) 5.5.1 初始应力生成 (83) 5.5.2 塑性计算 (85) 5.5.3塑性(排水)计算 (85) 5.5.4 固结(EPP)分析 (85) 5.5.5 固结(TPP)分析 (86) 5.5.6 安全性(PHI/C折减) (86) 5.5.7 动力分析 (87) 5.5.8 自由振动 (87) 5.5.9 地下水渗流(稳态) (88) 5.5.10 地下水渗流(瞬态) (88) 5.5.11 塑性零增长步 (88)

函数参数传递的原理

函数参数传递的原理 参数传递,是在程序运行过程中,实际参数就会将参数值传递给相应的形式参数,然后在函数中实现对数据处理和返回的过程,方法有按值传递参数,按地址传递参数和按数组传递参数。 形参:指出现在Sub 和Function过程形参表中的变量名、数组名,该过程在被调用前,没有为它们分配内存,其作用是说明自变量的类型和形态以及在过程中的作用。形参可以是除定长字符串变量之外的合法变量名,也可以带括号的数组名。 实参:实参就是在调用Sub 和Function过程时,从主调过程传递给被调用过程的参数值。实参可以是变量名、数组名、常数或表达式。在过程调用传递参数时,形参与实参是按位置结合的,形参表和实参表中对应的变量名可以不必相同,但它们的数据类型、参数个数及位置必须一一对应。 等号、函数名称、括弧和参数,是函数的四个组成部分。 函数“=SUM(1,2,3)”,1、2和3就是SUM函数的参数,没有参数1、2、3,函数SUM 则无从求值。 函数“=VLOOKUP(2,A:C,3,)”,没有参数2、A:C和3,函数VLOOKUP如何在A:C 区域查找A列中是2那一行第3列的数值? 当然,也有不需要参数的函数,如“=PI()”、“=NOW()”、“TODAY()”等。 函数参数传递的原理C语言中参数的传递方式一般存在两种方式:一种是通过栈的形式传递,另一种是通过寄存器的方式传递的。这次,我们只是详细描述一下第一种参数传递方式,另外一种方式在这里不做详细介绍。 首先,我们看一下,下面一个简单的调用例程: int Add (int a,int b,int c) { return a+b+c; }

Plaxis中常见问题集锦

1 问:Geo FEM,Plaxis,Z-Soil软件比较?2008/6/5 9:34:48 答:三者针对某个算例计算结果相差不大,误差在可接受围之。 就易用性来说,Plaxis好于Z-Soil好于GEO。Plaxis大家都用得很多了,Z-Soil的建模可以在前处理模块中用CAD元素绘制,或者通过dxf文件导入;GEO4只能输入剖面线的坐标,比较烦琐。Plaxis和Z-soil基本可以解决岩土工程所有问题,但GEO4由于建模功能的限制,只能解决隧道、边坡等相关问题;Plaxis和Z-Soil可以进行渗流分析(非饱和)包括流固偶合分析。 总的来说,Plaxis和Z-Soil是专业的岩土工程有限元程序;GEO FEM是GEO4里面的一个工具包,而GEO4类似于国的理正一样,是遵循Eurocode的设计软件。 2 问:在plaxis中,用折减系数作出它的几个滑裂面,如何查看滑裂面的角度、圆心、半径等 这些滑裂面的相关参数呢? 2008/6/5 9:36:26 答:使用强度折减法,不用假定slip surface,故不会有这些数据。 3 问:Plaxis怎么模拟路堤分步填筑?在实际施工中,填筑不是一次加载的,可能先填一半, 过个月再填一半,而且这一半也不是一次填完,要在几天完成,请问怎么在Plaxis中模拟,怎么 设置可以反应填筑速率,请高手指教? 2008/6/5 9:47:25 答:手册里有相关例子,你可以参考一下lesson 5。 堆载速率可以通过设置堆载这个stage的时间间隔来设置。如果只有基本模块,可以设置mstage 的数值。mstage=1.0,说明100%施加上去了,mstage=0.1,说明只有10%的荷载。由于Plaxis 不能设置load function,比较麻烦。当然,你可以将一层土细分成几个stage完成,也可以实现。 4 问:Plaxis 3D 用这个软件分析基坑时,基坑是钢格栅喷混凝土支护,支护用板来模拟,EI 和EA中的I和A分别指哪个面的惯性矩和面积,以及单位后面的/m应该是哪个长度? 2008/6/5 9:49:13 答:应该是:A=沿着洞轴方向L×厚度d E是弹性模量I是惯性矩 5 问:在网上看到有人怀疑Plaxis 3D Foundation和3D Tunnel的真三维性,有人说它们不是 真正的三维计算,有谁知道是怎么回事吗? 2008/6/5 9:59:42 答:Plaxis 3D Tunnel计算核是三维的。但是目前只支持平面拉伸建模,建附加模型还存在困难。 3D Tunnel的确不能生成复杂的斜交隧道。 3D Foundation是专门解决基础问题的三维有限元计算软件。其解决基础问题要比FLAC3D要专 业,特别是考虑了一些工程实际,但开放性不如FLAC3d。近期3D Foundation将在此方面有重 大改进,新版本前处理借用GID作为前处理工具。Plaxis 系列优点长处是其理论,尤其是hs和 hs-small模型。 6 问:最近在算一个基坑,很好的地质条件,桩、撑刚度都取得很大,居然算出来水平位移始终 都有70mm左右,但用同济启明星算水土分算,并且参数都没有取最大值,算的结果只有17mm 左右。规要求水平位移不超过30mm,要是用Plaxis是很难算出小于规值的结果的,事实上,也 不至于有那么大的位移的? 2008/6/5 10:05:32 答:主要问题是现在很多地质报告都不提供三轴的试验参数:例如E50模量,Eur模量,Es模量, 有效强度指标等;土体的本构参数比较特殊,要做特殊的试验,因此一般的项目参数方面的确有 问题。不过,即便是只有Es模量和直剪固快指标,通过换算和引入K0、孔隙比、Cc,Cs等其 他参数,也是可以得到其他需要的参数,不过这需要比较扎实的本构模型方面的知识和岩土工程 经验,知道不同的本构适合模拟什么土层,知道本构的优点和局限性,这对使用者的要求的确比 较高。 7 问:隧道已经组成一个类组,所以一定要对其进行材料定义。如果不定义得话,就不能对其 进行网格划分,这要怎么解决呢? 2008/6/5 10:08:42 答:你是不是只想模拟基坑开挖对既有隧道结构的影响,而省略掉前面隧道开挖过程的模拟。 这样的话,结果恐怕很难正确,而且会碰到你所说的问题。因为隧道在基坑开挖前,有一定的受 力状况,这需要模拟隧道开挖过程才能得到其受力状况,基坑开挖的影响也是在其这个受力状况 上产生的。你现在的目的是让基坑开挖前,隧道结构的力和弯矩都为零了,所以结果很难正确。

地铁地表沉降外文翻译(适用于毕业论文外文翻译+中英文对照)

外文原文 Surface settlement predictions for Istanbul Metro tunnels excavated by EPB-TBM S. G. Ercelebi ?H. Copur ?I. Ocak Abstract In this study, short-term surface settlements are predicted for twin tunnels, which are to be excavated in the chainage of 0 ? 850 to 0 ? 900 m between the Esenler and Kirazl?stations of the Istanbul Metro line, which is 4 km in length. The total length of the excavation line is 21.2 km between Esenler and Basaksehir. Tunnels are excavated by employing two earth pressure balance (EPB) tunnel boring machines (TBMs) that have twin tubes of 6.5 m diameter and with 14 m distance from center to center. The TBM in the right tube follows about 100 m behind the other tube. Segmental lining of 1.4 m length is currently employed as the final support. Settlement predictions are performed with finite element method by using Plaxis finite element program. Excavation, ground support and face support steps in FEM analyses are simulated as applied in the field. Predictions are performed for a typical geological zone, which is considered as critical in terms of surface settlement. Geology in the study area is composed of fill, very stiff clay, dense sand, very dense sand and hard clay, respectively, starting from the surface. In addition to finite element modeling, the surface settlements are also predicted by using semi-theoretical (semi-empirical) and analytical methods. The results indicate that the FE model predicts well the short-term surface settlements for a given volume loss value. The results of semi-theoretical and analytical methods are found to be in good agreement with the FE model. The results of predictions are compared and verified by field measurements. It is suggested that grouting of the excavation void should be performed as fast as possible after excavation of a section as a precaution against surface settlements during excavation. Face pressure of the TBMs should be closely monitored and adjusted for different zones. Keywords Surface settlement prediction _ Finite element method _ Analytical method _ Semi-theoretical method _ EPB-TBM tunneling _ Istanbul Metro Introduction Increasing demand on infrastructures increases attention to shallow soft ground tunneling methods in urbanized areas. Many surface and sub-surface structures make underground construction works very delicate due to the influence of ground deformation, which should be definitely limited/controlled to acceptable levels. Independent of the excavation method, the short- and long-term surface and sub-surface ground deformations should be predicted and remedial precautions against any damage to existing structures planned prior to construction. Tunneling cost substantially increases due to damages to structures resulting from surface settlements, which are above tolerable limits (Bilgin et al. 2009).

Plaxis中常见问题集锦

1 问:Geo FEM, Plaxis, Z-Soil软件比较?2008/6/5 9:34:48 答:三者针对某个算例计算结果相差不大,误差在可接受范围之内。 就易用性来说,Plaxis好于Z-Soil好于GEO。Plaxis大家都用得很多了,Z-Soil的建模可以在前处理模块中用CAD元素绘制,或者通过dxf文件导入;GEO4只能输入剖面线的坐标,比较烦琐。Plaxis和Z-soil基本可以解决岩土工程所有问题,但GEO4由于建模功能的限制,只能解决隧道、边坡等相关问题;Plaxis和Z-Soil可以进行渗流分析(非饱和)包括流固偶合分析。 总的来说,Plaxis和Z-Soil是专业的岩土工程有限元程序;GEO FEM是GEO4里面的一个工具包,而GEO4类似于国内的理正一样,是遵循Eurocode的设计软件。 2 问:在plaxis中,用折减系数作出它的几个滑裂面,如何查看滑裂面的角度、圆心、半径等 这些滑裂面的相关参数呢? 2008/6/5 9:36:26 答:使用强度折减法,不用假定slip surface,故不会有这些数据。 3 问:Plaxis怎么模拟路堤分步填筑?在实际施工中,填筑不是一次加载的,可能先填一半, 过个月再填一半,而且这一半也不是一次填完,要在几天内完成,请问怎么在Plaxis中模拟,怎 么设置可以反应填筑速率,请高手指教? 2008/6/5 9:47:25 答:手册里有相关例子,你可以参考一下lesson 5。 堆载速率可以通过设置堆载这个stage的时间间隔来设置。如果只有基本模块,可以设置mstage 的数值。mstage=1.0,说明100%施加上去了,mstage=0.1,说明只有10%的荷载。由于Plaxis 不能设置load function,比较麻烦。当然,你可以将一层土细分成几个stage完成,也可以实 现。 4 问:Plaxis 3D 用这个软件分析基坑时,基坑是钢格栅喷混凝土支护,支护用板来模拟,E I和EA中的I和A分别指哪个面的惯性矩和面积,以及单位后面的/m应该是哪个长度? 2008/6/5 9:49:13 答:应该是: A=沿着洞轴方向L×厚度d E是弹性模量 I是惯性矩 5 问:在网上看到有人怀疑Plaxis 3D Foundation和3D Tunnel的真三维性,有人说它们不是 真正的三维计算,有谁知道是怎么回事吗? 2008/6/5 9:59:42 答:Plaxis 3D Tunnel计算内核是三维的。但是目前只支持平面拉伸建模,建附加模型还存在困 难。3D Tunnel的确不能生成复杂的斜交隧道。 3D Foundation是专门解决基础问题的三维有限元计算软件。其解决基础问题要比FLAC3D要专 业,特别是考虑了一些工程实际,但开放性不如FLAC3d。近期3D Foundation将在此方面有重大 改进,新版本前处理借用GID作为前处理工具。Plaxis 系列优点长处是其理论,尤其是hs和 hs-small模型。 6 问:最近在算一个基坑,很好的地质条件,桩、撑刚度都取得很大,居然算出来水平位移始终 都有70mm左右,但用同济启明星算水土分算,并且参数都没有取最大值,算的结果只有17mm左 右。深圳规范要求水平位移不超过30mm,要是用Plaxis是很难算出小于规范值的结果的,事实 上,也不至于有那么大的位移的? 2008/6/5 10:05:32 答:主要问题是现在很多地质报告都不提供三轴的试验参数:例如E50模量,Eur模量,Es模量, 有效强度指标等;土体的本构参数比较特殊,要做特殊的试验,因此一般的项目参数方面的确有 问题。不过,即便是只有Es模量和直剪固快指标,通过换算和引入K0、孔隙比、Cc,Cs等其他 参数,也是可以得到其他需要的参数,不过这需要比较扎实的本构模型方面的知识和岩土工程经 验,知道不同的本构适合模拟什么土层,知道本构的优点和局限性,这对使用者的要求的确比较 高。 7 问:隧道已经组成一个类组,所以一定要对其进行材料定义。如果不定义得话,就不能对其 进行网格划分,这要怎么解决呢? 2008/6/5 10:08:42 答:你是不是只想模拟基坑开挖对既有隧道结构的影响,而省略掉前面隧道开挖过程的模拟。 这样的话,结果恐怕很难正确,而且会碰到你所说的问题。因为隧道在基坑开挖前,有一定的受 力状况,这需要模拟隧道开挖过程才能得到其受力状况,基坑开挖的影响也是在其这个受力状况

材料模型手册

材料模型手册

目录 1 简介 (5) 1.1 不同模型的选用 (5) 1.2 局限性 (7) 2 材料模拟初步 (9) 2.1 应力的一般定义 (9) 2.2 应变的一般定义 (11) 2.3 弹性应变 (12) 2.4 用有效参数进行的不排水分析 (14) 2.5 用有效强度参数进行不排水有效应力分析 (18) 2.6 用不排水强度参数进行不排水有效应力分析(不排水B) (19) 2.7 用不排水参数进行不排水总应力分析 (19) 2.8 高级模型中的初始预固结应力 (20) 2.9 关于初始应力 (21) 4 霍克布朗模型(岩石行为) (32) 4.1 霍克布朗模型公式 (33) 4.2 霍克-布朗与莫尔-库伦之间的转换 (36) 4.3 霍克-布朗模型中的参数 (36) 5 土体硬化模型(各向同性) (41) 5.1 标准排水三轴试验的双曲线关系 (42) 5.2 土体硬化模型的双曲线近似 (43) 5.3 三轴应力状态下的塑性体积应变 (45) 5.4 土体硬化模型的参数 (46) 5.5 土体硬化模型中帽盖屈服面 (52) 6 小应变土体硬化模型(HSS) (54) 6.1 用双曲线准则描述小应变刚度 (55) 6. 2 HS 模型中使用HARDIN-DRNEVICH 关系 (56) 6.3 初始加载VS 卸载/重加载 (58) 6.4模型参数 (59) 6.5 参数0G 和0.7γ (61) 6.6 模型初始化 (62) 6.7 与土体硬化模型的其他区别 (63) 7 软土模型 (64) 7.1 应力和应变的各向同性状态(123'''σσσ==) (64)

总结Java方法(函数)传值和传引用的问题

总结Java方法(函数)传值和传引用的问题 java方法中传值和传引用的问题是个基本问题,但是也有很多人一时弄不清。 (一)基本数据类型:传值,方法不会改变实参的值。 public class TestFun { public static void testInt(int i){ i=5; } public static void main(String[] args) { int a=0 ; TestFun.testInt(a); System.out.println("a="+a); } } 程序执行结果:a=0 。 (二)对象类型参数:传引用,方法体内改变形参引用,不会改变实参的引用,但有可能改变实参对象的属性值。 举两个例子: (1)方法体内改变形参引用,但不会改变实参引用,实参值不变。 public class TestFun2 { public static void testStr(String str){ str="hello";//型参指向字符串“hello” } public static void main(String[] args) { String s="1" ;

TestFun2.testStr(s); System.out.println("s="+s); //实参s引用没变,值也不变 } } 执行结果打印:s=1 (2)方法体内,通过引用改变了实际参数对象的内容,注意是“内容”,引用还是不变的。 import java.util.HashMap; import java.util.Map; public class TestFun3 { public static void testMap(Map map){ map.put("key2","value2");//通过引用,改变了实参的内容 } public static void main(String[] args) { Map map = new HashMap(); map.put("key1", "value1"); new TestFun3().testMap(map); System.out.println("map size:"+map.size()); //map内容变化了 } } 执行结果,打印:map size:2 。可见在方法testMap()内改变了实参的内容。 (3)第二个例子是拿map举例的,还有经常涉及的是 StringBuffer : public class TestFun4 {

材料模型手册笔记

8 材料模型手册笔记 1 、概述 1.1 不同模型的选用 Mohr-Coulomb 模型(MC),弹塑性Mohr-Coulomb 模型包括五个输入参数,即:表示土体弹性的E 和ν,表示土体塑性的?和c,以及剪胀角ψ。通过选择适当的K0值,可以生成初始水平土应力。 节理岩石模型(JR),节理模型是一种各向异性的弹塑性模型,特别适用于模拟包括层理尤其是断层方向在内的岩层行为等。 Hardening-Soil 模型(HS),是一种改进了的模拟岩土行为的模型,适用于所有的土,但是它不能用来解释粘性效应,即蠕变和应力松弛。对比Mohr-Coulomb 模型,Hardening-Soil 模型还可以用来解决模量依赖于应力的情况。这意味着所有的刚度随着压力的增加而增加。因此,输入的三个刚度值(三轴加载刚度E50、三轴卸载刚度Eur 和固结仪加载刚度E oed)与一个参考应力有关,这个参考应力值通常取为100kPa (1 bar)。 软土蠕变模型(SSC),是一个新近开发的应用于地基和路基等的沉陷问题的模型。 软土模型(SS),适用于接近正常固结的粘性土的主压缩。 改进的Cam-Clay 模型(MCC),主要用于模拟接近正常固结的粘性土。 不同模型的分析 对考虑的问题进行一个简单迅速的初步分析使用Mohr-Coulomb 模型。软土蠕变模型可以用于分析蠕变(即:极软土的次压缩)。 1.2 局限性 HS 模型:不能用来说明由于岩土剪胀和崩解效应带来的软化性质,不能用来模拟滞后或者反复循环加载情形,常需要较长的计算时间。 SSC 模型,通常会过高地预计弹性岩土的行为范围。特别是在包括隧道修建在内的开挖问题上。 SS 模型,同样的局限性(包括HS 模型和SSC 模型的)存在于SS 模型中。在开挖问题上不推荐使用这种模型。

c语言值传递的3种形式

//全部摘自别的博客,以前对值传递很迷糊,看完豁然开朗,整理下,来百度文库赚点分。 一、三道考题 开讲之前,我先请你做三道题目。(嘿嘿,得先把你的头脑搞昏才行……唉呀,谁扔我鸡蛋?) 考题一,程序代码如下: void Exchg1(int x, int y) { inttmp; tmp = x; x = y; y = tmp; printf("x = %d, y = %d\n", x, y); } main() { int a = 4,b = 6; Exchg1(a, b); printf("a = %d, b = %d\n", a, b); return(0); } 输出的结果为: x = ____, y=____. a = ____, b=____. 问下划线的部分应是什么,请完成。 考题二,程序代码如下: void Exchg2(int *px, int *py) { inttmp = *px; *px = *py; *py = tmp; printf("*px = %d, *py = %d.\n", *px, *py); } main() { int a = 4; int b = 6; Exchg2(&a, &b);

printf("a = %d, b = %d.\n", a, b); return(0); } 输出的结果为为: *px=____, *py=____. a=____, b=____. 问下划线的部分应是什么,请完成。 考题三,程序代码如下: void Exchg3(int&x, int&y) { inttmp = x; x = y; y = tmp; printf("x = %d,y = %d\n", x, y); } main() { int a = 4; int b = 6; Exchg3(a, b); printf("a = %d, b = %d\n", a, b); return(0); } 输出的结果为: x=____, y=____. a=____, b=____. 问下划线的部分应是什么,请完成。你不在机子上试,能作出来吗?你对你写出的答案有多大的把握?正确的答案,想知道吗?(呵呵,让我慢慢地告诉你吧!) 好,废话少说,继续我们的探索之旅了。 我们都知道:C语言中函数参数的传递有:值传递、地址传递、引用传递这三种形式。题一为值传递,题二为地址传递,题三为引用传递。不过,正是这几种参数传递的形式,曾把我给搞得晕头转向。我相信也有很多人与我有同感吧? 下面请让我逐个地谈谈这三种传递形式。 二、函数参数传递方式之一:值传递 (1)值传递的一个错误认识 先看考题一中Exchg1函数的定义: void Exchg1(int x, int y) /* 定义中的x,y变量被称为Exchg1函数的形式参数*/ {

C语言中参数传递

二.参数传递 函数的形参的初始化和变量的初始化一样,如果形参具有非引用类型,则复制实参的值,如果形参为引用类型,则它是实参的别名。 1.非引用实参 普通的非引用类型的函数通过复制对应的实参实现初始化。当用实参副本初始化形参时,函数并没有调用所传递的实参本身,因此不会修改实参的值。 注解:非引用形参表示对应实参的局部副本,对这类行参的修改仅仅改变了局部副本的值,一旦函数执行结束,这些局部变量的值也就没有了。 a. 指针形参 指针形参与其他非引用类型的行参一样,如果将新指针赋给行参,主调函数使用的实参指针的值没有改变。事实上被复制的指针只影响对指针的赋值。指针形参是const类型还是非const类型,将影响函数调用所使用的实参。 b. const行参 在调用函数时,如果该函数使用非引用的非const形参,则既给该函数传递const实参也可传递非const的实参(因为改变形参不影响const的实参,所以const实参不会被改变)。如果将形参定义为非引用的const类型,则在函数中,不可以改变实参的局部副本,由于实参是以副本的形式传递,因此传递给函数形参既可是const也可是非const对象。 注意:尽管函数的形参是const,但是编译器却将该行参声明视为普通的int型。 void fcn(const int i); void fcn(int i); 为了兼顾C语言,认为这两种定义并不区别。 c. 复制实参的局限性 不适合复制实参的情况包括: 当需要在函数中修改实参的值时 当需要以大型对象作为实参传递时,对实际的应用而言,复制对象所付出的时间和存储空间代价往往很大。 但没有办法实习对象的复制时 对于以上几种情况,有效的办法是将形参定义为引用或指针。 2.引用实参 与所有引用一样,引用形参直接关联到其所绑定的对象,而并非这些对象的副本。定义引

Hardening soil模型简介(Plaxis)

Chapter8 The hardening soil model 8.1Reasons for the election of the model 8.1.1Introduction The numerical modeling is going to be carried out by means of the?nite-element method as it allows for modeling complicated nonlinear soil behavior and various interface conditions, with di?erent geometries and soil properties. PLAXIS program will be used,this program has a series of advantages:?Excess pore pressure:Ability to deal with excess pore-pressure phenomena.Ex-cess pore pressures are computed during plastic calculations in undrained soil.?Soil-pile interaction:Interfaces can be used to simulate intensely shearing zone in contact with the pile,with values of friction angle and adhesion di?erent to the friction angle and cohesion of the soil.Better insight into soil-structure interaction.?Automatic load stepping:The program can run in an automatic step-size and an automatic time step selection mode,providing this way robust results.?Dynamic analysis:Possibility to analyze vibrations and wave propagations in the soil. ?Soil model:It can reproduce advanced constitutive soil models for simulation of non-linear behavior. 8.1.2Model election:soil,pile and interface The available soil models are(PLAXIS Version8): 1Linear elastic model:it is the simplest available stress-strain relationship.Ac-cording to the Hooke law,it only provides two input parameters,i.e.Young’s modu-lus E and Poisson’s ratioν.It is NOT suitable here because soil under load behaves strongly inelastically.However,this will be used to model the pile 2Mohr-Coulomb model:it is a perfectly elastoplastic model of general scope,thus, has a?xed yield surface.It involves?ve input parameters,i.e.E andνfor soil elas-ticity,the friction angle?and the cohesion c for soil plasticity,and the angle of dilatancyψ.It is a good?rst-order model,reliable to provide us with a trustful?rst insight into the problem. Advantages:

相关主题