content
string | pred_label
string | pred_score
float64 |
---|---|---|
Resources Contact Us Home
Browse by: INVENTOR PATENT HOLDER PATENT NUMBER DATE
Device for determining the rotational speed
6205838 Device for determining the rotational speed
Patent Drawings:Drawing: 6205838-2 Drawing: 6205838-3
« 1 »
(2 images)
Inventor: Schmid, et al.
Date Issued: March 27, 2001
Application: 09/091,913
Filed: August 19, 1999
Inventors: Artznei; Johannes (Reutlingen, DE)
Neul; Reinhard (Stuttgart, DE)
Schmid; Eberhard (Reutlingen, DE)
Steinlechner; Siegbert (Leonberg, DE)
Assignee: Robert Bosch GmbH (Stuttgart, DE)
Primary Examiner: Kwok; Helen C.
Assistant Examiner:
Attorney Or Agent: Striker; Michael J.
U.S. Class: 73/1.37; 73/504.13
Field Of Search: 73/1.37; 73/1.77; 73/504.13; 73/504.12; 73/504.14; 73/504.15; 73/504.16; 73/511; 73/514.16
International Class: G01C 19/56
U.S Patent Documents: 5426970; 5889193
Foreign Patent Documents: WO 96/21138
Other References:
Abstract: A device for determining a rotation rate is described, in which by means of digital evaluation circuits the output signals of a rotation rate sensor are evaluated. By identification of the transfer function from the electronically generated oscillation voltage that excites the oscillating body carrying the acceleration elements, to the output of the acceleration elements, or by identification of the transfer function from the electrically generated test voltage at the input of the acceleration elements to their output, the systematic errors of the rotation rate sensor are determined and taken into account in the digital sensor signal processing, with the aid of which the rotation rate is unequivocally determined.
Claim: What is claimed is:
1. A device for determining a rotation rate, having an oscillatable body, which is set into constant oscillation by means of an oscillation voltage (U.sub.1) generated in anelectrical circuit, having at least one sensor element which is disposed on the oscillatable body and outputs an output voltage (U.sub.2), which is a measure for a acceleration and thus also for the rotation rate, characterized in that the oscillationvoltage (U.sub.1), which is proportional to an instantaneous speed v(t) of the oscillatable body, is picked up and digitized; that the output voltage (U.sub.2) is digitized or is already generated as a digital signal; and that from two digitallypresent voltages (U.sub.1, U.sub.2) a transfer function is formed, which simulates all interference components at the rotation rate of zero and is the point of departure for the determination of the rotation rate.
2. The device for determining a rotation rate of claim 1, characterized in that a prepared oscillation voltage (U.sub.1) is delivered via an FIR filter (19) to a Hilbert filter (18) having one branch which furnishes an output voltage (U.sub.2"), which corresponds to a simulated interference signal that is subtracted at a summation point (21) from a digitized and bandpass-filtered voltage (U.sub.2 '), for forming an error signal e, which is multiplied by an amplitude-regulated signal obtainedfrom the second branch of the Hilbert filter, and which, after filtration in a low-pass filter (23), furnishes the rotation rate.
3. The device for determining a rotation rate of claim 2, characterized in that coefficients of the FIR filter (19) are set via an adaptation (24) which is controlled by the error signal e, as a result of which the properties of the FIR filter(19) are adapted to requirements.
4. A device for determining a rotation rate, having an oscillatable body, which is set into constant oscillation by means of an oscillation voltage (U.sub.1) generated in an electrical circuit, having at least one sensor element which isdisposed on the oscillatable body and outputs an output voltage (U.sub.2), which is a measure for an acceleration and thus also for the rotation rate, characterized in that the oscillation voltage (U.sub.1), which is proportional to an instantaneousspeed v(t) of the oscillatable body, is picked up and digitized; that the output voltage (U.sub.2) is digitized or is already generated as a digital signal; and that in addition a test signal (U.sub.T) is generated, which has frequency components inthe vicinity of an oscillation frequency of a mechanical oscillator and is additionally delivered to an acceleration sensor; that the changes caused by the test signal are digitally simulated, and this simulation is subtracted from an actualacceleration voltage.
5. The device for determining a rotation rate of claim 4, characterized in that the transfer function from the test signal (U.sub.T) to the output voltage (U.sub.2) is identified and simulated and taken into account in determining the rotationrate.
6. The device for determining a rotation rate of claim 5, characterized in that a digitized and bandpass-filtered voltages (U.sub.1 ') and (U.sub.T ') are each delivered to a respective adaptive FIR filter (34, 37), and a adaptation is effectedas a function of an digitized and bandpass-filtered acceleration voltage (U.sub.2 ") and the actual acceleration voltage (U.sub.2 ').
7. The device for determining a rotation rate of claim 6, characterized in that the coefficients of identical FIR filters (34 and 37) are set, via an adaptation algorithm (36) that is controlled by an error signal e, in such a way that the FIRfilters simulate the transfer function from the test signal (U.sub.T) to the output voltage (U.sub.2).
8. The device for determining a rotation rate of claim 7, characterized in that a digitized and filtered oscillation signal (U.sub.1 ") is regulated in amplitude, and that after the multiplication of a regulated oscillation signal (U.sub.1 '")by the error signal e and low-pass filtration in a low-pass filter (40), a the rotation rate signal (D) occurs.
9. The device for determining a rotation rate of claim 1, characterized in that an amplitude regulation (20) or (38) regulates to a constant amplitude of a voltage (U.sub.90 ') or of the voltage (U.sub.1 '").
10. The device for determining a rotation rate of claim 1, characterized in that an amplitude regulation (20) or (38) regulates to an amplitude that is proportional to the inverse of the amplitude of the oscillation voltage (U.sub.1).
11. The device for determining a rotation rate of claim 1, characterized in that a low-pass filter is present at an output of an evaluation circuit, and said low-pass filter filters out the higher-frequency signal components, having twice theoscillation frequency.
12. The device for determining a rotation rate of claim 1, characterized in that a speed of adaptation of FIR filters is adaptable from outside.
13. The device for determining a rotation rate of claim 1, characterized in that a digital evaluation circuit is embodied as a fully integratable circuit.
Description: BACKGROUND OF THE INVENTION
The invention is based on a device for determining a rate rotation.
The use of rotation rate sensors that utilize the Coriolis effect is known in conjunction with systems for dynamic control in motor vehicles. Such rotation rate sensors typically comprise one or more masses that are set into mechanicaloscillation at the frequency f.sub.s by an electrical oscillator circuit. These mechanical oscillations act on one or more acceleration sensors, which upon a rotation of the system also measure the Coriolis acceleration acting on the oscillating masses. From the excitation and acceleration signals, the rotation rate of the system can be determined with the aid of a suitable evaluation circuit.
An additional electrical test signal that is fed to the acceleration sensor or acceleration sensors can be used to cause an additional, arbitrarily generated acceleration to act upon the sensor. In this way, information on the properties of theacceleration sensor and the downstream evaluation circuits can for instance be obtained. It is thus also possible to detect errors, and especially systematic errors. This is especially important because rotation rate sensors that evaluate the Corioliseffect has systematic errors, whose effect on the measurement signal must be minimized by a suitable choice of evaluation method. Such systematic errors can be classified in one of the following types of error:
a) The acceleration sensor or sensors are sensitive not merely in the direction of the Coriolis acceleration to be measured but in other directions as well.
b) The mechanical oscillator that is set into oscillation by the electrical circuit has unintended oscillation components in the direction of the Coriolis acceleration.
c) Electrical feedthrough of the oscillation signal to the acceleration signal is possible.
To evaluate the output signals of rotation rate sensors, until now circuits have been used that are designed as analog circuits for signal processing. Such evaluation circuits, with which the rotation rate can be determined from the outputsignals of a rotation rate sensor and with which moreover monitoring the operability of the sensor or of the evaluation circuit is made possible, are described in International Patent Application WO 96/21138.
The known device for determining a rotation rate includes a rotation rate sensor which operates on the principle of a resonant oscillation gyrometer and is excited by means of an amplitude-regulated oscillator loop. This sensor is used forinstance to ascertain the yaw speed of a vehicle. To that end, the effect of the Coriolis acceleration, which is a measure for the actual yaw speed, is evaluated. To monitor the operability of the sensor or of the associated electronics, an additionalvoltage, for instance in the form of a Bite function, is fed in at certain selectable times, and the reaction of the system to this additional voltage is evaluated for error detection.
SUMMARY OF THE INVENTION
Accordingly, it is an object of the present invention to provide a device for determining a rate rotation which avoids the disadvantages of the prior art.
In keeping with these objects, one feature of present invention resides, briefly stated, in a device for determining a rotation rate, in which the oscillation voltage which is proportional to the instantaneous speed of the oscillatable body ispicked up and digitized, the output voltage is digitized or is already generated as a digital signal, and from two digitally presented voltages, the transfer function is formed, which simulates all interference components at the rotation rate of zero andis the point of departure for determination of the rotation rate.
The device of the invention has the advantage over the known device that purely digital signal processing is done, while in the known device an analog circuit is employed. The use of adaptive methods of digital signal processing enablesadvantageous system identification and a system simulation. Sensor errors can be compensated for successfully by the adaptation processes. The digital evaluation circuit according to the invention is advantageously fully integratable and has noproblems of synchronism and drift of the individual components. The circuit is calibration-free, except for a scaling factor.
These advantages are attained in that both the oscillation voltage and the electrical acceleration signal are evaluated jointly, with digitizing of the signals being done beforehand. In a first evaluation method, the digitized signals aresubjected to an adaptive system identification, as a result of which the transfer function of the sensor system between the oscillation signal and the acceleration signal is simulated. With the aid of this transfer function, the rotation rate can bedetermined. In this method, all the relevant factors are simulated by means of the system identification. However, constant rotation rates that persist for a long time are compensated for.
In a second method, in which in addition a test signal U.sub.T that excites the acceleration sensors is used, even long-persisting constant rotation rates are ascertained, even though at the same time a fast adaptation rate is possible. In thismethod, a system identification of the transfer function between the test signal U.sub.T and the acceleration signal U.sub.2 is performed, and with the aid of this the rotation rate is determined. By using the test signal, malfunctions of the sensor orof the associated digital evaluation circuit can advantageously be detected as well.
BRIEF DESCRIPTION OF THE DRAWING
Exemplary embodiments of the invention are shown in the drawing and will be described in further detail below. Specifically, FIG. 1 shows a block circuit diagram of a rotation rate sensor; FIG. 2 shows a first evaluation circuit; and FIG. 3shows a second evaluation circuit for the output signals of a rotation rate sensor of FIG. 1.
DESCRIPTION OF THE PREFERRED EMBODIMENTS
In the block circuit diagram shown in FIG. 1 of a rotation rate sensor, the mechanical oscillator, such as a hollow cylinder fastened at one end, is identified by reference numeral 10. This oscillator is set into mechanical oscillation by anelectric circuit. The electric circuit includes the two amplifiers 11 and 12. Amplifier 11 is regulated amplifier or has limiter properties. The associated output signal is designated as an oscillation signal U.sub.1.
The mechanical oscillator 10 that is excited to oscillate at the frequency f.sub.s influences the acceleration sensor 13, or optionally the acceleration sensors, which are secured to the mechanical oscillator 10. In the block circuit diagram ofFIG. 1, this influence is represented as a speed v(t). The acceleration sensor 13 or acceleration sensors are also influenced by the Coriolis acceleration ac.
In addition, a test signal U.sub.T can be supplied, which causes an additional arbitrarily acceleration to act on the acceleration sensor 13. At the output of the acceleration sensor 13, a voltage is established which is called the outputvoltage U.sub.2 and which represents the actual acceleration signal.
From the oscillation voltage U.sub.1 and the output voltage U.sub.2, the rotation rate D can be ascertained, using the digital evaluation circuits shown in FIGS. 2 and 3. The circuit shown in FIG. 2 thus makes it possible to determine therotation rate D of the system from excitation and acceleration signals. The circuit shown in FIG. 3 additionally uses a test signal U.sub.T.
In FIG. 2, a first evaluation circuit is shown, with which the voltages U.sub.1 and U.sub.2 are evaluated. To that end, the oscillation voltage U.sub.1 (t), which is proportional to the instantaneous speed v(t) of the mechanical oscillation, andthe electrical acceleration signal, that is, the output voltage U.sub.2 (t), are each converted into digital signals in a respective analog/digital converter 14, 15. Optionally, the output signal U.sub.2 of the acceleration sensor is also alreadypresent in digital form, which is especially true if the acceleration information has already been obtained digitally with the aid of a so-called sigma-delta process.
The digitized signals are each filtered using identical bandpass filters 16, 17, whose mean frequency is in the vicinity of the mechanical oscillation frequency f.sub.s. After this, an adaptive system identification is performed, which forinstance proceeds using an LMS or RLS algorithm, which simulates the transfer function H.sub.Nbl2 (z) of the sensor system between the oscillation signal U.sub.1 (z) and the acceleration signal U.sub.2 (z). In other words, the following equationapplies:
The transfer function H.sub.nb12 (z) simulates all the interfering components that occur at the rotation rate 0 and that have the oscillation frequency f.sub.s. If it is assumed that the essential interfering component has a phase displacementof 90.degree. with regard to the speed v and thus to the Coriolis acceleration ac, then the evaluation described below can be performed. To that end, a branch of a digital 90.degree. Hilbert filter 18 is included in the system identification. ThisHilbert filter 18 is supplied with the output voltage of the bandpass filter 16 via an FIR filter 19. The Hilbert filter 18 has not only the branch 18b, which is included in the system identification, but also a branch 18a, whose voltage has a phasedisplacement of 90.degree. from the first branch 18b. The output signal of the second branch U.sub.90 is regulated in its amplitude in the amplitude regulation 20.
There are two variants for performing the amplitude regulation. In the first variant, the voltage U.sub.90 ' is regulated to constant amplitude; that is:
This type of regulation is appropriate for a constant amplitude of the speed V or a constant amplitude of the voltage U.sub.1.
In the second variant of amplitude regulation, the voltage U.sub.90 ' is regulated such that the amplitude of the voltage U.sub.90 multiplied by the amplitude of the voltage U.sub.1 is constant; that is:
This type of regulation is appropriate with a variable amplitude of the speed v or a variable amplitude of the voltage U.sub.1.
The analog/digitally converted and bandpass filtered acceleration signal U.sub.2 ', which occurs at the output of the bandpass filter 17, like the signal U.sub.2 " occurring at the output of the Hilbert filter 18, is supplied to a summation point21. At the summation point 21, the simulated interference signal U.sub.2 " is subtracted from the acceleration signal U.sub.2 '. The resultant signal e represents the cleaned acceleration signal, which is demodulated by multiplication with thestandardized signal U.sub.90 '. The demodulation is identified in FIG. 2 as point 22. In the following low-pass filter, the demodulated signal is freed of the double oscillation frequency 2f.sub.S occurring in the multiplication, and the noisebandwidth is reduced. At the output of the low-pass filter 23, a signal occurs that is equivalent to the rotation rate D.
The signal e is also used as an error signal for controlling the adaptation. The adaptation process must therefore proceed very slowly, for instance over the range of minutes, because otherwise rotation rates that are constant over a longerperiod would be compensated out of existence. The adaptation speed can advantageously be controlled from outside with the aid of additional information, such as "sensor in repose". Hence a fast adaptation in repose and a slow adaptation during normaloperation can be achieved. In FIG. 2, the adaptation processes are combined in one block 24, to which the additional information can be supplied via an input 25. The adaptation stage influences the filter stage 19 via suitable connections.
In FIG. 3, a further digital evaluation circuit is shown, which permits signal evaluation by a second method. In this evaluation circuit, the oscillation voltage U.sub.1 and the acceleration voltage U.sub.2 are in turn supplied first to arespective analog/digital converter 26, 27 and to a respective bandpass filter 28, 29. The voltages U.sub.1 ' and U.sub.2 ' then appear at the outputs of the bandpass filters 28, 29.
In addition, with the aid of a test signal generator 30, a test signal U.sub.TD is generated, which has frequency components in the vicinity of the oscillation frequency of the mechanical oscillator and may for instance be sinusoidal orrectangular in shape. A so-called pseudo binary noise (PRBS, PN sequence) is suitable as a test signal as well. This test signal is converted in a digital/analog converter 31 and delivered in the form of the voltage U.sub.T to the acceleration sensor,as shown in FIG. 1.
The transfer function H.sub.NbT2 (z) from the input U.sub.T to the output U.sub.2 of FIG. 1 is also identified and simulated. To that end, first the changes that the signal U.sub.2 undergoes along the signal path to U.sub.2 ' are digitallysimulated for the digitally present test signal. This modeling is done with the aid of the analog/digital converter simulation 32 and the bandpass filter simulation 33. Thus the voltage U.sub.T ' appears at the output of the bandpass simulation 33.
If a sinusoidal test signal is used as the test signal, then a corresponding phase displacement suffices for the simulation. The simulation of the transfer function H.sub.NbT2 (z) is done via an adaptive FIR filter 34. The following equationapplies:
The voltage U.sub.2 " simulates the analog/digitally converted and bandpass-filtered acceleration voltage. At the summation point 34, it is subtracted from the actual acceleration voltage U.sub.2 ', thus creating the error signal e, whichcontrols the adaptation algorithm, which is shown as a block 36. The signal e, once adaptation is established, no longer includes any test signal components but instead now contains all the signal components that are caused by the mechanical rotationrate D to be measured.
The analog/digitally converted and bandpass filtered oscillation voltage U.sub.1 ' is filtered using a second FIR filter 37, whose coefficients are a copy of the coefficients of the filter 34. The signal U.sub.1 " thus obtained is suitable,because of its phase relationship, for the demodulation of the rotation rate sensor signal contained in the signal e. However, beforehand the voltage U.sub.2 " must be standardized, as described for the first method. To that end, it is delivered to anamplitude regulation 38, at whose output the voltage U.sub.1 '" appears, which at point 39 is multiplied by the signal e. After multiplication of the voltage U.sub.2 '" by the signal e and ensuing low-pass filtration in the low-pass filter 40, and afterthe digital/analog conversion in the digital/analog converter 41, the rotation rate signal D is obtained.
* * * * *
Recently Added Patents
Photoacoustic joulemeter utilizing beam deflection technique
Storage apparatus and method including page discard processing for primary and secondary volumes configured as a copy pair
Varying latency timers in a wireless communication system
Re-establishing push notification channels via user identifiers
Vehicle headlight
Semiconductor device and method of forming interconnect structure with conductive pads having expanded interconnect surface area for enhanced interconnection properties
Method of estimating remaining constant current/constant voltage charging time
Randomly Featured Patents
Universal transmission tester
Construction block
Cutting tooth for a ground working implement
Side-emission type LED package
Multi-mode camera and method therefor
Unitary sensor assembly for automotive vehicles
N-phenylcarbamate compound, process for preparing the sasme and biocidal composition for control of harmful organisms
Data streaming communication system and method
Distractable corpectomy device
Brake device for an elevator with monitoring capabilities
|
__label__pos
| 0.937094 |
Nomogram and scoring system for predicting stone-free status after extracorporeal shock wave lithotripsy in children with urolithiasis
Onal B. , Tansu N., Demirkesen O., Yalcin V., Huang L., Nguyen H. T. , et al.
BJU INTERNATIONAL, cilt.111, ss.344-352, 2013 (SCI İndekslerine Giren Dergi)
Özet
What's known on the subject? and What does the study add? Extracorporeal shock wave lithotripsy is often considered to be the first-line treatment method for the majority of urinary tract stone disease in children. The stone clearance rate in children treated with ESWL is higher than that in adults. Recently, nomograms for several diseases, e.g. for specific cancers, have been developed and validated in large patient populations. They have become very popular predictive tools that provide the most objective, evidence-based, and individualized risk estimation. These nomograms have gained acceptance as useful guides in clinical practice for use by physicians and patients. In adults, a nomogram has been created to predict stone-free outcome after ESWL; however, to our knowledge none has been developed for children with urolithiasis. This is the first study-generated nomogram table and scoring system for predicting the stone-free rate after ESWL in children. This predictive tool could be useful for clinicians in counselling the parents of children with urolithiasis and in recommending treatment. Objective To determine the stone-free rate after extracorporeal shock wave lithotripsy (ESWL) and its associated factors to formulate a nomogram table and scoring system to predict the probability of stone-free status in children. Patients and Methods A total of 412 children (427 renal units [RUs]) with urolithiasis were treated with ESWL using a lithotriptor between 1992 and 2008. Cox proportional hazards regression was used to model the number of treatment sessions to stone-free status as a function of statistically significant demographic characteristics, stones and treatment variables. A bootstrap method was used to evaluate the model's performance. Based on the multivariate model, the probabilities of being stone-free after each treatment session (1, 2 and >3) were then determined. A scoring system was created from the final multivariate proportional hazard model to evaluate each patient and predict their stone-free probabilities. Results Complete data were available for 395 RUs in 381 patients. Of the 395 RUs, 303 (76.7%) were considered to be stone-free after ESWL. Multivariate analysis showed that previous history of ipsilateral stone treatment is related to stone-free status (hazard ratio [HR]: 1.49; P = 0.03). Stone location was a significant variable for stone-free status, but only in girls. Age (HR 1.65, P = 0.02) and stone burden (HR 4.45, P = 0.002) were significant factors in the multivariate model. Conclusion We believe that the scoring system, and nomogram table generated, will be useful for clinicians in counselling the parents of children with urolithiasis and in recommending treatment.
|
__label__pos
| 0.595207 |
Medical Imaging Analysis
817 Words 4 Pages
Introduction
Medical Imaging is a revolutionary in medical diagnosis. With the advent of micro-electronics and computer science, there is a lot of ease in identifying and treating the diseases as never before.
Medical imaging is a technique helpful in idenfying the possible diseases and disorders. Using different radio spectrums, different images of an organ can be captured. It comes under a medical test, these days depend on the type of the disease patient undergo this test. After image analysis is done, medical practitioner treats the patient. For example, Sonography, CT, MRI, and PET come under different medical imaging models. Each model serves some purpose, and has its own advantages and disadvantages.
Processing Techniques
Figure
…show more content…
Monochrome image as 2-D function
Imaging models
We look at various imaging models available in field of medicine from Radiography to Echocardiography, their advantages and disadvantages, and applications.
Radiography
After the discovery of X-rays, Radiography came into limelight. Earlier to the discovery of X-rays also Radiography was available, but electromagnetic spectrum utilised for imaging. Using X-rays as source of illumination imaging is done, it exposes the internal architecture of non-transparent object of high density and composition. It is helpful in identifying bone fractures. It also serves other purposes too. Cost of equipment is low, and high mobility of setup makes high usage.
Working Principle
X-ray generator is used to generate x-rays, focus on the object. Some amount of the x-rays is absorbed by the object, and rest of them are passed through it. Passed through x-rays are captured by a detector behind the object. The detector is helpful in extracting the information of object internal structure in 2-D plane.
In figure 3, radiography using X-rays is shown.
Advantages
Cost of equipment is low, and high mobility of setup makes high
…show more content…
Radiography using X-rays. Figure 4. X-ray imaging of a bone.
Magnetic Resonance Imaging(MRI)
Magnetic resonance scanner is costlier than Radiography. Image quality of the MRI varies significantly from X-ray imaging. Both the imaging techniques are highly sensitive to the tissue properties. MRI uses magnets to polarise and excite the hydrogen nuclei present in the water molecules of the human tissues, provides the detectable signal. MRI release the RF pulse that is helpful in binding hydrogen atom.
Working principle
MRI equipment sends the RF pulse to the are needs to examined. Pulse helps the protons pesent in the exposed area to energise, and make them spin in different directions. Some of the tissues of the exposed area only excite and tune to the RF pulse, that frequency is called as Larmour frequency. MRI uses three types of electromagnetic fields for imaging, very strong, gradient field and weak RF field.
MRI equipments are capable of producing images in 3D blocks. It does not have any side effects because of no ionisation mechanisms as in CT scan. Any individual can be subjected to any number of MRI scans.
Figure 5. MRI scanning equipment.
Related Documents
|
__label__pos
| 0.662726 |
This documentation is archived and is not being maintained.
Working with DataTable Events
The DataTable object provides a series of events that can be processed by an application. The following table describes DataTable events.
Event Description
Initialized
Occurs after the EndInit method of a DataTable is called. This event is intended primarily to support design-time scenarios.
ColumnChanged
Occurs after a value has been successfully changed in a DataColumn.
ColumnChanging
Occurs when a value has been submitted for a DataColumn.
RowChanged
Occurs after a DataColumn value or the RowState of a DataRow in the DataTable has been changed successfully.
RowChanging
Occurs when a change has been submitted for a DataColumn value or the RowState of a DataRow in the DataTable.
RowDeleted
Occurs after a DataRow in the DataTable has been marked as Deleted.
RowDeleting
Occurs before a DataRow in the DataTable is marked as Deleted.
TableCleared
Occurs after a call to the Clear method of the DataTable has successfully cleared every DataRow.
TableClearing
Occurs after the Clear method is called but before the Clear operation begins.
TableNewRow
Occurs after a new DataRow is created by a call to the NewRow method of the DataTable.
Disposed
Occurs when the DataTable is Disposed. Inherited from MarshalByValueComponent.
NoteNote
Most operations that add or delete rows do not raise the ColumnChanged and ColumnChanging events. However, the ReadXml method does raise ColumnChanged and ColumnChanging events, unless the XmlReadMode is set to DiffGram or is set to Auto when the XML document being read is a DiffGram.
Additional Related Events
The Constraints property holds a ConstraintCollection instance. The ConstraintCollection class exposes a CollectionChanged event. This event fires when a constraint is added, modified, or removed from the ConstraintCollection.
The Columns property holds a DataColumnCollection instance. The DataColumnCollection class exposes a CollectionChanged event. This event fires when a DataColumn is added, modified, or removed from the DataColumnCollection. Modifications that cause the event to fire include changes to the name, type, expression or ordinal position of a column.
The Tables property of a DataSet holds a DataTableCollection instance. The DataTableCollection class exposes both a CollectionChanged and a CollectionChanging event. These events fire when a DataTable is added to or removed from the DataSet.
Changes to DataRows can also trigger events for an associated DataView. The DataView class exposes a ListChanged event that fires when a DataColumn value changes or when the composition or sort order of the view changes. The DataRowView class exposes a PropertyChanged event that fires when an associated DataColumn value changes.
Sequence of Operations
Here is the sequence of operations that occur when a DataRow is added, modified, or deleted:
1. Create the proposed record and apply any changes.
2. Check constraints for non-expression columns.
3. Raise the RowChanging or RowDeleting events as applicable.
4. Set the proposed record to be the current record.
5. Update any associated indexes.
6. Raise ListChanged events for associated DataView objects and PropertyChanged events for associated DataRowView objects.
7. Evaluate all expression columns, but delay checking any constraints on these columns.
8. Raise ListChanged events for associated DataView objects and PropertyChanged events for associated DataRowView objects affected by the expression column evaluations.
9. Raise RowChanged or RowDeleted events as applicable.
10. Check constraints on expression columns.
NoteNote
Changes to expression columns never raise DataTable events. Changes to expression columns only raise DataView and DataRowView events. Expression columns can have dependencies on multiple other columns, and can be evaluated multiple times during a single DataRow operation. Each expression evaluation raises events, and a single DataRow operation can raise multiple ListChanged and PropertyChanged events when expression columns are affected, possibly including multiple events for the same expression column.
Example
The following example demonstrates how to create event handlers for the RowChanged, RowChanging, RowDeleted, RowDeleting, ColumnChanged, ColumnChanging, TableNewRow, TableCleared, and TableClearing events. Each event handler displays output in the console window when it is fired.
static void DataTableEvents()
{
DataTable table = new DataTable("Customers");
// Add two columns, id and name.
table.Columns.Add("id", typeof(int));
table.Columns.Add("name", typeof(string));
// Set the primary key.
table.Columns["id"].Unique = true;
table.PrimaryKey = new DataColumn[] { table.Columns["id"] };
// Add a RowChanged event handler.
table.RowChanged += new DataRowChangeEventHandler(Row_Changed);
// Add a RowChanging event handler.
table.RowChanging += new DataRowChangeEventHandler(Row_Changing);
// Add a RowDeleted event handler.
table.RowDeleted += new DataRowChangeEventHandler(Row_Deleted);
// Add a RowDeleting event handler.
table.RowDeleting += new DataRowChangeEventHandler(Row_Deleting);
// Add a ColumnChanged event handler.
table.ColumnChanged += new
DataColumnChangeEventHandler(Column_Changed);
// Add a ColumnChanging event handler.
table.ColumnChanging += new
DataColumnChangeEventHandler(Column_Changing);
// Add a TableNewRow event handler.
table.TableNewRow += new
DataTableNewRowEventHandler(Table_NewRow);
// Add a TableCleared event handler.
table.TableCleared += new
DataTableClearEventHandler(Table_Cleared);
// Add a TableClearing event handler.
table.TableClearing += new
DataTableClearEventHandler(Table_Clearing);
// Add a customer.
DataRow row = table.NewRow();
row["id"] = 1;
row["name"] = "Customer1";
table.Rows.Add(row);
table.AcceptChanges();
// Change the customer name.
table.Rows[0]["name"] = "ChangedCustomer1";
// Delete the row.
table.Rows[0].Delete();
// Clear the table.
table.Clear();
}
private static void Row_Changed(object sender, DataRowChangeEventArgs e)
{
Console.WriteLine("Row_Changed Event: name={0}; action={1}",
e.Row["name"], e.Action);
}
private static void Row_Changing(object sender, DataRowChangeEventArgs e)
{
Console.WriteLine("Row_Changing Event: name={0}; action={1}",
e.Row["name"], e.Action);
}
private static void Row_Deleted(object sender, DataRowChangeEventArgs e)
{
Console.WriteLine("Row_Deleted Event: name={0}; action={1}",
e.Row["name", DataRowVersion.Original], e.Action);
}
private static void Row_Deleting(object sender,
DataRowChangeEventArgs e)
{
Console.WriteLine("Row_Deleting Event: name={0}; action={1}",
e.Row["name"], e.Action);
}
private static void Column_Changed(object sender, DataColumnChangeEventArgs e)
{
Console.WriteLine("Column_Changed Event: ColumnName={0}; RowState={1}",
e.Column.ColumnName, e.Row.RowState);
}
private static void Column_Changing(object sender, DataColumnChangeEventArgs e)
{
Console.WriteLine("Column_Changing Event: ColumnName={0}; RowState={1}",
e.Column.ColumnName, e.Row.RowState);
}
private static void Table_NewRow(object sender,
DataTableNewRowEventArgs e)
{
Console.WriteLine("Table_NewRow Event: RowState={0}",
e.Row.RowState.ToString());
}
private static void Table_Cleared(object sender, DataTableClearEventArgs e)
{
Console.WriteLine("Table_Cleared Event: TableName={0}; Rows={1}",
e.TableName, e.Table.Rows.Count.ToString());
}
private static void Table_Clearing(object sender, DataTableClearEventArgs e)
{
Console.WriteLine("Table_Clearing Event: TableName={0}; Rows={1}",
e.TableName, e.Table.Rows.Count.ToString());
}
See Also
Show:
|
__label__pos
| 0.723093 |
Unveiling the Remarkable Functions of the Esophagus: Understanding Its Vital Role in Digestion
The esophagus is a muscular tube that connects the throat to the stomach, playing a crucial role in the process of digestion. It serves as a conduit for food and liquids, allowing them to pass from the mouth to the stomach for further processing. In this article, we will explore the functions of the esophagus, understanding its vital role in digestion and how it contributes to the overall well-being of an individual.
Function 1: Food Transport
The primary function of the esophagus is to transport food and liquids from the mouth to the stomach. When we swallow, the muscles in the esophagus contract in a coordinated manner, propelling the food bolus downward through a series of rhythmic contractions known as peristalsis. This movement allows the food to bypass the throat and safely reach the stomach for further digestion.
Function 2: Mucus Secretion
The esophagus also plays a role in mucus secretion. Specialized cells within the lining of the esophagus produce mucus, a slippery substance that helps lubricate and protect the walls of the esophagus. This mucus layer prevents friction and damage as food passes through the esophagus, ensuring smooth and efficient transport.
Function 3: Prevention of Acid Reflux
Another important function of the esophagus is to prevent acid reflux. At the junction between the esophagus and the stomach, there is a muscular ring called the lower esophageal sphincter (LES). The LES acts as a valve, opening to allow food to enter the stomach and closing to prevent stomach acid from flowing back into the esophagus. This mechanism helps protect the delicate lining of the esophagus from the corrosive effects of stomach acid.
Function 4: Sensory Perception
The esophagus is involved in sensory perception related to swallowing and digestion. Nerve endings within the esophagus detect the presence of food and liquids, triggering the swallowing reflex. This reflex initiates the coordinated contraction of the esophageal muscles and the relaxation of the LES, allowing the food to pass through. Additionally, the esophagus can sense discomfort or irritation, signaling the brain to initiate protective responses such as coughing or clearing the throat.
Function 5: Passage of Air
Although the primary function of the esophagus is to transport food, it also allows for the passage of air during burping or belching. When excess air accumulates in the stomach or upper digestive tract, it can be released by a voluntary or involuntary relaxation of the upper esophageal sphincter. This allows the air to travel up the esophagus and be expelled through the mouth, providing relief from discomfort.
Frequently Asked Questions (FAQ)
Q1: Can the esophagus become blocked or obstructed?
A1: Yes, the esophagus can become blocked or obstructed, leading to difficulty in swallowing. This condition is known as esophageal obstruction or dysphagia. It can be caused by various factors, including structural abnormalities, tumors, strictures, or the presence of foreign objects. Treatment options depend on the underlying cause and may include medication, dilation procedures, or surgical intervention.
Q2: Are there any diseases or conditions associated with the esophagus?
A2: Yes, there are several diseases and conditions that can affect the esophagus. Examples include gastroesophageal reflux disease (GERD), esophagitis, Barrett’s esophagus, and esophageal cancer. GERD is a chronic condition characterized by the reflux of stomach acid into the esophagus, causing symptoms such as heartburn and acid regurgitation. Esophagitis refers to inflammation of the esophagus, often caused by GERD or infections. Barrett’s esophagus is a condition where the lining of the esophagus changes, increasing the risk of esophageal cancer. Esophageal cancer refers to the development of cancerous tumors in the esophagus. These conditions may require medical management and treatment.
Q3: How can I maintain the health of my esophagus?
A3: Maintaining the health of your esophagus is essential for proper digestion and overall well-being. Here are some tips to support the health of your esophagus:
1. Practice mindful eating: Chew your food thoroughly and eat at a relaxed pace. This helps ensure that food is properly broken down before swallowing, reducing the strain on the esophagus.
2. Maintain a healthy weight: Excess weight can put pressure on the abdomen, increasing the risk of acid reflux and esophageal issues. Maintain a healthy weight through a balanced diet and regular exercise.
3. Avoid trigger foods and beverages: Certain foods and beverages, such as spicy foods, citrus fruits, and carbonated drinks, can trigger acid reflux and irritate the esophagus. Identify your personal triggers and limit their consumption.
4. Quit smoking: Smoking can weaken the lower esophageal sphincter and increase the risk of acid reflux. Quitting smoking not only benefits your esophageal health but also improves your overall well-being.
5. Manage stress: Chronic stress can contribute to digestive issues, including esophageal problems. Find healthy ways to manage stress, such as practicing relaxation techniques, exercising, or seeking support from a therapist.
Q4: Can lifestyle changes help alleviate symptoms of acid reflux?
A4: Yes, lifestyle changes can often help alleviate symptoms of acid reflux and improve esophageal health. Some recommended changes include:
1. Elevate the head of your bed: Raising the head of your bed by 6 to 8 inches can help prevent stomach acid from flowing back into the esophagus during sleep.
2. Avoid eating before bedtime: Allow at least 2 to 3 hours between your last meal and bedtime to give your stomach enough time to empty.
3. Wear loose-fitting clothing: Tight clothing, especially around the waist, can put pressure on the abdomen and increase the risk of acid reflux. Opt for loose-fitting clothing to reduce this pressure.
4. Limit alcohol consumption: Alcohol can relax the lower esophageal sphincter and worsen acid reflux symptoms. Limit your alcohol intake or avoid it altogether.
5. Practice portion control: Overeating can put pressure on the stomach and increase the likelihood of acid reflux. Practice portion control and eat smaller, more frequent meals throughout the day.
Q5: When should I seek medical attention for esophageal symptoms?
A5: It is advisable to seek medical attention if you experience persistent or severe esophageal symptoms. These may include difficulty swallowing, chest pain, unexplained weight loss, frequent heartburn, or persistent coughing. A healthcare professional can evaluate your symptoms, perform diagnostic tests if necessary, and provide appropriate treatment options.
Conclusion
The esophagus is a remarkable organ with multiple functions that contribute to the process of digestion. From transporting food to preventing acid reflux and facilitating the passage of air, the esophagus plays a vital role in maintaining our overall well-being. By understanding its functions and taking steps to support its health, we can ensure optimal digestion and a healthy esophageal system. Remember to practice mindful eating, maintain a healthy lifestyle, and seek medical attention when needed to keep your esophagus in top condition.
Related Posts
|
__label__pos
| 0.999958 |
Resources Contact Us Home
Browse by: INVENTOR PATENT HOLDER PATENT NUMBER DATE
Nitrous oxide anneal of TEOS/ozone CVD for improved gapfill
Image Number 7 for United States Patent #7141483.
A method of filling a gap defined by adjacent raised features on a substrate includes providing a flow of a silicon-containing processing gas to a chamber housing the substrate and providing a flow of an oxidizing gas to the chamber. The method also includes depositing a first portion of a film as a substantially conformal layer in the gap by causing a reaction between the silicon-containing processing gas and the oxidizing gas. Depositing the conformal layer includes varying over time a ratio of the (silicon-containing processing gas):(oxidizing gas) and regulating the chamber to a pressure in a range from about 200 torr to about 760 torr throughout deposition of the conformal layer. The method also includes depositing a second portion of the film as a bulk layer. Depositing a second portion of the film includes maintaining the ratio of the (silicon-containing processing gas):(oxidizing gas) substantially constant throughout deposition of the bulk layer and regulating the chamber to a pressure in a range from about 200 torr to about 760 torr throughout deposition of the bulk layer. The method also includes exposing the substrate to nitrous oxide at a temperature less than about 900.degree. C. to anneal the deposited film.
Recently Added Patents
Negative active material for a rechargeable lithium battery, a method of preparing the same, and a rechargeable lithium battery comprising the same
Pharmaceutical composition comprising gabapentin or an analogue thereof and an .alpha.-aminoamide and its analgesic use
Tap and linking module TDO register, gating for TCK and TMS
Interleaving charge pumps for programmable memories
Power converter for an LED assembly and lighting application
Methods for forming patterned structures
Polymer bonded fibrous coating on dipped rubber articles skin contacting external surface
Randomly Featured Patents
Airbag arrangement for a vehicle occupant restraint system and method for producing an airbag arrangement
Color video system with illuminant-independent properties
Dynamic combining threshold for a rake receiver
Antenna transducer assembly, and an associated method therefor
Bar code reading apparatus having a detection sensitivity setting device
Banquet table with pivotable legs
Multiple head marking device
One-shot circuit for use in a PLL clock recovery circuit
Radio frequency circuit module on multi-layer substrate
System for providing application and management service and modifying user interface and method thereof
|
__label__pos
| 0.796933 |
Matter makes up everything, everywhere. All matter, both living and non-living, is composed of miniature chemical building blocks called atoms. Your body contains billions of hydrogen, oxygen, nitrogen, phosphorus, sulfur and carbon atoms.
What is life? What does it mean to be alive? How is something made “living”?
There is no universal agreement on what life is. However, scientists generally accept that the biological manifestation of life exhibits seven specific characteristics. In order for something to be described as living, that something must display all seven of those characteristics.
Biology is the study of life. But what is life? All living organisms share the following characteristics. These characteristics of life can be remembered with the use of “GRAMMIC”.
All Living Things …
1. Grow
A growing organism increases in size in all of its parts, rather than simply accumulating matter. The particular species begins to multiply and expand as the evolution continues to flourish.
2. Reproduce.
All living organisms reproduce to produce new organisms, either by sexual or asexual means.
3. Adaptation
Living organisms adapt to their environment and evolve.
4. Movement
Living things have moving parts or processes. Examples include the following processes cytoplasmic flow, cilia, flagella, muscles.
5. Metabolism … depend on chemical reactions and require energy.
Living organisms require chemical processes to maintain life. They use energy to carry out energy-requiring activities such as digestion, reproduction, cellular processes and locomotion.
6. Irritability… respond to stimuli.
A response can take many forms, but a response is often expressed by motion, for example, the leaves of a plant turning toward the sun or an animal chasing its prey
7. Cells
Cells are the basic components of all living things. If it doesn’t have cells its not alive. Some organisms are single-celled, like bacteria, or multi-celled, like humans.
Related Articles
Leave a Reply
avatar
|
__label__pos
| 0.995646 |
Chapter 19: Complex Reaction Mechanism
Example Problem: 19.1, Page Number 501
In [9]:
import numpy as np
from numpy import arange,array,ones,linalg
from matplotlib.pylab import plot,show
%matplotlib inline
#Variable declaration
Ce = 2.3e-9 #Initial value of enzyme concentration, M
r = array([2.78e-5,5.e-5,8.33e-5,1.67e-4])
CCO2 = array([1.25e-3,2.5e-3,5.e-3,20.e-3])
#Calculations
rinv = 1./r
CCO2inv = 1./CCO2
xlim(0,850)
ylim(0,38000)
xi = CCO2inv
A = array([ CCO2inv, ones(size(CCO2inv))])
# linearly generated sequence
w = linalg.lstsq(A.T,rinv)[0] # obtaining the parameters
slope = w[0]
intercept = w[1]
line = w[0]*CCO2inv+w[1] # regression line
plot(CCO2inv,line,'r-',CCO2inv,rinv,'o')
xlabel('$ {C_{CO}}_2, mM^{-1} $')
ylabel('$ Rate^{-1}, s/M^{-1} $')
show()
rmax = 1./intercept
k2 = rmax/Ce
Km = slope*rmax
#Results
print 'Km and k2 are %4.1f mM and %3.1e s-1'%(Km*1e3,k2)
Km and k2 are 10.0 mM and 1.1e+05 s-1
Example Problem: 19.2, Page Number 507
In [11]:
from numpy import arange,array,ones,linalg
from matplotlib.pylab import plot,show
%matplotlib inline
#Variable declaration
Vads = array([5.98,7.76,10.1,12.35,16.45,18.05,19.72,21.1]) #Adsorption data at 193.5K
P = array([2.45,3.5,5.2,7.2,11.2,12.8,14.6,16.1]) #Pressure, torr
#Calculations
Vinv = 1./Vads
Pinv =1./P
xlim(0,0.5)
ylim(0,0.2)
A = array([ Pinv, ones(size(Pinv))])
# linearly generated sequence
w = linalg.lstsq(A.T,Vinv)[0] # obtaining the parameters
m = w[0]
c = w[1]
line = m*Pinv+c # regression line
plot(Pinv,line,'r-',Pinv,Vinv,'o')
xlabel('$ 1/P, Torr^{-1} $')
ylabel('$ 1/V_{abs}, cm^{-1}g $')
show()
Vm = 1./c
K = 1./(m*Vm)
#Results
print 'Slope and intercept are %5.4f torr.g/cm3 and %5.4f g/cm3'%(m,c)
print 'K and Vm are %4.2e Torr^-1 and %3.1f cm3/g'%(K,Vm)
Slope and intercept are 0.3449 torr.g/cm3 and 0.0293 g/cm3
K and Vm are 8.48e-02 Torr^-1 and 34.2 cm3/g
Example Problem: 19.4, Page Number 520
In [19]:
from numpy import arange,array,ones,linalg
from matplotlib.pylab import plot,show
%matplotlib inline
#Variable declaration
CBr = array([0.0005,0.001,0.002,0.003,0.005]) #C6Br6 concentration, M
tf = array([2.66e-7,1.87e-7,1.17e-7,8.50e-8,5.51e-8]) #Fluroscence life time, s
#Calculations
Tfinv = 1./tf
xlim(0,0.006)
ylim(0,2.e7)
A = array([ CBr, ones(size(CBr))])
# linearly generated sequence
[m,c] = linalg.lstsq(A.T,Tfinv)[0] # obtaining the parameters
line = m*CBr+c # regression line
plot(CBr,line,'r-',CBr,Tfinv,'o')
xlabel('$ Br_6C_6, M $')
ylabel('$ tau_f $')
show()
#Results
print 'Slope and intercept are kq = %5.4e per s and kf = %5.4e per s'%(m,c)
Slope and intercept are kq = 3.1995e+09 per s and kf = 2.1545e+06 per s
Example Problem: 19.5, Page Number 523
In [21]:
from scipy.optimize import root
#Variable Declaration
r = 11. #Distance of residue separation, °A
r0 = 9. #Initial Distance of residue separation, °A
EffD = 0.2 #Fraction decrease in eff
#Calculations
Effi = r0**6/(r0**6+r**6)
Eff = Effi*(1-EffD)
f = lambda r: r0**6/(r0**6+r**6) - Eff
sol = root(f, 12)
rn = sol.x[0]
#Results
print 'Separation Distance at decreased efficiency %4.2f'%rn
Separation Distance at decreased efficiency 11.53
Example Problem: 19.6, Page Number 525
In [4]:
#Variable Declarations
mr = 2.5e-3 #Moles reacted, mol
P = 100.0 #Irradiation Power, J/s
t = 27 #Time of irradiation, s
h = 6.626e-34 #Planks constant, Js
c = 3.0e8 #Speed of light, m/s
labda = 280e-9 #Wavelength of light, m
#Calculation
Eabs = P*t
Eph = h*c/labda
nph = Eabs/Eph #moles of photone
phi = mr/6.31e-3
#Results
print 'Total photon energy absorbed by sample %3.1e J'%Eabs
print 'Photon energy absorbed at 280 nm is %3.1e J'%Eph
print 'Total number of photon absorbed by sample %3.1e photones'%nph
print 'Overall quantum yield %4.2f'%phi
Total photon energy absorbed by sample 2.7e+03 J
Photon energy absorbed at 280 nm is 7.1e-19 J
Total number of photon absorbed by sample 3.8e+21 photones
Overall quantum yield 0.40
Example Problem: 19.7, Page Number 530
In [9]:
from math import exp
#Variable Declarations
r = 2.0e9 #Rate constant for electron transfer, per s
labda = 1.2 #Gibss energy change, eV
DG = -1.93 #Gibss energy change for 2-naphthoquinoyl, eV
k = 1.38e-23 #Boltzman constant, J/K
T = 298.0 #Temeprature, K
#Calculation
DGS = (DG+labda)**2/(4*labda)
k193 = r*exp(-DGS*1.6e-19/(k*T))
#Results
print 'DGS = %5.3f eV'%DGS
print 'Rate constant with barrier to electron transfer %3.2e per s'%k193
DGS = 0.111 eV
Rate constant with barrier to electron transfer 2.66e+07 per s
|
__label__pos
| 0.989984 |
Documentation Home
MySQL 8.0 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 46.1Mb
PDF (A4) - 46.2Mb
PDF (RPM) - 41.5Mb
HTML Download (TGZ) - 10.6Mb
HTML Download (Zip) - 10.6Mb
HTML Download (RPM) - 9.1Mb
Man Pages (TGZ) - 220.4Kb
Man Pages (Zip) - 325.8Kb
Info (Gzip) - 4.1Mb
Info (Zip) - 4.1Mb
Excerpts from this Manual
MySQL 8.0 Reference Manual / ... / Window Function Optimization
8.2.1.20 Window Function Optimization
Window functions affect the strategies the optimizer considers:
• Derived table merging for a subquery is disabled if the subquery has window functions. The subquery is always materialized.
• Semi-joins are not applicable to window function optimization because semi-joins apply to subqueries in WHERE and JOIN ... ON, which cannot contain window functions.
• The optimizer processes multiple windows that have the same ordering requirements in sequence, so sorting can be skipped for windows following the first one.
• The optimizer makes no attempt to merge windows that could be evaluated in a single step (for example, when multiple OVER clauses contain identical window definitions). The workaround is to define the window in a WINDOW clause and refer to the window name in the OVER clauses.
An aggregate function not used as a window function is aggregated in the outermost possible query. For example, in this query, MySQL sees that COUNT(t1.b) is something that cannot exist in the outer query because of its placement in the WHERE clause:
SELECT * FROM t1 WHERE t1.a = (SELECT COUNT(t1.b) FROM t2);
Consequently, MySQL aggregates inside the subquery, treating t1.b as a constant and returning the count of rows of t2.
Replacing WHERE with HAVING results in an error:
mysql> SELECT * FROM t1 HAVING t1.a = (SELECT COUNT(t1.b) FROM t2);
ERROR 1140 (42000): In aggregated query without GROUP BY, expression #1
of SELECT list contains nonaggregated column 'test.t1.a'; this is
incompatible with sql_mode=only_full_group_by
The error occurs because COUNT(t1.b) can exist in the HAVING, and so makes the outer query aggregated.
Window functions (including aggregate functions used as window functions) do not have the preceding complexity. They always aggregate in the subquery where they are written, never in the outer query.
Window function evaluation may be affected by the value of the windowing_use_high_precision system variable, which determines whether to compute window operations without loss of precision. By default, windowing_use_high_precision is enabled.
For some moving frame aggregates, the inverse aggregate function can be applied to remove values from the aggregate. This can improve performance but possibly with a loss of precision. For example, adding a very small floating-point value to a very large value causes the very small value to be hidden by the large value. When inverting the large value later, the effect of the small value is lost.
Loss of precision due to inverse aggregation is a factor only for operations on floating-point (approximate-value) data types. For other types, inverse aggregation is safe; this includes DECIMAL, which permits a fractional part but is an exact-value type.
For faster execution, MySQL always uses inverse aggregation when it is safe:
• For floating-point values, inverse aggregation is not always safe and might result in loss of precision. The default is to avoid inverse aggregation, which is slower but preserves precision. If it is permissible to sacrifice safety for speed, windowing_use_high_precision can be disabled to permit inverse aggregation.
• For nonfloating-point data types, inverse aggregation is always safe and is used regardless of the windowing_use_high_precision value.
• windowing_use_high_precision has no effect on MIN() and MAX(), which do not use inverse aggregation in any case.
For evaluation of the variance functions STDDEV_POP(), STDDEV_SAMP(), VAR_POP(), VAR_SAMP(), and their synonyms, evaluation can occur in optimized mode or default mode. Optimized mode may produce slightly different results in the last significant digits. If such differences are permissible, windowing_use_high_precision can be disabled to permit optimized mode.
For EXPLAIN, windowing execution plan information is too extensive to display in traditional output format. To see windowing information, use EXPLAIN FORMAT=JSON and look for the windowing element.
|
__label__pos
| 0.863886 |
Determining the Pareto front of distributed generator and static VAR compensator units placement in distribution networks
Bahman Ahmadi, Ramazan Çağlar
Research output: Contribution to journalArticleAcademicpeer-review
6 Citations (Scopus)
28 Downloads (Pure)
Abstract
The integration of distributed generators (DGs), which are based on renewable energy sources, energy storage systems, and static VAR compensators (SVCs), requires considering more challenging operational cases due to the variability of DG production contributed by different characteristics for different time sequences. The size, quantity, technology, and location of DG units have major effects on the system to benefit from the integration. All these aspects create a multi-objective scope; therefore, it is considered a multi-objective mixed-integer optimization problem. This paper presents an improved multi-objective salp swarm optimization algorithm (MOSSA) to obtain multiple Pareto efficient solutions for the optimal number, location, and capacity of DGs and the controlling strategy of SVC a radial distribution system. MOSSA is a bio-inspired optimizer based on swarm intelligence techniques and it is used in finding the optimal solution for a global optimization problem. Two sets of objective functions have been formulated minimizing DGs and SVC cost, voltage violation, energy losses, and system emission cost. The usefulness of the proposed MOSSA has been tested with the 33-bus and 141-bus radial distribution systems and the qualitative comparisons against two well-known algorithms, multiple objective evolutionary algorithms based on decomposition (MOEA/D), and multiple objective particle swarm optimization (MOPSO) algorithm.
Original languageEnglish
Pages (from-to)3440-3453
Number of pages14
JournalInternational Journal of Electrical and Computer Engineering
Volume12
Issue number4
DOIs
Publication statusPublished - Aug 2022
Externally publishedYes
Keywords
• Multi-objective salp swarm
• Optimal planning
• Optimization algorithm
• Pareto efficient
• Photovoltaic
• Power distribution planning
• Wind power generation
Fingerprint
Dive into the research topics of 'Determining the Pareto front of distributed generator and static VAR compensator units placement in distribution networks'. Together they form a unique fingerprint.
Cite this
|
__label__pos
| 0.951447 |
24
I have some audio data loaded in a numpy array and I wish to segment the data by finding silent parts, i.e. parts where the audio amplitude is below a certain threshold over a a period in time.
An extremely simple way to do this is something like this:
values = ''.join(("1" if (abs(x) < SILENCE_THRESHOLD) else "0" for x in samples))
pattern = re.compile('1{%d,}'%int(MIN_SILENCE))
for match in pattern.finditer(values):
# code goes here
The code above finds parts where there are at least MIN_SILENCE consecutive elements smaller than SILENCE_THRESHOLD.
Now, obviously, the above code is horribly inefficient and a terrible abuse of regular expressions. Is there some other method that is more efficient, but still results in equally simple and short code?
40
Here's a numpy-based solution.
I think (?) it should be faster than the other options. Hopefully it's fairly clear.
However, it does require a twice as much memory as the various generator-based solutions. As long as you can hold a single temporary copy of your data in memory (for the diff), and a boolean array of the same length as your data (1-bit-per-element), it should be pretty efficient...
import numpy as np
def main():
# Generate some random data
x = np.cumsum(np.random.random(1000) - 0.5)
condition = np.abs(x) < 1
# Print the start and stop indices of each region where the absolute
# values of x are below 1, and the min and max of each of these regions
for start, stop in contiguous_regions(condition):
segment = x[start:stop]
print start, stop
print segment.min(), segment.max()
def contiguous_regions(condition):
"""Finds contiguous True regions of the boolean array "condition". Returns
a 2D array where the first column is the start index of the region and the
second column is the end index."""
# Find the indicies of changes in "condition"
d = np.diff(condition)
idx, = d.nonzero()
# We need to start things after the change in "condition". Therefore,
# we'll shift the index by 1 to the right.
idx += 1
if condition[0]:
# If the start of condition is True prepend a 0
idx = np.r_[0, idx]
if condition[-1]:
# If the end of condition is True, append the length of the array
idx = np.r_[idx, condition.size] # Edit
# Reshape the result into two columns
idx.shape = (-1,2)
return idx
main()
5
• This results in an impressive 20x speedup! It doesn't take into account the minimum length, but that's fairly easy to add. Only problem is the increased memory usage which makes it infeasible to use in some situation, so I think I will make use of this by default and add an option to use another algorithm when low on memory. – pafcu Dec 21 '10 at 5:46
• 1
With numpy 1.9, I get a DeprecationWarning: numpy boolean subtract (the binary - operator) is deprecated using np.diff on the boolean condition. I replaced this line with d = np.subtract(condition[1:], condition[:-1], dtype=np.float) to avoid the issue. – daryl Sep 29 '14 at 15:30
• 2
@daryl - Thanks for noticing the change! It might be clearer to do d = np.diff(condition.astype(int)) instead, though that's mostly a matter of personal preference. – Joe Kington Sep 29 '14 at 19:10
• Update on the deprecation: numpy.diff got specific defined behaviour for bools, which keeps this working, and it no longer shows a warning. So it appears safe to use the code in the answer again without the modifications from comments. Discussion here: github.com/numpy/numpy/issues/9251 – Thomas K Jun 24 '18 at 17:29
• Just a heads up - I use part of your code with attributation for an answer to another question - see https://stackoverflow.com/a/58039852/7505395 – Patrick Artner Sep 21 '19 at 11:34
8
There is a very convenient solution to this using scipy.ndimage. For an array:
a = np.array([1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0])
which can be the result of a condition applied to another array, finding the contiguous regions is as simple as:
regions = scipy.ndimage.find_objects(scipy.ndimage.label(a)[0])
Then, applying any function to those regions can be done e.g. like:
[np.sum(a[r]) for r in regions]
7
Slightly sloppy, but simple and fast-ish, if you don't mind using scipy:
from scipy.ndimage import gaussian_filter
sigma = 3
threshold = 1
above_threshold = gaussian_filter(data, sigma=sigma) > threshold
The idea is that quiet portions of the data will smooth down to low amplitude, and loud regions won't. Tune 'sigma' to affect how long a 'quiet' region must be; tune 'threshold' to affect how quiet it must be. This slows down for large sigma, at which point using FFT-based smoothing might be faster.
This has the added benefit that single 'hot pixels' won't disrupt your silence-finding, so you're a little less sensitive to certain types of noise.
3
I haven't tested this but you it should be close to what you are looking for. Slightly more lines of code but should be more efficient, readable, and it doesn't abuse regular expressions :-)
def find_silent(samples):
num_silent = 0
start = 0
for index in range(0, len(samples)):
if abs(samples[index]) < SILENCE_THRESHOLD:
if num_silent == 0:
start = index
num_silent += 1
else:
if num_silent > MIN_SILENCE:
yield samples[start:index]
num_silent = 0
if num_silent > MIN_SILENCE:
yield samples[start:]
for match in find_silent(samples):
# code goes here
1
• 1
Your code looks good, except that if the piece of silence is at the end of samples, then it won't be found. You need to check after the for loop for it. – Justin Peel Dec 20 '10 at 22:48
2
This should return a list of (start,length) pairs:
def silent_segs(samples,threshold,min_dur):
start = -1
silent_segments = []
for idx,x in enumerate(samples):
if start < 0 and abs(x) < threshold:
start = idx
elif start >= 0 and abs(x) >= threshold:
dur = idx-start
if dur >= min_dur:
silent_segments.append((start,dur))
start = -1
return silent_segments
And a simple test:
>>> s = [-1,0,0,0,-1,10,-10,1,2,1,0,0,0,-1,-10]
>>> silent_segs(s,2,2)
[(0, 5), (9, 5)]
1
• This seems to be about 25% faster than the regexp-based solution. Nice. Now it only takes 9 minutes :-) – pafcu Dec 20 '10 at 23:23
2
another way to do this quickly and concisely:
import pylab as pl
v=[0,0,1,1,0,0,1,1,1,1,1,0,1,0,1,1,0,0,0,0,0,1,0,0]
vd = pl.diff(v)
#vd[i]==1 for 0->1 crossing; vd[i]==-1 for 1->0 crossing
#need to add +1 to indexes as pl.diff shifts to left by 1
i1=pl.array([i for i in xrange(len(vd)) if vd[i]==1])+1
i2=pl.array([i for i in xrange(len(vd)) if vd[i]==-1])+1
#corner cases for the first and the last element
if v[0]==1:
i1=pl.hstack((0,i1))
if v[-1]==1:
i2=pl.hstack((i2,len(v)))
now i1 contains the beginning index and i2 the end index of 1,...,1 areas
1
@joe-kington I've got about 20%-25% speed improvement over np.diff / np.nonzero solution by using argmax instead (see code below, condition is boolean)
def contiguous_regions(condition):
idx = []
i = 0
while i < len(condition):
x1 = i + condition[i:].argmax()
try:
x2 = x1 + condition[x1:].argmin()
except:
x2 = x1 + 1
if x1 == x2:
if condition[x1] == True:
x2 = len(condition)
else:
break
idx.append( [x1,x2] )
i = x2
return idx
Of course, your mileage may vary depending on your data.
Besides, I'm not entirely sure, but i guess numpy may optimize argmin/argmax over boolean arrays to stop searching on first True/False occurrence. That might explain it.
0
I know I'm late to the party, but another way to do this is with 1d convolutions:
np.convolve(sig > threshold, np.ones((cons_samples)), 'same') == cons_samples
Where cons_samples is the number of consecutive samples you require above threshold
Your Answer
By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy
Not the answer you're looking for? Browse other questions tagged or ask your own question.
|
__label__pos
| 0.899287 |
Your first Business Rules application on OpenShift: from Zero to Hero in 30 minutes
Your first Business Rules application on OpenShift: from Zero to Hero in 30 minutes
In a previous blog post, we explained how to deploy an existing JBoss BRMS/Drools rules project onto an OpenShift DecisionServer. We created a decision/business-rules microservice on OpenShift Container Platform that was implemented by a BRMS application. The polyglot nature of a microservice architecture allowed us to use the best implementation (a rules engine) for this given functionality (business rules execution) in our architecture.
The project we used was an existing rules project that was available on GitHub. We did however not explain how one can create a project from scratch in the JBoss BRMS Business Central environment and deploy it on OpenShift Container Platform. That is what we will explore in this article.
Building the rules project
Red Hat JBoss BRMS provides a workbench, authoring environment and project & rules repository called “Business Central”. We will use Business Central to create our rules project, define our data model, and create our rules.
We provide a Red Hat JBoss BRMS Installation Demo that provides an easy installation of the BRMS platform. Please follow this demo to install and start the platform. Once the platform is started, we can create our project. The project will be a simple “Loan Application” demo (in fact, it will be based on one of our existing demo’s, which can be found here).
Open “Business Central” at “http://localhost:8080/business-central” and provide the username (brmsAdmin) and password (jbossbrms1!) (if you’ve installed the platform in a Docker container, use the URL of your Docker host as explained in the README of the Install Demo). We first need to create a so-called Organizational Unit (OU) in the “Business Central” interface:
1. Click on “Authoring -> Administration”
2. Click on “Organizational Units -> Manage Organizational Units”
3. Click on “Add” and create a new Organizational Unit with name “Demos” (you can leave the other fields in the screen empty).
Now we’re going to create a new repository in which we can store our project:
1. Click on “Repositories -> New repository”
2. Give it the name “loan” and assign it to the “Demos” OU we created earlier (leave “Managed Repository” unchecked).
Our next task is to create the project:
1. Click on “Authoring -> Project Authoring”
2. Click on “New Item -> Project”
3. Provide the following details:
– Project Name: loandemo
– Group ID: com.redhat.demos
– Artifact ID: loandemo
– Version: 1.0
Creating the Data Model
Now that we have a project, we can create our data model. In this example, we will create a simple data model consisting of 2 classes: Applicant and Loan.
1. Click on “New Item -> Data Object”
2. Give the object the name “Applicant”
3. Set the package to “com.redhat.demos.loandemo”
4. Give the object two fields:
– creditScore: int (Label: CreditScore)
– name: String (Label: Name)
Next, create a data object with name “Loan” in package “com.redhat.demos.loandemo” with the following fields:
• Amount: int (Label: Amount)
• approved: boolean (Label: Approved)
• Duration: int (Label: Duration)
• InterestRate: double (Label: InterestRate)
Make sure to save the objects using the “save” button (upper right corner) of the editor. We can now create our rules.
Writing the rules
We will create our rules in the form of a decision table:
1. Click on “New Item -> Guided Decision Table”
2. Give it the name “LoanApproval”
3. Set the package to “com.redhat.demos.loan”
4. Make sure to select “Extended entry, values defined in table body”
Our decision table will consist of 4 Constraint columns and one Action column. Our Constraint columns define the so-called Left-Hand-Side of our rules, the “when” part. The Action column defines the Right-Hand-Side or “then” part.
To add a Condition column:
1. Click on the “+” sign next to the word “Decision Table”
2. Click on “New Column”
3. Select “Add a Simple Condition” and define the following settings:
– Pattern: Applicant (set “a” for binding)
– Calculation Type: Literal Value
– Field: creditScore
– Operator: greater than or equal to
– Column Header: Minimum Credit Score
Define 3 additional Condition columns with the following values:
• Pattern: Applicant (set “a” for binding)
• Calculation Type: Literal Value
• Field: creditScore
• Operator: less than or equal to
• Column Header: Maximum Credit Score
• Pattern: Loan (set “l” for binding)
• Calculation Type: Literal Value
• Field: amount
• Operator: greater than or equal to
• Column Header: Minimum Amount
• Pattern: Loan (set “l” for binding)
• Calculation Type: Literal Value
• Field: amountOperator: less than or equal to
• Column Header: Maximum Amount
Finally, we need to configure our Action column:
1. Click again on “New Column”
2. Select “Set the value of a field”
3. Provide the following values:
– Fact: l (this is our Loan fact that we defined in our Condition columns)
– Field: approved
– Column header: Approved?
Save the Decision Table. We can now set the values in our decision table. Each row in our table defines a rule. When complete, the table should look like this:
Configuring the project for OpenShift S2I builds
The Red Hat JBoss BRMS Decision Server in OpenShift Container Platform uses the so-called S2I, or Source-to-Image, concept to build its OpenShift (Docker) container images. In essence, you provide S2I the source code of your rules project, and the build system will use Maven to build the KJAR (Knowledge JAR) containing the data model and rules, deploy this KJAR onto the Decision Server and create the container image.
Because S2I uses Maven, we first need to make sure that our project is buildable by Maven. To verify this, we clone the project onto our local filesystem. Business Central uses a Git repository for storage under the covers, so we can simply use our favorite Git tool to clone the BRMS repository:
> git clone ssh://brmsAdmin@localhost:8001/loan
Note that the Git implementation of Business Central uses an older public key algorithm (DAS), which might require you to add the following settings to your SSH configuration file (on Linux and macOS this file is located at “~/.ssh/config”).
Host localhost
HostKeyAlgorithms +ssh-dss
After the project has been successfully cloned, go to the “loan/loandemo” directory and run “mvn clean install” to start the Maven build. If all his correct, this will produce a build failure:
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.982 s
[INFO] Finished at: 2017-06-07T23:26:18+02:00
[INFO] Final Memory: 34M/396M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5.1-jboss-2:compile (default-compile) on project loandemo: Compilation failure: Compilation failure:
[ERROR] /Users/ddoyle/Development/github/jbossdemocentral/bla/loan/loandemo/src/main/java/com/redhat/demos/loandemo/Applicant.java:[12,32] package org.kie.api.definition.type does not exist
[ERROR] /Users/ddoyle/Development/github/jbossdemocentral/bla/loan/loandemo/src/main/java/com/redhat/demos/loandemo/Applicant.java:[14,32] package org.kie.api.definition.type does not exist
[ERROR] /Users/ddoyle/Development/github/jbossdemocentral/bla/loan/loandemo/src/main/java/com/redhat/demos/loandemo/Loan.java:[12,32] package org.kie.api.definition.type does not exist
[ERROR] /Users/ddoyle/Development/github/jbossdemocentral/bla/loan/loandemo/src/main/java/com/redhat/demos/loandemo/Loan.java:[14,32] package org.kie.api.definition.type does not exist
[ERROR] /Users/ddoyle/Development/github/jbossdemocentral/bla/loan/loandemo/src/main/java/com/redhat/demos/loandemo/Loan.java:[16,32] package org.kie.api.definition.type does not exist
[ERROR] /Users/ddoyle/Development/github/jbossdemocentral/bla/loan/loandemo/src/main/java/com/redhat/demos/loandemo/Loan.java:[18,32] package org.kie.api.definition.type does not exist
This is because our domain model contains Java annotations from the “kie-api” library, however, that dependency is not defined in the “pom.xml” project descriptor of our project. This dependency is not required for builds done in Business Central, as Business Central provides this JAR on the build path implicitly. However, we need to explicitly define this dependency in our “pom.xml” file for our local and Decision Server S2I Maven builds to succeed.
Add the following dependency to the “pom.xml” file of the project:
<dependencies>
<dependency>
<groupId>org.kie</groupId>
<artifactId>kie-api</artifactId>
<version>6.4.0.Final-redhat-13</version>
<scope>provided</scope>
</dependency>
</dependencies>
Note the “provided” scope, as we only require this dependency at compile time. At runtime, this dependency is provided by the Decision Server platform.
Run the build again: “mvn clean install”. The build should now succeed. We can commit these changes and push them back to our Git repository in Business Central with the following commands:
> git add pom.xml
> git commit -m "Added kie-api dependency to POM."
> git push
Making the project accessible to OpenShift S2I
As explained earlier, the BRMS Decision Server S2I build takes the source code of your project, for example from a Git repository, compiles the sources into a KJAR, deploys the KJAR onto the Decision Server and builds the OpenShift image (detailed information about the xPaaS BRMS image for OpenShift can be found in the manual). Therefore, the S2I build needs to have access to our project’s source code.
In our demo, we have 2 options to make our project available to the S2I build image:
1. If we can access our Business Central environment from our OpenShift instance, we can point the S2I image directly to our Git repository in Business Central. This repository is located at “git://localhost:9418/loan”.
2. Make the Git repo available at a location that the OpenShift can access, for example, GitHub.
In this example, we will use the second option and make our Git repository accessible via GitHub (other platforms, like Gitlab, Bitbucket or an internal Gogs instance can, of course, be used as well). To accomplish this we need to create an empty repository on Github, for example at https://www.github.com/DuncanDoyle/loan”.
Next, we add this new repository as the “upstream” repository to the local clone of our BRMS Business Central git repository:
> git remote add upstream [email protected]:DuncanDoyle/loan.git
> git push upstream master
Our BRMS Loan Demo project is now available on and accessible via, GitHub.
Deploying our Business Rules on OpenShift
In the previous Micro-rules on OpenShift blog post, we explained how to setup an OpenShift environment so that we can deploy a rules micro-service on the Decision Server. We will not repeat the setup documentation in this article, so please consult that post to learn how to quickly setup a local OpenShift environment.
Once we have access to an OpenShift environment that has the correct ImageStreams (jboss-decisionserver63-openshift) and templates (decisionserver63-basic-s2i) deployed, we can create a new project and our new application using the following command:
> oc new-project loan-demo --display-name="Loan Demo" --description="Red Hat JBoss BRMS Decision Server Loan Demo"
> oc new-app --template=decisionserver63-basic-s2i -p APPLICATION_NAME="loan-demo" -p KIE_SERVER_USER="brmsAdmin" -p KIE_SERVER_PASSWORD="jbossbrms@01" -p SOURCE_REPOSITORY_URL="https://github.com/DuncanDoyle/loan.git" -p SOURCE_REPOSITORY_REF=master -p KIE_CONTAINER_DEPLOYMENT="container-loan10=com.redhat.demos:loandemo:1.0" -p CONTEXT_DIR="loandemo"
Note that the syntax of this “new-app” command is a bit different from the syntax of the same command in our Micro-rules on OpenShift blog post. In newer versions of OpenShift, all parameters provided to the command need to be prefixed with “-p”.
We can check the status of the S2I build and deployment via the OpenShift CLI tool or the OpenShift Console.
Once the DecisionServer with our project has been deployed, we can send it a Loan Application request. We can use the following cURL command to fire a request:
curl -u brmsAdmin:jbossbrms@01 -X POST -H "Accept: application/json" -H "Content-Type: application/json" -H "X-KIE-ContentType: JSON" -d '{ "commands":[ { "insert":{ "object":{ "com.redhat.demos.loandemo.Applicant":{ "creditScore":230, "name":"Jim Whitehurst" }}, "out-identifier":"applicant" }}, { "insert":{ "object":{ "com.redhat.demos.loandemo.Loan":{ "amount":2500, "approved":false, "duration":24, "interestRate":1.5 }}, "out-identifier":"loan" }}, { "fire-all-rules":{ }}]}' http://loan-demo-loan-demo.127.0.0.1.xip.io/kie-server/services/rest/server/containers/instances/container-loan10
Because the inline JSON in the cUrl command is a bit hard to read, we have printed the formatted JSON request below:
{
"commands":[
{
"insert":{
"object":{
"com.redhat.demos.loandemo.Applicant":{
"creditScore":230,
"name":"Jim Whitehurst"
}
},
"out-identifier":"applicant"
}
},
{
"insert":{
"object":{
"com.redhat.demos.loandemo.Loan":{
"amount":2500,
"approved":false,
"duration":24,
"interestRate":1.5
}
},
"out-identifier":"loan"
}
},
{
"fire-all-rules":{
}
}
]
}
This JSON request is the representation of a BRMS “BatchExecutionCommand” in which we insert 2 objects (facts) into the rules engine, Applicant and Loan, after which we give the command to fire the rules. The response will look like this:
{
"type":"SUCCESS",
"msg":"Container 166d7802fc076eb3d6eda22cf186071c successfully called.",
"result":{
"execution-results":{
"results":[
{
"key":"loan",
"value":{
"com.redhat.demos.loandemo.Loan":{
"amount":2500,
"approved":true,
"duration":24,
"interestRate":1.5
}
}
},
{
"key":"applicant",
"value":{
"com.redhat.demos.loandemo.Applicant":{
"creditScore":230,
"name":"Jim Whitehurst"
}
}
}
],
"facts":[
{
"key":"loan",
"value":{
"org.drools.core.common.DefaultFactHandle":{
"external-form":"0:6:1508714685:1508714685:6:DEFAULT:NON_TRAIT:com.redhat.demos.loandemo.Loan"
}
}
},
{
"key":"applicant",
"value":{
"org.drools.core.common.DefaultFactHandle":{
"external-form":"0:5:576291744:576291744:5:DEFAULT:NON_TRAIT:com.redhat.demos.loandemo.Applicant"
}
}
}
]
}
}
}
Note that the application has been approved, as the “approved” field of our Loan object has been set to “true”.
Conclusion
In this article, we have shown how to get from a clean installation of Red Hat JBoss BRMS to a running Business Rules microservice on the Decision Server in OpenShift. We’ve shown how we can build a simple BRMS project, domain model and decision table for a Loan Application service, how this project can be shared with the OpenShift S2I build system via Git, and how a new rules application on OpenShift can be created. We concluded with an example that shows how to insert data into the rules and engine, fire the rules and receive a response using the BRMS DecisionServer’s RESTful API.
Red Hat JBoss BRMS provides a lightweight Decision Server engine that is extremely suitable for cloud deployments. In combination with Red Hat OpenShift Container Platform, it provides the perfect runtime for business-rules micro-services implementations, providing the power of a business rules engine in modern enterprise architectures.
Duncan Doyle
About the author:
Duncan Doyle is the Technical Marketing Manager for the JBoss BRMS and BPMSuite platforms at Red Hat. With a background in Red Hat Consulting and Services, Duncan has worked extensively with large Red Hat customers to build advanced, open-source, business rules and business process management solutions.
He has a strong background in technologies and concepts like Service Oriented Architecture, Continuous Integration & Delivery, rules engines and BPM platforms and is a subject matter expert (SME) on multiple JBoss Middleware technologies, including, but not limited to, JBoss EAP, HornetQ, Fuse, DataGrid, BRMS, and BPMSuite. When he’s not working on open-source solutions and technology, he is building Legos with his son and daughter or jamming along with some 90’s rock music on his Fender Stratocaster.
Click here to download and quickly get started with Red Hat JBoss BRMS.
Share
|
__label__pos
| 0.874757 |
Control of basal autophagy rate by <i>vacuolar peduncle</i>
<div><p>Basal autophagy is as a compressive catabolic mechanism engaged in the breakdown of damaged macromolecules and organelles leading to the recycling of elementary nutrients. Thought essential to cellular refreshing, little is known about the origin of a constitutional rate of basal autophagy. Here, we found that loss of <i>Drosophila vacuolar peduncle</i> (<i>vap</i>), a presumed GAP enzyme, is associated with enhanced basal autophagy rate and physiological alterations resulting in a wasteful cell energy balance, a hallmark of overactive autophagy. By contrast, starvation-induced autophagy was disrupted in <i>vap</i> mutant conditions, leading to a block of maturation into autolysosomes. This phenotype stem for exacerbated biogenesis of PI(3)P-dependent endomembranes, including autophagosome membranes and ectopic fusions of vesicles. These findings shed new light on the neurodegenerative phenotype found associated to mutant <i>vap</i> adult brains in a former study. A partner of Vap, Sprint (Spri), acting as an endocytic GEF for Rab5, had the converse effect of leading to a reduction in PI(3)P-dependent endomembrane formation in mutants. <i>Spri</i> was conditional to normal basal autophagy and instrumental to the starvation-sensitivity phenotype specific of <i>vap</i>. Rab5 activity itself was essential for PI(3)P and for pre-autophagosome structures formation. We propose that Vap/Spri complexes promote a cell surface-derived flow of endocytic Rab5-containing vesicles, the traffic of which is crucial for the implementation of a basal autophagy rate.</p></div>
|
__label__pos
| 0.885899 |
[473884]: src / icon_source_gicon.c Maximize Restore History
Download this file
icon_source_gicon.c 155 lines (127 with data), 4.5 kB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
/*
rox-media (Media) - DeviceKit-disks utility for ROX
Copyright (C) 2009 Tony Houghton <[email protected]>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <gdk-pixbuf/gdk-pixbuf.h>
#include "i18n.h"
#include "icon_source.h"
#include "icon_source_gicon.h"
#include "icon_source_gicon_priv.h"
#define H_ICON_SOURCE_GICON_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE((obj), \
H_TYPE_ICON_SOURCE_GICON, HIconSourceGIconPrivate))
static GdkPixbuf *
get_pixbuf(HIconSource *iself, int width, int height)
{
HIconSourceGIcon *self = H_ICON_SOURCE_GICON(iself);
HIconSourceGIconPrivate *priv = self->priv;
GError *error = NULL;
GdkPixbuf *pixbuf;
GtkIconInfo *iinfo;
g_return_val_if_fail(self->gicon && priv->theme, NULL);
height = MAX(width, height);
iinfo = gtk_icon_theme_lookup_by_gicon(priv->theme, self->gicon, height,
GTK_ICON_LOOKUP_FORCE_SIZE);
if (iinfo)
pixbuf = gtk_icon_info_load_icon(iinfo, &error);
if (!pixbuf)
{
char *gi_name = g_icon_to_string(self->gicon);
g_warning(_("Unable to generate pixbuf from gicon '%s': %s"),
gi_name, error->message);
g_free(gi_name);
g_error_free(error);
}
gtk_icon_info_free(iinfo);
return pixbuf;
}
static void
h_icon_source_gicon_init_h_icon_source(HIconSourceInterface *iface)
{
iface->get_pixbuf = get_pixbuf;
}
G_DEFINE_TYPE_WITH_CODE(HIconSourceGIcon, h_icon_source_gicon,
G_TYPE_OBJECT,
G_IMPLEMENT_INTERFACE(H_TYPE_ICON_SOURCE,
h_icon_source_gicon_init_h_icon_source));
static void
h_icon_source_gicon_init(HIconSourceGIcon *self)
{
self->priv = H_ICON_SOURCE_GICON_GET_PRIVATE(self);
self->gicon = NULL;;
self->priv->theme = NULL;
}
static void
h_icon_source_gicon_dispose(GObject *gobj)
{
HIconSourceGIcon *self = H_ICON_SOURCE_GICON(gobj);
HIconSourceGIconPrivate *priv = self->priv;
if (priv->theme)
{
g_object_unref(priv->theme);
priv->theme = NULL;
}
if (self->gicon)
{
g_object_unref(self->gicon);
self->gicon = NULL;
}
G_OBJECT_CLASS(h_icon_source_gicon_parent_class)->dispose(gobj);
}
static void
h_icon_source_gicon_finalize(GObject *gobj)
{
G_OBJECT_CLASS(h_icon_source_gicon_parent_class)->finalize(gobj);
}
static void
h_icon_source_gicon_class_init(HIconSourceGIconClass *klass)
{
GObjectClass *gclass;
g_type_class_add_private(klass, sizeof(HIconSourceGIconPrivate));
gclass = G_OBJECT_CLASS(klass);
gclass->dispose = h_icon_source_gicon_dispose;
gclass->finalize = h_icon_source_gicon_finalize;
}
HIconSourceGIcon *
h_icon_source_gicon_new(GdkScreen *screen, GIcon *gicon)
{
HIconSourceGIcon *self = H_ICON_SOURCE_GICON(
g_object_new(H_TYPE_ICON_SOURCE_GICON, NULL));
if (screen)
h_icon_source_gicon_set_screen(self, screen);
if (gicon)
h_icon_source_gicon_set_gicon(self, gicon);
return self;
}
void
h_icon_source_gicon_set_screen(HIconSourceGIcon *self, GdkScreen *screen)
{
HIconSourceGIconPrivate *priv = self->priv;
g_return_if_fail(H_IS_ICON_SOURCE_GICON(self));
if (priv->theme)
gtk_icon_theme_set_screen(priv->theme, screen);
else
priv->theme = gtk_icon_theme_get_for_screen(screen);
g_signal_emit(self, h_icon_source_signals[H_ICON_SOURCE_SIGNAL_CHANGED], 0);
}
void
h_icon_source_gicon_set_gicon(HIconSourceGIcon *self, GIcon *gicon)
{
g_return_if_fail(H_IS_ICON_SOURCE_GICON(self));
if (self->gicon)
g_object_unref(self->gicon);
self->gicon = gicon;
g_object_ref(gicon);
g_signal_emit(self, h_icon_source_signals[H_ICON_SOURCE_SIGNAL_CHANGED], 0);
}
|
__label__pos
| 0.980027 |
D Paste by Anonymous
Description: None
Page views: 1214
Hide line numbers
Create new paste
Post a reply
View replies
Paste:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
/*
Demonstration of a new dialect of the D language
It describes only what differs from D2.0
This language is compatible with C and (probably) D ABI, but not with C++.
*/
/*
Structures and classes are completely similar, except structs are having
controlled
alignment and the lack of polymorphism.
The structures are POD and fully compatible with the structures of the
language C.
*/
struct S {
int var0;
int var1;
int var2;
// Structs constructors are entirely same as in a classes:
this() {
var1 = 5;
}
}
interface I {
void incr();
}
// The structures is a POD.
// They supports inheritance without a polymorphism and they support
// interfaces too.
struct SD : S, I {
int var3;
int var4;
void incr() { ++var3; ++var4; }
/*
Structs constructors are similar to the class constructors.
Calling base constructor super () is required.
*/
this() {
super();
var4 = 8;
}
}
class C, I {
int var;
void incr() { ++var; }
/*
Instead of overloading the operator "=" for classes and structures,
there is present constructor, same as the copy constructor in C++ -
in the parameters it accepts only
object of the same type.
This is differs from D and the need to ensure that copy constructor
can change the source object
(for example, to copy objects linked to the linked-list).
Unlike the C++ constructor, it first makes a copy of the bitwise
the original object, then an additional postblit, the same way as
occurs in D2.0. This allows increase performance of copying than in
C++.
And about references:
When compiling with "-debug" option compiler builds binary with the
reference-counting.
This approach is criticized by Walter Bright there:
http://www.digitalmars.com/d/2.0/faq.html#reference-counting
But, if the language is not have GC, reference-counting is a good
way to make sure that
the object which it references exists. The cost - an additional
pointer dereferencing and
checking the counter (and this is only when compiling with option
"-debug"!).
*/
this( ref C src ) {
var3 = src.var3;
var4 = src.var4;
}
}
class CD : C {
real var2;
void dumb_method() {};
}
void func()
{
/*
Classes to be addressed in the heap by pointer. "*" need to
distinguish the classes in
heap of classes in the stack. I.e., creating classes and structures
takes place the same as creating
them in the C++.
*/
CD cd_stack; // Creates class in a stack
CD* cd_heap = new CD; // Creates class in a heap, new returns
// pointer (same as in C++)
C* c_heap = new C;
C c_stack;
// Copying of a objects (same as in C++)
cd_stack = *cd_heap;
*cd_heap = cd_stack;
/*
Copying of a pointers to the objects
"c_heap" pointer points to the object "cd_heap", with the object to
which the previously pointed "c_heap" is not removed (as there is
no GC and not used smartpointer template).
This is memory leak!
*/
c_heap = cd_heap;
/*
"Slicing" demo:
As a parent object is copied from derived class with additional
fields and methods. The "real var2" field data is not available in
"c_stack" and not will be copied:
*/
c_stack = *cd_heap;
/*
Attempt to place an object of type C into the derived object of type
CD. Field real var2 is not filled by C object. There field now
contains garbage:
*/
cd_stack = c_stack;
cd_stack.var2; // <- garbage data
}
Replies:
No replies posted yet
Post a Reply:
|
__label__pos
| 0.618916 |
God of Source God of Source - 20 days ago 4x
SQL Question
SQL add relations to relation table
I have 3 tables which manage the users an their rights
Employee
+-----------+------+
|EmployeeID | Name |
+-----------+------+
|1 |Tim |
|2 |Tom |
+-----------+------+
Right
+-----------+------+
|RightID |Name |
+-----------+------+
|1 |Read |
|2 |Write |
|3 |Change|
+-----------+------+
EmployeeRight
+-----------+--------+
|EmplyeeID | RightID|
+-----------+--------+
|1 |1 |
|1 |2 |
|2 |1 |
+-----------+--------+
Now I need to give all users the right "Change" which have the right "Write". But users that already have that right should not get it twice.
My current attempt does not work:
INSERT INTO EmployeeRight
(SELECT '3', EmployeeID FROM EmployeeRight WHERE RightID = 2 AND RightID !=3)
Answer
Within a single row RightID can't be both 2 and <>2, you need a query like this:
INSERT INTO EmployeeRight
SELECT EmployeeID, 3
FROM EmployeeRight
WHERE RightID = 2 -- existing right 2
AND EmployeeID NOT IN
(
SELECT EmployeeID
FROM EmployeeRight
WHERE RightID = 3 -- but not those who already have right 3
)
Comments
|
__label__pos
| 0.70395 |
0 follower
Class yii\helpers\Json
Inheritanceyii\helpers\Json » yii\helpers\BaseJson
Available since version2.0
Source Code https://github.com/yiisoft/yii2/blob/master/framework/helpers/Json.php
Json is a helper class providing JSON data encoding and decoding.
It enhances the PHP built-in functions json_encode() and json_decode() by supporting encoding JavaScript expressions and throwing exceptions when decoding fails.
Public Properties
Hide inherited properties
PropertyTypeDescriptionDefined By
$jsonErrorMessages array yii\helpers\BaseJson
Public Methods
Hide inherited methods
MethodDescriptionDefined By
decode() Decodes the given JSON string into a PHP data structure. yii\helpers\BaseJson
encode() Encodes the given value into a JSON string. yii\helpers\BaseJson
errorSummary() Generates a summary of the validation errors. yii\helpers\BaseJson
htmlEncode() Encodes the given value into a JSON string HTML-escaping entities so it is safe to be embedded in HTML code. yii\helpers\BaseJson
Protected Methods
Hide inherited methods
MethodDescriptionDefined By
handleJsonError() Handles encode() and decode() errors by throwing exceptions with the respective error message. yii\helpers\BaseJson
processData() Pre-processes the data before sending it to json_encode(). yii\helpers\BaseJson
|
__label__pos
| 0.975934 |
In this quick article, we will look at different ways of setting up a JavaScript variable by using Spring MVC Model object in a Thymeleaf template. If you need more information on how to use Thymeleaf with Spring Boot, take a look at this introductory tutorial.
Let us say we have the following Java model class named User.java for storing users data:
User.java
public class User implements Serializable {
private String firstName;
private String lastName;
private String email;
private int age;
private Date created;
// constructor, getters, and setters removed for brevity
}
And we have a controller method that creates a new User object and stores it in Spring MVC Model object:
@GetMapping("/")
public String homePage(Model model) {
// create a new user object
User user = new User("John", "Doe", "[email protected]",
29, new Date());
// store user object in `Model` object
model.addAttribute("user", user);
return "index";
}
JavaScript Inlining
JavaScript inlining in Thymeleaf templates allows us to process the JavaScript <script> blocks in HTML template mode. To use all features of HTML template mode in JavaScript blocks, you must enable JavaScript mode by explicitly specifying th:inline="javascript" attribute:
<script th:inline="javascript">
// write code here
</script>
Once the JavaScript mode is enabled, you can now use data from Spring MVC Model object to initialize JavaScript variables as shown below:
<script th:inline="javascript">
var name = [[${user.firstName + ' ' + user.lastName}]];
var email = [[${user.email}]];
var age = [[${user.age}]];
var createdAt = [[${#dates.format(user.created, 'EEE, MMMM dd, yyyy')}]];
</script>
Thymeleaf template engine will process the above JavaScript block and will render the following JavaScript block in the final output:
<script>
var name = "John Doe";
var email = "[email protected]";
var age = 29;
var createdAt = "Thu, January 30, 2020";
</script>
As you can see above, JavaScript inlining not only outputs the required text but also encloses it with quotes to output well-formed JavaScript literals. This happened because we output all expressions as escaped — using a double-bracket expression.
If you would have used unescaped expression like:
<script th:inline="javascript">
// ...
var createdAt = [(${user.created.getTime()})];
</script>
The rendered block would look like the following:
<script>
// ...
var createdAt = 1580334577834;
</script>
Be careful while using an unescaped expression in JavaScript mode. You might end up generating a malformed JavaScript code. For example, if you use an unescaped expression for a string field like email:
var email = [(${user.email})];
It will render like:
var email = [email protected];
And the browser will throw the following JavaScript error:
Uncaught SyntaxError: Invalid or unexpected token
JavaScript Natural Templates
JavaScript inlining is much more smarter than just applying JavaScript-specific escaping and outputting expression results as valid literals.
You can even specify default values for variables by wrapping the inline expressions in JavaScript comments like below:
<script th:inline="javascript">
var name = /*[[${user.firstName + ' ' + user.lastName}]]*/ "John Deo";
var email = /*[[${user.email}]]*/ "[email protected]";
var age = /*[[${user.age}]]*/ 25;
var createdAt = /*[[${user.created}]]*/ "January 29, 2020";
</script>
The above JavaScript inlining mechanism is especially useful for creating a quick prototype of a web page in the form of a static HTML file.
Thymeleaf will ignore everything we have written after the comments and before the semicolon. The static HTML file will have default values for all variables declared above. Since the Thymeleaf expressions are wrapped in comment blocks, the code will also be well-format.
This is what we call JavaScript natural templating! Thymeleaf is, in fact, a natural templating engine that works both in browsers and web applications.
Conclusion
That's all folks. In this short article, we looked at how to use the JavaScript inlining mechanism in Thymleaf templates. JavaScript inlining is a powerful feature that allows us to dynamically set the values of JavaScript variables using data from Spring MVC Model object in Thymeleaf.
JavaScript natural templating is another way of using JavaScript inlining while quickly crafting a static prototype of the website. If you want to learn more about getting started with Thymeleaf in Spring Boot, check out this guide.
✌️ Like this article? Follow me on Twitter and LinkedIn. You can also subscribe to RSS Feed.
|
__label__pos
| 0.676577 |
%A Zhang Li;Wang Jin-Ben;Liu Ming-Hua %T Supramolecular Assembly and Chirality of a Complex Film between Achiral TPPS and a Gemini Surfactant at the Air/water Interface %0 Journal Article %D 2004 %J Acta Phys. -Chim. Sin. %R 10.3866/PKU.WHXB20040407 %P 368-372 %V 20 %N 04 %U {http://www.whxb.pku.edu.cn/CN/abstract/article_25542.shtml} %8 2004-04-15 %X Supramolecular assembly and chirality between a novel gemini surfactant (C12H24-α,ω-(C12H25N+(CH3)2Br-)2), (abbreviated as C12-C12-C12) and TPPS (tetrakis(4-sulfonatophenyl) porphine) at the air/water interface were investigated. It was found that although the gemini surfactant itself could not form a stable monolayer at the air/water interface, when there existed TPPS in the subphase, a stable complex monolayer could be formed. The complex monolayer could be transferred onto solid substrate by a horizontal lifting method. At a certain pH value of the subphase, TPPS could form a J-aggregate. It was further found that the J-aggregate of TPPS showed a strong split Cotton effect in the transferred film although both the gemini surfactant and TPPS are achiral. Further investigation through AFM measurements revealed that the nanothread formed in the transferred film was responsible for the chirality of the multilayer film. In addition, the two positive charge center of the gemini surfactant did not necessarily play the cooperative role in inducing the chirality of TPPS J-aggregate.
|
__label__pos
| 0.752466 |
Speech for Fest
Topics: Electric double-layer capacitor, Electric vehicle, Capacitor Pages: 2 (753 words) Published: April 5, 2013
Abstract of SuperCapacitor
Supercapacitor also known as electric double-layer capacitor (EDLC),electrochemical double layer capacitor, or ultracapacitors, is an electrochemical capacitor with relatively high energy density. Compared to conventional electrolytic capacitors the energy density is typically on the order of hundreds of times greater. In comparison with conventional batteries or fuel cells, EDLCs also have a much higher power density. In this article the use of super capacitors likes hybrid power supply for various applications is presented. The main application is in the field of automation. The specific Power of the super capacitors and its high lifetime (1 million of Cycles) makes it very attractive for the startup of the automobiles. Unfortunately, the specific energy of this component is very low. For that this technology is associated with battery to supply the starter alternator.condenser, pseudo capacitor, electrochemical double layer capacitor, or ultracapacitors, is an electrochemical capacitor with relatively high energy density. Compared to Introduction of Super Capacitor Super capacitors also known as Electric double-layer capacitors, or Super capacitorss, or electrochemical double layer capacitors (EDLCs), or ultracapacitors, are electrochemical capacitors that have an unusually high energy density when compared to common capacitors, typically on the order of thousands of times greater than a high capacity electrolytic capacitor. For instance, a typical electrolytic capacitor will have a capacitance in the range of tens of millifarads. The same size super capacitor would have a capacitance of several farads.electrochemical double layer capacitors (EDLCs), or ultracapacitors, are electrochemical capacitors that have an unusualment of about two
conventional electrolytic capacitors the energy density is typically on the order of In a conventional capacitor, energy is stored by the removal of charge carriers, typically electrons, from one...
Continue Reading
Please join StudyMode to read the full document
You May Also Find These Documents Helpful
• Speech for the Fest Essay
• Speech Essay
• SPEECH Essay
• Speech I Informative Speech Essay
• Demonstration Speech Essay
• Speech Devotional Essay
• persuasive speech Essay
• Persuassive Speech Research Paper
Become a StudyMode Member
Sign Up - It's Free
|
__label__pos
| 0.744339 |
BLOG
What Is a Containerized Data Center?
A containerized data center concept is unique, innovative, challenging, and beneficial. It allows for a well-organized and secure IT infrastructure that is easily accessible. Over time, the popularity of container data centers has increased significantly, leading providers to offer various cooling system options, sizes, spaces, and layouts.
To put it simply, containerization provides a modular solution even for companies that need more skilled IT staff to maintain their systems. In addition, it comes with pre-made units that can be easily set up without needing any employees, making it a cost-effective alternative for brands lacking human labor.
What Is a Containerized Data Center?
A containerized server room or data center is a shipping container designed to house IT equipment such as servers, storage devices, networking gear, uninterruptible power supplies, generators, and cooling equipment.
You can also deploy separate containers for power and cooling equipment alongside a containerized data center. The container usually has built-in connectivity for accessing external power, water (for cooling purposes), and data.
Benefits of Choosing a Containerized Data Center?
Free Up Space
Transferring your IT infrastructure to a container will free up significant space inside your building. This means you won’t need to dedicate a large area to constructing a data center. As a result, you can use your valuable square footage to create additional office space.
Easy to Deploy
In addition to their energy efficiency and providing extra space, containerized data centers are easy to maintain. They are designed to be weather-resistant; therefore, you do not have to be concerned about any damage. You can put them outside of your company premises or in underused spaces.
Secondly, containers may seem massive, but they take up less space because they can be stacked without toppling. Access doors on both sides also allow easy entry to each container.
Faster Scalability
Scalability is crucial for running a company smoothly. Containerized data centers offer a convenient way to achieve scalability.
Made Energy Efficient
The most notable benefit is the energy-saving feature. The products are designed to be energy-efficient, which improves cooling efficiency and helps you save on ongoing operational costs. The modular design of this system includes integrated power and cooling equipment, which helps to reduce infrastructure expenses and shorten installation time. It is unique in its design.
Difference Between Modular and Containerized Data Centers
What is the advantage of using modular or containerized systems? First, both options offer a consistent package for gradually expanding a data center as needed. This means a facility can start with a basic amount of power and add progressively more racks, cooling, and support equipment over time. Then, as the company gains more customers or expands, additional servers and networking equipment are installed to meet the increased demand.
Containerized data centers
These units, also known as pods depending on the vendor or marketing term, are delivered in a shipping container or similarly sized structure. They work well for temporary deployments, such as in a disaster area. If a company’s data centers are complete but need more time to transition to cloud services, containers’ modular approach can provide a valuable solution for adding more servers. However, the reverse is not necessarily true, while containers can be modular.
Modular data centers
They all have similar benefits but with different levels of pre-made components. Additionally, they allow for easy maintenance and compatibility with a broader range of hardware. For example, a modular design comprises racks arranged in a hot/cold aisle without internal cooling or power systems. Instead, external cooling and power systems are used, and the access control method includes a network connection. Based on the specific implementation, additional components can be easily incorporated using pre-packaged modules, such as complete racks.
When the power capacity is insufficient, pre-made power systems that consist of UPS, transformers, switchboards, rectifiers, utility power out, and transfer switches can be installed. Additionally, cooling systems that come in combinations of chillers, condensers, pumps, air handlers, and plumbing can also be prefabricated.
Why Choose a Containerized Data Center?
Using containerized data centers can offer numerous benefits for some or all of your requirements.
Free up space
Deploying a containerized data center can help you reclaim space inside your building. In addition, these data centers are weather resistant and can be set up outside or in underutilized areas of manufacturing facilities like parking garages.
Access doors are typically included on both ends of these containers, allowing multiple containers to be stacked or placed next to each other.
Designed to be energy efficient
Container data centers are built to be highly energy efficient. This reduces ongoing operational costs and minimizes infrastructure expenses and installation timeframes. In addition, with a modular design and integrated power and cooling systems, these container data centers are designed to be highly efficient from the ground up.
Rapid deployment
Using containerized data centers can rapidly increase your existing network and capacity without opening a conventional expansion, which may cost more.
Conclusion
The digital economy’s growth has spurred the rapid development of industries such as cloud computing, the Internet of Things, and big data. As a result, data centers are facing increasingly demanding requirements. As a result, the limitations of traditional data centers have become more evident and need to be revised to fulfill market demands. Prefabricated containerized data centers meet current market needs and will experience rapid growth.
Although they have some drawbacks, containerized data centers offer clear benefits over traditional data centers. Based on significant cost savings in immediate short-term investments and future long-term operating costs, containerized data centers are now becoming the preferred method for constructing data centers.
Read more
|
__label__pos
| 0.958409 |
What Are Terpenes and What Is Their Role?
In a previous article we’ve mentioned that lab tests for hemp products analyze not only the content of cannabinoids, but also the amount of solvents and the presence of terpenes in the final products.
You’re probably familiar with solvents and cannabinoids at this point, but what about terpenes? What are these compounds and how do they influence the properties of hemp in general, and of hemp oil in particular?
Terpenes give the aroma, flavor and color of plants
Terpenes are organic compounds found in a variety of plants, and contribute to their flavor, scent and color.
essential oils terpenesThese substances are the building blocks for essential oils and plant raisins, and are often used in food additives, perfumery and aromatherapy. Some are even thought to have medicinal properties, and to help in fighting bacteria, fungus and environmental stress.
Plants like rosemary, mint or basil have a strong terpene profile, and this is why they’re referred to as aromatic plants. Cannabis at its turn contains a wide range of terpenes (over 200) that are thought to interact synergistically with the cannabinoids in the plant, and to enhance its health effects.
BCP (beta-caryophyllene) for example is a terpene found in the cannabis plant that is known to activate the CB2 receptor in the endocannabinoid system and to exert anti-inflammatory effects. It’s non-psychoactive, and is the first FDA approved dietary cannabinoid, being used as food additive.
Vitamin A is also a terpene, although we don’t generally think of it this way. Conifers produce large amounts of these compounds, and most plants produce higher quantities of terpenes in the warmer seasons.
Each of the different cannabis strains contains its own terpenes, and some are more abundant, hence the different flavors and aromas. Alpha-pinene for example is one of the most known terpenes in cannabis and is also found in sage and rosemary. It is known to act as a natural bronchodilator and expectorant and to help one focus better. It increases the mental energy and can even act as a topical antiseptic.
Limonene, another terpenes found in the cannabis strains, is also present in citrus fruits, juniper and peppermint, and has anti-fungal, anti-bacterial and anti-depressant effects. Moreover, it is suggested that this compound exerts anti-carcinogen properties, and is known to increase blood pressure.
Myrcene is found in menthol, lemon grass and most varieties of marijuana, and is widely used in the perfumery industry. Just like the previously mentioned compounds, it has anti-microbial and anti-septic properties, and acts as a natural anti-depressant, anti-carcinogen and anti-inflammatory agent. It’s a relaxing substance and in marijuana-derived products, it increases the cell membrane permeability, allowing for higher amounts of THC to travel to the brain cells.
Terpenes and hemp oil
Unlike cannabis, hemp does not have a strong flavor and is not referred to as an aromatic plant, therefore the terpene profile of hemp is less significant than that of cannabis. But the plant still contains such compounds, and none of them is psychoactive. Terpenes in hemp have anti-inflammatory, anti-bacterial and anti-viral properties, the most known of them being caryphyllene and myrcene.
The hemp plant contains 120 terpenes, but depending on the processing method, these can or cannot be found in the whole plant extract with naturally occurring cannabidiol CBD. Oil made of hemp seeds is less abundant in terpenes than the similar product obtained from other portions of the plant (Hendriks et al, 1978).
Hemp contains mostly monoterpenes and sesquiterpenes (Turner et al, 1980), which can be concentrated into essential oils through steam distillation methods. Myrcene is also known to exhibit anti-oxidant properties (Duke, 1999), and caryophyllene has cytoprotective effects.
Cannabinoids have no smell, so the flavor and aroma of hemp products depends on their terpenes profile. Of all the terpenes found in hemp, only few appear in amounts high enough to be noteworthy.
No Comments
Post A Comment
|
__label__pos
| 0.678082 |
A simplified analytical model for radiation dominated ignition of solid fuels exposed to multiple non-steady heat fluxes
Roberto Parot, José Ignacio Rivera, Pedro Reszka, José Luis Torero, Andrés Fuentes
Research output: Contribution to journalArticlepeer-review
5 Scopus citations
Abstract
Heat fluxes from fires are strongly time-dependent. Historically, the thermal ignition theory in its classical form has neglected this time dependency until recent years, where theories have been developed to include time-varying incident heat fluxes. This article proposes a simplified general model formulation for the heating of solid fuels exposed to four different heat flux behaviors, considering the penetration of radiation into the medium. The incident heat flux cases developed where: Constant, Linear, Exponential and Polynomial, which represent different situations related to structural and wildland fires. The analytical models consider a spatially averaged medium temperature and exact and approximate solutions are presented, based on the critical ignition temperature criterion, which are valid for solids of any optical thickness. The results were validated by comparison with various models presented in the literature, where the model granted in this work was capable to adjust to all of them, especially when high heat fluxes are involved. Therefore, the proposed model acquires a significant engineering utility since it provides a single model to be used as a general and versatile tool to predict the ignition delay time in a manageable way for solid fuels exposed to different fire conditions.
Original languageEnglish
Article number111866
JournalCombustion and Flame
Volume237
DOIs
StatePublished - Mar 2022
Externally publishedYes
Keywords
• Fire safety
• Ignition delay time
• In-depth absorption of radiation
• Integral heat equation
• Solid ignition
• Translucent solids
Fingerprint
Dive into the research topics of 'A simplified analytical model for radiation dominated ignition of solid fuels exposed to multiple non-steady heat fluxes'. Together they form a unique fingerprint.
Cite this
|
__label__pos
| 0.981601 |
安全文库
挖洞经验 | 记一次曲折的Getshell过程
*本文原创作者:三只小潴,本文属1024rd原创奖励计划,未经许可禁止转载
最近在挖某框架的漏洞,其中挖到一枚Getshell,挖的过程有点曲折感觉可以写篇文章总结一下,方便与各位大牛交流交流。
因为此框架有大量用户,并且此漏洞并未修复,故此隐去所有有关此框架的信息,连文章中出现的代码都是我自己另写的,重在思路,希望大家理解。
首先通过审计定位到可能导致漏洞的代码(路径:/edit/creat.php):
$file = $_GP['file'];
$viewFile = './setting/' . $file;
if (!file_exists($viewFile)) {
mkdirs(dirname($viewFile));
file_put_contents($viewFile, '<!-- SETTING URL:setting /' . $file . ' -->');
}
其中 $GP 是合并 $GET 和 $_POST 的变量。
可以看到写入的文件路径和写入的部分内容都是可控的,看到这里不禁露出了一丝笑容,没想到一枚 getshell 如此轻松。
好吧,先测试一下,把$file的值设置为:
<?php echo 1111; ?>.php
post 到 /index.php? control=edit&action=creat
(此框架是单入口)
挖洞经验 | 记一次曲折的Getshell过程
预计生成的文件内容是:
<!-- SETTING URL:setting/<?php echo 1111;?>.php -->
好了,那访问一下生成的文件,URL:
http://test.com/edit/setting/%3C%3Fphp%20echo%201111%3B%20%3F%3E.php
右键查看一下源码,发现输出的内容是:
<!-- SETTING URL:setting/<?php echo 1111;?>.php -->
居然被过滤了? 回溯之前的代码,在 index.php 文件中发现代码:
$_GP= array_merge($_GET, $_POST);
$_GP = htmlEncode($_GP);
$control = $_GP['control'];
$action = $_GP['action'];
$controls = array('basic', 'edit');
$actions = array('index', 'creat');
if (in_array($control, $controls) &&in_array($action, $actions)) {
$file ="./$control/$action.php";
include $file;
} else {
echo 'error';
}
关键在开始的两行代码上,htmlEncode ? 搜索这个函数,找到这个函数的代码如下:
function htmlEncode($var) {
if (is_array($var)) {
foreach ($var as $key => $value) {
$var[htmlspecialchars($key)] =htmlEncode($value);
}
} else {
$var = str_replace('&', '&', htmlspecialchars($var,ENT_QUOTES));
}
return $var;
}
结合起来,就是对 post 和 get 获取到的所有内容进行htmlspecialchars,所以才会出现上面所看到的尖括号被过滤的情况。
看到这里,脸上的笑容都消失了,哎呀,果然没那么容易。尖括号过滤了,那就没办法写入PHP 代码的解析标签了,想不到什么突破的办法,难道就这样放弃么?开始犯愁…
一直想着:过滤了尖括号怎么办?过滤了尖括号怎么办?过滤了尖括号怎么办……
那我能不能不用尖括号呢?不用尖括号能不能解析?要怎么才能解析?想到这里,突然就想到模板!这个框架的模板和大多数 MVC 的模板一样,使用大括号作为标记:
function view($var) {
/*
这里一系列的处理就不写了
过程就是对模板中出现的伪代码进行处理
这些做过 Web MVC 开发的都知道
而伪代码的格式与常见的格式一样,用大括号把变量括起来,比如:{$var}
当然还有一些 {if $var==xx}、{loop $var as $value} 等等这些
其实这些处理的目的就是生成 PHP 可解析的代码
*/
//假设解析后的代码文件存放在一个 tmp 目录里,而目录的路径赋值给了 $viewFile 变量
include $viewFile;
}
这样就可以使用模板的标记 {} 来绕过尖括号 <> 的过滤,但是根据这个框架的路由协定,模板不能随便被包含,所以只能覆盖原有的模板。
按照这个思路,找一个有加载模板的功能,覆盖加载的模板,覆盖之后访问了就可以解析了。按照这个思路,找到一个加载了模板的功能,URL是:
/index.php? control=basic&action=index
代码路径在/basic/index.php,代码最后就有调用 view(‘index’);
加载的模板路径在:
/themes/basic/index.html
按照这些信息,应该构造 $file 的值为:
../../themes/basic/index.html
但是这样又有一个问题了,虽然构造这样的值可以覆盖原有的模板文件,但是写入的文件内容就是:
<!-- SETTING URL:setting/../../themes/basic/index.html-->
这样的话就没有写入需要的 Webshell 了,怎么办呢?!
根据 URL 的特性,./1.php 和 ./test/../1.php 访问的内容是一样的,都是 1.php 这个文件,但是 test 这个目录名我是可以随便写的,再根据模板伪代码的格式构造一个控制 $file 的测试 POC:
../../{php echo 1111;}/../themes/basic/index.html
(根据 view() 函数的代码,有一个{php }伪代码标签,处理的时候会替换为 <?php >。其实就算是没有这标签也可以用其他非组合的标签代替)
挖洞经验 | 记一次曲折的Getshell过程
生成的文件内容为:
<!-- SETTING URL:setting/../../{php echo1111;}/../themes/basic/index.html -->
访问 URL:
/index.php? control=basic&action=index
右键查看源码,输出的内容为:
<!-- SETTING URL:setting/../../1111/../themes/basic/index.html -->
证明代码执行了,那构造一个包含一句话的 POC,按照上一个 POC 的思路,应该把 file 的值构造为:
../../{phpeval($_POST['w']);}/../themes/basic/index.html
但是访问后发现输出的内容为:
../../{ phpeval($_POST["e;w"e;]); }/../themes/basic/index.html
想起 $file 的值是通过框架封装的 $GP 来获取的,$GP 的值都经过了 htmlencode,怎么办呢?! 根据 PHP 的特性,$_POST[‘w’] 获取值的时候可以把引号去掉,所以可以把 poc 改为:
../../{php eval($_POST[w]);}/../themes/basic/index.html
挖洞经验 | 记一次曲折的Getshell过程
访问 URL:/index.php? control=basic&action=index ,给参数 w传值 echo 1111;
挖洞经验 | 记一次曲折的Getshell过程
右键查看源码,内容为:
<!-- SETTING URL:setting/../../1111/../themes/basic/index.html -->
证明 post 的代码确实被执行了,到服务器上执行:
cd /var/www/html/themes/basic/
vim index.html
挖洞经验 | 记一次曲折的Getshell过程
至此,getshell 完成,虽然过程有点艰辛,但还是拿下了。
最后总结一下:
1. 刚开始遇到过滤尖括号等的 HTML 字符的时候,利用了 MVC 模板中的伪代码代替绕过了
2. 遇到覆盖文件时候填写完整路径不能写入payload 的问题,使用了构造一个不存在的目录(目录的名称就是 payload)的方法进行 payload 的写入
3. 最后写入 payload 的时候发现也过滤了引号导致不能写入 $POST[‘w’] ,根据 PHP 的特性,去掉引号依然可以获取 w 下标的内容,所以替换为 $POST[w]
4. 写入最终构造好的 payload,Getshell 完成!
*本文原创作者:三只小潴,本文属1024rd原创奖励计划,未经许可禁止转载
|
__label__pos
| 0.700432 |
+39 – 3333 230 381 [email protected]
The retreat how addiction hijacks the brain
How addiction hijacks the brain
The word “addiction” is derived from a Latin term for “enslaved by” or “bound to.” Anyone who has struggled to overcome an addiction, or has tried to help someone else to do so, understands why.
Addiction exerts a long and powerful influence on the brain that manifests in three distinct ways: craving for the object of addiction, loss of control over its use, and continuing involvement with it despite adverse consequences. While overcoming addiction is possible, the process is often long, slow, and complicated. It took years for researchers and policymakers to arrive at this understanding.
When researchers first began to investigate what caused addictive behavior, they believed that people who developed addictions were somehow morally flawed or lacking in willpower. Overcoming addiction, they thought, involved punishing miscreants or, alternately, encouraging them to muster the will to break a habit.
A lot has changed since then. Today addiction is being recognized as a chronic disease that changes both brain structure and function. Just as cardiovascular disease damages the heart and diabetes impairs the pancreas, addiction hijacks the brain. Recovery from addiction involves willpower, certainly, but it is not enough to “just say no”. Instead, people typically use multiple strategies, including psychotherapy, medication, and self-care, as they try to break the grip of an addiction.
Another shift in thinking about addiction has occurred as well. For many years, experts believed that only alcohol and powerful drugs could cause addiction. More recent research, however, has shown that certain pleasurable activities, such as gambling, shopping, and sex, can also co-opt the brain and may represent multiple expressions of a common underlying brain process.
From liking to wanting
Nobody starts out intending to develop an addiction, but many people get caught in its snare. More than two-thirds of people with addiction abuse alcohol. The top three drugs causing addiction are marijuana, opioid (narcotic) pain relievers, and cocaine.
Genetic vulnerability contributes to the risk of developing an addiction. Twin and adoption studies show that about 40% to 60% of susceptibility to addiction is hereditary. But behavior plays a key role, especially when it comes to reinforcing a habit.
Pleasure principle
The brain registers all pleasures in the same way, whether they originate with a psychoactive drug, a monetary reward, a sexual encounter, or a satisfying meal. In the brain, pleasure has a distinct signature: the release of the neurotransmitter dopamine is so consistently tied with pleasure that neuroscientists refer to the region as the brain’s pleasure center.
How addiction hijacks the brain
The brain’s reward center
Addictive drugs provide a shortcut to the brain’s reward system by flooding the nucleus accumbens with dopamine. The hippocampus lays down memories of this rapid sense of satisfaction, and the amygdala creates a conditioned response to certain stimuli.
All drugs of abuse, from nicotine to heroin, cause a particularly powerful surge of dopamine in the nucleus accumbens. The likelihood that the use of a drug or participation in a rewarding activity will lead to addiction is directly linked to the speed with which it promotes dopamine release, the intensity of that release, and the reliability of that release. Even taking the same drug through different methods of administration can influence how likely it is to lead to addiction. Smoking a drug or injecting it intravenously, as opposed to swallowing it as a pill, for example, generally produces a faster, stronger dopamine signal and is more likely to lead to drug misuse.
Learning process
Dopamine not only contributes to the experience of pleasure, but also plays a role in learning and memory — two key elements in the transition from liking something to becoming addicted to it.
According to the current theory about addiction, dopamine interacts with another neurotransmitter, glutamate, to take over the brain’s system of reward-related learning. This system has an important role in sustaining life because it links activities needed for human survival (such as eating and sex) with pleasure and reward. The reward circuit in the brain includes areas involved with motivation and memory as well as with pleasure. Addictive substances and behaviors stimulate the same circuit, and then overload it.
Repeated exposure to an addictive substance or behavior causes nerve cells in the nucleus accumbens and the prefrontal cortex, the area of the brain involved in planning and executing tasks, to communicate in a way that couples liking something with wanting it, in turn driving us to go after it. That is, this process motivates us to take action to seek out the source of pleasure.
Tolerance and compulsion
Over time, the brain adapts in a way that actually makes the sought-after substance or activity less pleasurable. In nature, rewards usually come only with time and effort. Addictive drugs and behaviors provide a shortcut, flooding the brain with dopamine and other neurotransmitters. Our brains do not have an easy way to withstand the attack.
Addictive drugs, for example, can release two to 10 times the amount of dopamine that natural rewards do, and they do it more quickly and more reliably. In a person who becomes addicted, brain receptors become overwhelmed. The brain responds by producing less dopamine or eliminating dopamine receptors, an adaptation similar to turning the volume down on a loudspeaker when noise becomes too loud.
As a result of these adaptations, dopamine has less impact on the brain’s reward center. People who develop an addiction typically find that, in time, the desired substance no longer gives them as much pleasure. They have to take more of it to obtain the same dopamine “high” because their brains have adapted, an effect known as tolerance.
At this point, compulsion takes over. The pleasure associated with an addictive drug or behavior subsides — and yet the memory of the desired effect and the need to recreate it (the wanting) persists. It is as though the normal machinery of motivation is no longer functioning.
The learning process mentioned earlier also comes into play. The hippocampus and the amygdala store information about environmental cues associated with the desired substance, so that it can be located again. These memories help create a conditioned response, intense craving, whenever the person encounters those environmental cues.
Cravings contribute not only to addiction, but to relapse after a hard-won sobriety. A person addicted to heroin may be in danger of relapse when he sees a hypodermic needle, for example, while another person might start to drink again after seeing a bottle of whiskey. Conditioned learning helps explain why people who develop an addiction risk relapse even after years of abstinence.
|
__label__pos
| 0.887869 |
Compatibility of Gases
A particular Gas may be incompatible with the cylinder or any packaging in which it is stored or with the pipelines through which it passes. For example Acetylene will react with zinc and copper, hydrogen sulphide will react with brass..
English: Gas cilinder
English: Gas cilinder (Photo credit: Wikipedia)
There was an incident in which an aluminium cylinder containing ethyl chloride and helium with trace amounts of 1,1,1-trichloroethane and trichloroethylene exploded in a cargo warehouse in the Dubai Airport. This was due to non-compatibility of the mixture of gases and the material of cylinder.
Two different gases may react with each other, example Acetylene, which is a highly flammable gas will dangerously react with Chlorine which is a strong oxidizing agent; water-reactive gas.
In transport regulations gases are classified as below
Class 2: Gases
Class 2.1: flammable gases
Class 2.2: non-flammable, non-toxic gases
Class 2.3: toxic gases
According to physical state transport condition of gases are divided in to four;
1. Compressed gas
2. Liquefied gas
3. Refrigerated liquefied gas
4. Dissolved gas.
While storing gas in cylinders or any pressure receptacles or while transporting or storing different gases together, one must take into consideration of below;
1. Compatibility of gas with the storage device (materials of the cylinder made of).
2. Compatibility of gases stored or transported together (chemical reactions between the gases in case of leakage of both or when involved together in fire what may be the consequences).
3. Compatibility of gas with other goods
4. Any other safety concerns
Below is the segregation table for gases as per IMDG Code, in this we can see the different clauses for transporting gas by ocean going vessels.
SEGREGATION OF CLASS 2SEGREGATION OF CLASS 2
SEGREGATION OF CLASS 2
For sea transport one must look in to the individual provisions in IMDG Code for each gas before deciding whether it can be stored together on a ship.
Write your view
|
__label__pos
| 0.956669 |
Warning: This API is deprecated and will be removed in a future version of TensorFlow after the replacement is stable.
NonMaxSuppressionV5
Stay organized with collections Save and categorize content based on your preferences.
public final class NonMaxSuppressionV5
Greedily selects a subset of bounding boxes in descending order of score,
pruning away boxes that have high intersection-over-union (IOU) overlap with previously selected boxes. Bounding boxes with score less than `score_threshold` are removed. Bounding boxes are supplied as [y1, x1, y2, x2], where (y1, x1) and (y2, x2) are the coordinates of any diagonal pair of box corners and the coordinates can be provided as normalized (i.e., lying in the interval [0, 1]) or absolute. Note that this algorithm is agnostic to where the origin is in the coordinate system and more generally is invariant to orthogonal transformations and translations of the coordinate system; thus translating or reflections of the coordinate system result in the same boxes being selected by the algorithm. The output of this operation is a set of integers indexing into the input collection of bounding boxes representing the selected boxes. The bounding box coordinates corresponding to the selected indices can then be obtained using the `tf.gather operation`. For example: selected_indices = tf.image.non_max_suppression_v2( boxes, scores, max_output_size, iou_threshold, score_threshold) selected_boxes = tf.gather(boxes, selected_indices) This op also supports a Soft-NMS (with Gaussian weighting) mode (c.f. Bodla et al, https://arxiv.org/abs/1704.04503) where boxes reduce the score of other overlapping boxes instead of directly causing them to be pruned. To enable this Soft-NMS mode, set the `soft_nms_sigma` parameter to be larger than 0.
Nested Classes
class NonMaxSuppressionV5.Options Optional attributes for NonMaxSuppressionV5
Public Methods
static <T extends Number> NonMaxSuppressionV5<T>
create(Scope scope, Operand<T> boxes, Operand<T> scores, Operand<Integer> maxOutputSize, Operand<T> iouThreshold, Operand<T> scoreThreshold, Operand<T> softNmsSigma, Options... options)
Factory method to create a class wrapping a new NonMaxSuppressionV5 operation.
static NonMaxSuppressionV5.Options
padToMaxOutputSize(Boolean padToMaxOutputSize)
Output<Integer>
selectedIndices()
A 1-D integer tensor of shape `[M]` representing the selected indices from the boxes tensor, where `M <= max_output_size`.
Output<T>
selectedScores()
A 1-D float tensor of shape `[M]` representing the corresponding scores for each selected box, where `M <= max_output_size`.
Output<Integer>
validOutputs()
A 0-D integer tensor representing the number of valid elements in `selected_indices`, with the valid elements appearing first.
Inherited Methods
Public Methods
public static NonMaxSuppressionV5<T> create (Scope scope, Operand<T> boxes, Operand<T> scores, Operand<Integer> maxOutputSize, Operand<T> iouThreshold, Operand<T> scoreThreshold, Operand<T> softNmsSigma, Options... options)
Factory method to create a class wrapping a new NonMaxSuppressionV5 operation.
Parameters
scope current scope
boxes A 2-D float tensor of shape `[num_boxes, 4]`.
scores A 1-D float tensor of shape `[num_boxes]` representing a single score corresponding to each box (each row of boxes).
maxOutputSize A scalar integer tensor representing the maximum number of boxes to be selected by non max suppression.
iouThreshold A 0-D float tensor representing the threshold for deciding whether boxes overlap too much with respect to IOU.
scoreThreshold A 0-D float tensor representing the threshold for deciding when to remove boxes based on score.
softNmsSigma A 0-D float tensor representing the sigma parameter for Soft NMS; see Bodla et al (c.f. https://arxiv.org/abs/1704.04503). When `soft_nms_sigma=0.0` (which is default), we fall back to standard (hard) NMS.
options carries optional attributes values
Returns
• a new instance of NonMaxSuppressionV5
public static NonMaxSuppressionV5.Options padToMaxOutputSize (Boolean padToMaxOutputSize)
Parameters
padToMaxOutputSize If true, the output `selected_indices` is padded to be of length `max_output_size`. Defaults to false.
public Output<Integer> selectedIndices ()
A 1-D integer tensor of shape `[M]` representing the selected indices from the boxes tensor, where `M <= max_output_size`.
public Output<T> selectedScores ()
A 1-D float tensor of shape `[M]` representing the corresponding scores for each selected box, where `M <= max_output_size`. Scores only differ from corresponding input scores when using Soft NMS (i.e. when `soft_nms_sigma>0`)
public Output<Integer> validOutputs ()
A 0-D integer tensor representing the number of valid elements in `selected_indices`, with the valid elements appearing first.
|
__label__pos
| 0.96717 |
Question
How long does it take for Godaddy to update and point to Digital Ocean server?
I created a Droplet 12 hours ago and added the nameservers given by Digital Ocean to my Godaddy Domain Account DNS settings.
When i’m running a whois on my Domain, the digital ocean servers are visible. However, when i try to open my domain name on the browser, my website is unreachable.
1).So how long does it take for the Godaddy to connect with the Digital Ocean Droplet? As of now, I can access only my IP address not my website.
2.) Additionally, in my wordpress general settings, i changed the website from IP address of Digital Ocean to my domain name and now the website ( accessed by IP address) is not opening correctly( some images are not displaying and I cannot login as well because its redirecting to mywebsite/wp-login.php which is already not accessible. What exactly is happening?
Submit an answer
Answer a question...
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Sign In or Sign Up to Answer
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
DNS propagation on GoDaddy side can take up to 48 hours. You can take look at What factors affect DNS propagation time?. Once DNS propagation finishes, you should get an email from GoDaddy confirming it.
About problems with WP, let’s wait until you can access to DO server via domain. Then try again.
If DNS propagation already finished and your site is still not working, share more details so we will try to help you. =)
|
__label__pos
| 0.75648 |
How to install fonts?
Windows
1. Unzip the font first.
2. Select Control Panel from the Start menu.
3. Then select Appearance and Personalization.
4. Then click “Font”.
5. Click File, and then click Install New Fonts.
6. If you don’t see the File menu, press ALT.
7. Navigate to the folder containing the fonts you want to install.
Likewise, people ask, how do I add fonts to my Mac?
The files are compressed, you may need a utility like Stufit Expander.
1. Double-click the font file > Install Font button at the bottom of the preview under Mac OS X 10.3 or later (including FontBook).
2. Under any version of Mac OS X: put the file in /Library/Fonts (for all users),
3. Under Mac OS 9 or earlier:
How do you use the fonts you download?
Go to Control Panel and click font. Right-click anywhere within the folder and click Install New font. Do one of the following: Install Fonts from the computer’s disk drive, after adding font dialog box, in the list box containing the drive list box, select the folder that contains the new font file.
How do I download the Calibri font to my Mac?
To find and install default Microsoft fonts on Mac:
1. Navigate here in your browser.
2. Download the .ZIP file.
3. Unzip it (double click on it).
4. Open the folder that appears.
5. Select all .TTF files within the folder.
6. After selecting the file, right-click.
7. From the pop-up menu, choose Open With → Font Book.
How to import fonts into design space?
Write your text, making sure the text is selected, then click Edit in the right panel.By default, in the first drop-down menu “All fontis selected. Click this drop-down menu and select System font”. It will load your installed font On your computer, this may take a few seconds.
What font does Apple use?
Apple There are three favorite fonts: Myriad, Lucida Grande and Helvetica Neue. Now there’s a new favorite: Avenir. It’s on both OS X Mountain Lion and iOS 6 – which means you’ll see it featured in the next iPhone.
See also How to add north arrow in Autocad 2016?
How do I install fonts from a zip file?
Copy and paste or drag and drop extracted (.ttf or .otf) font file to font folder.This font Folder is located in C:Windowsfont or C:WINNTfont. Find and double-click font folder.click file and Install new font choose to include font you want Install and click OK.
How do I download fonts to my phone?
To install a TTF font file saved to the device:
1. Copy the TTF font file you want to use to your device, preferably into the /sdcard directory.
2. Start the font installer.
3. Before tampering with your system fonts, back up your existing default fonts.
4. Click the Local tab to open Directory Explorer.
How do you download google fonts?
Open Google Fonts directory, choose your favorite font (or font) and add them to the collection.Once you have collected what you want font, click”download Your Favorites” link at the top and you will get a zip file with all the requests font TTF format.
How to upload fonts to Google Slides?
To enable font plugins:
1. Open any Google Doc, or create a new one.
2. From the Add-ons menu, click Get Add-ons.
3. In the Search for Add-ons box, enter “Extensis Fonts”
4. Select the Extensis font plugin from the list.
5. Click the free button in the upper right corner.
How do I install fonts on a Mac?
The files are compressed, you may need a utility like Stufit Expander.
1. Double-click the font file > Install Font button at the bottom of the preview under Mac OS X 10.3 or later (including FontBook).
2. Under any version of Mac OS X: put the file in /Library/Fonts (for all users),
3. Under Mac OS 9 or earlier:
See also Are you relieved of a trendy lie?
How to add fonts to Word 2016?
Go to Control Panel and click font. Right-click anywhere within the folder and click Install new font. Do one of the following: Install One font From your computer disk drive, in Add font dialog box, in the list box containing the drive list box, select the font document.
How to delete fonts on Mac?
Going back to Font Book, we can easily uninstall them:
1. Start Font Book (located in /Applications/) and use the Search function to find the font to delete.
2. Select the font you want to delete and right-click on it and choose “Delete ‘Fontname’ Family” or choose the same option from the File menu.
Where can I find the Control Panel in Windows 10?
A slightly slower way to start Control Panel in Windows 10 is done from the start menu.Click or tap the Start button, then scroll down in the Start menu to Windows system folder.there you will find a control panel shortcut.
How to remove fonts in Windows 10?
Here’s everything you need to know. First, you need to access the font control panel.Easiest way so far: Click to enter Windows 10 New search field (to the right of the Start button), type “font, and then click an item that appears at the top of the results: font – control panel.
How to delete fonts?
First, open the control panel and click font folder. If you’re in category view, go ahead and switch to icon view.choose font you want delete then click delete The button is towards the top of the window.If all goes well, your font should be removed from your system.
How to remove fonts in Windows 8?
#2 John C_21
1. Open Fonts by clicking the Start button, click Control Panel, click Appearance and Personalization, and then click Fonts.
2. Click on the font you want to delete. To select multiple fonts at once, hold down the Ctrl key while clicking each font.
3. On the toolbar, click Delete.
See also What do you get a new mom for herself?
Can you add fonts to Google Docs?
open any Google record, or create a new one one. from Add to-on menu, click get Add to-on.in search Add to-ons box, enter “Extensis font” Select Extensis font added– from the list.
How do I send fonts from my Mac?
Create a folder on your desktop that you can copy into font. In the search results window, copy each font (hold down the Option key while dragging to avoid moving the files) into the folder you created on the desktop. For programs like Adobe InDesign, use the package feature.
Where are the fonts on the Mac?
Mac OS X: Font locations and their uses
font usage font folder location
“user” ~/Library/Fonts/
“Local” /library/fonts/
“The internet” /web/library/fonts/
“system” /system/library/fonts/
How do I copy fonts from one Mac to another?
backup font exist Apple Computer – you want to find font Folders in the library on HD.so you will go Apple Computer HD > Library > font. choose font Folder > Right click and select Copy. Now you can drag and drop”font copy” folder to an external hard drive or cloud.
Where is the Font Book on Mac?
roll out font book, go to /Applications/font book, or click the Go menu in the Finder, select Applications, and double-click font book icon.
How to transfer fonts from one computer to another?
Open Windows Explorer and navigate to C:Windowsfont, then from font folder to a network drive or thumb drive.Then, in the second computer, drag the font file to font folder, Windows will install them automatically.
|
__label__pos
| 0.999826 |
Cardiology
May 2014
Clinical
Recurrent palmar blister
Volume 43, No.5, May 2014 Pages 307-308
Natalia Jiménez Gómez
María Asunción Ballester Martínez
Emiliano Grillo
Pedro Jaén Olasolo
Case study
A woman aged 34 years, who had no notable medical history, presented with a 2-day history of a painful and tender blister on her right hand but no associated symptoms. She had a history of recurrent episodes in the past 6 years that were preceded by localised pain, tenderness and burning, and resolved spontaneously. There had been no local trauma, recent exercise or use of medicines. Physical examination revealed a tense palmar blister with discrete perilesional erythema (Figure 1) and painful lymphangitis of the right upper limb (Figure 2). She was afebrile. Laboratory tests for inflammatory markers (C-reactive protein and erythrocyte sedimentation rate) showed no abnormal findings.
Figure 1. Palmar blister
Figure 1. Palmar blister
Question 1
What is the most likely diagnosis?
Question 2
What is the differential diagnosis?
Question 3
What is the most appropriate management?
Question 4
What is the most useful investigation to confirm the diagnosis?
Figure 2. Lymphangitis
Figure 2. Lymphangitis
Answer 1
Given the absence of medication use, the most likely diagnosis is recurrent Herpes simplex infection. H. simplex viruses produce primary and recurrent vesicular eruptions that favour the orolabial and genital regions. The palmar area is involved less commonly.1 Viral lymphangitis can complicate the clinical presentation, as in this case, and it is frequently misdiagnosed as a bacterial infection.1,2 It should be noted that the infection can be transmitted to others through contact with skin vesicles.
Answer 2
Recurrent H. simplex needs to be differentiated from other causes of bullous skin lesions:
In a fixed drug eruption, one round sharply demarcated erythematous plaque is seen, sometimes with a central blister and violaceous hue. However, previous pharmacological exposure is a prerequisite and was not a feature of this case.
Culicosis bullosa are bullous reactions to insect bites. These reactions are common and are often multiple, pruritic, excoriated papules or plaques. Although the cutaneous manifestations could be compatible with an insect bite, the recurrent course and painful lesions make this option improbable.
Localised bullous pemphigoid could present as a tense blister with perilesional erythema, but lymphangitis is not a frequent finding.3 Local factors, such as trauma, ultraviolet light or topical therapy, seem to be frequently implicated in the production of lesions.4 The disease has a benign course and generally responds to cessation of exacerbating factors and initiation of topical steroids.
H. zoster infection begins with a prodrome of pruritus, hyperaesthesia and intense pain. Most patients develop a painful eruption of grouped vesicles on an erythematous base in a dermatomal distribution. It is rarely recurrent.
Bullous erysipelas represents a superficial cellulitis with lymphatic involvement. It is usually caused by group A-haemolytic streptococci. It typically appears as a sharply demarcated, tender area of erythema and oedema with an indurated border. The clinical course may be complicated by the local appearance of bullae. Accompanying signs and symptoms include lymphangitis and chills. The absence of fever and resolution with symptomatic treatment make this an unlikely diagnosis here.
Answer 3
Although valaciclovir, famciclovir and aciclovir have all shown high clinical efficacy in the treatment of herpesvirus infections, valaciclovir is preferable for long-term suppressive therapy from a treatment adherence perspective as it requires only daily dosing (500 mg/day).5 Valaciclovir is an oral pro-drug that is converted to aciclovir after administration.1 Chronic suppressive therapy is usually reserved for patients with six or more recurrences per year. In our patient, the acute episode was not treated with valacyclovir but prophylactic treatment was instituted and no recurrence was reported at 1-year follow-up. It was not neccesary to add oral broad spectrum antibiotics in this case because the lymphangitis was due to viral infection.1,2
Answer 4
Detection of herpesvirus DNA using real-time polymerase chain reaction (RT-PCR) is the best test to confirm the diagnosis. In addition to being the preferred method for identifying H. simplex in cerebrospinal fluid, RT-PCR is increasingly being used as a rapid, sensitive and specific method to detect H. simplex DNA in specimens from the skin and other organs.6 To ensure an adequate sample and avoid false-negative results, the vesicle should be unroofed and the base of the ulcer scraped with a flocked swab in universal transport media (Copan, Italy).7 H. simplex type 1 was isolated from this patient.
Tzanck smear test is rarely used now for diagnosis. It reveals multinucleated epithelial giant cells but it does not distinguish between H. simplex and Varicella zoster virus.6 Viral culture was the traditional gold standard for detection of H. simplex and was the reference method against which all other tests were measured. A cell culture positive for H. simplex suggests probable active infection. However, a negative cell culture result does not rule out H. simplex infection, particularly if the specimen is from cerebrospinal fluid or nonvesicular lesions.8 Stained biopsy specimens show intra-epidermal vesiculation associated with balloning degeneration of keratinocytes, which often fuse to form multinucleated giant cells.9
Competing interests: None.
Provenance and peer review: Not commissioned; externally peer reviewed.
References
1. Cendras J, Sparsa A, Soria P, et al. Herpetic recurrent upper limb lymphangitis. Rev Med Interne 2008;29:158–60.
2. Sands M, Brown R. Herpes simplex lymphangitis. Two cases and a review of the literature. Arch Intern Med 1988;148:2066–67.
3. Lecluse AL, Bruijnzeel-Koomen CA. Herpes simplex virus infection mimicking bullous disease in an immunocompromised patient. Case Rep Dermatol 2010;2:99–102.
4. Salomon RJ, Briggaman RA, Wernikoff SY, Kayne AL. Localized bullous pemphigoid. A mimic of acute contact dermatitis. Arch Dermatol 1987;123:389–92.
5. Lebrun-Vignes B, Bouzamondo A, Dupuy A, Guillaume JC, Lechat P, Chosidow O. A meta-analysis to assess the efficacy of oral antiviral treatment to prevent genital herpes outbreaks. J Am Acad Dermatol 2007;57:238–46.
6. Schmutzhard J, Merete Riedel H, Zweygberg Wirgart B, Grillner L. Detection of Herpes simplex virus type 1, Herpes simplex virus type 2 and Varicella zoster virus in skin lesions. Comparison of real-time PCR, nested PCR and virus isolation. J Clin Virol 2004;29:120–26.
7. Tan TY, Zou H, Ong DC, et al. Development and clinical validation of a multiplex real-time PCR assay for Herpes simplex and Varicella zoster virus. Diagn Mol Pathol 2013;22:245–48.
8. Singh A, Preiksaitis J, Ferenczy A, Romanowski B. The laboratory diagnosis of Herpes simplex virus infections. Can J Infect Dis Med Microbiol 2005;16:92–98.
9. Fueki H, Sugita K, Sawada Y, Nakamura M, Tokura Y. Atypical large bullae caused by Herpes simplex in a patient with thymoma. Eur J Dermatol 2011;21:435–36.
Correspondence [email protected]
Yes No
Declaration of competing interests *
Yes No
Additional Author (remove)
Yes No
Competing Interests:
Your comment is being submitted, please wait
Download citation in RIS format (EndNote, Zotero, RefMan, RefWorks)
Download citation in BIBTEX format (RefMan)
Download citation in REFER format (EndNote, Zotero, RefMan, RefWorks)
For more information see Wikipedia: Comparison of reference management software
Advertising
Type
Clinical
2014
Advertising
|
__label__pos
| 0.517927 |
dan dan - 6 months ago 39
Android Question
Detect whether there is an Internet connection available on Android
Possible Duplicate:
How to check internet access on Android? InetAddress never timeouts
I need to detect whether the Android device is connected to the Internet.
The
NetworkInfo
class provides a non-static method
isAvailable()
that sounds perfect.
Problem is that:
NetworkInfo ni = new NetworkInfo();
if (!ni.isAvailable()) {
// do something
}
throws this error:
The constructor NetworkInfo is not visible.
Safe bet is there is another class that returns a
NetworkInfo
object. But I don't know which.
1. How to get the above snippet of code to work?
2. How could I have found myself the information I needed in the online documentation?
3. Can you suggest a better way for this type of detection?
Answer
The getActiveNetworkInfo() method of ConnectivityManager returns a NetworkInfo instance representing the first connected network interface it can find or null if none of the interfaces are connected. Checking if this method returns null should be enough to tell if an internet connection is available or not.
private boolean isNetworkAvailable() {
ConnectivityManager connectivityManager
= (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);
NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo();
return activeNetworkInfo != null && activeNetworkInfo.isConnected();
}
You will also need:
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
in your android manifest.
Edit:
Note that having an active network interface doesn't guarantee that a particular networked service is available. Network issues, server downtime, low signal, captive portals, content filters and the like can all prevent your app from reaching a server. For instance you can't tell for sure if your app can reach Twitter until you receive a valid response from the Twitter service.
|
__label__pos
| 0.995127 |
Exam 2-Chiropractic Paradigm Flashcards Preview
Foundations > Exam 2-Chiropractic Paradigm > Flashcards
Flashcards in Exam 2-Chiropractic Paradigm Deck (28)
Loading flashcards...
1
Paradigm
A set of assumptions, concepts, values, and practices that constitutes a way of viewing reality for the community that shares them, especially in intellectual disciplines
2
Osteopathic Paradigm
Relationship between the spine and skeleton and proper function of circulatory system
3
D.D. Palmer’s Paradigm
Relationship between skeleton and nervous system in which a persons state of health depends on proper integration between skeletal structures and the function of the nervous system
4
Ian Coulter’s Philosophical Framework
Vitalism
Holistic
Naturalism
Therapeutic Conservation
Humanism
Critical Rationalism
5
Vitalism
Functions of a living organism are due to an unknown vital principle distinct from all chemical and physical forces
6
Holism
The balanced integration of the individual in all aspects and levels of being; body, mind, and spirit.
7
Naturalism
The body is built on nature’s order - shouldn’t be tampered with unnecessarily through the use of drugs, which may affect the symptoms but do not remove the cause.
The role of the doctor is to facilitate natural healing.
8
Therapeutic conservatism
The chiropractic paradigm is inherently conservative. “First fo no harm”
Combination of vitalism, naturalism, and holism
9
Humanism
..
Sensitive to the values, and cultural, and ethnic backgrounds of others
Care for patients, not just treat the patients
10
Critical Rationalism
World is subject to scientific investigation
Ex: ROM comparison pre and post
11
D.D. Palmer’s Original Theory of Health and Wellness
“Too much or not enough energy is disease” and that disease, rather than being something external that invades the body, is instead the result of internal imbalances involving hyper-function or hypo-function of organs and systems. This is a result of fluctuation in nerve tone (too tense or too slack). The cause of disease in any variation in tone.
Today’s concept of homeostasis
12
The resistance of the host is more ________ than the ________ of the pathogen.
Significant
Power
13
Andrew Weil MD
Rather than warring on disease agents with the hope of eliminating them, we ought to worry more about strengthening resistance to them and learning to live in balance to them more of the time
14
Compare the thinking of Palmer in 1910, Dubos in 1982, and Weil in 2005
Common themes: empower the body to heal itself. Palmer and Weil both embrace the healing power of nature.
15
Innate intelligence
Intrinsic ability of an organism to react physiologically to the changing conditions of the external and internal environments
16
What is the purpose of an adjustment according to CS Cleveland?
Is not to depress nor to stimulate, but to remove interference with transmission, or pressure, from the affected nerve thus restoring normal nerve supply.
17
What are Palmer’s three T’s?
Trauma, Toxin, and Thought
The physical structure of the body is challenged through ADLs, theorizing these challenges or stressors take these three forms
18
What is the Contemporary Perspective of Three T’s?
Physical, Chemical, and Emotional
And their adverse influence on tone or function of the nervous system, as well as in the causation of subluxation and illness.
19
In contrast to DD Palmer’s theory of adjusting the full skeleton, B.J. Palmer focused on....
The mechanics of the spine only
20
What was the “birth” of straight v mixer chiropractic?
John Howard started the NAtional School of Chiropractic; the first broad college
21
How did Howard’s practice contrast with the approach Palmer had taken in that time? (Legally and Philosophically)
...
22
Define Straight (Focused) Chiropractors
Focus almost exclusively on the vertebral subluxations and its manual adjustment
23
Define Mixer (Broad) Chiropractors
Use additional clinical approaches as adjuncts to adjusting the spine
24
What is the definition of identity?
Sameness in all that constitutes the objective reality of a thing: oneness
25
What are the areas of controversy & variation in perspective of chiropractic?
- Procedures that fall under the scope of chiropractic practice
- Range of the effects of chiropractic care for the patient
- Clinical value of subluxation correction
- Appropriate terminology
- Isolation from or integration with other health care professionals (specifically allopathic practitioners)
26
How do the areas of controversy affect the profession’s identity?
..
27
What are examples or adjunctive therapy?
Physiotherapy
Dietary Counseling
Nutritional Supplementation
Acupuncture
Massage
28
Scopes of Services
..
|
__label__pos
| 0.933924 |
@Article{hepatmon15357, TITLE = {How Can We Make Decision for Patients With Chronic Hepatitis B According to Hepatitis B Virus (HBV) DNA Level?}, JOURNAL = {Hepatitis Monthly}, PUBLISHER = {Kowsar}, VOLUME = {14}, NUMBER = {2}, URL = {https://sites.kowsarpub.com/hepatmon/articles/15357.html}, ISSN = {1735-3408}, AUTHOR = {Keshvari, M. and Alavian, S. M. and Sharafi, H.}, YEAR = {2014}, PAGES = {e15285}, DOI = {10.5812/hepatmon.15285}, }
|
__label__pos
| 0.999702 |
Advertisements
• amimo
• Kandungan
• Kategori
• Archive
• Flickr Photos
Buruj Bajak
Buruj Bajak ialah buruj Big Dipper atau Ursa Major. Sekiranya kita membincangkan perkataan bajak mungkin masyarakat umum terutama golongan muda pada hari ini tidak mengetahui apa itu bajak, melainkan masyarakat yang berada di kawasan pertanian tradisional.
DSC_0405
Advertisements
1.8 LOKASI DI BUMI
Semakin banyak kita memahami tentang bintang dan pergerakannya, semakin seronok kita mencerap. Glob langit berfungsi sepertimana glob daratan. Glob daratan memberikan maklumat tentang kedudukan sesuatu tempat di daratan.
Ingat kembali bagaimana sebuah peta berfungsi. Dengan menggunakan peta tersebut kita gambarkan Bumi sebagai sebuah sfera kemudian kita gariskan garisan bayangan padanya sebagai panduan. Garis bayangan tersebut terdiri dari garis latitud dan garis longitud. Kedudukan sesuatu tempat mestilah dirujukkan kepada kedua-dua garis ini. Garis longitud ialah garis yang menyambungkan dari kutub utara hingga ke kutub selatan, garis ini juga dinamakan sebagai garis meridian. Garis latitud dengan rujukan 0° adalah garis dari kutub utara melalui Bandar Greenwich, England ke kutub selatan. Garis yang membahagi dua garis latitud di kenali sebagai garis khatulistiwa atau equator, garis ini membahagikan Bumi kepada Hemisfera utara dan hemisfera selatan. Garis khatulistiwa ini adalah garis longitud yang bernilai 0°
clip_image002
Rujuk gambarajah di atas
a: garis latitud 30° U
b: garis longitud 30° T
c: Khatulistiwa
d: Garis Prime Meridian 0°
Hadiah Nobel Kategori Fizik
Motivation :
“for groundbreaking experiments regarding the two-dimensional material graphene”
image image
Disebelah Kiri Andre Geim dilahirkan di sochi Russia 1958, bekerja di University of Manchester UK, Kanan Konstantin Novoselov dilahirkan di Ninzhy Tagil Russia 1974, bekerja di University yang sama.
Gabungan kedua-dua generasi ini telah berjaya mengsasingkan “graphene” . Kejayaan ini merupakan kejayaan yang mampu mengubah senario dunia. ini kerana bahan ini dikatakan lebih kuat daripada besi dan merupakan bahan konduktor yang tersangat baik.
Gabungan kedua ciri ini memungkinkan pembinaan super komputer. Klik
sciback_phy_10.pdf untuk download laporan ringkas tentang penemuan ini.
Chapter 6 static
6.1 Equilibrium of Particles
> Any object is said to be in equilibrium if its acceleration is zero.
> If the velocity is also zero, the object is said to be in static equilibrium.
> Since F = ma, if a = 0, then F = 0. Thus the conditions for a point object (particle) in equilibrium is:
the vector sum of all the external forces acting on the particle must be zero, ΣF = 0
> For forces in a plane, (x-y plane) in order that a particle is in equilibrium, the sums of the resolved parts of the forces in the x and y directions must be zero. ΣFx = 0 and ΣFy = 0. (In general, to prove that a particle is in equilibrium, we must show that the sums of the resolved parts of the forces on the particle in any two directions are each equal zero.)
6.2 Closed Polygon
> If the forces as mention in 6.1, drawn to scale and in the appropriate directions, a close triangle or a closed polygon is formed.
For example,(summary)
(a) Two forces in equilibrium along the x-axis
clip_image002
ΣF = 0
F1 = F2
(b) Three forces in equilibrium in the x-y plane
clip_image004
clip_image006
The forces will formed a closed triangle
ΣF = 0
ΣFx = 0 and ΣFy = 0
(c) Four forces in equilibrium in the x-y plane
clip_image008
forces will formed a closed polygon
clip_image010
ΣF = 0
ΣFx = 0 and ΣFy = 0
Example 1
clip_image012
Coplanar forces F1,F2 and F3 act on a point mass A. as shown in figure above. State or show on a labeIled diagram, the condition for the mass to be in equilibrium.
solution
Example 2
clip_image014
a small ball with weight W = 20 N is suspended by a light thread. When strong wind blows horizontally, exerting a instant force F on the ball, the thread makes an angle 30° to the vertical as shown. What are the values of T and F ?
solution
Example 3
clip_image016
A cable car travels along a fixed support cable and is pulled along this cable by a moving draw cable. For the situation shown, the cable car and passengers with weight 50 x 104 N is considered to be stationary with forces T, and T, acting on it. Assuming the draw cable exerts negligible force on the cable car.
(a) sketch and show the forces acting on the cable car.
(b) find the magnitude of T1 and T2
Solution
Example 4
clip_image018
An object of weight W is placed on a smooth plane inclined at an angle q to the horizontal. A force F is applied in a direction parallel to the plane so that the body is in equilibrium. Find F and R, the I normal reaction in terms of W and q. ,
Solution
Resolving forces in a direction perpendicular to the plane, R = W cos q
Resolving forces in a direction parallel to the plane, F = W sin q
Example 5
clip_image020
An object of weight W is placed on a smooth plane inclined at an angle 0 to the horizontal. A force F is applied horizontally so that / the body is in equilibrium. Find F and R, the normal reaction in / terms of W and 0.
Solution
Turning effects of forces
• Torque or moment of a force about a point is the product of that force and the perpendicular distance from the line of action of the force to the point.
(a)Torque/Moment, t = F x d
clip_image022
(b) Torque/Moment = F d sin q
clip_image024
• moment of a force = force x perpendicular distance from pivot to the line of action of force
• Unit of moment is Newton metre (N m)
· torque is a vector quantity
• A torque can turn in a clockwise direction or an anticlockwise direction.
Example 6
clip_image026
The crank of a bicycle pedal is 16 cm long and the downwards push of a leg is 300 N. Calculate the moment due to the force exerted on the pedal when crack has turned through an angle of 60° below the horizontal.
Solution
Moment of the force = 300 x 0.16 cos 60° = 300 x0.16 x0.5 = 24 Nm
Couple/Gandingan
•When two equal forces are acting in opposite direction but not along the same straight line, they form a couple.
•A couple has no resultant force.
•A couple only produces turning effect (rotation).
clip_image028
•The moment of a couple is given by:
clip_image030
• The moment of a couple is the product of one of the forces and the perpendicular distance
between the two forces.
Summary
Torque/Moment* Couple
Turning Effect
t = F x d
F : force
d : jejari/radius
Moment = F d sin q
Equilibrium when moment clockwise = anticlockwise
*in physic moment of force(moment) and Torque, they have the same meaning
When two equal forces are acting in opposite direction
Example 7
clip_image032
Calculate the moment of the Couple produced by the forces acting on the steering wheel of a car in the diagram given.
Solution
Moment of couple = 25 x 0.30 = 7.5 N m
6.3 Equilibrium of Rigid Bodies
> For a rigid body (a non-point object or extended object) in equilibrium,
(a) there must be zero resultant force. ΣF = 0
(b) there must be zero resultant torque. Στ = 0
Alternatively, we can apply the principle of moments which state that for any body in equilibrium, the sum of the clockwise moments about any pivot must equal the sum of , the anticlockwise moments about that pivot.
> Forces that act on rigid body may be concurrent forces or non-concurrent forces.
1.concurrent forces(Daya bersetemu)
– Concurrent forces are forces whose lines of action pass through a single common point.
– Concurrent forces will only cause translational motion.
– To determine whether concurrent forces acting on a rigid body are in equilibrium, all that is required is to check whether the resultant forces is zero.
clip_image034
2. Under non concurrent forces
clip_image036
– Non-concurrent forces are forces whose lines of action do not pass through a single common point.
– To determine whether non-concurrent forces acting on a rigid body has translational and rotational equilibrium, it is necessary to check whether condition ΣF = 0 as well as condition Στ = 0.
Example 8
clip_image038
The seesaw in the diagram is balanced. Use the principle of moments to calculate the weight, W.
Solution
W(15) = 300(1.0) + 450(1.5) = 650N
Example 9
clip_image040
uniform rod XY of weight 20.0 N is freely hinged to a wall at X. It is held horizontal by force F acting from Y at an angle of 60° to the vertical as shown in the diagram. What is the value of F?
solution
clip_image042
The diagram shows the forces acting on your forearm when you hold a weight of 60 N with your arm horizontally. Your elbow joint acts as a fulcrum. The weight of the arm is 20 N and its
is considered to act at a distance 14.0 cm from the fulcrum. Use the principle of moments to calculate the force T exerted by your biseps. What is the reaction force R at the fulcrum?
solution
6.4 Frictional Forces
> Friction acts whenever two surfaces move or try to move relative to one another.
> There are two kinds of frictional forces:
1. Static friction
– It is a force at the contact surfaces which prevents the surfaces from sliding over each other.
clip_image044
-The frictional force always acts in the opposite direction to the pulling force P. It is always self-adjusting, constantly equalising itself to P, maintaining static equilibrium as long as the limiting friction is not exceeded.
-If the pulling force is greater than the limiting friction, the block moves and anoth frictional force known as kinetic friction comes into effect.
Limiting friction:
(a) Depands on the nature of the surfaces.
(b) Is independent of the area of contact.
(c) Is proportional to the normal reaction,R.
Thus limiting friction has a value F = mR
2.Kinetic friction
-It is a force between two moving surfaces which opposes the sliding motion.
clip_image046
– When the pulling force P exceeds the limiting friction, the resultant force accelerates the block.
– Once in motion, the frictional force decreases. The frictional force involved now is the kinetic friction.
– To maintain constant velocity, the pulling force P has to be decreased to the same magnitude as the frictional force (kinetic friction).
– The kinetic friction is independent of the relative velocity of the surfaces.
China Lancar Roket Ke Bulan
2 oktober 2010 China melancarkar Roket menuju ke Bulan. Pihak berkuasa China menjangkakan probe Chong-e2 akan berada mendarat di Bulan dalam masa 5 hari.
BBC News – China launches Moon mission.
%d bloggers like this:
|
__label__pos
| 0.899287 |
Different mechanisms of regulation of nuclear reduced nicotinamide adenine dinucleotide phosphate dependent 3 oxo steroid 5α reductase activity in rat liver, kidney and prostate
J. A. Gustafsson, A. Pousette
Research output: Contribution to journalArticle
8 Scopus citations
Abstract
The regulatory mechanisms involved in the control of the nuclear NADPH dependent 3 ketosteroid 5α reductase (5α reductase) activity were studied in liver, kidney and prostate. The substrate used was [1,2 3H] androst 4 ene 3,17 dione (androstenedione) (for liver and kidney) or [4 14C] androstenedione (for prostate). The hepatic nuclear 5α reductase activity was greater in female than in male rats, was greater in adult than in prepubertal female rats, increased after castration of male rats, but was not affected by treatment with testosterone propionate or oestradiol benzoate. These regulatory characteristics are in part different from those previously described for the hepatic microsomal 5α reductase. The renal nuclear metabolism of androstenedione, i.e. 5α reduction and 17β hydroxy steroid reduction, was relatively unaffected by sex, age, castration and treatment with testosterone propionate. However, treatment of castrated male rats with oestradiol benzoate led to a significant increase in the 5α reductase activity and a significant decrease in the 17β hydroxy steroid reductase activity. Finally, the nuclear 5α reductase activity in prostate was androgen dependent, decreasing after castration and increasing after treatment with testosterone propionate. In conclusion, the nuclear 5α reductase activities in liver, kidney and prostate seem to be under the control of distinctly different regulatory mechanisms. The hypothesis is presented that whereas the prostatic nuclear 5α reductase participates in the formation of a physiologically active androgen, 5α dihydrotestosterone, this may not be the true function of the nuclear 5α reductase in liver and kidney. These enzymes might rather serve to protect the androgen target sites in the chromatin from active androgens (e.g. testosterone) by transforming them into less active androgens (e.g. 5α androstane 3,17 dione and/or 5α dihydrotestosterone).
Original languageEnglish (US)
Pages (from-to)273-277
Number of pages5
JournalBiochemical Journal
Volume142
Issue number2
DOIs
StatePublished - 1974
ASJC Scopus subject areas
• Biochemistry
• Molecular Biology
• Cell Biology
Fingerprint Dive into the research topics of 'Different mechanisms of regulation of nuclear reduced nicotinamide adenine dinucleotide phosphate dependent 3 oxo steroid 5α reductase activity in rat liver, kidney and prostate'. Together they form a unique fingerprint.
Cite this
|
__label__pos
| 0.874844 |
Bcaa Vs Creatine | Difference, Benefits, and Comparison
Published On:
Welcome to Drugresearch.in! We are excited to announce that we have acquired Doclists.in, Platforms allow health experts to share their knowledge and research with the world.
Selecting a supplement that is appropriate for your body is a challenging process. There are several considerations to ponder while selecting these supplements.
The health and fitness supplement market has grown in recent years, giving you more options than ever before for items to help you achieve your fitness objectives.
However, the increased variety and information might make it challenging to choose the appropriate supplements for your specific needs.
In this post, we’ll talk about two primary supplements, between which there’s always a debate regarding which is the best.
So, let’s get started by defining BCAA and creatine in more detail.
What Is BCAA?
BCAA (Branched Chain Amino Acids)
BCAA stands for Branched Chain Amino Acids.
It contains three essential amino acids, namely.
1. Leucine: Aids to burn fats and promotes muscle protein synthesis
2. Isoleucine: Helps in growth, immunity, protein metabolism, and transportation of glucose.
3. Valine: Repairs the muscles and boosts energy levels in the body.
Adding to the knowledge, BCAA is also known as the building block of proteins, and all fitness enthusiasts are aware of the significance of proteins in muscle growth.
BCAAs aid in the development of lean muscle growth while also preventing muscular breakdown. During high-intensity workouts, your body uses BCAAs as a source of energy.
There is no need to pre-digest BCAA. It is absorbed straight into the circulation.It is one of the major plus points of this supplement.
BCAA aid muscular development by boosting protein synthesis during resistance exercise. Supplementing with BCAA Plus might help you perform better at the gym or recover faster after a challenging workout.
A study says that combining BCAAs with resistance exercise can improve muscle growth and fat burning, promote hormonal balance, and aid muscle pain and recovery.
What Is Creatine?
Creatine
Creatine is a naturally – occurring substance present in muscle cells. It aids in the production of energy in your muscles during heavy lifting or high-intensity activity.
It’s a nitrogenous organic acid that helps provide energy to cells all across the body, primarily muscle cells.
It essentially improves exercise performance by producing ATP, which is the body’s energy currency.
Creatine, like BCAA, is composed of amino acids and is known as a Tripeptide molecule, which, as the name implies, is made up of three components.
1. Arginine: Exercise performance and recovery are enhanced.
2. Glycine: Improves the growth of the muscle
3. Methionine: It consists of pain-relieving and anti-inflammatory properties.
However, unlike BCAA, CREATINE is not immediately absorbed into circulation. Instead, it is stored as Creatine Phosphate in the muscle tissue, where it loses a phosphate molecule to ADP to convert into ATP, which serves as an energy source.
Benefits Of Bcaa And Creatine
BCAA
Now that we’ve established primary distinctions between BCAA and CREATINE, let’s go on to acquire a better understanding of the subject by learning some of the perks of both supplements.
The muscles break down BCAAs to provide energy during complex exercises, therefore preventing muscular breakdown. Due to this reason, BCAA supplements are commonly used as a fast energy source during intense workouts and training sessions, and they provide the following benefits:
Significant benefits of BCAA:
1. Increases Muscle growth
Glycine, a component of BCAA, has been linked to increased muscular development.
It also helps give cells energy through its conversion of nutrients from your food, which helps feed hungry muscular tissues while also increasing endurance, strength, and performance. It also aids in hormone synthesis and management, assisting the body in naturally synthesizing steroid hormones that govern the fat-to-muscle mass ratio and control energy expenditure.
1. Fuels muscle with energy at the time of workouts
Consider them your muscle health policy! Muscle protein breakdown, particularly BCAA breakdown for energy, increases during exercise. By supplementing with BCAAs, the body is less likely to deplete its amino acid (protein) reserves.
1. Aids in muscle recovery
BCAAs enhance muscle mass, and more significant muscle means more calories burned owing to an increased metabolic rate.
BCAAs may assist with healing and discomfort after exercise. The impact may not be significant enough to justify supplementation.
1. Promotes Muscle protein synthesis
It is most likely the main reason weight lifters adore BCAAs! Leucine, as previously stated, is the most significant of the three BCAAs for starting muscle protein synthesis (MPS), which is required for muscle development and allows you to work harder without experiencing exercise-induced tiredness.
Creatine
The more creatine you have stored in your muscle cells, the more energy molecules you have available for strength, power, and muscular development.
The additional fuel aids in the development of muscular strength and the reduction of tiredness during exercise
Creatine, rather than synthesizing muscles like BCAAs, increases endurance and stimulates muscular development.
Significant benefits of creatine:
1. It helps to increase endurance
It allows for higher overall effort or volume in a single training session, vital for long-term muscle growth.Creatine is so beneficial to the body that many people opt to take it even if they are not athletes.
1. Improves strength and increases muscle mass
It is perhaps the most well-known advantage of creatine. In the same manner that creatine aids in the production of ATP and, therefore, energy, it also aids in protein synthesis, which promotes lean muscle mass. Creatine promotes the synthesis of new muscle mass by increasing the hormone IGF-1. It also raises the water content of muscle cells, resulting in increased muscular growth.
1. Improves brain power
Creatine has been linked to cognitive enhancements such as mental alertness, attention, and memory. Studies have demonstrated creatine to increase poor memory in healthy people, including when given as a vegetarian supplement. In one research, participants’ hypoxia-induced problems, such as attention, were recovered when given creatine supplements.
1. Improves the overall fatigue
Creatine can alleviate exhaustion and stress by giving your brain more energy and boosting dopamine levels.
Bcaa VS Creatine, Who Has Won The Battle?
The BCAA vs. creatine argument is complicated, with no clear winner or loser.
Now that you understand how the two supplements operate, the main distinction between BCAAs and creatine is how each improves physical performance.
Different people choose one over the other based on their requirements. If you can’t decide between the two, the good news is that you can take it at different times throughout the day.
The goal is to grasp the qualities and benefits of each and then make an informed decision.
Creatine is an excellent supplement for individuals who are strength training and bulking up.
BCAA supplements are a superior choice for increasing lean muscle mass.
REMINDER:However, don’t rely solely on supplements, as nothing can substitute real food.
FAQ’S
Should I go for BCAA or CREATINE?
Your inquiry has two answers: yes and no. Both BCAAs and Creatine will assist in fuelling your exercise performance, increasing lean muscle mass, and powering your workout, allowing you to accomplish your goals and optimize your outcomes.
So it is totally up to you which one to opt for as both the supplements have their benefits.
Can You Mix Creatine And Bcaa?
Yes, the answer to that is a big yes.
Several studies have proven that combining the two vitamins has no negative impact on your health, and many professional athletes and personal trainers suggest it. Many supplements, particularly pre-workout supplements, contain BCAAs with creatine.
Leave a Comment
|
__label__pos
| 0.974062 |
Techniques
Magnetic Particle Testing (MT)
Magnetic Particle Testing (MT)
03 Jul 2022
Magnetic particle examination (MT) is a very popular, low-cost method to perform nondestructive examination (NDE) of ferromagnetic material. Ferromagnetic is defined in ASME Section V as “a term applied to materials that can be magnetized or strongly attracted by a magnetic field.” MT is an NDE method that checks for surface discontinuities but can also reveal discontinuities slightly below the surface.
How Magnetic Particle Examination Works
When ferromagnetic material (typically iron or steel) is defect-free, it will transfer lines of magnetic flux (field) through the material without any interruption.
But when a crack or other discontinuity is present, the magnetic flux leaks out of the material. As it leaks, magnetic flux (magnetic field) will collect ferromagnetic particles (iron powder), making the size and shape of the discontinuity easily visible.
However, the magnetic flux will only leak out of the material if the discontinuity is generally perpendicular to its flow. If the discontinuity, such as a crack, is parallel to the lines of magnetic flux, there will be no leakage and therefore no indication observed. To resolve this issue, each area needs to be examined twice. The second examination needs to be perpendicular to the first so discontinuities in any direction are detected. The examiner must ensure that enough overlap of areas of magnetic flux is maintained throughout the examination process so discontinuities are not missed.
History of Magnetic Particle Examination
Magnetism was first used as early as 1868 to check for cannon barrel defects. Cannon barrels were first magnetized and then a magnetic compass was moved down the length of the barrel. If a discontinuity was present, the magnetic flux would leak out and cause the compass needle to move. Defects could be easily located with this technique.
In the early 1920s, William Hoke noticed metallic grindings from hard steel parts (held by a magnetic chuck while being ground) formed patterns that followed the cracks in the surface of parts he was machining. He also found that by applying fine ferromagnetic powder to the parts, there was a build-up of powder at the discontinuities which formed a more visible indication.
By the 1930s, MT was quickly replacing the oil and whiting method of NDE (liquid penetrant [PT]) in the railroad industry. It was quicker and did not leave behind the white powder that required clean-up. After an MT evaluation, only iron powder was left behind, which could easily fall off the part or be blown away.
Different Techniques
There are many different techniques and combinations of techniques of MT. The ASME Boiler and Pressure Vessel Code, Section V, Article 7, recognizes five different techniques of magnetization:
1. Prod technique
2. Longitudinal magnetization technique
3. Circular magnetization technique
4. Yoke technique
5. Multidirectional magnetization technique
There are two different ferromagnetic examination media: dry particles and wet particles. Both forms can be either fluorescent or non-fluorescent (visible, color contrast) and come in a variety of colors to contrast with the tested material.
Most-Used Methods
Two of the most-used methods are the stationary horizontal system, using longitudinal and circular magnetization techniques, and the very portable yoke technique.
A stationary magnetic particle examination system set up for longitudinal and circular magnetization using wet fluorescent particles.
Stationary systems are generally used for smaller parts such as crank shafts and valve stems. They are often found indoors around machine shops and heat-treating facilities. Typically they have a headstock and tailstock. Parts can be clamped between stocks for magnetization. There is also a coil placed around the part to magnetize it in the perpendicular direction. Stationary horizontal systems use the wet particle technique with a circulation tank below the equipment. Wet particles flow over the examined part and drain into the circulation tank. Wet particles have more mobility flowing in a liquid than dry particles. This mobility helps sensitivity by allowing particles to easily move to the discontinuities. Fluorescent particles are commonly used with stationary horizontal systems because indoor operation makes it easy to darken the area; required ultraviolet (black) light can then be used to evaluate the parts. Both wet method examinations have about the same sensitivity, but under correct lighting conditions, fluorescent indications are much easier to see. This type of stationary system can cost $15,000 or more.
External longitudinal seam of an inservice boiler being checked with magnetic particle examination using an AC yoke with dry powder.
The MT yoke technique is the most portable and lowest-cost method, and therefore the most popular method. A typical yoke kit would cost around $750. Most yokes can operate in alternating current (AC) or direct current (DC) modes. DC gives the most penetration and is recommended if subsurface discontinuities need to be detected. AC is recommended if the surface is rough, because AC gives the particles more mobility than DC. A yoke has an electric coil in the unit creating a longitudinal magnetic field that transfers through the legs to the examined part. The yoke technique is easy to use with minimal training. It can be used indoors, outdoors, inside vessels and tanks, and in all positions. Prior to use, the magnetizing power of electromagnetic yoke shall have been checked within the past year. An AC yoke must have a lifting power of at least 10 lb and a DC yoke of at least 40 lb.
Basic Steps
The following illustrate basic steps to use with the dry powder, non-fluorescent, yoke technique. Prior to the start of examination, all equipment and meters shall be calibrated in accordance with ASME Section V, Article 7.
ASME Section V, Article 7 requires the magnetic particle visible method (color contrast) be evaluated with a minimum light intensity of 100 footcandles on the part surface. The proper quantity of light must be verified using some type of calibrated light meter and witnessed and accepted by the inspector. If fluorescent magnetic particles are being used, a black light shall achieve a minimum of 1,000 microwatts per square centimeter on the examined surface. If alternate wavelength light sources are used to provide ultraviolet light, causing fluorescence in the particles, it shall be qualified in accordance with ASME Section V, Article 7, Appendix IV.
Light meter showing 107.0 footcandles of light.
Typical Examples of ASME Code-Required Inspections
In the ASME codes of construction, magnetic particle examination or liquid penetrant examination is specified many times to detect the possibility of surface defects. If material is nonmagnetic, the only choice is liquid penetrant examination. However, if material is ferromagnetic, magnetic particle examination is generally used. Some typical examples of ASME Code-required inspections include, but are not limited to:
• Castings for surface defects
• Plates for laminations in corner joints when the edge of one plate is exposed and not fused into the weld joint
• Head spin hole plug welds
• Weld metal build-up on plates
• Areas where defects have been removed before weld repair
Once boilers and pressure vessels are in service, MT can be a widely-used examination method. The National Board Inspection Code (NBIC) specifies MT may be used for the inspection of items such as:
• Internal and external surfaces of boiler and pressure vessels
• Vessels in liquid ammonia service
• Components subjected to fire damage
• Locomotive and historical boilers
• Yankee dryers
• Cargo tanks
• Vessels in LP gas service
• Weld repairs and alterations to pressure-retaining items
Typical Inservice Inspections
MT examination of the longitudinal seam on an inservice boiler.
MT examination of a lifting lug weld on an inservice boiler.
Use of an AC yoke in the MT process to detect fatigue-type discontinuities in welded seams of a steam drum during inservice evaluation.
Crack in seal weld of boiler tube to steam drum discovered with MT. This was the result of improper repair procedures.
Wet fluorescent MT process showing a crack in a steam drum circumferential weld seam.
Watertube Inspection
Photos courtesy of Coastal Inspection Services
Advantages and Disadvantages of Using Magnetic Particle Examination
Advantages:
• Can detect both surface and near-surface indications.
• Surface preparation is not as critical compared to other NDE methods. Most surface contaminants will not hinder detection of a discontinuity.
• A relatively fast method of examination.
• Indications are visible directly on the surface.
• Low-cost compared to many other NDE methods.
• A portable NDE method, especially when used with battery-powered yoke equipment.
• Post-cleaning generally not necessary.
• A relatively safe technique; materials generally not combustible or hazardous.
• Indications can show relative size and shape of the discontinuity.
• Easy to use and requires minimal amount of training.
Disadvantages:
• Non-ferrous materials, such as aluminum, magnesium, or most stainless steels, cannot be inspected.
• Examination of large parts may require use of equipment with special power requirements.
• May require removal of coating or plating to achieve desired sensitivity.
• Limited subsurface discontinuity detection capabilities.
• Post-demagnetization is often necessary.
• Alignment between magnetic flux and indications is important.
• Each part needs to be examined in two different directions.
• Only small sections or small parts can be examined at one time.
In conclusion, magnetic particle examination can be a useful nondestructive examination method during new construction and inservice inspections. It can only be used on ferromagnetic materials; therefore, it is not the best method for all applications. For quick, low-cost inspections, MT is often the best NDE method for detecting surface and slightly subsurface discontinuities.
Facebook
Instagram
LinkedIn
Youtube
WhatsApp
|
__label__pos
| 0.808619 |
Skip to Content
0
Dynamically replace default OData Model
Aug 28, 2017 at 01:38 PM
319
avatar image
Hello SAP UI5 Experts,
I have a SAPUI5 Applicaiton that has a default OData Model defined in the manifest.json
"": {
"dataSource": "mainService",
"settings": {
"metadataUrlParams": {
"sap-documentation": "heading"
},
"defaultBindingMode": "TwoWay"
}
}
now we want to use the same application against different OData Services that implement different authorizations. The interface of the service is always the same. For that I've implemented the following function in the Component.js of my App:
_setDefaultModelForUser: function () {
var that = this;
var _odata1 = "/group1/service.xsodata";
var _odata2 = "/group2/service.xsodata";
var serviceUrl = "";
var oManifest = this.getManifestObject();
var oCurrentUser = this.getModel("currentUser");
oCurrentUser.attachRequestCompleted(function() {
var username = oCurrentUser.getProperty("/name");
switch(username) {
case "P598692":
serviceUrl = _odata1;
break;
case "S0001142741":
serviceUrl = _odata2;
break;
default:
}
if(serviceUrl !== "") {
oManifest._oManifest["sap.app"].dataSources.mainService.uri = serviceUrl;
var oDefaultModel = that.getModel("");
var defaultModelSettings = oManifest._oManifest["sap.ui5"].models[""].settings;
oDefaultModel = new sap.ui.model.odata.v2.ODataModel(serviceUrl, defaultModelSettings);
that.setModel(oDefaultModel, "");
}
});
}
I call this method at the beginning of the init function:
init: function() {
this._setDefaultModelForGroup();
Unfortunately this has no effect of the default model. Only the metadata is loaded, but the default model isn't replaces.
Hope someone could jump in here with some help.
Best regards
Gregor
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.
8 Answers
Dominique Pierre Aug 28, 2017 at 03:25 PM
1
Or maybe you could define your different data sources in the manifest and set the data source in the component's init?
"dataSources": {
"service1": {
"uri": "/group1/service.xsodata",
"type": "OData",
"settings": {
"odataVersion": "2.0",
"localUri" : "localService/metadata.xml"
}
},
"service2": {
"uri": "/group2/service.xsodata",
"type": "OData",
"settings": {
"odataVersion": "2.0",
"localUri" : "localService/metadata.xml"
}
}
}
var oManifestEntry = this.getMetadata().getManifestEntry("sap.ui5");
oManifestEntry.models[""].dataSource = "service1";
Share
10 |10000 characters needed characters left characters exceeded
Mark Teichmann Aug 28, 2017 at 01:53 PM
0
Why do you need to use the default model? Maybe it is easier to define two models and set the model you use on a different place?
Share
10 |10000 characters needed characters left characters exceeded
DJ Adams
Aug 28, 2017 at 02:33 PM
0
Just a thought - are you attaching the event handler early enough to be triggered (for the requestCompleted event)?
Share
10 |10000 characters needed characters left characters exceeded
Mauricio Lauffer Aug 29, 2017 at 06:57 AM
0
I would extend the app and replace the OData service through configuration, just as we do with any Fiori app.
Component.extend("blablabla.Component", {
metadata: {
version: "1.0",
config: {
"sap.ca.serviceConfigs": [{
"name": "",
"serviceUrl": "/Northwind/V2/Northwind/Northwind.svc/",
"isDefault": true,
"mockedDataSource": "./localService/metadata.xml"
}]
}
}
});
Share
10 |10000 characters needed characters left characters exceeded
Giovanni Degani Aug 28, 2017 at 01:46 PM
0
Cant you just use the application component extension and do something like this ?
metadata: {
config: {
"sap.ca.serviceConfigs": [{
name: "SERVICE NAME DEFINED IN THE METADATA",
serviceUrl: "/sap/opu/odata/sap/NEW_SERVICE_URL/",
isDefault: true,
useBatch: true
}]
}
}
Show 2 Share
10 |10000 characters needed characters left characters exceeded
he probably has many services....
0
Hi Giovanni,
thank you for your tip regarding the extension. I've created now two extensions of our main app where I've then did a service replacement. Now just the Launchpad has to be configured to use the different apps according to the User's Group assignment.
Best regards
Gregor
1
Jun Wu Aug 28, 2017 at 02:03 PM
0
how about moving those code to a later point?
component--->app
how about app controller?
Share
10 |10000 characters needed characters left characters exceeded
Wouter Lemaire Aug 28, 2017 at 02:42 PM
0
Hi Gregor,
I think your changes on the manifest and the default OData model are too late. The component already initialized everything before your request has been completed.
I suggest to try removing the OData model definition in the manifest.json, so it won't initialize a default model. Keep the "_setDefaultModelForUser" function as it is but remove the code that manipulates the manifest.json.
I would still use the destinations to define your different services.
Hope it helps.
Best regards,
Wouter
Show 2 Share
10 |10000 characters needed characters left characters exceeded
what wouter said. don't define the model in the manifest but create it manually after receiving the user-type.
even better would be a polymorph service proxy... but...
0
Yep, that's also what I suggested in my answer earlier too ...
0
Douglas Amaral Cezar Aug 28, 2017 at 03:14 PM
0
Gregor,
I've had success with the same approach suggested by Wouter.
In my case, I've one model for online use and the other one for offline use and it's set at onInit event.
Best regards,
Douglas
Share
10 |10000 characters needed characters left characters exceeded
|
__label__pos
| 0.918918 |
Category:
What is the Law of Conservation of Energy?
Article Details
• Written By: Vasanth S.
• Edited By: Kathryn Hulick
• Last Modified Date: 25 October 2016
• Copyright Protected:
2003-2016
Conjecture Corporation
• Print this Article
Free Widgets for your Site/Blog
Relatively speaking, Roman charioteers earned more than modern pro athletes. more...
October 25 , 1971 : The United Nations expelled Taiwan and admitted China. more...
The law of conservation of energy is a principle of physics that states that, in a closed system, energy cannot be created or destroyed. It is expressed in the First Law of Thermodynamics, which states that energy may be transformed into many forms, such as light or heat, but the overall sum of the energies is conserved, or remains constant. Generally, this law is illustrated with a pendulum. The height at which the ball is released at one end of a pendulum will equal the height the ball will reach at the other end. In fact, in a theoretically frictionless environment, the ball will continue to swing back and forth forever.
As a fundamental concept in physics, the law of conservation of energy provides an explanation for how energy is conserved and converted within a system. Generally, one form of energy can be converted into another form of energy. For example, potential energy can be converted to kinetic energy.
Ad
The kinetic energy of a particular object is the energy it posses while in motion. As an expression, kinetic energy equals one-half of the mass of the object, multiplied by the square of the velocity of the object, or KE = 1/2mv2. Kinetic energy consists of three types of energies. Vibrational kinetic energy is the energy due to vibrational motion, and rotational kinetic energy is the energy due to rotational motion. Translational kinetic energy is the energy due to motion of the center of mass from one point to another.
Generally, the potential energy of an object is the energy that is stored while at rest in a force field. Gravity is a force that acts upon an object and gives it potential energy. For example, a ball at the top of a hill has a certain amount of stored energy due to gravity. Other types of potential energy include electric, magnetic, and elastic. An example of elastic potential energy is a stretched spring.
The law of conservation of energy states that the potential energy of a ball on a hill is generally converted to kinetic energy when the ball starts rolling down the hill as a result of gravity. Similarly, the potential energy of a stretched spring becomes kinetic energy when the spring is released. In a pendulum, the law establishes that, when the ball is at its highest point, all the energy is potential energy and there is zero kinetic energy. At the ball's lowest point, all the energy in the ball is kinetic and there is zero potential energy. The total energy of the ball is the sum of the potential energy and kinetic energy.
Ad
You might also Like
Recommended
Discuss this Article
anon357739
Post 8
What is the behind the law that energy is neither created nor destroyed?
anon354977
Post 7
I really want to know what are its disadvantages? I can't find it anywhere on any website. If you can help, please do.
anon346890
Post 6
Who established the Law of Conservation of Energy?
anon218447
Post 4
I had only one question: what is its disadvantage?
Babalaas
Post 3
@ PelesTears- The first law, the law of conservation of enery, has been explained. The second law is the law of entropy. This is basically the law of chaos, stating that energy cannot be returned to the same state, basically implying that entropy increases and a perpetual motion machine is impossible. The third law is the law of absolute zero, stating that absolute zero is unattainable.
There is a zeroth law, which was created afterward to define the other laws. This law describes thermodynamic equilibrium and defines temperature.
PelesTears
Post 2
What are the other laws of thermodynamics?
Glasshouse
Post 1
The law of consevation of energy is important in understanding thermodynamics. Any heat gained by one object in a closed system must equal the heat lost by the other object(s) in the system.
I recently did a lab experiment where I used the change in temperature and mass of a piece of hot aluminum dropped into an insulated container of water to determine how much energy was transferred to the container of water.
The law of conservation of energy let me know that the energy transferred into the water is the exact same amount of energy released by the aluminum. the amount of energy released by the aluminum is the equivalent of the mass, change in temperature, and specific heat all multiplied together.
Post your comments
Post Anonymously
Login
username
password
forgot password?
Register
username
password
confirm
email
|
__label__pos
| 0.982883 |
Better LifeHealth and FitnessLifestyle
Causes of shortness of breath and how to overcome it
Shortness of breath is normal if experienced by people who have just done intense exercise, experienced drastic temperature changes, or are at high altitudes. However, if you experience it almost all the time, even when doing light activity or while resting, there could be a health problem that you need to be aware of.
The causes of shortness of breath are not only related to respiratory diseases, but also heart problems, allergies and obesity.
Heart disease causes shortness of breath
Heart failure can cause shortness of breath
Heart failure can cause shortness of breath
Experiencing constant shortness of breath could be a symptom of heart disease. Some heart diseases that can cause shortness of breath include:
1. Heart failure
Heart failure, or sometimes called congestive heart failure, is a condition when the heart is not strong enough to pump blood properly so it cannot meet the body’s needs.
Apart from shortness of breath, heart failure is also characterized by fatigue, swelling in the ankles, soles of the feet and the middle of the body.
2. Tachycardia
Tachycardia is a condition where the heart rate is very fast, usually more than 100 beats per minute in adults. In fact, the normal heartbeat frequency is 60 times per minute for adults. One type of tachycardia that can cause shortness of breath is atrial tachycardia or SVT. This is a condition when the heart’s electrical signals do not fire properly and requires immediate medical attention.
3. Angina
In fact, angina is not a disease, but a symptom in the form of pain or discomfort when blood flow to the heart is reduced. When it occurs, angina is usually accompanied by breathing problems such as shortness of breath and excessive sweating.
Angina can be a sign of a heart problem that requires medical treatment, such as coronary heart disease.
4. Heart attack
A heart attack occurs when something blocks blood flow to the heart, so the heart doesn’t get the oxygen it needs. This is a medical emergency that needs to be treated quickly.
Shortness of breath is one of the symptoms of a heart attack. Apart from that, people who are having a heart attack will also feel pain in the chest and under the sternum, as well as the arms. The pain can also spread to the jaw, throat and back.
5. Atrial fibrillation
Atrial fibrillation is a condition when the heart’s electrical impulses are chaotic, causing irregular heartbeats or palpitations
Apart from a racing heart, AF can also be accompanied by symptoms of shortness of breath, chest pain, fatigue, dizziness or feeling like fainting, and difficulty exercising.
Lung disease causes shortness of breath
Asthma can be a cause of shortness of breath
Asthma can be a cause of shortness of breath
Apart from heart disease, shortness of breath can also be caused by diseases that attack the respiratory tract and lungs, including:
1. Asma
Asthma is a condition when the airways swell and narrow, and produce excessive mucus. This condition makes breathing very difficult and also triggers coughing, whistling sounds when exhaling (wheezing), and shortness of breath.
2. COPD/COPD
Shortness of breath can also be caused by chronic obstructive pulmonary disease (COPD). COPD is a chronic inflammatory lung disease that can cause obstruction of air flow from the lungs. Apart from shortness of breath, other symptoms of COPD are coughing, mucus production (phlegm), and wheezing.
3. Covid-19
Covid-19 is an infectious disease caused by the SARS-CoV-2 virus. Shortness of breath or shortness of breath is one of the symptoms of Covid-19 apart from fever and cough. This condition can become severe in a short time.
4. Pneumonia
Shortness of breath can be a symptom of pneumonia, inflammation of the air sacs in the lungs. People with this disease will usually cough up phlegm and have a fever, some even shivering.
5. Pulmonary embolism
Pulmonary embolism is a condition where a blood clot blocks the blood vessels in the lungs, thereby stopping blood flow and oxygen supply from entering the lungs. Shortness of breath, shortness of breath, and sharp chest pain are some of the symptoms of pulmonary embolism. In most cases, blood clots originate in the veins in the legs and travel to the lungs.
Other health conditions cause shortness of breath
In many cases, shortness of breath is caused by panic attacks or anxiety due to certain situations, or due to chronic illness. These panic attacks are often mistaken for heart attacks, making the sufferer even more panicked.
If you are not experiencing anxiety or panic, shortness of breath could be caused by certain health conditions, such as:
1. Allergies
This condition occurs when you come into contact with or inhale an allergen, ranging from dust to cold air (cold allergy). Shortness of breath can be a sign of a dangerous allergic reaction (anaphylaxis) that must be treated immediately.
2. Sarcoidosis
This is a rare condition when the body experiences inflammation at various points, such as the lungs, spleen, eyes and skin.
3. Obesity
In people who are overweight or obese, shortness of breath can also occur repeatedly.
If shortness of breath persists continuously, even causing unbearable pain, don’t delay seeing a doctor, so that the cause can be found immediately and appropriate treatment can be obtained.
First aid for shortness of breath
Breathing exercises
Breathing exercises
Treatment for shortness of breath will depend on the cause. As first aid, there are simple steps you can take to relieve shortness of breath, such as:
1. Pursed-lip breathing
This is the simplest technique to relieve shortness of breath or shortness of breath. Start by relaxing your neck and shoulders, then breathe in through your nose, and then slowly exhale through your mouth with your lips in a whistling position.
2. Sit hunched over
If shortness of breath occurs while in a sitting position, try leaning forward on your elbows, then breathe as usual. If there is a table in front of you, lie your head on the table with your arms or pillows.
3. Sleep in a relaxed position
A relaxed position to reduce shortness of breath can be done by lying on your side. Position the pillow higher, so that the head is raised. Additionally, place a pillow between your legs. As an alternative, you can lie on your back with a pillow to support you.
4. Breathe using the diaphragm
The diaphragmatic breathing technique is performed in a sitting position. Make sure your shoulders, head and neck are relaxed. Place your palms on your stomach, breathe slowly through your nose and feel the movement of your stomach as you breathe.
Then, exhale with your mouth in a whistling position, while feeling your stomach contract. Do this technique for at least 5 minutes.
About author
Maria Teolis is a psychologist. Collaborator at the Elpis Center of Ispra (Varese) multidisciplinary study specialized in the diagnosis and treatment of developmental disorders (behavioral disorders, learning, etc.), psychotherapy for children and adults, psychomotor, pedagogical, speech therapy, educational and osteopathic treatment, where she deals with training activities and strengthening specific skills and is involved in different types of projects aimed at children and adolescents. It collaborates with a cooperative offering educational and support services to children and young people with behavioral problems, learning or problems of different nature related to the evolutionary sphere. Attentive to the aspects of psycho-motor development, she carries out activities with children aimed at strengthening and increasing motor, emotional and relational skills. She currently attends a master in Sports Psychology. [email protected]
|
__label__pos
| 0.961529 |
Printer Friendly
7DO: a model for ontology complexity evaluation.
1. Introduction
Ontologies are becoming increasingly important in artificial intelligence, software engineering, bioinformatics, library science, information system architecture, software agents, e-commerce, natural language processing, information query systems, knowledge management and Semantic Web applications as a form of knowledge representation about the world or some part of it. Ontologies are often defined as an explicit specification of a conceptualization [1]. A more technical definition of ontology describes it as an engineering artefact (abstract model) that provides a simplified view of a particular domain of concern and defines formally the concepts, relations, and the constraints on their use [2]. The advantages of developing and using ontologies include more effective information retrieval and analysis processes, allow communication and knowledge sharing over a domain of interest in an unambiguous way, and encourage knowledge reuse.
Though there are several knowledge representation languages available for modelling domain ontologies, the Web Ontology Language (OWL) [3] is already being used as a de facto standard ontology description language. Available ontologies are very diverse in size, quality, coverage, level of detail and complexity. Therefore it is important to evaluate important characteristics of ontologies, which would help ontology developers to design and maintain ontologies as well as help ontology users to choose the ontologies that best meet their needs [4]. As more ontologies are being developed and maintained, the issues of ontology evolution [5] also become important
Several authors have proposed using technical ontology characteristics for ontology evaluation. The OntoMetric [6] framework for ontology evaluation consists of 160 characteristics spread across five dimensions: content of the ontology, language, development methodology, building tools, and usage costs. A framework for comparing ontology schemas described in [7] is based on the following groups of ontology characteristics: design process, taxonomy, internal concept structure and relations between concepts, axioms, inference mechanism, applications, and contribution. The OntoQA [8] approach assesses quality of both ontology schemas as well as of populated ontologies (knowledge bases) through a set of metrics. These metrics can highlight key characteristics of an ontology schema as well as its population. Also a set of ontology cohesion metrics have been proposed by [4].
The novelty of this paper is a model and a collection of technical metrics (adopted or newly proposed) for evaluation of the structural complexity of ontologies. The structure of the paper is as follows. Section 2 presents a 7DO model for evaluation of complexity of OWL ontologies. Section 3 describes the complexity metrics used at different dimensions of the 7DO model. Section 4 describes the application of the proposed metrics for ontology evolution research. Finally, Section 5 presents conclusions.
2. 7DO Model for Ontology Evaluation
Domain ontologies, especially ontologies specified using OWL, are increasingly used in the process of developing information system architectures, e-Learning software, Semantic Web applications, web services [9]. So, OWL ontologies are not only documents, but also software development artefacts, too. OWL ontologies are based on XML schemas. The fact that XML schemas are software artefacts, which claim an increasingly central role in software construction projects, has been noted by [10].
Ontologies are complex artefacts, which combine structural information about domain concepts, different kinds of their relationships, classification of concepts into different hierarchies, logic reasoning on the properties and restrictions of concepts and their relationships. Therefore, we need not a single, but a collection of complexity measures for evaluation of complexity of ontology description artefacts at different ontology dimensions.
Here we distinguish between:
1) first-order properties, or characteristics, which are derived directly from the ontology description itself using simple mathematical actions such as counting, e.g., file size (count of symbols in a file) or number tags in an XML document; and
2) second-order properties or metrics, which can not be derived directly from artefacts, but are calculated from first-order properties.
Complexity is one of such metrics. Complexity metrics may be helpful for reasoning about ontology structure, understanding the relationships between different parts of ontologies, comparing and evaluating ontologies. There are many definitions of what complexity is, so there can be many different complexity metrics. Therefore, the selection of a particular complexity metric is always a subjective matter.
The common approach to measure the complexity of XML schema documents is to count the number of schema elements. Certainly, the complexity of ontology can be measured by the size of ontology (expressed in terms of file size in KB, or Lines of Code), the number of concepts in ontology, or the number of markup elements required to describe ontology. However, we do not consider size as a definitive metric of ontology complexity. First, small things can be complex, too. Second, size does not indicate the quality of ontology, but rather the scope of its domain, because a complex domain requires a larger number of concepts and their relationships to describe domain knowledge than a simple one. The metrics that measure schema's complexity by counting the number of each component do not give sufficient information about complexity of a given schema and the complexity of each independent component. Therefore, we focus on adopting or proposing new complexity metrics for ontology evaluation that are scale-free, i.e., are independent of the size of ontology.
Based on these considerations we propose a Seven Dimension Ontology (7DO) model to evaluation of OWL ontologies. The model has the following dimensions, which represent different views on ontology complexity:
1) Text: Ontology as text (sequence of symbols) with unknown syntax and structure. The only thing known is that this text describes a domain of our interest.
2) Metadata: Ontology as annotated domain knowledge. Domain knowledge is represented as a collection of domain artefacts with attached annotation metadata (labels, names, comments). Such separation of data and metadata is a first step towards creation of ontology.
3) Structure: Ontology as a structured document specified in a markup language (XML). Such document describes different domain entities as elements and properties of these entities as attributes. Separation of entities from their properties is a first analytical step towards understanding of a domain.
4) Algorithm: Ontology as a high-level program specification (algorithm), which describes a sequence of specific reasoning steps over domain knowledge. The transition from one step to other step is a functional operation specified as an XML element. An operation may have one or more operands specified as XML attributes. (The view on a markup document as a program specification is not new, e.g., XSLT is a XML-based functional programming language for XML document transformation).
5) Hierarchy: Ontology as taxonomy of things (domain concepts) arranged in a hierarchical structure. Such structure consists of classes related by subtype/supertype (inheritance/generalization) relationships. Hierarchy can be modelled in an object-oriented way using UML class diagrams, which can be used to represent ontology [11]. However such ontology has no semantics.
6) Metamodel: Ontology as a domain data metamodel described using Resource Description Framework (RDF) Schema. The RDF data model describes domain knowledge in terms of subject-predicate-object expressions. The subject denotes the resource, and the predicate denotes traits or aspects of the resource and expresses a relationship between the subject and the object. Such expressions describe domain knowledge formally using first-order logic.
7) Logic: Ontology as a domain knowledge representation specified using OWL. Domain knowledge is expressed in terms of a set of individuals (classes), a set of property assertions which relate these individuals to each other, a set of axioms which place constraints on sets of individuals, and the types of relationships permitted between them. Axioms provide semantics by allowing systems to infer additional information based on the data explicitly provided using Description Logics (DL). DL are decidable fragments of first-order logic, which are used to represent the domain concept definitions in a structured and formally well-understood way.
The 7DO model is summarized in Table 1.
3. Complexity Metrics at Different Dimensions of 7DO Model
We propose using the following complexity metrics for evaluating complexity at different dimensions of ontology in the 7DO model:
1) Text dimension: Relative Kolmogorov Complexity
Kolmogorov Complexity [12] measures the complexity of an object by the length of the smallest program that generates it. We have an object x and a description system [phi] that maps from a description w to this object. Kolmogorov Complexity [K.sub.[phi]](x) of an object x is the size of the shortest program in the description system [phi] capable of producing x on a universal computer:
(1) [MATHEMATICAL EXPRESSION NOT REPRODUCIBLE IN ASCII]
Kolmogorov Complexity [K.sub.[phi]](x) is the minimal size of information required to generate x by an algorithm. Unfortunately, it cannot be computed in the general case and must be approximated. Usually, compression algorithms are used to give an upper bound to Kolmogorov Complexity.
Suppose that we have a compression algorithm [C.sub.i]. Then, a shortest compression of w in the description system [phi] will give the upper bound to information content in x:
(2) [MATHEMATICAL EXPRESSION NOT REPRODUCIBLE IN ASCII]
The semantics-free complexity of OWL ontology O can be evaluated using the Relative Kolmogorov Complexity (RKC) metric, which can be calculated using a compression algorithm C as follows:
RKC = [parallel]C(O)[parallel]/[parallel]O[parallel], (3)
where [parallel]O[parallel] is the size of ontology O, and [parallel]C(O)[parallel] is the size of compressed ontology O.
A high value of RKC means that there is a high variability of text content, i.e., high complexity. A low value of RKC means high redundancy, i.e., the abundance of repeating fragments in text.
2) Metadata dimension: Annotation Richness Ontology O can be defined as a collection of statements on domain concepts with corresponding annotations (metadata) expressed symbolically: O = <(s,m)|s,m [member of] [[summation].sup.*]>, where s is a statement, m is the metadata of s, and [[summation].sup.*] is a string of symbols from alphabet [summation]. For the evaluation of ontology complexity at the metadata dimension, we propose using the Annotation Richness (AR) metric:
[MATHEMATICAL EXPRESSION NOT REPRODUCIBLE IN ASCII] (4)
where [parallel]O[parallel] is the size of ontology O, and [parallel]m[parallel] is the size of metadata in ontology O.
A higher value of the AR metric means that ontology contains more metadata and its description is more complex.
3) Structure dimension: Structural Nesting Depth
An XML document D can be defined as a collection of elements D=(e|e[member of]E). Each element e is a 3-tuple e=(l,A,E), where l is the label of the element, A is the set of the attributes of the element, and E is a set of the nested elements. The complexity of an XML document can be evaluated using the depth of the document's structure tree. For characterizing complexity of the XML document's structure, we propose the Structural Nesting Depth (SND) metric:
[MATHEMATICAL EXPRESSION NOT REPRODUCIBLE IN ASCII] (5)
where d is the largest depth of the XML document, [N.sub.e] is the total number of elements in an XML document, and [n.sub.e](i) is the number of elements at document depth i.
The SND metric is a combination of breadth and depth measures [13] for XML documents, and indicates the depth of the broadest part of the XML document tree.
4) Algorithm dimension: Normalized Difficulty
A functional program specification S is a sequence of functions S=([florin]|[florin][member or]F), where [florin]:(a,a[member of]A) [right arrow] A is a specific function (operator) that may have a sequence of operands as its arguments, and A is a set of function arguments (operands). For XML documents we accept that operations are specified as XML elements, and operands are specified as XML attributes.
We derive the number of distinct operators [n.sub.1], [n.sub.1] = |F|, the number of distinct operands [n.sub.2], [n.sub.2], = |A|, the total number of operators [N.sub.1], [N.sub.1] = |S|, the total number of operands [N.sub.2], [N.sub.2] = [summation over ([florin][member of]S)] |A|.
For evaluating ontology complexity at the algorithm dimension we introduce the Normalized Difficulty (ND) metric, which is a normalized ratio of Halstead Difficulty and Volume metrics [14]:
ND = [n.sub.1][N.sub.2]/([N.sub.1]+[N.sub.2])([n.sub.1]+[n.sub.2]) (6)
A high value of the ND metric means that ontology is highly complex with many distinct classes and relationships between them.
5) Hierarchy dimension: Subclassing Richness
Concept hierarchy (taxonomy) H is a 4-tuple H=(V,E,L,R), where V is a set of nodes (vertices) representing domain concepts, E is set of directed edges representing semantic relationships between concepts, L is a set of labels denoting different types of semantic relationships such as aggregation, generalization etc., and R is a set of constraints defined over nodes and edges to constrain these relationships.
Concept hierarchies provide a static modelling capability that is well suited for representing ontologies, so the structural complexity of a concept hierarchy (such as described using UML class diagram) is one of the most important measures to evaluate the quality of ontologies [15]. Here we assume that concept hierarchy is described using RDF schema. To evaluate the complexity of taxonomical relationships in ontology, the Subclassing Richness (SR) metric is used:
SR = [n.sub.SC]/[n.sub.C] + [n.sub.SC], (7)
where [n.sub.SC] is a number of sub-class (SC) relationships {rdfs:subClassOf}, and [n.sub.C] is a number of classes (C) {Class, Thing, Nothing} in the concept hierarchy.
The SR metric reflects the distribution of information across different levels of the ontology. A low SR value indicates a vertical ontology, which might reflect a very detailed type of knowledge that the ontology represents. A high SR value indicates a horizontal (flat) ontology, which means that ontology represents a wide range of general knowledge.
6) Metamodel dimension: Relationship Richness
Ontology described using an RDF schema is a graph G = <{C [union] L},P,[S.sup.C],[S.sup.P]>, where C is a set of nodes labelled with a class name, L is a set of nodes labelled with a data type (literals), [S.sup.C] is a subsumption between classes C , P is a set of arcs of the form < [c.sub.1], p, [c.sub.2] > , where [c.sub.1] [member of] C, [c.sub.2] [member of] C [union] L, p is a property name, and [S.sub.P] is a subsumption between properties P.
Main RDFS constructs for the description of ontologies are committed for describing resource class hierarchies {rdfs:subClassOf} and resource property relationships {rdfs:subPropertyOf, rdfs:domain, rdfs:range}. To evaluate complexity of relationships defined by the RDF schema constructs of the OWL ontology the
Relationship Richness (RR) metric is adopted from the OntoQA metric collection [8]:
RR = [n.sub.P]/[n.sub.P] + [n.sub.SC], (8)
where [n.sub.P] is the number of relationships (P) defined in the schema, and [n.sub.SC] is the number of subclasses (SC) (i.e., inheritance relationships).
The RR metric reflects the diversity of relationships in the ontology. An ontology that contains many relations other than class-subclass relations is richer than taxonomy with only sub-classing relationships.
7) Ontology dimension: Logic Richness
The ontology structure O, proposed by [8], can be described by a a 6-tuple O:={C, P, A, [H.sup.C], prop, att}, where C is a set of concepts (classes), P is a set of relationships, A is a set of attributes, [H.sup.C] , [H.sup.C] [??] C x C, is a concept hierarchy (taxonomy), prop: P[right arrow]C x C is a function that relates concepts non-taxonomically, att: A[right arrow]C is a function that relates concepts with literal values.
OWL language syntax has the following groups of constructs for describing non-taxonomic relationships between domain concepts:
-- classes (C) {Class, Thing, Nothing}, and -- properties (P) {rdf:Property, DatatypeProperty, ObjectProperty, FunctionalProperty, SymmetricProperty, AnnotationProperty, TransitiveProperty, InverseFunctionalProperty, OntologyProperty}.
The non-taxonomic relationships are:
-- class restrictions (CR) {Restriction}, -- property restrictions (PR) {rdfs:domain, rdfs:range}, -- equalities (E) {differentFrom, distinctMembers, equivalentClass, equivalentProperty, sameAs}, -- class axioms (CA) {oneOf, dataRange, disjointWith}, -- class expressions (CE) {complementOf, intersectionOf, unionOf}.
Class restrictions are used to restrict individuals that belong to a class. Property restrictions identify restrictions to be placed on how properties can be used by instances of a class. Equalities identify equalities/inequalities between classes and properties. Axioms are used to associate class and property identifiers with either partial or complete specifications of their characteristics, and to give other information about classes and properties. Class expressions are used to perform Boolean logic operations over class hierarchies.
The complexity of taxonomical relationships is defined at the hierarchy and metamodel dimensions of the 7DO model. For complexity of first-order logic relationships between concepts and properties we propose using a Logic Richness (LR) metric defined as follows:
[MATHEMATICAL EXPRESSION NOT REPRODUCIBLE IN ASCII] (9)
where [n.sub.x]--is a number of objects x in ontology O. The LR metric reflects the diversity and complexity of logic relationships in the ontology.
8) Cumulative complexity of ontology
The Cumulative Complexity (CC) of ontology in the 7DO model is calculated as an arithmetic mean of dimensions' complexities:
CC = RKC + AR + SND + ND + IR + RR + LR/7. 100% (10)
All complexity metrics of the 7DO model satisfy the Non-negativity, Null Value, Symmetry Module Monotonicity, Disjoint Module Additivity properties of complexity metrics defined by [16]. Furthermore, all metric values are scaled to (0,1) range, which is convenient for comparison and aggregation of metric values. The 7DO model metrics are summarized in Table 2.
4. Case Study in Ontology Evolution
We performed complexity analysis of the SWETO [17] ontology. SWETO is a general purpose ontology that covers domains including publications, affiliations, geography and terrorism. We analyzed 5 versions of the SWETO ontology developed in 2003-2004. The size of the SWETO ontology was measured using Lines of Code (LOC) metric (Figure 1) and the number of classes (Figure 2).
The measurement of complexity metrics was performed by a PHP script that parses the XML-based OWL ontology and computes the complexity metrics based on the predefined XML, RDF and OWL primitives. The Relative Kolmogorov Complexity metric was calculated using the standard PHP ARCHIVE_ZIP library. The results are presented in Figure 3.
From the results we can see, that the SWETO ontology has grown from version to version linearly (size: R = 0.97; number of classes: R = 0.95). The complexity metric values (except RR) have remained flat. The value of the RR metric has decreased pointing to the introduction of relationships other than sub-classing relationships such as restrictions on class properties.
[FIGURE 1 OMITTED]
[FIGURE 2 OMITTED]
[FIGURE 3 OMITTED]
From the results shown in Figures 1-3 we can make two conclusions:
1) The size of an evolved ontology tends to grow linearly;
2) The complexity of an evolved ontology tends to remain constant.
Note that the Second Law of Lehman [18] for software evolution claims that complexity of an evolved software program tends to increase. The claim has been supported empirically for numerous software development projects [19]. It seems that the complexity of ontologies as a domain description artefact depends only upon the domain of ontology and stays flat as ontologies are being evolved. However, more research is needed on ontologies from different domain to confirm this observation. This research can be considered as a first step towards discovery and formulation of the Ontology Evolution Laws.
5. Conclusions
The presented 7DO model for evaluation of the structural complexity of ontology descriptions can be used for comparison and ranking of ontologies within the same domain, as well as for investigating ontology evolution issues. The proposed set of complexity metrics can be used by knowledge engineers, ontology designers, and ontology users.
The advantages of the ontology evaluation using the proposed metrics of the 7DO model are as follows: 1) Computation is easy and straightforward, only XML parser is required. 2) The 7DO model is ontology content-independent. 3) Metrics are reusable and domain-independent. 4) Metrics are scale-free, i.e., independent of an ontology size.
However for deeper ontology analysis, the metric-based evaluation should be combined with the expert-based evaluation of non-technical and content related ontology characteristics such as completeness or consistency. A suite of benchmark ontologies should be developed (or gathered), with which the results of ontology evaluation could be compared.
References
[1] T.R. Gruber. A translation approach to portable ontologies. Knowledge Acquisition, 5:199-220, 1993.
[2] N. Guarino. Formal Ontology and Information Systems. In Proc. of First Int. Conf. on Formal Ontologies in Information Systems (FOIS), Trento, Italy, pp. 3-15, 1998.
[3] World Wide Web Consortium. OWL Web Ontology Language Reference. W3C Recommendation 10 Feb, 2004.
[4] H. Yao, A.M. Orme, and L. Etzkorn. Cohesion Metrics for Ontology Design and Application. Journal of Computer Science 1(1): 107-113. Science Publications, 2005.
[5] L. Stojanovic. Methods and Tools for Ontology Evolution. PhD thesis, University of Karlsruhe, 2004.
[6] A. Lozano-Tello and A. Gomez-Perez. ONTOMETRIC: a method to choose the appropriate ontology. Journal of Database Management 15, 1-18, 2004.
[7] N. Noy and C. Hafner. The state of the art in ontology design: A survey and comparative review. AI Magazine, 18(3):53-74, 1997.
[8] S. Tartir, I.B. Arpinar, M. Moore, A. Sheth, B. Aleman-Meza. OntoQA: Metric-Based Ontology Quality Analysis. IEEE ICDM 2005 Workshop on Knowledge Acquisition from Distributed, Autonomous, Semantically Heterogeneous Data and Knowledge Sources, Houston, TX, USA, November 27, 2005, pp. 45-53.
[9] M. Hepp, P. De Leenheer, A. de Moor, and Y. Sure (Eds.). Ontology Management: Semantic Web, Semantic Web Services, and Business Applications. Springer, 2007.
[10] J. Visser. Structure metrics for XML Schema. In J.C. Ramalho et al. (eds.). Proc. of XATA 2006. Univ. of Minho, 2006.
[11] S. Cranfield. UML and the Semantic Web. Proc. of the International Semantic Web Working Symposium, Palo Alto, USA, 2001.
[12] M. Li and P. Vitanyi. An Introduction to Kolmogorov Complexity and Its Applications, 2nd Edition, Springer Verlag, 1997.
[13] R. Lammel, S.D. Kitsis, and D. Remy. Analysis of XML Schema Usage. Proc. of XML 2005, International Digital Enterprise Alliance, Atlanta, November 2005.
[14] M.H. Halstead. Elements of Software Science. New York, NY: Elsevier, 1977.
[15] D. Kang, B. Xu, J. Lu, W.C. Chu. A complexity measure for ontology based on UML. Proc. of 10th IEEE International Workshop on Future Trends of Distributed Computing Systems FTDCS 2004, 26-28 May 2004, pp. 222 - 228.
[16] L.C. Briand, S. Morasca, V.R. Basili. Property-Based Software Engineering Measurement. IEEE Trans. Software Eng. 22(1): 68-86, 1996.
[17] B. Aleman-Meza, C. Halaschek, A. Sheth, I.B. Arpinar, and G. Sannapareddy, SWETO: Large-Scale Semantic Web Test-bed. Proc. of 16th Int. Conf. on Software Engineering & Knowledge Engineering, Banff, Canada, pp. 490-493, 2004.
[18] M.M. Lehman, J.F. Ramil, P. Wernick, D.E. Perry, and W.M. Turski. Metrics and Laws of Software Evolution --The Nineties View. IEEE METRICS 1997, p. 20.
[19] W. Scacchi. Understanding Open Source Software Evolution. In N.H. Madhavji, M.M. Lehman, J.F. Ramil, and D. Perry, (eds.), Software Evolution and Feedback, John Wiley and Sons, New York, 2006.
Robertas Damasevicius
Software Engineering Department,
Kaunas University of Technology,
Studentu 50-415, LT-51368, Kaunas, Lithuania
email: [email protected]
Table 1: Summary of the 7DO model
Analyzed
Dimension Artefacts format Reasoning
Text Symbols TXT Syntax-free
Metadata Data, metadata XML Semantics-free
Structure Elements, attributes XML
Algorithm Operators, operands XML
Hierarchy Classes, relationships RDF
Metamodel Subjects, objects, RDF First-order logic
predicates
Logic Class and property OWL
restrictions class
expressions, axioms
Table 2: Summary of ontology dimension complexity metrics
Dimension Metric Subjects of measurement
Text Relative Kolmogorov Object: OWL file
Complexity Program: compressed OWL file
Metadata Annotation Richness Data: XML elements, attributes
Metadata: attribute values,
labels, comments
Structure Structural Nesting Depth: level of XML document
Depth
Elements: number of tags at
different document levels
Algorithm Normalized Difficulty Operators: XML tags
Operands: attributes of XML
tags
Hierarchy Subclassing Richness Concepts: Classes
Relationships: subclass
relationships
Metamodel Relationship Richness Subclass relationships, other
relationships
Ontology Logic Richness Class and property restrictions,
equalities, class axioms,
class expressions
Dimension Meaning for ontology
Text High variability of content
Metadata Provision of human-readable information on domain concepts
Structure Complexity of document's structure
Algorithm Uniqueness of classes and relationships between them
Hierarchy Detailness of domain knowledge
Metamodel Complexity of relationships between domain concepts
Ontology Complexity of logic
COPYRIGHT 2009 University of the West of Scotland, School of Computing
No portion of this article can be reproduced without the express written permission from the copyright holder.
Copyright 2009 Gale, Cengage Learning. All rights reserved.
Reader Opinion
Title:
Comment:
Article Details
Printer friendly Cite/link Email Feedback
Author:Damasevicius, Robertas
Publication:Computing and Information Systems
Date:Feb 1, 2009
Words:4053
Previous Article:Bees collective dynamics.
Next Article:Immersive learning and assessment with quizHUD.
Terms of use | Copyright © 2015 Farlex, Inc. | Feedback | For webmasters
|
__label__pos
| 0.964765 |
README.Fedora
Differences between upstream and the Fedora package =================================================== * In /usr/bin you have isql-fb for Firebird isql. We can't name it isql to avoid conflict with isql from UNIX-ODBC. In /usr/bin you have also gstat-fb for Firebird gstat. We can't name it gstat to avoid conflict with gstat from Ganglia-gmond. * By default, Firebird is set as superserver mode. Please read the Firebird doc if you want to change the mode. To help you, you have systemd units in /usr/share/firebird/misc. * According to Fedora packaging rules, firebird service is not started automatically. You need to start it, as root : for SuperServer : systemctl start firebird-superserver.service If you want to have firebird started at each boot, as root : for SuperServer : systemctl enable firebird-superserver.service
|
__label__pos
| 0.630547 |
What are the liquid indicators on my iPhone?
iPhones contain small liquid contact indicators that are designed to detect the presence of liquid inside the device. These indicators are very important for determining potential water damage, which can impact the functionality and warranty status of an iPhone.
What do the liquid indicators look like?
The liquid contact indicators on an iPhone are very small and can be difficult to see. They are located in the sim card slot, headphone jack (on older models), and other internal components. The indicators appear as small white or pink stickers or tabs. When dry, they will remain white/pink. When exposed to liquid, they turn red or pink.
Where are the liquid indicators located?
Here are the most common locations for the liquid contact indicators in different iPhone models:
• iPhone X, XS, 11 – SIM card tray, logic board
• iPhone XR, SE (2nd gen) – SIM card tray
• iPhone 8, 7 – SIM card tray, logic board, headphone jack
• iPhone 6S, 6S Plus – SIM card tray, logic board, headphone jack
• iPhone 6, 6 Plus – SIM card tray, logic board, headphone jack
What happens when liquid is detected?
When the liquid contact indicators detect the presence of liquid, they will turn from white/pink to red or pink. This color change is irreversible. It alerts Apple technicians that liquid has gotten inside your iPhone at some point.
Exposure to liquid can cause corrosion and damage to internal components. Even after drying out, residual deposits can impact the logic board and electrical connections. Liquid damage is not covered by Apple’s warranty, so a red/pink indicator will void your warranty status.
What types of liquids can activate the indicators?
The liquid contact indicators are very sensitive by design. They are calibrated to detect very small amounts of liquid. The following types of liquids can cause the indicators to be triggered:
• Water
• Sweat
• Rain
• Coffee
• Tea
• Soda
• Alcohol
• Shampoo
• Soap
• Humidity/condensation
It does not take much liquid at all for the indicators to be activated. Just a small amount of moisture or humidity over time can cause the color to change. The indicators are so sensitive that even high humidity can trigger them in some cases.
Can you reset or dry out a liquid indicator?
Unfortunately, once a liquid indicator has turned pink/red it cannot be reversed. The color change is permanent. There is no way to “reset” or “dry out” the indicators.
Some people try methods like using a hairdryer to dry the indicator, but this will not change it back to the original color. The only option is to replace any triggered liquid contact indicators.
Should you replace a triggered liquid indicator?
If the indicator has been triggered on your iPhone, it is probably best to have it replaced. Here are some benefits of replacing liquid indicators:
• Returns indicator to original white/pink color
• Can help avoid warranty issues if iPhone needs future repair
• Makes it easier to detect any new exposure to liquid
• Gives you peace of mind knowing your iPhone is dry internally
The biggest reason to replace a triggered indicator is to reset the warranty status. If Apple opens up your iPhone for repair later on, the warranty will be voided if liquid damage is apparent.
How to replace a liquid contact indicator
Replacing liquid indicators requires opening up the iPhone to access the internal components. It should only be done by an experienced repair technician.
Here is an overview of the process:
1. Open iPhone and disassemble components to access logic board
2. Locate all liquid contact indicator tabs that have turned pink/red
3. Carefully peel back each triggered indicator tab
4. Clean and dry the component surface underneath
5. Apply new replacement liquid contact indicator tabs
6. Reassemble iPhone
Each indicator is just a small adhesive tab or sticker. The new replacements can be purchased cheaply in bulk. Proper tools, training, and experience are needed to disassemble the iPhone and replace them without any damage.
Cost to replace liquid contact indicators
The cost to replace liquid contact indicators varies depending on how many need to be switched out. In general, you can expect to pay:
• $30 – $70 to replace one or two indicators
• $70 – $120 to replace three to five indicators
• $120+ to replace six or more indicators
Some repair shops charge per indicator, such as $15 – $20 per tab replaced. The total cost scales up quickly if multiple indicators were triggered.
Alternatives to replacing liquid indicators
If you do not want to pay to have the liquid contact indicators replaced, here are a couple alternative options:
• Do nothing – You can leave the triggered indicators as-is. Just be aware it may void warranty or impact future service.
• Hide indicators – Some shops can hide the indicators behind a waterproof sealant so they cannot be seen if the iPhone is opened later.
However, keep in mind that these do not actually reset the indicators or address any potential liquid damage. Replacing the indicators is the only way to properly restore them.
Preventing liquid contact indicators from triggering
Here are some tips to help prevent triggering the liquid contact indicators in your iPhone:
• Use a waterproof case for wet environments like the pool or beach.
• Keep iPhone away from excess moisture and humidity.
• Never submerge or expose iPhone to pressurized water flow.
• Avoid large spills – quickly dry any small liquid splashes.
• Don’t use iPhone in the bathroom while showering.
• Turn on airplane mode before workouts to prevent sweat damage.
A bit of care and precaution goes a long way in avoiding liquid damage. But accidents can happen, so be prepared for the cost of replacement if an indicator does get triggered.
Frequently Asked Questions
Can I trigger the indicators without getting the phone wet?
It’s very difficult to trigger the indicators without actual liquid contact. High humidity alone does not normally trigger them. Something wet would need to directly touch the tab to turn it pink/red.
Do liquid indicators expire over time?
The liquid contact indicators are designed to not degrade or expire over time. As long as they stay dry, they should maintain the original white/pink color for the lifespan of the iPhone.
Can Apple deny service for a triggered indicator?
Yes, Apple considers liquid contact a form of accidental damage not covered under warranty. If any indicators are triggered, they can legally deny service or charge out of warranty fees.
Do all iPhones have the same indicator placements?
The locations vary slightly between models, but are generally near points of potential liquid ingress like the SIM tray, charging port, headphone jack, etc. Technicians are trained on the exact placements for each model.
Can liquid indicators be replaced by third parties?
Yes, many reputable third party repair shops offer liquid indicator replacement services. The only requirement is having trained technicians able to properly disassemble the iPhone without causing damage.
Conclusion
The liquid contact indicators in iPhones serve an important role in detecting water damage issues. If you see red/pink indicators instead of white/pink, it means liquid was able to ingress and impact internal components at some point. Replacing the indicators can reset the water damage status and warranty eligibility if desired. With proper precautions, you can avoid triggering the indicators through liquid exposure. But accidents happen, so be prepared for potential indicator replacement costs down the road.
|
__label__pos
| 0.973082 |
Is Angular JS Dead?
Is AngularJS obsolete?
The first announcement came in January 2018, later reiterated at NG Conf in Salt Lake City, that the final release of AngularJS would be 1.7 and would enter Long Term Support (LTS) through June 30, 2021.
After that time, Google will no longer maintain the library..
Is angular or react better in 2020?
If you have time for some longer learning curve, you can choose the Angular but for the smaller learning curve, Reactjs is the best option. … It is not possible to compare its functionalities with just a library i.e., Reactjs. Typescript experts should not just miss to use Angular and can go ahead with the framework.
Should I learn react or angular?
Every framework or library has some pros and cons, same with React and Angular. From the above all factors if you are a beginner or have less coding practice also if you want stability for your project you can go with React because it’s learning curve is fast and easier also job in the market is higher than Angular.
Is jQuery dead?
jQuery has seen a significant decline in popularity over the past few years. With the rise of frontend JavaScript frameworks like Angular, Vue and React, jQuery’s quirky syntax and often-overwrought implementation has taken a backseat to this new wave of web technology. … jQuery may be outdated but jQuery is not dead.
How old is angular?
AngularJS first appeared on GitHub with version 0.9. 0 in October of 2010. Version 1.0 launched on June 14th, 2012.
Is angular Dead 2020?
Angular, developed by Google, was first released in 2010, making it the oldest of the lot. It is a TypeScript-based JavaScript framework. … The latest stable version is Angular 10, which was released in June 2020. Vue, also known as Vue.
Is angular harder than react?
React is much easier to learn than Angular or any other framework for that matter. That does not mean that is easier to use. React is much easier to learn than Angular or any other framework for that matter. That does not mean that is easier to use.
Is Vue faster than react?
Vue can be faster than React out of the box, due to more smart optimizations it is doing. React letting you do whatever you want, but not helping to do it. There is no difference how they handle states, or how they perform DOM manipulations.
Will front end die?
No, front-end isn’t dying. It’s still just HTML with CSS and Javascript. What is changing are new frameworks and libraries and other stuff that’s build on top of the HTML/CSS/Javascript that’s changing the way in which sites are build. … Front end development has never been more active than it is today.
Is angular worth learning 2020?
Yes, its really good choice for many companies, so it’s worth learning in 2020. Angular is the most mature of the frameworks, has good backing in terms of contributors and is a complete package. … Angular is a good choice for companies with large teams and developers who already use TypeScript.
Do Google use react?
Yes, Google does not uses React, Because, Google has its own massive AngularJS development framework. There is project across Google that use React in some unexpected ways such as using Google maps in react without custom libraries. all though it’s built in Angular. It accepts React components just as easily.
Is angular dying because of react?
Angular is not dying in popularity. Rather, the attention has just been diverted. While React might be eating up more of the development ecosystem and demand pie, Angular is still going steady despite React’s rising fame.
Does Google use angular?
Google do use Angular internally for all its official websites and applications. … A few doubters of Angular regularly site that none of the Google lead applications like gmail are composed in Angular. Gmail is online since 2004 and AngularJs is developed in 2009.
Is angular outdated?
No. AngularJS is dying, but not Angular.
|
__label__pos
| 0.998355 |
JsonUtility not working with Arrays
Hello,
I’m having a problem serializing an array into json. I am using Unity’s JsonUtility and I thought they were supported since some people said it here. Anyways if it isn’t supported how could I do it without, if it is, then why does this code not work?
// Test array that will be converted
string[] test = new string[] { "test", "Hello World"};
// Get the length of the array to convert
Debug.Log(test.Length);
// Convert array to json
string json = JsonUtility.ToJson(test);
// This returns {}
Debug.Log(json);
For some reason my output is
2
{}
Thanks!
Thanks to @Bunny83, it works now!
All I had to do was put the array inside it’s own custom class and then mark that class as [Serializable]
and just use ToJson with that object instead.
This works…you need an Object to define the call for JSON.
using UnityEngine;
using System.Collections;
public class MaterialController : MonoBehaviour {
// Use this for initialization
void Start () {
//store the retrieved JSON object to a string
string json = "";
TestObject testobj = new TestObject();
testobj.test = "My test string";
json = JsonUtility.ToJson(testobj);
Debug.Log (json);
}
//*************************************************
// JSON Object structure for JSON Decoding.
//*************************************************
[System.Serializable] public struct TestObject {
public string test;
}
}
|
__label__pos
| 0.982379 |
Reference documentation for deal.II version 9.1.1
\(\newcommand{\dealcoloneq}{\mathrel{\vcenter{:}}=}\)
array_view.h
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2004 - 2019 by the deal.II authors
4 //
5 // This file is part of the deal.II library.
6 //
7 // The deal.II library is free software; you can use it, redistribute
8 // it, and/or modify it under the terms of the GNU Lesser General
9 // Public License as published by the Free Software Foundation; either
10 // version 2.1 of the License, or (at your option) any later version.
11 // The full text of the license can be found in the file LICENSE.md at
12 // the top level directory of deal.II.
13 //
14 // ---------------------------------------------------------------------
15
16 #ifndef dealii_array_view_h
17 #define dealii_array_view_h
18
19 #include <deal.II/base/config.h>
20
21 #include <deal.II/base/exceptions.h>
22 #include <deal.II/base/memory_space.h>
24 #include <deal.II/base/table.h>
25 #include <deal.II/base/tensor.h>
26
27 #include <deal.II/lac/lapack_full_matrix.h>
28
29 #include <type_traits>
30 #include <vector>
31
32 DEAL_II_NAMESPACE_OPEN
33
34
76 template <typename ElementType, typename MemorySpaceType = MemorySpace::Host>
77 class ArrayView
78 {
79 public:
85
89 using iterator = value_type *;
90
94 using const_iterator = const ElementType *;
95
99 ArrayView();
100
120 ArrayView(value_type *starting_element, const std::size_t n_elements);
121
131 ArrayView(const ArrayView<typename std::remove_cv<value_type>::type,
132 MemorySpaceType> &view);
133
148 ArrayView(
149 const std::vector<typename std::remove_cv<value_type>::type> &vector);
150
165 ArrayView(std::vector<typename std::remove_cv<value_type>::type> &vector);
166
186 void
187 reinit(value_type *starting_element, const std::size_t n_elements);
188
194 bool
195 operator==(
196 const ArrayView<const value_type, MemorySpaceType> &other_view) const;
197
203 bool
204 operator==(const ArrayView<typename std::remove_cv<value_type>::type,
205 MemorySpaceType> &other_view) const;
206
212 bool
213 operator!=(
214 const ArrayView<const value_type, MemorySpaceType> &other_view) const;
215
221 bool
222 operator!=(const ArrayView<typename std::remove_cv<value_type>::type,
223 MemorySpaceType> &other_view) const;
224
229 std::size_t
230 size() const;
231
236 value_type *
237 data() const noexcept;
238
242 iterator
243 begin() const;
244
248 iterator
249 end() const;
250
255 cbegin() const;
256
261 cend() const;
262
275 value_type &operator[](const std::size_t i) const;
276
277 private:
283
287 std::size_t n_elements;
288
289 friend class ArrayView<const ElementType, MemorySpaceType>;
290 };
291
292
293
294 //---------------------------------------------------------------------------
295
296
297 namespace internal
298 {
299 namespace ArrayViewHelper
300 {
301 template <typename MemorySpaceType>
302 inline bool
303 is_in_correct_memory_space(const void *const ptr)
304 {
305 #ifndef DEAL_II_COMPILER_CUDA_AWARE
306 (void)ptr;
307 static_assert(std::is_same<MemorySpaceType, MemorySpace::Host>::value,
308 "If the compiler doesn't understand CUDA code, "
309 "the only possible memory space is 'MemorySpace::Host'!");
310 return true;
311 #else
312 cudaPointerAttributes attributes;
313 const cudaError_t cuda_error = cudaPointerGetAttributes(&attributes, ptr);
314 if (cuda_error != cudaErrorInvalidValue)
315 {
316 AssertCuda(cuda_error);
317 if (std::is_same<MemorySpaceType, MemorySpace::Host>::value)
318 return attributes.memoryType == cudaMemoryTypeHost;
319 else
320 return attributes.memoryType == cudaMemoryTypeDevice;
321 }
322 else
323 {
324 // ignore and reset the error since host pointers produce an error
325 cudaGetLastError();
326 return std::is_same<MemorySpaceType, MemorySpace::Host>::value;
327 }
328 #endif
329 }
330 } // namespace ArrayViewHelper
331 } // namespace internal
332
333
334
335 template <typename ElementType, typename MemorySpaceType>
337 : starting_element(nullptr)
338 , n_elements(0)
339 {}
340
341
342
343 template <typename ElementType, typename MemorySpaceType>
346 const std::size_t n_elements)
347 : starting_element(starting_element)
348 , n_elements(n_elements)
349 {
350 Assert(
351 n_elements == 0 ||
352 internal::ArrayViewHelper::is_in_correct_memory_space<MemorySpaceType>(
353 starting_element),
354 ExcMessage("The memory space indicated by the template parameter "
355 "and the one derived from the pointer value do not match!"));
356 }
357
358
359
360 template <typename ElementType, typename MemorySpaceType>
361 inline void
363 const std::size_t n_elements)
364 {
365 *this = ArrayView(starting_element, n_elements);
366 }
367
368
369
370 template <typename ElementType, typename MemorySpaceType>
372 const ArrayView<typename std::remove_cv<value_type>::type, MemorySpaceType>
373 &view)
375 , n_elements(view.n_elements)
376 {}
377
378
379
380 template <typename ElementType, typename MemorySpaceType>
382 const std::vector<typename std::remove_cv<value_type>::type> &vector)
383 : // use delegating constructor
384 ArrayView(vector.data(), vector.size())
385 {
386 // the following static_assert is not strictly necessary because,
387 // if we got a const std::vector reference argument but ElementType
388 // is not itself const, then the call to the forwarding constructor
389 // above will already have failed: vector.data() will have returned
390 // a const pointer, but we need a non-const pointer.
391 //
392 // nevertheless, leave the static_assert in since it provides a
393 // more descriptive error message that will simply come after the first
394 // error produced above
395 static_assert(std::is_const<value_type>::value == true,
396 "This constructor may only be called if the ArrayView "
397 "object has a const value_type. In other words, you can "
398 "only create an ArrayView to const values from a const "
399 "std::vector.");
400 }
401
402
403
404 template <typename ElementType, typename MemorySpaceType>
406 std::vector<typename std::remove_cv<value_type>::type> &vector)
407 : // use delegating constructor
408 ArrayView(vector.data(), vector.size())
409 {}
410
411
412
413 template <typename ElementType, typename MemorySpaceType>
414 inline bool
417 {
418 return (other_view.data() == starting_element) &&
419 (other_view.size() == n_elements);
420 }
421
422
423
424 template <typename ElementType, typename MemorySpaceType>
425 inline bool
427 operator==(const ArrayView<typename std::remove_cv<value_type>::type,
428 MemorySpaceType> &other_view) const
429 {
430 return (other_view.data() == starting_element) &&
431 (other_view.size() == n_elements);
432 }
433
434
435
436 template <typename ElementType, typename MemorySpaceType>
437 inline bool
440 {
441 return !(*this == other_view);
442 }
443
444
445
446 template <typename ElementType, typename MemorySpaceType>
449 {
450 if (n_elements == 0)
451 return nullptr;
452 else
453 return starting_element;
454 }
455
456
457
458 template <typename ElementType, typename MemorySpaceType>
459 inline bool
461 operator!=(const ArrayView<typename std::remove_cv<value_type>::type,
462 MemorySpaceType> &other_view) const
463 {
464 return !(*this == other_view);
465 }
466
467
468
469 template <typename ElementType, typename MemorySpaceType>
470 inline std::size_t
472 {
473 return n_elements;
474 }
475
476
477
478 template <typename ElementType, typename MemorySpaceType>
481 {
482 return starting_element;
483 }
484
485
486
487 template <typename ElementType, typename MemorySpaceType>
490 {
491 return starting_element + n_elements;
492 }
493
494
495
496 template <typename ElementType, typename MemorySpaceType>
499 {
500 return starting_element;
501 }
502
503
504
505 template <typename ElementType, typename MemorySpaceType>
508 {
509 return starting_element + n_elements;
510 }
511
512
513
514 template <typename ElementType, typename MemorySpaceType>
517 {
519 Assert(
520 (std::is_same<MemorySpaceType, MemorySpace::Host>::value),
521 ExcMessage(
522 "Accessing elements is only allowed if the data is stored in CPU memory!"));
523
524 return *(starting_element + i);
525 }
526
527
528
529 #ifndef DOXYGEN
530 namespace internal
531 {
532 namespace ArrayViewHelper
533 {
539 template <class Iterator>
540 bool
541 is_contiguous(const Iterator &first, const Iterator &last)
542 {
543 const auto n = std::distance(first, last);
544 for (typename std::decay<decltype(n)>::type i = 0; i < n; ++i)
545 if (std::addressof(*(std::next(first, i))) !=
546 std::next(std::addressof(*first), i))
547 return false;
548 return true;
549 }
550
551
562 template <class T>
563 constexpr bool
564 is_contiguous(T *, T *)
565 {
566 return true;
567 }
568 } // namespace ArrayViewHelper
569 } // namespace internal
570 #endif
571
572
573
590 template <typename Iterator, typename MemorySpaceType = MemorySpace::Host>
591 ArrayView<typename std::remove_reference<
592 typename std::iterator_traits<Iterator>::reference>::type,
593 MemorySpaceType>
594 make_array_view(const Iterator begin, const Iterator end)
595 {
596 static_assert(
597 std::is_same<typename std::iterator_traits<Iterator>::iterator_category,
598 typename std::random_access_iterator_tag>::value,
599 "The provided iterator should be a random access iterator.");
600 Assert(begin <= end,
601 ExcMessage(
602 "The beginning of the array view should be before the end."));
603 Assert(internal::ArrayViewHelper::is_contiguous(begin, end),
604 ExcMessage("The provided range isn't contiguous in memory!"));
605 // the reference type, not the value type, knows the constness of the iterator
606 return ArrayView<typename std::remove_reference<
607 typename std::iterator_traits<Iterator>::reference>::type,
608 MemorySpaceType>(std::addressof(*begin), end - begin);
609 }
610
611
612
622 template <typename ElementType, typename MemorySpaceType = MemorySpace::Host>
625 {
626 Assert(begin <= end,
627 ExcMessage(
628 "The beginning of the array view should be before the end."));
630 }
631
632
633
644 template <typename Number, typename MemorySpaceType>
647 {
648 return make_array_view(array_view.cbegin(), array_view.cend());
649 }
650
651
652
663 template <typename Number, typename MemorySpaceType>
666 {
667 return make_array_view(array_view.begin(), array_view.end());
668 }
669
670
671
688 template <int rank, int dim, typename Number>
691 {
692 return make_array_view(tensor.begin_raw(), tensor.end_raw());
693 }
694
695
696
713 template <int rank, int dim, typename Number>
714 inline ArrayView<Number>
716 {
717 return make_array_view(tensor.begin_raw(), tensor.end_raw());
718 }
719
720
721
738 template <int rank, int dim, typename Number>
741 {
742 return make_array_view(tensor.begin_raw(), tensor.end_raw());
743 }
744
745
746
764 template <int rank, int dim, typename Number>
765 inline ArrayView<Number>
767 {
768 return make_array_view(tensor.begin_raw(), tensor.end_raw());
769 }
770
771
772
786 template <typename ElementType, int N>
788 {
789 return ArrayView<ElementType>(array, N);
790 }
791
792
793
808 template <typename ElementType>
810 make_array_view(Vector<ElementType> &vector)
811 {
812 return ArrayView<ElementType>(vector.begin(), vector.size());
813 }
814
815
816
831 template <typename ElementType>
833 make_array_view(const Vector<ElementType> &vector)
834 {
835 return ArrayView<const ElementType>(vector.begin(), vector.size());
836 }
837
838
839
854 template <typename ElementType>
856 make_array_view(std::vector<ElementType> &vector)
857 {
858 return ArrayView<ElementType>(vector.data(), vector.size());
859 }
860
861
862
877 template <typename ElementType>
879 make_array_view(const std::vector<ElementType> &vector)
880 {
881 return ArrayView<const ElementType>(vector.data(), vector.size());
882 }
883
884
885
905 template <typename ElementType>
907 make_array_view(std::vector<ElementType> &vector,
908 const std::size_t starting_index,
909 const std::size_t size_of_view)
910 {
911 Assert(starting_index + size_of_view <= vector.size(),
912 ExcMessage("The starting index and size of the view you want to "
913 "create would lead to a view that extends beyond the end "
914 "of the given vector."));
915 return ArrayView<ElementType>(&vector[starting_index], size_of_view);
916 }
917
918
919
939 template <typename ElementType>
941 make_array_view(const std::vector<ElementType> &vector,
942 const std::size_t starting_index,
943 const std::size_t size_of_view)
944 {
945 Assert(starting_index + size_of_view <= vector.size(),
946 ExcMessage("The starting index and size of the view you want to "
947 "create would lead to a view that extends beyond the end "
948 "of the given vector."));
949 return ArrayView<const ElementType>(&vector[starting_index], size_of_view);
950 }
951
952
953
970 template <typename ElementType>
973 const typename Table<2, ElementType>::size_type row)
974 {
975 AssertIndexRange(row, table.size()[0]);
976 return ArrayView<ElementType>(&table[row][0], table.size()[1]);
977 }
978
979
980
997 template <typename ElementType>
999 {
1000 return ArrayView<ElementType>(&table[0][0], table.n_elements());
1001 }
1002
1003
1004
1021 template <typename ElementType>
1024 {
1025 return ArrayView<const ElementType>(&table[0][0], table.n_elements());
1026 }
1027
1028
1046 template <typename ElementType>
1049 {
1050 return ArrayView<ElementType>(&matrix(0, 0), matrix.n_elements());
1051 }
1052
1053
1054
1071 template <typename ElementType>
1074 {
1075 return ArrayView<const ElementType>(&matrix(0, 0), matrix.n_elements());
1076 }
1077
1078
1079
1096 template <typename ElementType>
1099 const typename Table<2, ElementType>::size_type row)
1100 {
1101 AssertIndexRange(row, table.size()[0]);
1102 return ArrayView<const ElementType>(&table[row][0], table.size()[1]);
1103 }
1104
1105
1106
1126 template <typename ElementType>
1128 Table<2, ElementType> & table,
1129 const typename Table<2, ElementType>::size_type row,
1130 const typename Table<2, ElementType>::size_type starting_column,
1131 const std::size_t size_of_view)
1132 {
1133 AssertIndexRange(row, table.size()[0]);
1134 AssertIndexRange(starting_column, table.size()[1]);
1135 Assert(starting_column + size_of_view <= table.size()[1],
1136 ExcMessage("The starting index and size of the view you want to "
1137 "create would lead to a view that extends beyond the end "
1138 "of a column of the given table."));
1139 return ArrayView<ElementType>(&table[row][starting_column], size_of_view);
1140 }
1141
1142
1143
1163 template <typename ElementType>
1166 const typename Table<2, ElementType>::size_type row,
1167 const typename Table<2, ElementType>::size_type starting_column,
1168 const std::size_t size_of_view)
1169 {
1170 AssertIndexRange(row, table.size()[0]);
1171 AssertIndexRange(starting_column, table.size()[1]);
1172 Assert(starting_column + size_of_view <= table.size()[1],
1173 ExcMessage("The starting index and size of the view you want to "
1174 "create would lead to a view that extends beyond the end "
1175 "of a column of the given table."));
1176 return ArrayView<const ElementType>(&table[row][starting_column],
1177 size_of_view);
1178 }
1179
1180
1181
1182 /*
1183 * Create a view that doesn't allow the container it points to to be modified.
1184 * This is useful if the object passed in is not `const` already and a function
1185 * requires a view to constant memory in its signature.
1186 *
1187 * This function returns an object of type `ArrayView<const T>` where `T` is the
1188 * element type of the container.
1189 *
1190 * @relatesalso ArrayView
1191 */
1192 template <typename Container>
1193 inline auto
1194 make_const_array_view(const Container &container)
1195 -> decltype(make_array_view(container))
1196 {
1197 return make_array_view(container);
1198 }
1199
1200
1201 DEAL_II_NAMESPACE_CLOSE
1202
1203 #endif
ArrayView< ElementType > make_array_view(LAPACKFullMatrix< ElementType > &matrix)
Definition: array_view.h:1048
ArrayView< const ElementType > make_array_view(const LAPACKFullMatrix< ElementType > &matrix)
Definition: array_view.h:1073
ArrayView< Number, MemorySpaceType > make_array_view(ArrayView< Number, MemorySpaceType > &array_view)
Definition: array_view.h:665
ArrayView< const Number, MemorySpaceType > make_array_view(const ArrayView< Number, MemorySpaceType > &array_view)
Definition: array_view.h:646
ArrayView< ElementType > make_array_view(ElementType(&array)[N])
Definition: array_view.h:787
const_iterator cbegin() const
Definition: array_view.h:498
ArrayView< const Number > make_array_view(const Tensor< rank, dim, Number > &tensor)
Definition: array_view.h:690
ArrayView< ElementType > make_array_view(std::vector< ElementType > &vector, const std::size_t starting_index, const std::size_t size_of_view)
Definition: array_view.h:907
iterator end() const
Definition: array_view.h:489
#define AssertIndexRange(index, range)
Definition: exceptions.h:1637
STL namespace.
static ::ExceptionBase & ExcIndexRange(int arg1, int arg2, int arg3)
size_type n_elements() const
ArrayView< const ElementType > make_array_view(const Table< 2, ElementType > &table, const typename Table< 2, ElementType >::size_type row, const typename Table< 2, ElementType >::size_type starting_column, const std::size_t size_of_view)
Definition: array_view.h:1165
bool operator==(const ArrayView< const value_type, MemorySpaceType > &other_view) const
Definition: array_view.h:416
std::size_t size() const
Definition: array_view.h:471
std::size_t n_elements
Definition: array_view.h:287
const std::conditional< std::is_const< VectorType >::value, const VectorType::value_type, VectorType::value_type >::type * const_iterator
Definition: array_view.h:94
ArrayView< Number > make_array_view(SymmetricTensor< rank, dim, Number > &tensor)
Definition: array_view.h:766
ArrayView< ElementType > make_array_view(Vector< ElementType > &vector)
Definition: array_view.h:810
static ::ExceptionBase & ExcMessage(std::string arg1)
value_type & operator[](const std::size_t i) const
Definition: array_view.h:516
void reinit(value_type *starting_element, const std::size_t n_elements)
Definition: array_view.h:362
Number * begin_raw()
std::conditional< std::is_const< VectorType >::value, const VectorType::value_type, VectorType::value_type >::type value_type
Definition: array_view.h:84
#define Assert(cond, exc)
Definition: exceptions.h:1407
#define AssertCuda(error_code)
Definition: exceptions.h:1722
Number * end_raw()
Definition: tensor.h:1181
Number * end_raw()
ArrayView< ElementType > make_array_view(Table< 2, ElementType > &table, const typename Table< 2, ElementType >::size_type row)
Definition: array_view.h:972
value_type * data() const noexcept
Definition: array_view.h:448
ArrayView< const ElementType > make_array_view(const std::vector< ElementType > &vector, const std::size_t starting_index, const std::size_t size_of_view)
Definition: array_view.h:941
bool operator!=(const ArrayView< const value_type, MemorySpaceType > &other_view) const
Definition: array_view.h:439
ArrayView< const Number > make_array_view(const SymmetricTensor< rank, dim, Number > &tensor)
Definition: array_view.h:740
size_type size(const unsigned int i) const
ArrayView< const ElementType > make_array_view(const Vector< ElementType > &vector)
Definition: array_view.h:833
ArrayView< ElementType > make_array_view(std::vector< ElementType > &vector)
Definition: array_view.h:856
typename AlignedVector< T >::size_type size_type
Definition: table.h:418
ArrayView< const ElementType > make_array_view(const Table< 2, ElementType > &table, const typename Table< 2, ElementType >::size_type row)
Definition: array_view.h:1098
ArrayView< ElementType, MemorySpaceType > make_array_view(ElementType *const begin, ElementType *const end)
Definition: array_view.h:624
Number * begin_raw()
Definition: tensor.h:1161
value_type * starting_element
Definition: array_view.h:282
Definition: table.h:37
ArrayView< typename std::remove_reference< typename std::iterator_traits< Iterator >::reference >::type, MemorySpaceType > make_array_view(const Iterator begin, const Iterator end)
Definition: array_view.h:594
iterator begin() const
Definition: array_view.h:480
ArrayView< ElementType > make_array_view(Table< 2, ElementType > &table, const typename Table< 2, ElementType >::size_type row, const typename Table< 2, ElementType >::size_type starting_column, const std::size_t size_of_view)
Definition: array_view.h:1127
ArrayView< Number > make_array_view(Tensor< rank, dim, Number > &tensor)
Definition: array_view.h:715
const_iterator cend() const
Definition: array_view.h:507
ArrayView< const ElementType > make_array_view(const std::vector< ElementType > &vector)
Definition: array_view.h:879
ArrayView< const ElementType > make_array_view(const Table< 2, ElementType > &table)
Definition: array_view.h:1023
ArrayView< ElementType > make_array_view(Table< 2, ElementType > &table)
Definition: array_view.h:998
|
__label__pos
| 0.620085 |
RTC - Simple RTC Alarm
Materials
Example
This example demonstrates how to use the RTC library methods to create a RTC Alarm, so that to do some tasks when an alarm is matched. In particular, the RTC time is set at 16:00:00 and an alarm at 16:00:10. When the time matches, “Alarm Match” information will be printed on the serial monitor.
First, select the correct Ameba development board from the Arduino IDE: “Tools” -> “Board”.
Then open the ” RTCAlarm ” example from: “File” -> “Examples” -> “RTC” -> “RTCAlarm”:
1
In the example, the RTC time is set at 16:00:00 and an alarm is set at 16:00:10. Upon successfully upload the sample code and press the reset button. When the alarm time (10 seconds) is reached the attached interrupt function will print the following information: “Alarm Matched!” showing in this figure below.
1
Copyrights ©瑞晟微电子(苏州)有限公司 2021. All rights reserved.
Please confirm that QQ communication software is installed
|
__label__pos
| 0.700601 |
Difference Between 225 and 235 Tires 2022 – Easily Find Out the Suitable Tire
The difference between 225 and 235 tires appears little at first glance due to their similar widths, yet their variances are more extensive than imagined.
Tires are required and must be carefully considered before purchasing one. It might be tough to choose the right tires for you from all the options available on the market.
Table could not be displayed.
Of course, you would not want to squander your money on one that will not be advantageous. That is why we wrote this article to help you understand the differences between 225 and 235 tires!
How Do I Find My Tire Size?
Difference Between 225 and 235 Tires 2022
It is not as difficult as it may appear to determine the tire size of your automobile. Open your automobile owner’s guide or the driver’s side door to get the tire size and load data for your automobile.
If you see 205/55/R16 91H, for example, it means:
• The number 205 denotes the tire’s standard section width in millimeters.
• The aspect ratio of a tire is 55, which is the ratio of its portion height to its portion width.
• R stands for radial-ply structure.
• The number 16 denotes the rim’s nominal diameter.
• 91H is a sign that denotes the tire’s ultimate load performance and coverage at which you could safely maintain it.
Various Tire Sizes
1920x1080 vtime2 30 take2021 12 29 23.32.06 scaled
There are 9 common tire sizes and variations of each size.
These are:
• 14-inch tires
• 15-inch tires
• 16-inch tires
• 17-inch tires
• 18-inch tires
• 19-inch tires
• 20-inch tires
• 21-inch tires
• 22-inch tires
There is a variance for passenger vehicle and light truck/CUV/SUV tire sizes in every common tire size. Out of the above, only 15-inch tires, 16-inch tires, 17-inch tires, 18-inch tires, and 20-inch tires can support high flotation tire sizes. However, in this article, we will look at two tire sizes: 225 and 235.
Features of 225 Tires
• Treadwear Warranty: 70,000 Miles
• Tire Diameter: 15 Inches
• Type: All Season Tires
• Rim Width: 8.85 Inches
225 tireir?t=brzatojota 20&language=en US&l=li2&o=1&a=B01GMTTNU0
Features of 235 Tires
• Treadwear Warranty: 60,000 Miles
• Tire Diameter: 15 Inches
• Type: All Season Tires
• Rim Width: 9 Inches
235ir?t=brzatojota 20&language=en US&l=li2&o=1&a=B01N0LNR3K
Difference Between 225 and 235 Tires
Now let us get to the real reason why you are reading this article.
Difference Between 225 and 235 Tires 2022
01. Stability
Because a 235 tire is wider, it provides better road steadiness when accelerating. Larger vehicles, such as Land Rovers, can benefit from this.
02. Weight
The difference in weight between the two tire sizes is insignificant. The weight of the tires really should not be considered while making your choice.
03. Gas Mileage
When it comes to gas mileage, a low-rolling-resistance tire is a way to go. The 225 has less rolling resistance than the 235 since it is narrower.
04. Carloads
When it comes to vehicles, you will want to know how much weight they can handle. 235 tires are required for vehicles that can handle a heavier weight. Cars with 225 tires or smaller may carry a lighter load.
05. Aspect Ratio of the Tires’ Sidewall
Given the difference in width, the 225 tires will most likely have a greater aspect ratio than the 235 tires. The tire’s efficiency on the road will therefore be affected by this minor change in the statistics.
06. Width of the Tires
The 225 tires are narrower than the 235 tires in comparison. When deciding which tires to put on the front and rear, the difference is substantial.
Rear-wheel-drive sports vehicles, for example, come equipped with front-wheel-drive tires that are smaller in width than their rear-wheel-drive counterparts.
To handle the turning capabilities of wider tires, such as 235 in the front, larger wheel walls are required.
Although it is a good idea to put narrower tires in the front and wider tires in the back of your automobile, installing bigger tires on one side of your vehicle is meaningless.
07. Handling
The more touch the tires have with the road’s surface, the better. When tires get wider and shorter, their load capacity changes to improve surface grip, the big tread blocks on 235 tires provide assured handling.
In extreme circumstances, the tread-built helps provide a firm footprint and robust, reliable handling.
08. Traction
In all weather situations, both 225 and 235 tires provide excellent traction. This implies that this tire will perform admirably on every surface, whether wet, dry, ice, or snowy.
Pros and Cons
In terms of pros, both tires are affordable, have high durability and stability, and have excellent treadwear.
However, the con of each is that these tires do not have the much-needed grip you are searching for when compared to wider tires.
Difference Between 225 and 235 Tires 2022 infografik
Frequently Asked Questions About 225 and 235 Tires
01. Are 225 and 235 Tires Interchangeable?
Yes, they are. However, this is only possible if your car’s rims can accept the larger millimeter.
02. Can I Replace 235 Tires With 245?
Yes, you may change 245/50-18 tires with 235/50-18 tires. However, the overall diameter will be 10mm (0.4 in) smaller.
03. How Much Bigger is a 235 Than a 225?
The width of a 235 tire is 10mm wider than that of a 225 tire. A 235 tire also has a 15mm bigger diameter and is 7.5mm taller than a 225 tire.
04. How Do I Know What Tires Fit My Rims?
It would be best if you took away the diameter of your rims from the diameter of your tires. Then you divide that response by 2, and the outcome will be the answer you are searching for.
05. Do Tire Sizes Have to Match Exactly?
They must adhere to size requirements for bead form, diameter, and breadth. Wheels and tires must have the same diameter; for example, only a 16″ tire should be mounted on a 16″ wheel. However, there is one more stipulation: tire and wheel width.
Conclusion
loose tire rolling
The width of these tires differs somewhat. You will want a 225 if you have a smaller car and want to save money on petrol. You will want a 235 if you have a bigger car and require additional stability.
To put it another way, evaluate your requirements and decide based on your top priorities.
|
__label__pos
| 0.77658 |
The Vital Role of Brakes
The Vital Role of Brakes
Maintaining your car’s brake system is crucial to overall vehicle safety. It is vital when driving with passengers and other drivers. Avoiding hazardous driving habits such as slamming on the brakes and braking unnecessarily will help to extend the longevity of your vehicle’s brake components.
If you notice any signs of brake trouble, such as a squishy or low-feeling pedal, schedule an inspection right away! It will save you money and time in the long run.
Brake Pads
Brake pads are the underrated heroes of your braking system, serving as the front line of your vehicle’s defense against accidents. They convert kinetic energy into thermal energy to bring your car to a stop by generating friction against the rotors.
When you step on the brake pedal, it activates the hydraulic system that pushes a piston within a master cylinder filled with brake fluid into calipers situated at each wheel. The calipers then firmly grip the brake pads and apply pressure against the rotating rotors, which leads to a decrease in the speed of your wheels and ultimately brings your car to a stop.
The steel backing plates that the friction-based substance is bonded to on the surfaces facing the disc brake rotors make up the brake pads. When your brake pads begin to wear down, you will hear a squeaking sound. It is the result of friction-based material moving to the metal surface of the rotors, signaling that a replacement is necessary. For this reason, you must maintain your brake repair Edmonds, WA schedule.
Brake Rotors
Many gearheads describe the master cylinder as the “heart” of your brake system because, like the heart, it pumps fluid to where it is needed most. When you press the brake pedal, mechanical leverage pushes a rod known as the pushrod through the dual-chamber master cylinder and creates hydraulic pressure transferred to each wheel’s calipers.
The calipers act as metal clamps that grip the rotating disc or rotor of each wheel to slow its speed. If the calipers get too hot from constant exposure to heat, they can lose their ability to clamp onto the brake rotor, and your car may feel as if it pulls to one side. Other potential problems include:
• A low brake fluid level.
• Air trapped in the brake lines.
• A misadjusted master cylinder pushrod.
These are all things that can be diagnosed with a quick and easy visual inspection. You should also check the rotors and drums to ensure they are free of debris, rust, or damage that can interfere with brake function.
Brake Fluid
When you hit the brakes, a complex process converts your mechanical force into hydraulic pressure to slow and stop your vehicle. This alchemy depends on a hardworking fluid that can endure intense heat and pressure variations.
Brake fluid is a specialty hydraulic fluid that carries your foot’s force into the system through the master cylinder and brake lines. It then transfers this pressure to brake pads and rotors, creating friction that slows down your vehicle’s wheels.
To operate appropriately, brake fluid must have a high boiling point. It also needs to lubricate the brake system’s components. Various types of brake fluid exist, such as glycol DOT 3, DOT 4, and DOT 5.1 (which contain silicon and doesn’t absorb water). Over time, these liquids can absorb moisture and contaminants, reducing their boiling points. It can lead to a spongy pedal feel and decreased braking efficiency. Changing your brake fluid frequently can keep it working well. It is a must for your car’s safety and performance!
Brake Lines
It takes much more than pressing the brake pedal to stop your car. That’s why it is so important to keep all of the different components of your brake system in top working condition.
For example, your brake lines are the rigid metal tubing network that channels your brake fluid from the master cylinder to points near each of your wheels or brake calipers. Brake lines are made from various materials, including aluminum, stainless steel, and steel. Aluminum and stainless steel are very corrosion-resistant, especially compared to copper tubing or vinyl hoses, which can be damaged by road salt thrown on the roadways during winter.
Brake line tubes are usually manufactured with a soft metallic wear tab that closes an electric circuit when the brake pads wear thin, alerting you of the need for a replacement. They are also often ‘flared,’ similar to the end of a pair of jeans, to provide a tight seal at each connection point.
|
__label__pos
| 0.826435 |
Bringing science and development together through news and analysis
CDC Q&A on bird flu
This set of questions and answers, prepared by the US Centers for Disease Control and Prevention (CDC), focuses on the threat that bird flu poses to public health. It also covers the spread of avian influenza in birds and other animals. The questions cover symptoms of infected birds and humans, and how to protect people against infection. They also outline factors that could trigger an influenza pandemic, and the measures needed to prepare for it.
{{LINK_LABEL_GO_TO_DOCUMENT}}
|
__label__pos
| 0.799105 |
DBLP BibTeX Record 'conf/kes/MiT05'
@inproceedings{DBLP:conf/kes/MiT05,
author = {Lina Mi and
Fumiaki Takeda},
title = {Research on Individual Recognition System with Writing Pressure
Based on Customized Neuro-template with Gaussian Function},
booktitle = {KES (2)},
year = {2005},
pages = {263-269},
ee = {http://dx.doi.org/10.1007/11552451_36},
crossref = {DBLP:conf/kes/2005-2},
bibsource = {DBLP, http://dblp.uni-trier.de}
}
@proceedings{DBLP:conf/kes/2005-2,
editor = {Rajiv Khosla and
Robert J. Howlett and
Lakhmi C. Jain},
title = {Knowledge-Based Intelligent Information and Engineering
Systems, 9th International Conference, KES 2005, Melbourne,
Australia, September 14-16, 2005, Proceedings, Part II},
booktitle = {KES (2)},
publisher = {Springer},
series = {Lecture Notes in Computer Science},
volume = {3682},
year = {2005},
isbn = {3-540-28895-3},
bibsource = {DBLP, http://dblp.uni-trier.de}
}
|
__label__pos
| 0.998456 |
What is a sleep study?
0
66
A sleep study, also known as a polysomnogram (PSG), is an overnight test that records multiple streams of information to help doctors gauge how you sleep. The comprehensive and continuous recordings taken during the test include brain waves (EEG), oxygen saturation (SpO2), eye movements (EOG), respiratory effort, muscle activity (EMG) and heart rhythm (ECG). Based on the information from PSG sleep doctors are able to diagnose, or effectively rule out, many types of sleep disorders. Although the most common disorder seen is obstructive sleep apnea, we can also diagnose narcolepsy, hypersomnia, periodic limb movement disorder (PLMD), REM behavior disorder, and restless legs syndrome (RLS).
Once diagnosed with a sleep disorder, what are the next steps?
Once the test is completed, a registered sleep technician scores the entire study. The goal of the sleep study is to check for any sleep disorders that may be disturbing your sleep. We check and count all the breathing irregularities (called apneas, hypopneas, and respiratory-effort related arousals). Additionally we also count all the “Arousals” from sleep, cardiac rhythm abnormalities, leg movements, body position during sleep, and oxygen saturation during sleep. Once scored, the test recording and the scoring data is now completely reviewed usually by ABIM Sleep Medicine board-certified physicians.
The physician interpretation is done with the help of the patient’s medical history, a complete list of prescribed medications, and the sleep questionnaire provided. The doctor then writes aqtq80-yB381C full report that is sent to your doctor. If you are diagnosed with sleep apnea your doctor can decide to start to on CPAP or have you come back for another sleep study to start on CPAP.
SHARE
LEAVE A REPLY
|
__label__pos
| 0.990823 |
阅读 833
Dart 调用C语言混合编程
Dart 调用C语言
本篇博客研究Dart语言如何调用C语言代码混合编程,最后我们实现一个简单示例,在C语言中编写简单加解密函数,使用dart调用并传入字符串,返回加密结果,调用解密函数,恢复字符串内容。
环境准备
编译器环境
如未安装过VS编译器,则推荐使用GCC编译器,下载一个64位Windows版本的GCC——MinGW-W64 下载地址
在这里插入图片描述
如上,它有两个版本,sjljseh后缀表示异常处理模式,seh 性能较好,但不支持 32位。 sjlj 稳定性好,可支持 32位,推荐下载seh 版本
将编译器安装到指定的目录,完成安装后,还需要配置一下环境变量,将安装目录下的bin目录加入到系统Path环境变量中,bin目录下包含gcc.exemake.exe等工具链。
测试环境 配置完成后,检测一下环境是否搭建成功,打开cmd命令行,输入gcc -v能查看版本号则成功。
Dart SDK环境
去往Dart 官网下载最新的2.3 版本SDK,注意,旧版本不支持ffi 下载地址
下载安装后,同样需要配置环境变量,将dart-sdk\bin配置到系统Path环境变量中。
测试Dart ffi接口
简单示例
创建测试工程,打开cmd命令行
mkdir ffi-proj
cd ffi-proj
mkdir bin src
复制代码
创建工程目录ffi-proj,在其下创建binsrc文件夹,在bin中创建main.dart文件,在src中创建test.c文件
编写test.c 我们在其中包含了windows头文件,用于showBox函数,调用Win32 API,创建一个对话框
#include<windows.h>
int add(int a, int b){
return a + b;
}
void showBox(){
MessageBox(NULL,"Hello Dart","Title",MB_OK);
}
复制代码
进入src目录下,使用gcc编译器,将C语言代码编译为dll动态库
gcc test.c -shared -o test.dll
复制代码
编写main.dart
import 'dart:ffi' as ffi;
import 'dart:io' show Platform;
/// 根据C中的函数来定义方法签名(所谓方法签名,就是对一个方法或函数的描述,包括返回值类型,形参类型)
/// 这里需要定义两个方法签名,一个是C语言中的,一个是转换为Dart之后的
typedef NativeAddSign = ffi.Int32 Function(ffi.Int32,ffi.Int32);
typedef DartAddSign = int Function(int, int);
/// showBox函数方法签名
typedef NativeShowSign = ffi.Void Function();
typedef DartShowSign = void Function();
void main(List<String> args) {
if (Platform.isWindows) {
// 加载dll动态库
ffi.DynamicLibrary dl = ffi.DynamicLibrary.open("../src/test.dll");
// lookupFunction有两个作用,1、去动态库中查找指定的函数;2、将Native类型的C函数转化为Dart的Function类型
var add = dl.lookupFunction<NativeAddSign, DartAddSign>("add");
var showBox = dl.lookupFunction<NativeShowSign, DartShowSign>("showBox");
// 调用add函数
print(add(8, 9));
// 调用showBox函数
showBox();
}
}
复制代码
在这里插入图片描述
深入用法
这里写一个稍微深入一点的示例,我们在C语言中写一个简单加密算法,然后使用dart调用C函数加密解密
编写encrypt_test.c,这里写一个最简单的异或加密算法,可以看到加密和解密实际上是一样的
#include <string.h>
#define KEY 'abc'
void encrypt(char *str, char *r, int r_len){
int len = strlen(str);
for(int i = 0; i < len && i < r_len; i++){
r[i] = str[i] ^ KEY;
}
if (r_len > len) r[len] = '\0';
else r[r_len] = '\0';
}
void decrypt(char *str, char *r, int r_len){
int len = strlen(str);
for(int i = 0; i < len && i < r_len; i++){
r[i] = str[i] ^ KEY;
}
if (r_len > len) r[len] = '\0';
else r[r_len] = '\0';
}
复制代码
编译为动态库
gcc encrypt_test.c -shared -o encrypt_test.dll
复制代码
编写main.dart
import 'dart:ffi';
import 'dart:io' show Platform;
import "dart:convert";
/// encrypt函数方法签名,注意,这里encrypt和decrypt的方法签名实际上是一样的,两个函数返回值类型和参数类型完全相同
typedef NativeEncrypt = Void Function(CString,CString,Int32);
typedef DartEncrypt = void Function(CString,CString,int);
void main(List<String> args) {
if (Platform.isWindows) {
// 加载dll动态库
DynamicLibrary dl = DynamicLibrary.open("../src/encrypt_test.dll");
var encrypt = dl.lookupFunction<NativeEncrypt, DartEncrypt>("encrypt");
var decrypt = dl.lookupFunction<NativeEncrypt, DartEncrypt>("decrypt");
CString data = CString.allocate("helloworld");
CString enResult = CString.malloc(100);
encrypt(data,enResult,100);
print(CString.fromUtf8(enResult));
print("-------------------------");
CString deResult = CString.malloc(100);
decrypt(enResult,deResult,100);
print(CString.fromUtf8(deResult));
}
}
/// 创建一个类继承Pointer<Int8>指针,用于处理C语言字符串和Dart字符串的映射
class CString extends Pointer<Int8> {
/// 申请内存空间,将Dart字符串转为C语言字符串
factory CString.allocate(String dartStr) {
List<int> units = Utf8Encoder().convert(dartStr);
Pointer<Int8> str = allocate(count: units.length + 1);
for (int i = 0; i < units.length; ++i) {
str.elementAt(i).store(units[i]);
}
str.elementAt(units.length).store(0);
return str.cast();
}
// 申请指定大小的堆内存空间
factory CString.malloc(int size) {
Pointer<Int8> str = allocate(count: size);
return str.cast();
}
/// 将C语言中的字符串转为Dart中的字符串
static String fromUtf8(CString str) {
if (str == null) return null;
int len = 0;
while (str.elementAt(++len).load<int>() != 0);
List<int> units = List(len);
for (int i = 0; i < len; ++i) units[i] = str.elementAt(i).load();
return Utf8Decoder().convert(units);
}
}
复制代码
运行结果
在这里插入图片描述
可以看到将"helloworld"字符串加密后变成一串乱码,解密字符串后,恢复内容
完善代码
上述代码虽然实现了我们的目标,但是存在明显的内存泄露,我们使用CString 的allocatemalloc申请了堆内存,但是却没有手动释放,这样运行一段时间后可能会耗尽内存空间,手动管理内存往往是C/C++中最容易出问题的地方,这里我们只能进行一个简单的设计来回收内存
/// 创建Reference 类来跟踪CString申请的内存
class Reference {
final List<Pointer<Void>> _allocations = [];
T ref<T extends Pointer>(T ptr) {
_allocations.add(ptr.cast());
return ptr;
}
// 使用完后手动释放内存
void finalize() {
for (final ptr in _allocations) {
ptr.free();
}
_allocations.clear();
}
}
复制代码
修改代码
import 'dart:ffi';
import 'dart:io' show Platform;
import "dart:convert";
/// encrypt函数方法签名,注意,这里encrypt和decrypt的方法签名实际上是一样的,两个函数返回值类型和参数类型完全相同
typedef NativeEncrypt = Void Function(CString,CString,Int32);
typedef DartEncrypt = void Function(CString,CString,int);
void main(List<String> args) {
if (Platform.isWindows) {
// 加载dll动态库
DynamicLibrary dl = DynamicLibrary.open("../src/hello.dll");
var encrypt = dl.lookupFunction<NativeEncrypt, DartEncrypt>("encrypt");
var decrypt = dl.lookupFunction<NativeEncrypt, DartEncrypt>("decrypt");
// 创建Reference 跟踪CString
Reference ref = Reference();
CString data = CString.allocate("helloworld",ref);
CString enResult = CString.malloc(100,ref);
encrypt(data,enResult,100);
print(CString.fromUtf8(enResult));
print("-------------------------");
CString deResult = CString.malloc(100,ref);
decrypt(enResult,deResult,100);
print(CString.fromUtf8(deResult));
// 用完后手动释放
ref.finalize();
}
}
class CString extends Pointer<Int8> {
/// 开辟内存控件,将Dart字符串转为C语言字符串
factory CString.allocate(String dartStr, [Reference ref]) {
List<int> units = Utf8Encoder().convert(dartStr);
Pointer<Int8> str = allocate(count: units.length + 1);
for (int i = 0; i < units.length; ++i) {
str.elementAt(i).store(units[i]);
}
str.elementAt(units.length).store(0);
ref?.ref(str);
return str.cast();
}
factory CString.malloc(int size, [Reference ref]) {
Pointer<Int8> str = allocate(count: size);
ref?.ref(str);
return str.cast();
}
/// 将C语言中的字符串转为Dart中的字符串
static String fromUtf8(CString str) {
if (str == null) return null;
int len = 0;
while (str.elementAt(++len).load<int>() != 0);
List<int> units = List(len);
for (int i = 0; i < len; ++i) units[i] = str.elementAt(i).load();
return Utf8Decoder().convert(units);
}
}
复制代码
总结
dart:ffi包目前正处理开发中,暂时释放的只有基础功能,且使用dart:ffi包后,Dart代码不能进行aot编译,不过Dart开发了ffi接口后,极大的扩展了dart语言的能力边界,就如同的Java的Jni一样,如果ffi接口开发得足够好用,Dart就能像Python那样成为一门真正的胶水语言。
大家如果有兴趣进一步研究,可以查看dart:ffi包源码,目前该包总共才5个dart文件,源码很少,适合学习。
参考资料:
dart:ffi 源码
dart:ffi 官方示例
欢迎关注我的公众号:编程之路从0到1
我的个人博客
我的 GitHub
在这里插入图片描述
关注下面的标签,发现更多相似文章
评论
|
__label__pos
| 0.955757 |
The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)
[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]
FreeBSD/Linux Kernel Cross Reference
sys/netccitt/x25.h
Version: - FREEBSD - FREEBSD11 - FREEBSD10 - FREEBSD9 - FREEBSD92 - FREEBSD91 - FREEBSD90 - FREEBSD8 - FREEBSD82 - FREEBSD81 - FREEBSD80 - FREEBSD7 - FREEBSD74 - FREEBSD73 - FREEBSD72 - FREEBSD71 - FREEBSD70 - FREEBSD6 - FREEBSD64 - FREEBSD63 - FREEBSD62 - FREEBSD61 - FREEBSD60 - FREEBSD5 - FREEBSD55 - FREEBSD54 - FREEBSD53 - FREEBSD52 - FREEBSD51 - FREEBSD50 - FREEBSD4 - FREEBSD3 - FREEBSD22 - linux-2.6 - linux-2.4.22 - MK83 - MK84 - PLAN9 - DFBSD - NETBSD - NETBSD5 - NETBSD4 - NETBSD3 - NETBSD20 - OPENBSD - xnu-517 - xnu-792 - xnu-792.6.70 - xnu-1228 - xnu-1456.1.26 - xnu-1699.24.8 - xnu-2050.18.24 - OPENSOLARIS - minix-3-1-1
SearchContext: - none - 3 - 10
1 /* $NetBSD: x25.h,v 1.12 2003/08/07 16:33:06 agc Exp $ */
2
3 /*
4 * Copyright (c) 1990, 1992, 1993
5 * The Regents of the University of California. All rights reserved.
6 *
7 * This code is derived from software contributed to Berkeley by the
8 * Laboratory for Computation Vision and the Computer Science Department
9 * of the University of British Columbia and the Computer Science
10 * Department (IV) of the University of Erlangen-Nuremberg, Germany.
11 *
12 * Redistribution and use in source and binary forms, with or without
13 * modification, are permitted provided that the following conditions
14 * are met:
15 * 1. Redistributions of source code must retain the above copyright
16 * notice, this list of conditions and the following disclaimer.
17 * 2. Redistributions in binary form must reproduce the above copyright
18 * notice, this list of conditions and the following disclaimer in the
19 * documentation and/or other materials provided with the distribution.
20 * 3. Neither the name of the University nor the names of its contributors
21 * may be used to endorse or promote products derived from this software
22 * without specific prior written permission.
23 *
24 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
25 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 * SUCH DAMAGE.
35 *
36 * @(#)x25.h 8.1 (Berkeley) 6/10/93
37 */
38
39 /*
40 * Copyright (c) 1984 University of British Columbia.
41 * Copyright (c) 1992 Computer Science Department IV,
42 * University of Erlangen-Nuremberg, Germany.
43 *
44 * This code is derived from software contributed to Berkeley by the
45 * Laboratory for Computation Vision and the Computer Science Department
46 * of the University of British Columbia and the Computer Science
47 * Department (IV) of the University of Erlangen-Nuremberg, Germany.
48 *
49 * Redistribution and use in source and binary forms, with or without
50 * modification, are permitted provided that the following conditions
51 * are met:
52 * 1. Redistributions of source code must retain the above copyright
53 * notice, this list of conditions and the following disclaimer.
54 * 2. Redistributions in binary form must reproduce the above copyright
55 * notice, this list of conditions and the following disclaimer in the
56 * documentation and/or other materials provided with the distribution.
57 * 3. All advertising materials mentioning features or use of this software
58 * must display the following acknowledgement:
59 * This product includes software developed by the University of
60 * California, Berkeley and its contributors.
61 * 4. Neither the name of the University nor the names of its contributors
62 * may be used to endorse or promote products derived from this software
63 * without specific prior written permission.
64 *
65 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
66 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
67 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
68 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
69 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
70 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
71 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
72 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
73 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
74 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
75 * SUCH DAMAGE.
76 *
77 * @(#)x25.h 8.1 (Berkeley) 6/10/93
78 */
79
80 #ifndef _NETCCITT_X25_H_
81 #define _NETCCITT_X25_H_
82
83 #ifdef _KERNEL
84 #define PRC_IFUP 3
85 #define PRC_LINKUP 4
86 #define PRC_LINKDOWN 5
87 #define PRC_LINKRESET 6
88 #define PRC_LINKDONTCOPY 7
89 #ifndef PRC_DISCONNECT_REQUEST
90 #define PRC_DISCONNECT_REQUEST 10
91 #endif
92 #endif
93
94 #define CCITTPROTO_HDLC 1
95 #define CCITTPROTO_X25 2 /* packet level protocol */
96 #define IEEEPROTO_802LLC 3 /* doesn't belong here */
97
98 #define HDLCPROTO_LAP 1
99 #define HDLCPROTO_LAPB 2
100 #define HDLCPROTO_UNSET 3
101 #define HDLCPROTO_LAPD 4
102
103 /* socket options */
104 #define PK_ACCTFILE 1 /* use level = CCITTPROTO_X25 */
105 #define PK_FACILITIES 2 /* use level = CCITTPROTO_X25 */
106 #define PK_RTATTACH 3 /* use level = CCITTPROTO_X25 */
107 #define PK_PRLISTEN 4 /* use level = CCITTPROTO_X25 */
108
109 #define MAX_FACILITIES 109 /* maximum size for facilities */
110
111 /*
112 * X.25 Socket address structure. It contains the X.121 or variation of
113 * X.121, facilities information, higher level protocol value (first four
114 * bytes of the User Data field), and the last 12 characters of the User
115 * Data field.
116 */
117
118 struct x25_sockaddr { /* obsolete - use sockaddr_x25 */
119 short xaddr_len; /* Length of xaddr_addr. */
120 u_char xaddr_addr[15]; /* Network dependent or X.121 address. */
121 u_char xaddr_facilities; /* Facilities information. */
122 #define XS_REVERSE_CHARGE 0x01
123 #define XS_HIPRIO 0x02
124 u_char xaddr_proto[4]; /* Protocol ID (4 bytes of user data). */
125 u_char xaddr_userdata[12]; /* Remaining User data field. */
126 };
127
128 /*
129 * X.25 Socket address structure. It contains the network id, X.121
130 * address, facilities information, higher level protocol value (first four
131 * bytes of the User Data field), and up to 12 characters of User Data.
132 */
133
134 struct sockaddr_x25 {
135 u_char x25_len;
136 u_char x25_family; /* must be AF_CCITT */
137 short x25_net; /* network id code (usually a dnic) */
138 char x25_addr[16]; /* X.121 address (null terminated) */
139 struct x25opts {
140 char op_flags; /* miscellaneous options */
141 /* pk_var.h defines other lcd_flags */
142 #define X25_REVERSE_CHARGE 0x01 /* remote DTE pays for call */
143 #define X25_DBIT 0x02 /* not yet supported */
144 #define X25_MQBIT 0x04 /* prepend M&Q bit status byte to packet data */
145 #define X25_OLDSOCKADDR 0x08 /* uses old sockaddr structure */
146 #define X25_DG_CIRCUIT 0x10 /* lcd_flag: used for datagrams */
147 #define X25_DG_ROUTING 0x20 /* lcd_flag: peer addr not yet known */
148 #define X25_MBS_HOLD 0x40 /* lcd_flag: collect m-bit sequences */
149 char op_psize; /* requested packet size */
150 #define X25_PS128 7
151 #define X25_PS256 8
152 #define X25_PS512 9
153 char op_wsize; /* window size (1 .. 7) */
154 char op_speed; /* throughput class */
155 } x25_opts;
156 short x25_udlen; /* user data field length */
157 char x25_udata[16]; /* user data field */
158 };
159
160 /*
161 * network configuration info
162 * this structure must be 16 bytes long
163 */
164
165 struct x25config {
166 struct sockaddr_x25 xc_addr;
167 /* link level parameters */
168 u_short xc_lproto:4, /* link level protocol eg. CCITTPROTO_HDLC */
169 xc_lptype:4, /* protocol type eg. HDLCPROTO_LAPB */
170 xc_ltrace:1, /* link level tracing flag */
171 xc_lwsize:7; /* link level window size */
172 u_short xc_lxidxchg:1, /* link level XID exchange flag - NOT YET */
173 /* packet level parameters */
174 xc_rsvd1:2,
175 xc_pwsize:3, /* default window size */
176 xc_psize:4, /* default packet size 7=128, 8=256, ... */
177 xc_type:3, /* network type */
178 #define X25_1976 0
179 #define X25_1980 1
180 #define X25_1984 2
181 #define X25_DDN 3
182 #define X25_BASIC 4
183 xc_ptrace:1, /* packet level tracing flag */
184 xc_nodnic:1, /* remove our dnic when calling on net */
185 xc_prepnd0:1; /* prepend 0 when making offnet calls */
186 u_short xc_maxlcn; /* max logical channels */
187 u_short xc_dg_idletimo; /* timeout for idle datagram circuits. */
188 };
189
190 #ifdef IFNAMSIZ
191 struct ifreq_x25 {
192 char ifr_name[IFNAMSIZ]; /* if name, e.g. "en0" */
193 struct x25config ifr_xc;
194 };
195 #define SIOCSIFCONF_X25 _IOW('i', 12, struct ifreq_x25) /* set ifnet config */
196 #define SIOCGIFCONF_X25 _IOWR('i',13, struct ifreq_x25) /* get ifnet config */
197 #endif
198
199 #ifdef _KERNEL
200 struct llinfo_x25;
201 struct pklcd;
202 struct sockaddr_in;
203 struct x25_ifaddr;
204 struct ifnet;
205 struct rtentry;
206 struct rt_addrinfo;
207
208 void x25_lxfree __P((struct llinfo_x25 *));
209 int x25_ifinput __P((struct mbuf *, void *));
210 int x25_connect_callback __P((struct mbuf *, void *));
211 int x25_dgram_incoming __P((struct mbuf *, void *));
212 int x25_ifoutput __P((struct ifnet *, struct mbuf *, struct sockaddr *, struct rtentry *));
213 void x25_iftimeout __P((struct ifnet *));
214 void x25_rtrequest __P((int , struct rtentry *, struct rt_addrinfo *));
215 void x25_rtinvert __P((int , struct sockaddr *, struct rtentry *));
216 void x25_ddnip_to_ccitt __P((struct sockaddr *, struct rtentry *));
217 void x25_dg_rtinit __P((struct sockaddr_x25 *, struct x25_ifaddr *, int ));
218 void pk_init __P((void));
219 int pk_user_protolisten __P((u_char *));
220 int pk_rtattach __P((struct socket *, struct mbuf *));
221 int x25_rtattach __P((struct pklcd *, struct rtentry *));
222 #endif
223
224 #endif /* _NETCCITT_X25_H_ */
Cache object: 7774b2687b13c1e3c43ba8293c5c915d
[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]
This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.
|
__label__pos
| 0.827465 |
Sigmoid dose response relationship toxicology
sigmoid dose response relationship toxicology
A normally distributed sigmoid curve such as this one approaches a response of 0% as the dose is. Interpret frequency (normal distribution) and dose - of most exposures in toxicology. Dosage - response mathematical relationship. (positive sigmoid curve. The dose–response relationship, or exposure–response relationship, describes the change in Dose–response curves are generally sigmoidal and monophasic and can be fit to a classical Hill equation. they apply to endocrine disruptors argues for a substantial revision of testing and toxicological models at low doses.
The dose-response relationship or curve allows one to establish causality that a chemical has induced the observed effects, helps establish the lowest dose at which toxicity occurs if there is a threshold, and determines the rate or slope for the dose response.
There was a problem providing the content you requested
There may or may not be a threshold, a dose below which no observable effect is expected. Within a species or population, the majority will respond similarly to a given toxicant; however, a wide variance of responses may be encountered, some individuals are susceptible and others resistant. As demonstrated in Figure 2. A large standard deviation indicates great variability of response.
sigmoid dose response relationship toxicology
The shape and slope of the dose-response curve is helpful in predicting the risk or toxicity of a substance at specific dose levels.
Major differences among toxicants may exist not only in the dose at which the toxicity is seen but also in the percent of population responding per unit change in dose i.
Dose–response relationship - Wikipedia
As illustrated in Figure 4 below, Toxicant A has a higher threshold but a steeper slope than Toxicant B, the implication being that comparatively, Toxicant B is more toxic at lower dosages and Toxicant A more toxic at higher dosages.
A threshold for toxic effects occurs at the point where the body's ability to detoxify a xenobiotic or repair toxic injury has been exceeded. For most organs there is a reserve capacity so that loss of some organ function does not cause decreased performance. Figure 5, below, see http: Given the larger number of subjects needed to observe an unlikely phenomenon one usually cannot afford to study sufficient numbers of subjects at very low doses to accurately portray the dose response relationship at the lowest dose ranges.
Hence laboratory animals are typically studied at dosages which are orders of magnitude higher than human beings are expected to be exposed and conclusions of risk in human settings are derived from extrapolations of observed data at higher ranges to the lower ranges at which humans might be exposed. Source available from here. For any updates to the material, or more permissions beyond the scope of this license, please email healthoer uct. One of the more commonly used measures of toxicity is the LD The LD50 says nothing about non-lethal toxic effects though.
sigmoid dose response relationship toxicology
A chemical may have a large LD50, but may produce illness at very small exposure levels. It is incorrect to say that chemicals with small LD50s are more dangerous than chemicals with large LD50s, they are simply more toxic.
sigmoid dose response relationship toxicology
The danger, or risk of adverse effect of chemicals, is mostly determined by how they are used, not by the inherent toxicity of the chemical itself. The LD50s of different poisons may be easily compared; however, it is always necessary to know which species was used for the tests and how the poison was administered the route of exposuresince the LD50 of a poison may vary considerably based on the species of animal and the way exposure occurs.
Some poisons may be extremely toxic if swallowed oral exposure and not very toxic at all if splashed on the skin dermal exposure.
Dose–response relationship
The potency of a poison is a measure of its strength compared to other poisons. The more potent the poison, the less it takes to kill; the less potent the poison, the more it takes to kill.
The potencies of poisons are often compared using signal words or categories as shown in the example in table 2. The designation toxic dose TD is used to indicate the dose exposure that will produce signs of toxicity in a certain percentage of animals.
sigmoid dose response relationship toxicology
The TD50 is the toxic dose for 50 percent of the animals tested. The larger the TD the more poison it takes to produce signs of toxicity.
General Principles of Toxicology - Page 2 of 6
The toxic dose does not give any information about the lethal dose because toxic effects for example, nausea and vomiting may not be directly related to the way that the chemical causes death. The toxicity of a chemical is an inherent property of the chemical itself. It is also true that chemicals can cause different types of toxic effects, at different dose levels, depending on the animal species tested.
|
__label__pos
| 0.890827 |
Skip to main content
Full text of "Metallurgy Of Cast Iron"
EFFECT OF VARIATIONS IN TOTAL CARBON. 247
in the percentages of carbon in iron cannot be controlled sufficiently to regulate mixtures in everyday founding. This proposition is largely due to some advocating that the creation of the graphitic carbon is not regulated by silicon, but due chiefly to changes in the percentages of carbon. It is true that the higher the carbon, the more graphite there is in normally made and cooled pig iron or castings, other conditions being equal. Nevertheless, variations in the silicon and sulphur, especially the silicon, are chiefly responsible for variations in the graphite of different pig or castings. If those who think otherwise will take note of variations in the total carbon and the combined carbon they will find that, allowing for changes in the percentage of total carbon, the combined carbon varies closely with those of silicon and sulphur, especially the former; or, in other words, with a constant total carbon, sulphur, and manganese, etc., the higher the silicon, the lower the combined carbon and the higher the graphite, in normally made and cooled pig iron or castings.
flalleable founders notice that the heat of irons is greatly derived from the carbon in it. As a rule the low silicon irons give them the highest carbon. When the exception to this rule takes place and they get low carbon in low silicon irons, which many prefer, they notice its heat effect in a very pronounced manner. Iron with less than i per cent, silicon may have carbon up to 4.50 per cent, while over 4.00 per cent, silicon iron may often not exceed 2.00 per cent, carbon.
To insure good fluidity it is not to be understood, by the above, that it is necessary to have carbon above 3.75. To obtain good fluidity, extra silicon, phosphorus, and often manganese are necessary to be com-o.n. in ladle 1,772 Ibs. .100" -326 " I.IOO .242 3
|
__label__pos
| 0.8945 |
The idea that Is Australia Wider than the Moon? might seem absurd at first glance. After all, the moon is a celestial body that orbits the Earth and has a diameter of 3,474 kilometers. Australia, on the other hand, is a continent located in the southern hemisphere with a total land area of 7.692 million square kilometers. But is it possible that is Australia wider than the moon?
To answer this question, we need to look at what we mean by “wider.” If we are talking about the physical size of these two objects, then it’s clear that the moon is much larger than Australia. However, if we are talking about the perceived width of Australia as seen from space, then things get a bit more interesting.Is Australia Wider than the Moon
When we look at the moon from Earth, it appears to be about the same size as the sun, even though the sun is much larger. This is because the moon is much closer to us than the sun, so it appears larger in our field of view. Similarly, if we were to view Australia from space, it would appear much wider than it actually is due to the curvature of the Earth.
To understand this phenomenon, we need to look at the concept of the “horizon.” The horizon is the line where the Earth appears to meet the sky, and it curves away from us as we move further away from the surface. This curvature is due to the shape of the Earth, which is roughly spherical. As a result, objects that are far away from us appear to be “squished” toward the horizon, making them appear wider than they actually are.
This effect is particularly pronounced when looking at large objects like continents. From space, Australia would appear to stretch almost from one end of the horizon to the other, making it seem much wider than it actually is. In fact, if we were to view Australia from space at the right angle, it could appear to be wider than the moon.
Of course, this is all just a matter of perspective. In reality, the moon is much larger than Australia, and it would take over 50 million Australia to fill the volume of the moon. However, the fact that Australia can appear wider than the moon when viewed from space is a fascinating reminder of the complexities of perception and the way our brains interpret the world around us.
Is Australia Wider than the Moon
Full blood moon eclipse 2018
This phenomenon is not unique to c, of course. Any large object viewed from space will appear wider than it actually is due to the curvature of the Earth. In fact, this effect is the reason why the Earth itself appears to be a flat disc from space, even though we know it is actually a sphere.
Despite this, there is something uniquely awe-inspiring about the idea of Australia stretching across the horizon, wider than the moon. It’s a reminder of the immense scale of the world we live in and the way that even the most familiar objects can take on new dimensions when viewed from a different perspective.
It’s also a reminder of the incredible advances we have made in space exploration over the past few decades. Thanks to satellites, telescopes, and other advanced technologies, we are able to view our world and the universe beyond it in ways that were once unimaginable. This has allowed us to gain new insights into the workings of our planet, as well as the larger cosmos that surrounds us.
In conclusion, while it may seem strange to suggest that Australia is wider than the moon, it is in fact a possibility when viewed from space. This is due to the way that the curvature of the Earth can make large objects appear wider than they actually are. While this phenomenon is not unique to Australia, it serves as a fascinating reminder of the way that perception and perspective can shape our understanding of the world around us. As we continue to explore the universe and push the boundaries of our knowledge, we will undoubtedly encounter many more surprising and unexpected phenomena that challenge our understanding of the world. But through continued curiosity and exploration, we can continue to expand our knowledge and appreciation of the vast and endlessly fascinating universe we inhabit.
Is Australia Wider than the Moon
NEW JERSEY, USA – OCTOBER 1: A plane flies through as The Harvest Moon rises behind The Statue of Liberty of New York City as seen from the Liberty State Park in New Jersey, United States on October 1, 2020. (Photo by Tayfun Coskun/Anadolu Agency via Getty Images)
It’s also worth noting that while the concept of Australia appearing wider than the moon is a fascinating one, it’s not something that is likely to have much practical significance in our day-to-day lives. After all, we don’t often view Australia or the moon from space, and even if we did, the perception of their relative widths would depend on a variety of factors, including the angle of observation, the time of day, and the weather conditions.
Nonetheless, the idea of Australia stretching across the horizon, wider than the moon, is a powerful and evocative one that speaks to our sense of wonder and awe at the natural world. It reminds us of the sheer scale and complexity of the universe we inhabit, and the way that even the most familiar objects can take on new dimensions and meanings when viewed from a different perspective.
Ultimately, the idea that Australia is wider than the moon is a testament to the power of curiosity and imagination to inspire and challenge us, to push us to explore new frontiers and seek out new knowledge. Whether we are exploring the far reaches of the universe or simply contemplating the wonders of our own planet, the pursuit of knowledge and understanding is a deeply human endeavor that drives us forward and helps us to make sense of the world around us.
Author
Write A Comment
|
__label__pos
| 0.989021 |
ANAEROBIC SLUDGE DIGESTERS
Anaerobic sludge digesters are reactors in which waste water is treated with microbes to 'digest' the suspended solids. The reactor is essentially a CSTR. The reactor is intially charged with a microbial population. This is followed by the continuous addition of waste water feed and heat to the system. The use of methanogenic bacteria as the microbial population results in poor process stability. Hence, a good control system is necessary. A simple schematic of the setup is shown below.
The parameters affecting the process are the rate of heat addition and the flow rate of the influent waste water. Furthermore, there are environmental disturbances which affect the process. Chief among these are the concentration of suspended solids in the influent feed and the temperature of the feed. The important measured variables are the concentration of the suspended matter in the digester and the temperature of the digester.
You are required to model the process and derive the transfer functions relating the manipulated variables and the disturbances to the controlled variables. Furthermore, you should analyze the extent of interaction in the system and, based on the analysis, pair the appropriate manipulated and controlled variables. Finally, you are required to design a controller for the process.
|
__label__pos
| 0.923714 |
Uncovering the Origins of Strength in Geopolymer Composites
Significance
Geopolymers are inorganic, typically ceramic, materials that form long-range, covalently bonded, non-crystalline (amorphous) networks. Ideally, they are synthesized by mixing a source of aluminosilicates with a highly caustic alkaline and silica-rich solution. This unique composite exhibits many appealing properties such as: early strength development, low carbon dioxide footprint, high strength-to-weight ratio, high fracture toughness, high flexural strength, and high compressive strength. As of now, the influence of microstructure and heterogeneity on the constitutive behavior of geopolymer binders reinforced with aggregates—particulates or fibers, is not yet fully understood. Therefore, mechanistic models are needed to fully understand the impact of a heterogeneous and multiscale microstructure on the stress-strain response for geopolymer composites. Previous studies showed that several phenomenological approaches have been developed to correlate the mechanical response to the chemistry of sodium-based metakaolin and fly-ash geopolymer binders either based on linear regression or neural network models. Moreover, it is evident from literature that finite element approaches have also been formulated at the macroscopic scale to investigate the response of geopolymer concrete reinforced with steel rebars. Nonetheless, there is still a missing link between the mechanical response of geopolymer composites and their chemistry and mix design.
On this account, Professor Ange Therese Akono from the Northwestern University in collaboration with Professor Seid Koric and Professor Waltraud M. Kriven at the University of Illinois at Urbana-Champaign proposed a study whose main objective was to formulate a rigorous physics-based and multiscale micromechanics-based theory that could connect the elasto-plastic response of geopolymer composites to the heterogeneity and to the pore structure. In other words, they formulated a nonlinear physics-based mechanistic model that described the constitutive response of geopolymer composites and bridged the molecular and macroscopic length-scales. Their work is currently published in the research journal, Cement and Concrete Composites.
In their work, the research team employed a physics-based energetic approach to explore the influence of the nanogranular and particulate nature of geopolymer composites on the elasto-plastic constants. To this end, they formulated a multiscale model for geopolymer composites spanning 12 length-scales, from the molecular level to the macroscopic length-scale to capture the influence of chemistry and structure on the mechanical response. Next, they described the evolution of the elastic and strength properties across multiple length scales by application of micromechanics theory. They then validated the theoretical model on unreinforced potassium geopolymer as well as particulate geopolymer composites. Finally, the model was applied to investigate the influence of porosity, processing, and chemistry on the inelastic behavior of geopolymer composites.
The researchers found out that the strength behavior of geopolymer composites is significantly influenced by local contacts between geopolymer nanoparticles at the nanoscale. They also realized that air voids, depending on their size, affect the mechanical response differently. For instance, nanoscale airvoids are dictated by the chemistry of the geopolymer precursor and promote strength development through local rearrangement. In contrast, micron-scale air voids are a product of the mixing procedure and they play a detrimental role as they act as stress concentrators, thereby initiating premature failure. Meanwhile particulate and fiber reinforcement enhance the strength response in different manners. Fibers provide a bridging effect whereas microparticles local dissipate mechanical energy through particle-to-particle contacts as well as matrix-to-particle friction.
We provide the missing link between strength response of metakaolin-based geopolymer composites and pore structure. We found that the effective strength is controlled by local contacts between geopolymer nanoparticles at the nanoscale and, at the microscale, by the presence of micropores resulting from the mixing procedure. Our methodology is important to inform the design of high-performance lightweight smart materials with enhanced stiffness and strength.” said Professor Ange T. Akono to Advances in Engineering.
In summary, the study shed light on the influence of heterogeneity and porosity on the constitutive behavior of geopolymer composites. Remarkably, the presented theoretical approach enabled the researchers to rank processing methods according to their effectiveness. An important takeaway is that four major factors contribute to the strength of geopolymer composites: the chemistry of the geopolymer precursor at the molecular scale, the nature and the shape of the reinforcement (usually at the microscale), and the mixing procedure. In a statement to Advances in Engineering, Professor Ange T. Akono further mentioned that their research work earmarked an important step in the mechanistic modeling of the behavior of geopolymer composites so as to advance the science and technology of geopolymer composites.
Uncovering the Origins of Strength in Geopolymer Composites - Advances in Engineering
multiscale model for geopolymer composites.
About the author
Dr. Ange-Therese Akono is an Assistant Professor and Louis Berger Junior professor in the Department of Civil and Environmental Engineering at Northwestern University. With a Ph. D. (2013) and an M. Sc. (2011) from the Massachusetts Institute of Technology, Dr. Akono’s award include the ASCE New Faces of Civil Engineering Professionals Award, the National Center for Supercomputing Applications Faculty Fellowship, and the MITEnergy Initiative Fellowship.
Dr. Akono’s laboratory aims to push the frontiers of nanomechanics with a focus on fracture mechanics, smart materials, green concrete, subsurface energy, and biomaterials.
Reference
Ange Therese Akono, Seid Koric, Waltraud M. Kriven. Influence of pore structure on the strength behavior of particle- and fiber reinforced metakaolin-based geopolymer composites. Cement and Concrete Composites volume 104 (2019) 103361.
Go To Cement and Concrete Composites
Check Also
Development of Ultra-fast photonic computing processor using polarization - Advances in Engineering
Development of Ultra-fast photonic computing processor using polarization
|
__label__pos
| 0.898833 |
How can I freeze specific weights of Neural network model?
94 次查看(过去 30 天)
I need to set some specific weights before training, and keep these weights fixed during training
采纳的回答
Utkarsh
Utkarsh 2020-6-18
Hi Abdelwahab,
If you wish to assign those weights in the beginning and keep them as constant, you can set the ‘WeightLearnRateFactor’ property as 0 (which defines the learning rate for that layer) for those layers.
For example,
convolution2dLayer(3,1,'Padding',[1 1 1 1],'WeightLearnRateFactor',0);
You may refer to this link to learn more about such properties.
Or if you want to fix certain weights to some layers in a trained network , then directly assign those layers the values after training the network.
net = alexnet; % or your pre-trained network
layer = net.Layers(1) % here 1 can be replaced with the layer number you wish to change
layer.Weights = randn(11,11,3,96); %the weight matrix which you wish to assign
1 个评论
Ahmad Gad
Ahmad Gad 2021-8-25
编辑:Ahmad Gad 2021-8-25
Can I do the same for a shallow network? And using which function?
请先登录,再进行评论。
更多回答(0 个)
类别
Help CenterFile Exchange 中查找有关 Image Data Workflows 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
Translated by
|
__label__pos
| 0.955763 |
SciCombinator
Discover the most talked about and latest scientific content & concepts.
Concept: Numerical taxonomy
7
The origin of limes and lemons has been a source of conflicting taxonomic opinions. Biochemical studies, numerical taxonomy and recent molecular studies suggested that cultivated Citrus species result from interspecific hybridization between four basic taxa (C. reticulata, C. maxima, C. medica and C. micrantha). However, the origin of most lemons and limes remains controversial or unknown. The aim of this study was to perform extended analyses of the diversity, genetic structure and origin of limes and lemons.
Concepts: DNA, Taxonomy, Citrus, Orange, Citron, Rutaceae, Cultivated plant taxonomy, Numerical taxonomy
0
We argue that the mathematization of science should be understood as a normative activity of advocating for a particular methodology with its own criteria for evaluating good research. As a case study, we examine the mathematization of taxonomic classification in systematic biology. We show how mathematization is a normative activity by contrasting its distinctive features in numerical taxonomy in the 1960s with an earlier reform advocated by Ernst Mayr starting in the 1940s. Both Mayr and the numerical taxonomists sought to formalize the work of classification, but Mayr introduced a qualitative formalism based on human judgment for determining the taxonomic rank of populations, while the numerical taxonomists introduced a quantitative formalism based on automated procedures for computing classifications. The key contrast between Mayr and the numerical taxonomists is how they conceptualized the temporal structure of the workflow of classification, specifically where they allowed meta-level discourse about difficulties in producing the classification.
Concepts: Scientific method, Taxonomy, Categorization, Taxonomic rank, Biological classification, Alpha taxonomy, Systematics, Numerical taxonomy
|
__label__pos
| 0.979776 |
blob: c4e415b6d6996db44a0d483120ede74a91f733e2 [file] [log] [blame]
# Copyright 2021 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Defines a Python binary.
#
# Example
#
# ```
# python_binary("main") {
# main_source = "main.py"
# main_callable = "main"
# sources = [
# "foo.py",
# "bar.py",
# ]
# output_name = "main.pyz"
# deps = [ "//path/to/lib" ]
# }
# ```
#
# Parameters
#
# main_source (required)
# Source file including the entry callable for this binary.
# This file will typically contain
# ```
# if __name__ == "__main__":
# main()
# ```
# Type: path
#
# main_callable (optional)
# Main callable, which serves as the entry point of the output zip archive.
# In the example above, this is "main".
# Type: string
# Default: main
#
# output_name (optional)
# Name of the output Python zip archive, must have .pyz as extension.
# Type: string
# Default: ${target_name}.pyz
#
# sources
# deps
# visibility
# testonly
template("python_binary") {
assert(defined(invoker.main_source), "main_source is required")
_library_infos_target = "${target_name}_library_infos"
_library_infos_json = "${target_gen_dir}/${target_name}_library_infos.json"
generated_file(_library_infos_target) {
forward_variables_from(invoker,
[
"testonly",
"deps",
])
visibility = [ ":*" ]
outputs = [ _library_infos_json ]
output_conversion = "json"
data_keys = [ "library_info" ]
walk_keys = [ "library_info_barrier" ]
}
action(target_name) {
forward_variables_from(invoker,
[
"testonly",
"visibility",
])
sources = [ invoker.main_source ]
if (defined(invoker.sources)) {
sources += invoker.sources
}
inputs = [ _library_infos_json ]
deps = [ ":${_library_infos_target}" ]
# Output must be a .pyz, so our build knows to use a vendored Python
# interpreter to run them.
#
# Output a single .pyz file makes the output deterministic, otherwise we'd
# have to list out all the library sources that will be copied to output
# directory, which is not possible because they are not known until the
# generated JSON file is parsed at build time.
_output = "${target_out_dir}/${target_name}.pyz"
if (defined(invoker.output_name)) {
assert(get_path_info(invoker.output_name, "extension") == "pyz",
"output_name must have .pyz as extension")
_output = "${target_out_dir}/${invoker.output_name}"
}
outputs = [ _output ]
_main_callable = "main"
if (defined(invoker.main_callable)) {
_main_callable = invoker.main_callable
}
script = "//build/python/package_python_binary.py"
depfile = "${target_out_dir}/${target_name}.d"
args = [ "--sources" ] + rebase_path(sources, root_build_dir) + [
"--target_name",
target_name,
"--main_source",
rebase_path(invoker.main_source, root_build_dir),
"--main_callable",
_main_callable,
"--library_infos",
rebase_path(_library_infos_json, root_build_dir),
"--depfile",
rebase_path(depfile, root_build_dir),
"--gen_dir",
rebase_path(target_gen_dir, root_build_dir),
"--output",
rebase_path(_output, root_build_dir),
]
}
}
|
__label__pos
| 0.99991 |
~~ Offline ~~ theme Menu
Write Yourself a Scheme in 48 Hours in F# – Part IV
It is the evaluator turn. It is a big file, let’s see if I can fit it in a single post.
Aptly enough, the most important function is called eval.
eval env = function
| String _ as v -> v
| Number _ as v -> v
| Bool _ as v -> v
| Atom var -> getVar var env
| List [Atom "quote"; v] -> v
| List [Atom "if"; pred; conseq; alt] -> evalIf env pred conseq alt
| List [Atom "load"; fileName] -> load [fileName] |> List.map (eval env) |> last
| List [Atom "set!" ; Atom var ; form] -> env |> setVar var (eval env form)
| List [Atom "define"; Atom var; form] -> define env var (eval env form)
| List (Atom "define" :: (List (Atom var :: parms) :: body)) ->
makeNormalFunc env parms body |> define env var
| List (Atom "define" :: (DottedList ((Atom var :: parms), varargs) :: body)) ->
makeVarargs varargs env parms body |> define env var
| List (Atom "lambda" :: (List parms :: body)) -> makeNormalFunc env parms body
| List (Atom "lambda" :: (DottedList(parms, varargs) :: body)) -> makeVarargs varargs env parms body
| List (Atom "lambda" :: ((Atom _) as varargs :: body)) -> makeVarargs varargs env [] body
| List (func :: args) ->
let f = eval env func
let argVals = List.map (eval env) args
apply f argVals
| badForm -> throw (BadSpecialForm("Unrecognized special form", badForm))
This is the core of the evaluator. It takes as an input the LispVal generated by the parser and an environment and returns a LispVal that is the result of the reduction. As a side effect, it occasionally modify the environment. I carefully crafted the previous phrase to maximize the discomfort of the functional programmers tuned in. Such fun 🙂
More seriously (?), here is what it does:
We have a bunch of ‘see below’ to take care of. We’ll look at them in order.
First the ‘if’ statement. If the evaluated predicate is Bool(True) evaluate the consequent, otherwise evaluate the alternative. For some reason, I wrote it the other way around.
and
// 1a. If the evaluation of the pred is false evaluate alt, else evaluate cons
evalIf env pred conseq alt =
match eval env pred with
| Bool(false) -> eval env alt
| _ -> eval env conseq
Then there is the load function. It reads all the test and gets out the list of LispVal contained in it.
let load = fileIOFunction (fun fileName -> File.ReadAllText(fileName)
|> readExprList)
ReadExprList is part of the parser. We’ll look at it then. Sufficient here to say that it takes a string and returns a list of LispVal.
FileIOFunction just encapsulates a common pattern in all the file access functions. I don’t like such mechanical factorization of methods, without any real reusability outside the immediate surroundings of the code. But I like repetition even less.
let fileIOFunction func = function
| [String fileName] -> func (fileName)
| [] -> throw (IOError("No file name"))
| args -> throw (NumArgs(1, args))
A family of functions create FuncRecord given appropriate parameters. I seem to have lost memory of the contortions related to the last one. If I end up having to work again on this code, I’ll need to figure it out again. Note to myself, please comment this kind of code next time.
let makeFunc varargs env parms body =
Func ({parms = (List.map showVal parms); varargs = varargs; body = body; closure = env})
let makeNormalFunc = makeFunc None
let makeVarargs = showVal >> Some >> makeFunc
apply is the other workhorse function in the evaluator. The best way to understand it is to start from the bottom (where bindVars starts the line). We are binding the arguments and the variable arguments in the closure that has been passed in. We then evaluate the body. But the body is just a list of LispVal, so we just need to evaluate them in sequence and return the result of the last one.
and apply func args =
match func with
| PrimitiveFunc(f) -> f args
| Func ({parms = parms; varargs = varargs; body = body; closure = closure}) ->
let invalidNonVarargs = args.Length <> parms.Length && varargs.IsNone
let invalidVarargs = args.Length < parms.Length && varargs.IsSome
if invalidVarargs || invalidNonVarargs
then
throw (NumArgs(parms.Length, args))
else
let remainingArgs = args |> Seq.skip parms.Length |> Seq.toList
let evalBody env = body |> List.map (eval env) |> last
let rec zip xs1 xs2 acc =
match xs1, xs2 with
| x1::xs1, x2::xs2 -> zip xs1 xs2 ((x1, x2)::acc)
| _ -> acc
let bindVarArgs arg env =
match arg with
| Some(argName) -> bindVars [argName, (List remainingArgs)] env
| None -> env
bindVars (zip parms args []) closure
|> bindVarArgs varargs
|> evalBody
| funcName -> throw (NotFunction("Expecting a function, getting ", showVal funcName))
This is enough for one post. Next time we’ll finish the evaluator.
Top
|
__label__pos
| 0.898122 |
Page 1
Electricity and Magnetism For 50 years, Edward M. Purcell’s classic textbook has introduced students to the world of electricity and magnetism. This third edition has been brought up to date and is now in SI units. It features hundreds of new examples, problems, and figures, and contains discussions of real-life applications. The textbook covers all the standard introductory topics, such as electrostatics, magnetism, circuits, electromagnetic waves, and electric and magnetic fields in matter. Taking a nontraditional approach, magnetism is derived as a relativistic effect. Mathematical concepts are introduced in parallel with the physical topics at hand, making the motivations clear. Macroscopic phenomena are derived rigorously from the underlying microscopic physics. With worked examples, hundreds of illustrations, and nearly 600 end-of-chapter problems and exercises, this textbook is ideal for electricity and magnetism courses. Solutions to the exercises are available for instructors at www.cambridge.org/Purcell-Morin. EDWARD M . PURCELL
(1912–1997) was the recipient of many awards for his scientific,
educational, and civic work. In 1952 he shared the Nobel Prize for Physics for the discovery of nuclear magnetic resonance in liquids and solids, an elegant and precise method of determining the chemical structure of materials that serves as the basis for numerous applications, including magnetic resonance imaging (MRI). During his career he served as science adviser to Presidents Dwight D. Eisenhower, John F. Kennedy, and Lyndon B. Johnson. DAVID J . MORIN
is a Lecturer and the Associate Director of Undergraduate Studies in the
Department of Physics, Harvard University. He is the author of the textbook Introduction to Classical Mechanics (Cambridge University Press, 2008).
THIRD EDITION
ELECTRICITY AND MAGNETISM EDWARD M. PURCELL DAVID J. MORIN Harvard University, Massachusetts
CA M B R I D G E U N I V E R S I T Y P R E S S
Cambridge, New York, Melbourne, Madrid, Cape Town, Singapore, São Paulo, Delhi, Mexico City Cambridge University Press The Edinburgh Building, Cambridge CB2 8RU, UK Published in the United States of America by Cambridge University Press, New York www.cambridge.org Information on this title: www.cambridge.org/Purcell-Morin © D. Purcell, F. Purcell, and D. Morin 2013 This edition is not for sale in India. This publication is in copyright. Subject to statutory exception and to the provisions of relevant collective licensing agreements, no reproduction of any part may take place without the written permission of Cambridge University Press. Previously published by Mc-Graw Hill, Inc., 1985 First edition published by Education Development Center, Inc., 1963, 1964, 1965 First published by Cambridge University Press 2013 Printed in the United States by Sheridan Inc. A catalog record for this publication is available from the British Library Library of Congress cataloging-in-publication data Purcell, Edward M. Electricity and magnetism / Edward M. Purcell, David J. Morin, Harvard University, Massachusetts. – Third edition. pages cm ISBN 978-1-107-01402-2 (Hardback) 1. Electricity. 2. Magnetism. I. Title. QC522.P85 2012 537–dc23 2012034622 ISBN 978-1-107-01402-2 Hardback Additional resources for this publication at www.cambridge.org/Purcell-Morin Cambridge University Press has no responsibility for the persistence or accuracy of URLs for external or third-party internet websites referred to in this publication, and does not guarantee that any content on such websites is, or will remain, accurate or appropriate.
Preface to the third edition of Volume 2
xiii
Preface to the second edition of Volume 2
xvii
Preface to the first edition of Volume 2
xxi
CHAPTER 1 ELECTROSTATICS: CHARGES AND FIELDS 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 1.10 1.11 1.12 1.13 1.14 1.15 1.16
Electric charge Conservation of charge Quantization of charge Coulomb’s law Energy of a system of charges Electrical energy in a crystal lattice The electric field Charge distributions Flux Gauss’s law Field of a spherical charge distribution Field of a line charge Field of an infinite flat sheet of charge The force on a layer of charge Energy associated with the electric field Applications
1 1 4 5 7 11 14 16 20 22 23 26 28 29 30 33 35
CONTENTS
vi
CONTENTS
Chapter summary Problems Exercises CHAPTER 2 THE ELECTRIC POTENTIAL 2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8 2.9 2.10 2.11 2.12 2.13 2.14 2.15 2.16 2.17 2.18
Line integral of the electric field Potential difference and the potential function Gradient of a scalar function Derivation of the field from the potential Potential of a charge distribution Uniformly charged disk Dipoles Divergence of a vector function Gauss’s theorem and the differential form of Gauss’s law The divergence in Cartesian coordinates The Laplacian Laplace’s equation Distinguishing the physics from the mathematics The curl of a vector function Stokes’ theorem The curl in Cartesian coordinates The physical meaning of the curl Applications Chapter summary Problems Exercises
CHAPTER 3 ELECTRIC FIELDS AROUND CONDUCTORS 3.1 3.2 3.3 3.4 3.5 3.6 3.7 3.8 3.9
Conductors and insulators Conductors in the electrostatic field The general electrostatic problem and the uniqueness theorem Image charges Capacitance and capacitors Potentials and charges on several conductors Energy stored in a capacitor Other views of the boundary-value problem Applications Chapter summary
38 39 47
58 59 61 63 65 65 68 73 78 79 81 85 86 88 90 92 93 95 100 103 105 112
124 125 126 132 136 141 147 149 151 153 155
CONTENTS
Problems Exercises
155 163
CHAPTER 4 ELECTRIC CURRENTS
177
4.1 4.2 4.3 4.4 4.5 4.6 4.7 4.8 4.9 4.10 4.11 4.12
Electric current and current density Steady currents and charge conservation Electrical conductivity and Ohm’s law The physics of electrical conduction Conduction in metals Semiconductors Circuits and circuit elements Energy dissipation in current flow Electromotive force and the voltaic cell Networks with voltage sources Variable currents in capacitors and resistors Applications Chapter summary Problems Exercises
CHAPTER 5 THE FIELDS OF MOVING CHARGES 5.1 5.2 5.3 5.4 5.5 5.6 5.7 5.8 5.9
From Oersted to Einstein Magnetic forces Measurement of charge in motion Invariance of charge Electric field measured in different frames of reference Field of a point charge moving with constant velocity Field of a charge that starts or stops Force on a moving charge Interaction between a moving charge and other moving charges Chapter summary Problems Exercises
CHAPTER 6 THE MAGNETIC FIELD 6.1 6.2
Definition of the magnetic field Some properties of the magnetic field
177 180 181 189 198 200 204 207 209 212 215 217 221 222 226
235 236 237 239 241 243 247 251 255 259 267 268 270
277 278 286
vii
viii
CONTENTS
Vector potential Field of any current-carrying wire Fields of rings and coils Change in B at a current sheet How the fields transform Rowland’s experiment Electrical conduction in a magnetic field: the Hall effect 6.10 Applications Chapter summary Problems Exercises 6.3 6.4 6.5 6.6 6.7 6.8 6.9
CHAPTER 7 ELECTROMAGNETIC INDUCTION 7.1 7.2 7.3 7.4 7.5 7.6 7.7 7.8 7.9 7.10 7.11
Faraday’s discovery Conducting rod moving through a uniform magnetic field Loop moving through a nonuniform magnetic field Stationary loop with the field source moving Universal law of induction Mutual inductance A reciprocity theorem Self-inductance Circuit containing self-inductance Energy stored in the magnetic field Applications Chapter summary Problems Exercises
CHAPTER 8 ALTERNATING-CURRENT CIRCUITS 8.1 8.2 8.3 8.4 8.5 8.6 8.7
A resonant circuit Alternating current Complex exponential solutions Alternating-current networks Admittance and impedance Power and energy in alternating-current circuits Applications Chapter summary Problems Exercises
293 296 299 303 306 314 314 317 322 323 331
342 343 345 346 352 355 359 362 364 366 368 369 373 374 380
388 388 394 402 405 408 415 418 420 421 424
CONTENTS
CHAPTER 9 MAXWELL’S EQUATIONS AND ELECTROMAGNETIC WAVES 9.1 9.2 9.3 9.4 9.5 9.6 9.7 9.8
“Something is missing” The displacement current Maxwell’s equations An electromagnetic wave Other waveforms; superposition of waves Energy transport by electromagnetic waves How a wave looks in a different frame Applications Chapter summary Problems Exercises
CHAPTER 10 ELECTRIC FIELDS IN MATTER 10.1 10.2 10.3 10.4 10.5 10.6 10.7 10.8 10.9 10.10 10.11 10.12 10.13 10.14 10.15 10.16
Dielectrics The moments of a charge distribution The potential and field of a dipole The torque and the force on a dipole in an external field Atomic and molecular dipoles; induced dipole moments Permanent dipole moments The electric field caused by polarized matter Another look at the capacitor The field of a polarized sphere A dielectric sphere in a uniform field The field of a charge in a dielectric medium, and Gauss’s law A microscopic view of the dielectric Polarization in changing fields The bound-charge current An electromagnetic wave in a dielectric Applications Chapter summary Problems Exercises
CHAPTER 11 MAGNETIC FIELDS IN MATTER 11.1
How various substances respond to a magnetic field
430 430 433 436 438 441 446 452 454 455 457 461
466 467 471 474 477 479 482 483 489 492 495 497 500 504 505 507 509 511 513 516
523 524
ix
x
CONTENTS
11.2 11.3 11.4 11.5 11.6 11.7 11.8 11.9 11.10 11.11 11.12
The absence of magnetic “charge” The field of a current loop The force on a dipole in an external field Electric currents in atoms Electron spin and magnetic moment Magnetic susceptibility The magnetic field caused by magnetized matter The field of a permanent magnet Free currents, and the field H Ferromagnetism Applications Chapter summary Problems Exercises
CHAPTER 12 SOLUTIONS TO THE PROBLEMS 12.1 12.2 12.3 12.4 12.5 12.6 12.7 12.8 12.9 12.10 12.11
Chapter 1 Chapter 2 Chapter 3 Chapter 4 Chapter 5 Chapter 6 Chapter 7 Chapter 8 Chapter 9 Chapter 10 Chapter 11
529 531 535 540 546 549 551 557 559 565 570 573 575 577
586 586 611 636 660 678 684 707 722 734 744 755
Appendix A: Differences between SI and Gaussian units
762
Appendix B: SI units of common quantities
769
Appendix C: Unit conversions
774
Appendix D: SI and Gaussian formulas
778
Appendix E: Exact relations among SI and Gaussian units
789
CONTENTS
Appendix F: Curvilinear coordinates
791
Appendix G: A short review of special relativity
804
Appendix H: Radiation by an accelerated charge
812
Appendix I: Superconductivity
817
Appendix J: Magnetic resonance
821
Appendix K: Helpful formulas/facts
825
References
831
Index
833
xi
For 50 years, physics students have enjoyed learning about electricity and magnetism through the first two editions of this book. The purpose of the present edition is to bring certain things up to date and to add new material, in the hopes that the trend will continue. The main changes from the second edition are (1) the conversion from Gaussian units to SI units, and (2) the addition of many solved problems and examples. The first of these changes is due to the fact that the vast majority of courses on electricity and magnetism are now taught in SI units. The second edition fell out of print at one point, and it was hard to watch such a wonderful book fade away because it wasn’t compatible with the way the subject is presently taught. Of course, there are differing opinions as to which system of units is “better” for an introductory course. But this issue is moot, given the reality of these courses. For students interested in working with Gaussian units, or for instructors who want their students to gain exposure to both systems, I have created a number of appendices that should be helpful. Appendix A discusses the differences between the SI and Gaussian systems. Appendix C derives the conversion factors between the corresponding units in the two systems. Appendix D explains how to convert formulas from SI to Gaussian; it then lists, side by side, the SI and Gaussian expressions for every important result in the book. A little time spent looking at this appendix will make it clear how to convert formulas from one system to the other. The second main change in the book is the addition of many solved problems, and also many new examples in the text. Each chapter ends with “problems” and “exercises.” The solutions to the “problems” are located in Chapter 12. The only official difference between the problems
Preface to the third edition of Volume 2
xiv
Preface to the third edition of Volume 2
and exercises is that the problems have solutions included, whereas the exercises do not. (A separate solutions manual for the exercises is available to instructors.) In practice, however, one difference is that some of the more theorem-ish results are presented in the problems, so that students can use these results in other problems/exercises. Some advice on using the solutions to the problems: problems (and exercises) are given a (very subjective) difficulty rating from 1 star to 4 stars. If you are having trouble solving a problem, it is critical that you don’t look at the solution too soon. Brood over it for a while. If you do finally look at the solution, don’t just read it through. Instead, cover it up with a piece of paper and read one line at a time until you reach a hint to get you started. Then set the book aside and work things out for real. That’s the only way it will sink in. It’s quite astonishing how unhelpful it is simply to read a solution. You’d think it would do some good, but in fact it is completely ineffective in raising your understanding to the next level. Of course, a careful reading of the text, including perhaps a few problem solutions, is necessary to get the basics down. But if Level 1 is understanding the basic concepts, and Level 2 is being able to apply those concepts, then you can read and read until the cows come home, and you’ll never get past Level 1. The overall structure of the text is essentially the same as in the second edition, although a few new sections have been added. Section 2.7 introduces dipoles. The more formal treatment of dipoles, along with their applications, remains in place in Chapter 10. But because the fundamentals of dipoles can be understood using only the concepts developed in Chapters 1 and 2, it seems appropriate to cover this subject earlier in the book. Section 8.3 introduces the important technique of solving differential equations by forming complex solutions and then taking the real part. Section 9.6.2 deals with the Poynting vector, which opens up the door to some very cool problems. Each chapter concludes with a list of “everyday” applications of electricity and magnetism. The discussions are brief. The main purpose of these sections is to present a list of fun topics that deserve further investigation. You can carry onward with some combination of books/ internet/people/pondering. There is effectively an infinite amount of information out there (see the references at the beginning of Section 1.16 for some starting points), so my goal in these sections is simply to provide a springboard for further study. The intertwined nature of electricity, magnetism, and relativity is discussed in detail in Chapter 5. Many students find this material highly illuminating, although some find it a bit difficult. (However, these two groups are by no means mutually exclusive!) For instructors who wish to take a less theoretical route, it is possible to skip directly from Chapter 4 to Chapter 6, with only a brief mention of the main result from Chapter 5, namely the magnetic field due to a straight current-carrying wire.
Preface to the third edition of Volume 2
The use of non-Cartesian coordinates (cylindrical, spherical) is more prominent in the present edition. For setups possessing certain symmetries, a wisely chosen system of coordinates can greatly simplify the calculations. Appendix F gives a review of the various vector operators in the different systems. Compared with the second edition, the level of difficulty of the present edition is slightly higher, due to a number of hefty problems that have been added. If you are looking for an extra challenge, these problems should keep you on your toes. However, if these are ignored (which they certainly can be, in any standard course using this book), then the level of difficulty is roughly the same. I am grateful to all the students who used a draft version of this book and provided feedback. Their input has been invaluable. I would also like to thank Jacob Barandes for many illuminating discussions of the more subtle topics in the book. Paul Horowitz helped get the project off the ground and has been an endless supplier of cool facts. It was a pleasure brainstorming with Andrew Milewski, who offered many ideas for clever new problems. Howard Georgi and Wolfgang Rueckner provided much-appreciated sounding boards and sanity checks. Takuya Kitagawa carefully read through a draft version and offered many helpful suggestions. Other friends and colleagues whose input I am grateful for are: Allen Crockett, David Derbes, John Doyle, Gary Feldman, Melissa Franklin, Jerome Fung, Jene Golovchenko, Doug Goodale, Robert Hart, Tom Hayes, Peter Hedman, Jennifer Hoffman, Charlie Holbrow, Gareth Kafka, Alan Levine, Aneesh Manohar, Kirk McDonald, Masahiro Morii, Lev Okun, Joon Pahk, Dave Patterson, Mara Prentiss, Dennis Purcell, Frank Purcell, Daniel Rosenberg, Emily Russell, Roy Shwitters, Nils Sorensen, Josh Winn, and Amir Yacoby. I would also like to thank the editorial and production group at Cambridge University Press for their professional work in transforming the second edition of this book into the present one. It has been a pleasure working with Lindsay Barnes, Simon Capelin, Irene Pizzie, Charlotte Thomas, and Ali Woollatt. Despite careful editing, there is zero probability that this book is error free. A great deal of new material has been added, and errors have undoubtedly crept in. If anything looks amiss, please check the webpage www.cambridge.org/Purcell-Morin for a list of typos, updates, etc. And please let me know if you discover something that isn’t already posted. Suggestions are always welcome. David Morin
xv
This revision of “Electricity and Magnetism,” Volume 2 of the Berkeley Physics Course, has been made with three broad aims in mind. First, I have tried to make the text clearer at many points. In years of use teachers and students have found innumerable places where a simplification or reorganization of an explanation could make it easier to follow. Doubtless some opportunities for such improvements have still been missed; not too many, I hope. A second aim was to make the book practically independent of its companion volumes in the Berkeley Physics Course. As originally conceived it was bracketed between Volume I, which provided the needed special relativity, and Volume 3, “Waves and Oscillations,” to which was allocated the topic of electromagnetic waves. As it has turned out, Volume 2 has been rather widely used alone. In recognition of that I have made certain changes and additions. A concise review of the relations of special relativity is included as Appendix A. Some previous introduction to relativity is still assumed. The review provides a handy reference and summary for the ideas and formulas we need to understand the fields of moving charges and their transformation from one frame to another. The development of Maxwell’s equations for the vacuum has been transferred from the heavily loaded Chapter 7 (on induction) to a new Chapter 9, where it leads naturally into an elementary treatment of plane electromagnetic waves, both running and standing. The propagation of a wave in a dielectric medium can then be treated in Chapter 10 on Electric Fields in Matter. A third need, to modernize the treatment of certain topics, was most urgent in the chapter on electrical conduction. A substantially rewritten
Preface to the second edition of Volume 2
xviii
Preface to the second edition of Volume 2
Chapter 4 now includes a section on the physics of homogeneous semiconductors, including doped semiconductors. Devices are not included, not even a rectifying junction, but what is said about bands, and donors and acceptors, could serve as starting point for development of such topics by the instructor. Thanks to solid-state electronics the physics of the voltaic cell has become even more relevant to daily life as the number of batteries in use approaches in order of magnitude the world’s population. In the first edition of this book I unwisely chose as the example of an electrolytic cell the one cell—the Weston standard cell—which advances in physics were soon to render utterly obsolete. That section has been replaced by an analysis, with new diagrams, of the lead-acid storage battery—ancient, ubiquitous, and far from obsolete. One would hardly have expected that, in the revision of an elementary text in classical electromagnetism, attention would have to be paid to new developments in particle physics. But that is the case for two questions that were discussed in the first edition, the significance of charge quantization, and the apparent absence of magnetic monopoles. Observation of proton decay would profoundly affect our view of the first question. Assiduous searches for that, and also for magnetic monopoles, have at this writing yielded no confirmed events, but the possibility of such fundamental discoveries remains open. Three special topics, optional extensions of the text, are introduced in short appendixes: Appendix B: Radiation by an Accelerated Charge; Appendix C: Superconductivity; and Appendix D: Magnetic Resonance. Our primary system of units remains the Gaussian CGS system. The SI units, ampere, coulomb, volt, ohm, and tesla are also introduced in the text and used in many of the problems. Major formulas are repeated in their SI formulation with explicit directions about units and conversion factors. The charts inside the back cover summarize the basic relations in both systems of units. A special chart in Chapter 11 reviews, in both systems, the relations involving magnetic polarization. The student is not expected, or encouraged, to memorize conversion factors, though some may become more or less familiar through use, but to look them up whenever needed. There is no objection to a “mixed” unit like the ohmcm, still often used for resistivity, providing its meaning is perfectly clear. The definition of the meter in terms of an assigned value for the speed of light, which has just become official, simplifies the exact relations among the units, as briefly explained in Appendix E. There are some 300 problems, more than half of them new. It is not possible to thank individually all the teachers and students who have made good suggestions for changes and corrections. I fear that some will be disappointed to find that their suggestions have not been followed quite as they intended. That the net result is a substantial improvement I hope most readers familiar with the first edition will agree.
Preface to the second edition of Volume 2
Mistakes both old and new will surely be found. Communications pointing them out will be gratefully received. It is a pleasure to thank Olive S. Rand for her patient and skillful assistance in the production of the manuscript. Edward M. Purcell
xix
The subject of this volume of the Berkeley Physics Course is electricity and magnetism. The sequence of topics, in rough outline, is not unusual: electrostatics; steady currents; magnetic field; electromagnetic induction; electric and magnetic polarization in matter. However, our approach is different from the traditional one. The difference is most conspicuous in Chaps. 5 and 6 where, building on the work of Vol. I, we treat the electric and magnetic fields of moving charges as manifestations of relativity and the invariance of electric charge. This approach focuses attention on some fundamental questions, such as: charge conservation, charge invariance, the meaning of field. The only formal apparatus of special relativity that is really necessary is the Lorentz transformation of coordinates and the velocity-addition formula. It is essential, though, that the student bring to this part of the course some of the ideas and attitudes Vol. I sought to develop—among them a readiness to look at things from different frames of reference, an appreciation of invariance, and a respect for symmetry arguments. We make much use also, in Vol. II, of arguments based on superposition. Our approach to electric and magnetic phenomena in matter is primarily “microscopic,� with emphasis on the nature of atomic and molecular dipoles, both electric and magnetic. Electric conduction, also, is described microscopically in the terms of a Drude-Lorentz model. Naturally some questions have to be left open until the student takes up quantum physics in Vol. IV. But we freely talk in a matter-of-fact way about molecules and atoms as electrical structures with size, shape, and stiffness, about electron orbits, and spin. We try to treat carefully a question that is sometimes avoided and sometimes beclouded in introductory texts, the meaning of the macroscopic fields E and B inside a material.
Preface to the first edition of Volume 2
xxii
Preface to the first edition of Volume 2
In Vol. II, the student’s mathematical equipment is extended by adding some tools of the vector calculus—gradient, divergence, curl, and the Laplacian. These concepts are developed as needed in the early chapters. In its preliminary versions, Vol. II has been used in several classes at the University of California. It has benefited from criticism by many people connected with the Berkeley Course, especially from contributions by E. D. Commins and F. S. Crawford, Jr., who taught the first classes to use the text. They and their students discovered numerous places where clarification, or something more drastic, was needed; many of the revisions were based on their suggestions. Students’ criticisms of the last preliminary version were collected by Robert Goren, who also helped to organize the problems. Valuable criticism has come also from J. D. Gavenda, who used the preliminary version at the University of Texas, and from E. F. Taylor, of Wesleyan University. Ideas were contributed by Allan Kaufman at an early stage of the writing. A. Felzer worked through most of the first draft as our first “test student.” The development of this approach to electricity and magnetism was encouraged, not only by our original Course Committee, but by colleagues active in a rather parallel development of new course material at the Massachusetts Institute of Technology. Among the latter, J. R. Tessman, of the MIT Science Teaching Center and Tufts University, was especially helpful and influential in the early formulation of the strategy. He has used the preliminary version in class, at MIT, and his critical reading of the entire text has resulted in many further changes and corrections. Publication of the preliminary version, with its successive revisions, was supervised by Mrs. Mary R. Maloney. Mrs. Lila Lowell typed most of the manuscript. The illustrations were put into final form by Felix Cooper. The author of this volume remains deeply grateful to his friends in Berkeley, and most of all to Charles Kittel, for the stimulation and constant encouragement that have made the long task enjoyable. Edward M. Purcell
1 Overview The existence of this book is owed (both figuratively and literally) to the fact that the building blocks of matter possess a quality called charge. Two important aspects of charge are conservation and quantization. The electric force between two charges is given by Coulomb’s law. Like the gravitational force, the electric force falls off like 1/r2 . It is conservative, so we can talk about the potential energy of a system of charges (the work done in assembling them). A very useful concept is the electric field, which is defined as the force per unit charge. Every point in space has a unique electric field associated with it. We can define the flux of the electric field through a given surface. This leads us to Gauss’s law, which is an alternative way of stating Coulomb’s law. In cases involving sufficient symmetry, it is much quicker to calculate the electric field via Gauss’s law than via Coulomb’s law and direct integration. Finally, we discuss the energy density in the electric field, which provides another way of calculating the potential energy of a system. 1.1 Electric charge Electricity appeared to its early investigators as an extraordinary phenomenon. To draw from bodies the “subtle fire,” as it was sometimes called, to bring an object into a highly electrified state, to produce a steady flow of current, called for skillful contrivance. Except for the spectacle of lightning, the ordinary manifestations of nature, from the freezing of water to the growth of a tree, seemed to have no relation to the curious behavior of electrified objects. We know now that electrical
Electrostatics: charges and fields
2
Electrostatics: charges and fields
forces largely determine the physical and chemical properties of matter over the whole range from atom to living cell. For this understanding we have to thank the scientists of the nineteenth century, Ampère, Faraday, Maxwell, and many others, who discovered the nature of electromagnetism, as well as the physicists and chemists of the twentieth century who unraveled the atomic structure of matter. Classical electromagnetism deals with electric charges and currents and their interactions as if all the quantities involved could be measured independently, with unlimited precision. Here classical means simply “nonquantum.” The quantum law with its constant h is ignored in the classical theory of electromagnetism, just as it is in ordinary mechanics. Indeed, the classical theory was brought very nearly to its present state of completion before Planck’s discovery of quantum effects in 1900. It has survived remarkably well. Neither the revolution of quantum physics nor the development of special relativity dimmed the luster of the electromagnetic field equations Maxwell wrote down 150 years ago. Of course the theory was solidly based on experiment, and because of that was fairly secure within its original range of application – to coils, capacitors, oscillating currents, and eventually radio waves and light waves. But even so great a success does not guarantee validity in another domain, for instance, the inside of a molecule. Two facts help to explain the continuing importance in modern physics of the classical description of electromagnetism. First, special relativity required no revision of classical electromagnetism. Historically speaking, special relativity grew out of classical electromagnetic theory and experiments inspired by it. Maxwell’s field equations, developed long before the work of Lorentz and Einstein, proved to be entirely compatible with relativity. Second, quantum modifications of the electromagnetic forces have turned out to be unimportant down to distances less than 10−12 meters, 100 times smaller than the atom. We can describe the repulsion and attraction of particles in the atom using the same laws that apply to the leaves of an electroscope, although we need quantum mechanics to predict how the particles will behave under those forces. For still smaller distances, a fusion of electromagnetic theory and quantum theory, called quantum electrodynamics, has been remarkably successful. Its predictions are confirmed by experiment down to the smallest distances yet explored. It is assumed that the reader has some acquaintance with the elementary facts of electricity. We are not going to review all the experiments by which the existence of electric charge was demonstrated, nor shall we review all the evidence for the electrical constitution of matter. On the other hand, we do want to look carefully at the experimental foundations of the basic laws on which all else depends. In this chapter we shall study the physics of stationary electric charges – electrostatics. Certainly one fundamental property of electric charge is its existence in the two varieties that were long ago named positive and negative.
1.1 Electric charge
The observed fact is that all charged particles can be divided into two classes such that all members of one class repel each other, while attracting members of the other class. If two small electrically charged bodies A and B, some distance apart, attract one another, and if A attracts some third electrified body C, then we always find that B repels C. Contrast this with gravitation: there is only one kind of gravitational mass, and every mass attracts every other mass. One may regard the two kinds of charge, positive and negative, as opposite manifestations of one quality, much as right and left are the two kinds of handedness. Indeed, in the physics of elementary particles, questions involving the sign of the charge are sometimes linked to a question of handedness, and to another basic symmetry, the relation of a sequence of events, a, then b, then c, to the temporally reversed sequence c, then b, then a. It is only the duality of electric charge that concerns us here. For every kind of particle in nature, as far as we know, there can exist an antiparticle, a sort of electrical “mirror image.” The antiparticle carries charge of the opposite sign. If any other intrinsic quality of the particle has an opposite, the antiparticle has that too, whereas in a property that admits no opposite, such as mass, the antiparticle and particle are exactly alike. The electron’s charge is negative; its antiparticle, called a positron, has a positive charge, but its mass is precisely the same as that of the electron. The proton’s antiparticle is called simply an antiproton; its electric charge is negative. An electron and a proton combine to make an ordinary hydrogen atom. A positron and an antiproton could combine in the same way to make an atom of antihydrogen. Given the building blocks, positrons, antiprotons, and antineutrons,1 there could be built up the whole range of antimatter, from antihydrogen to antigalaxies. There is a practical difficulty, of course. Should a positron meet an electron or an antiproton meet a proton, that pair of particles will quickly vanish in a burst of radiation. It is therefore not surprising that even positrons and antiprotons, not to speak of antiatoms, are exceedingly rare and short-lived in our world. Perhaps the universe contains, somewhere, a vast concentration of antimatter. If so, its whereabouts is a cosmological mystery. The universe around us consists overwhelmingly of matter, not antimatter. That is to say, the abundant carriers of negative charge are electrons, and the abundant carriers of positive charge are protons. The proton is nearly 2000 times heavier than the electron, and very different, too, in some other respects. Thus matter at the atomic level incorporates negative and positive electricity in quite different ways. The positive charge is all in the atomic nucleus, bound within a massive structure no more than 10−14 m in size, while the negative charge is spread, in 1 Although the electric charge of each is zero, the neutron and its antiparticle are not
interchangeable. In certain properties that do not concern us here, they are opposite.
3
4
Electrostatics: charges and fields
effect, through a region about 104 times larger in dimensions. It is hard to imagine what atoms and molecules – and all of chemistry – would be like, if not for this fundamental electrical asymmetry of matter. What we call negative charge, by the way, could just as well have been called positive. The name was a historical accident. There is nothing essentially negative about the charge of an electron. It is not like a negative integer. A negative integer, once multiplication has been defined, differs essentially from a positive integer in that its square is an integer of opposite sign. But the product of two charges is not a charge; there is no comparison. Two other properties of electric charge are essential in the electrical structure of matter: charge is conserved, and charge is quantized. These properties involve quantity of charge and thus imply a measurement of charge. Presently we shall state precisely how charge can be measured in terms of the force between charges a certain distance apart, and so on. But let us take this for granted for the time being, so that we may talk freely about these fundamental facts.
1.2 Conservation of charge Pho
ton
Before
e– e+
After
Figure 1.1. Charged particles are created in pairs with equal and opposite charge.
The total charge in an isolated system never changes. By isolated we mean that no matter is allowed to cross the boundary of the system. We could let light pass into or out of the system, since the “particles” of light, called photons, carry no charge at all. Within the system charged particles may vanish or reappear, but they always do so in pairs of equal and opposite charge. For instance, a thin-walled box in a vacuum exposed to gamma rays might become the scene of a “pair-creation” event in which a high-energy photon ends its existence with the creation of an electron and a positron (Fig. 1.1). Two electrically charged particles have been newly created, but the net change in total charge, in and on the box, is zero. An event that would violate the law we have just stated would be the creation of a positively charged particle without the simultaneous creation of a negatively charged particle. Such an occurrence has never been observed. Of course, if the electric charges of an electron and a positron were not precisely equal in magnitude, pair creation would still violate the strict law of charge conservation. That equality is a manifestation of the particle–antiparticle duality already mentioned, a universal symmetry of nature. One thing will become clear in the course of our study of electromagnetism: nonconservation of charge would be quite incompatible with the structure of our present electromagnetic theory. We may therefore state, either as a postulate of the theory or as an empirical law supported without exception by all observations so far, the charge conservation law:
1.3 Quantization of charge
The total electric charge in an isolated system, that is, the algebraic sum of the positive and negative charge present at any time, never changes. Sooner or later we must ask whether this law meets the test of relativistic invariance. We shall postpone until Chapter 5 a thorough discussion of this important question. But the answer is that it does, and not merely in the sense that the statement above holds in any given inertial frame, but in the stronger sense that observers in different frames, measuring the charge, obtain the same number. In other words, the total electric charge of an isolated system is a relativistically invariant number.
1.3 Quantization of charge The electric charges we find in nature come in units of one magnitude only, equal to the amount of charge carried by a single electron. We denote the magnitude of that charge by e. (When we are paying attention to sign, we write −e for the charge on the electron itself.) We have already noted that the positron carries precisely that amount of charge, as it must if charge is to be conserved when an electron and a positron annihilate, leaving nothing but light. What seems more remarkable is the apparently exact equality of the charges carried by all other charged particles – the equality, for instance, of the positive charge on the proton and the negative charge on the electron. That particular equality is easy to test experimentally. We can see whether the net electric charge carried by a hydrogen molecule, which consists of two protons and two electrons, is zero. In an experiment carried out by J. G. King,2 hydrogen gas was compressed into a tank that was electrically insulated from its surroundings. The tank contained about 5 · 1024 molecules (approximately 17 grams) of hydrogen. The gas was then allowed to escape by means that prevented the escape of any ion – a molecule with an electron missing or an extra electron attached. If the charge on the proton differed from that on the electron by, say, one part in a billion, then each hydrogen molecule would carry a charge of 2 · 10−9 e, and the departure of the whole mass of hydrogen would alter the charge of the tank by 1016 e, a gigantic effect. In fact, the experiment could have revealed a residual molecular charge as small as 2 · 10−20 e, and none was observed. This proved that the proton and the electron do not differ in magnitude of charge by more than 1 part in 1020 . Perhaps the equality is really exact for some reason we don’t yet understand. It may be connected with the possibility, suggested by certain 2 See King (1960). References to previous tests of charge equality will be found in this
article and in the chapter by V. W. Hughes in Hughes (1964).
5
6
Electrostatics: charges and fields
theories, that a proton can, very rarely, decay into a positron and some uncharged particles. If that were to occur, even the slightest discrepancy between proton charge and positron charge would violate charge conservation. Several experiments designed to detect the decay of a proton have not yet, as of this writing, registered with certainty a single decay. If and when such an event is observed, it will show that exact equality of the magnitude of the charge of the proton and the charge of the electron (the positron’s antiparticle) can be regarded as a corollary of the more general law of charge conservation. That notwithstanding, we now know that the internal structure of all the strongly interacting particles called hadrons – a class that includes the proton and the neutron – involves basic units called quarks, whose electric charges come in multiples of e/3. The proton, for example, is made with three quarks, two with charge 2e/3 and one with charge −e/3. The neutron contains one quark with charge 2e/3 and two quarks with charge −e/3. Several experimenters have searched for single quarks, either free or attached to ordinary matter. The fractional charge of such a quark, since it cannot be neutralized by any number of electrons or protons, should betray the quark’s presence. So far no fractionally charged particle has been conclusively identified. The present theory of the strong interactions, called quantum chromodynamics, explains why the liberation of a quark from a hadron is most likely impossible. The fact of charge quantization lies outside the scope of classical electromagnetism, of course. We shall usually ignore it and act as if our point charges q could have any strength whatsoever. This will not get us into trouble. Still, it is worth remembering that classical theory cannot be expected to explain the structure of the elementary particles. (It is not certain that present quantum theory can either!) What holds the electron together is as mysterious as what fixes the precise value of its charge. Something more than electrical forces must be involved, for the electrostatic forces between different parts of the electron would be repulsive. In our study of electricity and magnetism we shall treat the charged particles simply as carriers of charge, with dimensions so small that their extension and structure is, for most purposes, quite insignificant. In the case of the proton, for example, we know from high-energy scattering experiments that the electric charge does not extend appreciably beyond a radius of 10−15 m. We recall that Rutherford’s analysis of the scattering of alpha particles showed that even heavy nuclei have their electric charge distributed over a region smaller than 10−13 m. For the physicist of the nineteenth century a “point charge” remained an abstract notion. Today we are on familiar terms with the atomic particles. The graininess of electricity is so conspicuous in our modern description of nature that we find a point charge less of an artificial idealization than a smoothly varying distribution of charge density. When we postulate such smooth charge distributions, we may think of them as averages over very
1.4 Coulomb’s law
large numbers of elementary charges, in the same way that we can define the macroscopic density of a liquid, its lumpiness on a molecular scale notwithstanding.
1.4 Coulomb’s law As you probably already know, the interaction between electric charges at rest is described by Coulomb’s law: two stationary electric charges repel or attract one another with a force proportional to the product of the magnitude of the charges and inversely proportional to the square of the distance between them. We can state this compactly in vector form: F2 = k
q1 q2 rˆ 21 . 2 r21
(1.1)
Here q1 and q2 are numbers (scalars) giving the magnitude and sign of the respective charges, rˆ 21 is the unit vector in the direction3 from charge 1 to charge 2, and F2 is the force acting on charge 2. Thus Eq. (1.1) expresses, among other things, the fact that like charges repel and unlike charges attract. Also, the force obeys Newton’s third law; that is, F2 = −F1 . The unit vector rˆ 21 shows that the force is parallel to the line joining the charges. It could not be otherwise unless space itself has some builtin directional property, for with two point charges alone in empty and isotropic space, no other direction could be singled out. If the point charge itself had some internal structure, with an axis defining a direction, then it would have to be described by more than the mere scalar quantity q. It is true that some elementary particles, including the electron, do have another property, called spin. This gives rise to a magnetic force between two electrons in addition to their electrostatic repulsion. This magnetic force does not, in general, act in the direction of the line joining the two particles. It decreases with the inverse fourth power of the distance, and at atomic distances of 10−10 m the Coulomb force is already about 104 times stronger than the magnetic interaction of the spins. Another magnetic force appears if our charges are moving – hence the restriction to stationary charges in our statement of Coulomb’s law. We shall return to these magnetic phenomena in later chapters. Of course we must assume, in writing Eq. (1.1), that both charges are well localized, each occupying a region small compared with r21 . Otherwise we could not even define the distance r21 precisely. The value of the constant k in Eq. (1.1) depends on the units in which r, F, and q are to be expressed. In this book we will use the International System of Units, or “SI” units for short. This system is based on the 3 The convention we adopt here may not seem the natural choice, but it is more
consistent with the usage in some other parts of physics and we shall try to follow it throughout this book.
7
8
Electrostatics: charges and fields
meter, kilogram, and second as units of length, mass, and time. The SI unit of charge is the coulomb (C). Some other SI electrical units that we will eventually become familiar with are the volt, ohm, ampere, and tesla. The official definition of the coulomb involves the magnetic force, which we will discuss in Chapter 6. For present purposes, we can define the coulomb as follows. Two like charges, each of 1 coulomb, repel one another with a force of 8.988 · 109 newtons when they are 1 meter apart. In other words, the k in Eq. (1.1) is given by k = 8.988 · 109
8 esu F = 10 dynes rs ete
20 esu 4
esu
tim cen
F=
q1q2
N m2 . C2
In Chapter 6 we will learn where this seemingly arbitrary value of k comes from. In general, approximating k by 9 · 109 N m2 /C2 is quite sufficient. The magnitude of e, the fundamental quantum of electric charge, happens to be about 1.602 · 10−19 C. So if you wish, you may think of a coulomb as defined to be the magnitude of the charge contained in 6.242 · 1018 electrons. Instead of k, it is customary (for historical reasons) to introduce a constant 0 which is defined by
r 221 cm2
1 k≡ ⇒ 4π 0
F = 10 dynes
(1.2)
C2 1 0 ≡ = 8.854 · 10−12 4π k N m2
C2 s2 or kg m3
.
(1.3)
1 newton = 105 dynes
In terms of 0 , Coulomb’s law in Eq. (1.1) takes the form
1 coulomb = 2.998 × 109 esu e = 4.802 × 10−10 esu = 1.602 × 10−19 coulomb
F = 8.988 ×
108
newtons
F=
1 q1 q2 rˆ 21 2 4π 0 r21
(1.4)
2 coulombs coulomb 5 coulombs
rs ete
m 10
F=
1 4p
newtons F = 8.988 × 108 newtons
q1q2 0
r 221
m2
8.988 × 109
−12 0 = 8.854 × 10
Figure 1.2. Coulomb’s law expressed in Gaussian electrostatic units (top) and in SI units (bottom). The constant 0 and the factor relating coulombs to esu are connected, as we shall learn later, with the speed of light. We have rounded off the constants in the figure to four-digit accuracy. The precise values are given in Appendix E.
The constant 0 will appear in many expressions that we will meet in the course of our study. The 4π is included in the definition of 0 so that certain formulas (such as Gauss’s law in Sections 1.10 and 2.9) take on simple forms. Additional details and technicalities concerning 0 can be found in Appendix E. Another system of units that comes up occasionally is the Gaussian system, which is one of several types of cgs systems, short for centimeter–gram–second. (In contrast, the SI system is an mks system, short for meter–kilogram–second.) The Gaussian unit of charge is the “electrostatic unit,” or esu. The esu is defined so that the constant k in Eq. (1.1) exactly equals 1 (and this is simply the number 1, with no units) when r21 is measured in cm, F in dynes, and the q values in esu. Figure 1.2 gives some examples using the SI and Gaussian systems of units. Further discussion of the SI and Gaussian systems can be found in Appendix A.
1.4 Coulomb’s law
Example (Relation between 1 coulomb and 1 esu) Show that 1 coulomb equals 2.998 · 109 esu (which generally can be approximated by 3 · 109 esu). Solution From Eqs. (1.1) and (1.2), two charges of 1 coulomb separated by a distance of 1 m exert a (large!) force of 8.988 · 109 N ≈ 9 · 109 N on each other. We can convert this to the Gaussian unit of force via 1N = 1
(1000 g)(100 cm) kg m g cm = = 105 2 = 105 dynes. s2 s2 s
(1.5)
The two 1 C charges therefore exert a force of 9 · 1014 dynes on each other. How would someone working in Gaussian units describe this situation? In Gaussian units, Coulomb’s law gives the force simply as q2 /r2 . The separation is 100 cm, so if 1 coulomb equals N esu (with N to be determined), the 9 · 1014 dyne force between the charges can be expressed as 9 · 1014 dyne =
(N esu)2 ⇒ N 2 = 9 · 1018 ⇒ N = 3 · 109 . (100 cm)2
(1.6)
Hence,4 1 C = 3 · 109 esu.
(1.7)
The magnitude of the electron charge is then given approximately by e = 1.6 · 10−19 C ≈ 4.8 · 10−10 esu. If we had used the more√exact value of k in Eq. (1.2), the “3” in our result would have been replaced by 8.988 = 2.998. This looks suspiciously similar to the “2.998” in the speed of light, c = 2.998 · 108 m/s. This is no coincidence. We will see in Section 6.1 that Eq. (1.7) can actually be written as 1 C = (10{c}) esu, where we have put the c in brackets to signify that it is just the number 2.998 · 108 without the units of m/s. On an everyday scale, a coulomb is an extremely large amount of charge, as evidenced by the fact that if you have two such charges separated by 1 m (never mind how you would keep each charge from flying apart due to the self repulsion!), the above force of 9 · 109 N between them is about one million tons. The esu is a much more reasonable unit to use for everyday charges. For example, the static charge on a balloon that sticks to your hair is on the order of 10 or 100 esu.
The only way we have of detecting and measuring electric charges is by observing the interaction of charged bodies. One might wonder, then, how much of the apparent content of Coulomb’s law is really only definition. As it stands, the significant physical content is the statement of inverse-square dependence and the implication that electric charge 4 We technically shouldn’t be using an “=” sign here, because it suggests that the units of
a coulomb are the same as those of an esu. This is not the case; they are units in different systems and cannot be expressed in terms of each other. The proper way to express Eq. (1.7) is to say, “1 C is equivalent to 3 · 109 esu.” But we’ll usually just use the “=” sign, and you’ll know what we mean. See Appendix A for further discussion of this.
9
10
Electrostatics: charges and fields
(a)
is additive in its effect. To bring out the latter point, we have to consider more than two charges. After all, if we had only two charges in the world to experiment with, q1 and q2 , we could never measure them 2 . Suppose separately. We could verify only that F is proportional to 1/r21 we have three bodies carrying charges q1 , q2 , and q3 . We can measure the force on q1 when q2 is 10 cm away from q1 , with q3 very far away, as in Fig. 1.3(a). Then we can take q2 away, bring q3 into q2 ’s former position, and again measure the force on q1 . Finally, we can bring q2 and q3 very close together and locate the combination 10 cm from q1 . We find by measurement that the force on q1 is equal to the sum of the forces previously measured. This is a significant result that could not have been predicted by logical arguments from symmetry like the one we used above to show that the force between two point charges had to be along the line joining them. The force with which two charges interact is not changed by the presence of a third charge. No matter how many charges we have in our system, Coulomb’s law in Eq. (1.4) can be used to calculate the interaction of every pair. This is the basis of the principle of superposition, which we shall invoke again and again in our study of electromagnetism. Superposition means combining two sets of sources into one system by adding the second system “on top of” the first without altering the configuration of either one. Our principle ensures that the force on a charge placed at any point in the combined system will be the vector sum of the forces that each set of sources, acting alone, causes to act on a charge at that point. This principle must not be taken lightly for granted. There may well be a domain of phenomena, involving very small distances or very intense forces, where superposition no longer holds. Indeed, we know of quantum phenomena in the electromagnetic field that do represent a failure of superposition, seen from the viewpoint of the classical theory. Thus the physics of electrical interactions comes into full view only when we have more than two charges. We can go beyond the explicit statement of Eq. (1.1) and assert that, with the three charges in Fig. 1.3 occupying any positions whatsoever, the force on any one of them, such as q3 , is correctly given by the following equation:
q2 m
c 10
Great distance
q3
Great distance
q2
q1
(b) q3 m
c 10
q1
(c) q2 q3 10
cm
q1
Figure 1.3. The force on q1 in (c) is the sum of the forces on q1 in (a) and (b).
F=
1 q3 q2 rˆ 32 1 q3 q1 rˆ 31 + . 2 2 4π 0 r31 4π 0 r32
(1.8)
The experimental verification of the inverse-square law of electrical attraction and repulsion has a curious history. Coulomb himself announced the law in 1786 after measuring with a torsion balance the force between small charged spheres. But 20 years earlier Joseph Priestly, carrying out an experiment suggested to him by Benjamin Franklin, had noticed the absence of electrical influence within a hollow charged container and made an inspired conjecture: “May we not infer from this experiment that the attraction of electricity is subject to the same laws with that of gravitation and is therefore according to the square of the
1.5 Energy of a system of charges
distances; since it is easily demonstrated that were the earth in the form of a shell, a body in the inside of it would not be attracted to one side more than the other.” (Priestly, 1767). The same idea was the basis of an elegant experiment in 1772 by Henry Cavendish. Cavendish charged a spherical conducting shell that contained within it, and temporarily connected to it, a smaller sphere. The outer shell was then separated into two halves and carefully removed, the inner sphere having been first disconnected. This sphere was tested for charge, the absence of which would confirm the inverse-square law. (See Problem 2.8 for the theory behind this.) Assuming that a deviation from the inverse-square law could be expressed as a difference in the exponent, 2 + δ, say, instead of 2, Cavendish concluded that δ must be less than 0.03. This experiment of Cavendish remained largely unknown until Maxwell discovered and published Cavendish’s notes a century later (1876). At that time also, Maxwell repeated the experiment with improved apparatus, pushing the limit down to δ < 10−6 . The present limit on δ is a fantastically small number – about one part in 1016 ; see Crandall (1983) and Williams et al. (1971). Two hundred years after Cavendish’s experiment, however, the question of interest changed somewhat. Never mind how perfectly Coulomb’s law works for charged objects in the laboratory – is there a range of distances where it completely breaks down? There are two domains in either of which a breakdown is conceivable. The first is the domain of very small distances, distances less than 10−16 m, where electromagnetic theory as we know it may not work at all. As for very large distances, from the geographical, say, to the astronomical, a test of Coulomb’s law by the method of Cavendish is obviously not feasible. Nevertheless we do observe certain large-scale electromagnetic phenomena that prove that the laws of classical electromagnetism work over very long distances. One of the most stringent tests is provided by planetary magnetic fields, in particular the magnetic field of the giant planet Jupiter, which was surveyed in the mission of Pioneer 10. The spatial variation of this field was carefully analyzed5 and found to be entirely consistent with classical theory out to a distance of at least 105 km from the planet. This is tantamount to a test, albeit indirect, of Coulomb’s law over that distance. To summarize, we have every reason for confidence in Coulomb’s law over the stupendous range of 24 decades in distance, from 10−16 to 108 m, if not farther, and we take it as the foundation of our description of electromagnetism.
1.5 Energy of a system of charges In principle, Coulomb’s law is all there is to electrostatics. Given the charges and their locations, we can find all the electrical forces. Or, given 5 See Davis et al. (1975). For a review of the history of the exploration of the outer limit
of classical electromagnetism, see Goldhaber and Nieto (1971).
11
12
Electrostatics: charges and fields
(a) q2
Great distance
q1
(b) q2 r 12 q1
(c)
q2 r 21 r 32
q1 r 31
Final position of q3
q3 in transit ds
F32
F31
Figure 1.4. Three charges are brought near one another. First q2 is brought in; then, with q1 and q2 fixed, q3 is brought in.
that the charges are free to move under the influence of other kinds of forces as well, we can find the equilibrium arrangement in which the charge distribution will remain stationary. In the same sense, Newton’s laws of motion are all there is to mechanics. But in both mechanics and electromagnetism we gain power and insight by introducing other concepts, most notably that of energy. Energy is a useful concept here because electrical forces are conservative. When you push charges around in electric fields, no energy is irrecoverably lost. Everything is perfectly reversible. Consider first the work that must be done on the system to bring some charged bodies into a particular arrangement. Let us start with two charged bodies or particles very far apart from one another, as indicated in Fig. 1.4(a), carrying charges q1 and q2 . Whatever energy may have been needed to create these two concentrations of charge originally we shall leave entirely out of account. How much work does it take to bring the particles slowly together until the distance between them is r12 ? It makes no difference whether we bring q1 toward q2 or the other way around. In either case the work done is the integral of the product: force times displacement, where these are signed quantities. The force that has to be applied to move one charge toward the other is equal and opposite to the Coulomb force. Therefore, W = (applied force) · (displacement) r12 1 q1 q2 1 q1 q2 . (1.9) − dr = = 2 4π 0 r 4π 0 r12 r=∞ Note that because r is changing from ∞ to r12 , the differential dr is negative. We know that the overall sign of the result is correct, because the work done on the system must be positive for charges of like sign; they have to be pushed together (consistent with the minus sign in the applied force). Both the displacement and the applied force are negative in this case, resulting in positive work being done on the system. With q1 and q2 in coulombs, and r12 in meters, Eq. (1.9) gives the work in joules. This work is the same whatever the path of approach. Let’s review the argument as it applies to the two charges q1 and q2 in Fig. 1.5. There we have kept q1 fixed, and we show q2 moved to the same final position along two different paths. Every spherical shell, such as the one indicated between r and r + dr, must be crossed by both paths. The increment of work involved, −F · ds in this bit of path (where F is the Coulomb force), is the same for the two paths.6 The reason is that F has the same magnitude at both places and is directed radially from q1 , while 6 Here we use for the first time the scalar product, or “dot product,” of two vectors.
A reminder: the scalar product of two vectors A and B, written A · B, is the number AB cos θ , where A and B are the magnitudes of the vectors A and B, and θ is the angle between them. Expressed in terms of Cartesian components of the two vectors, A · B = Ax Bx + Ay By + Az Bz .
1.5 Energy of a system of charges ds = dr/ cos θ ; hence F · ds = F dr. Each increment of work along one path is matched by a corresponding increment on the other, so the sums must be equal. Our conclusion holds even for paths that loop in and out, like the dotted path in Fig. 1.5. (Why?) Returning now to the two charges as we left them in Fig. 1.4(b), let us bring in from some remote place a third charge q3 and move it to a point P3 whose distance from charge 1 is r31 , and from charge 2, r32 . The work required to effect this will be P3 F3 · ds. (1.10) W3 = −
13
dr
q
ds r
Thanks to the additivity of electrical interactions, which we have already emphasized, − F3 · ds = − (F31 + F32 ) · ds (1.11) = − F31 · ds − F32 · ds. That is, the work required to bring q3 to P3 is the sum of the work needed when q1 is present alone and that needed when q2 is present alone: W3 =
1 q1 q3 1 q2 q3 + . 4π 0 r31 4π 0 r32
(1.12)
The total work done in assembling this arrangement of three charges, which we shall call U, is therefore q1 q3 q2 q3 q1 q2 1 + + . (1.13) U= 4π 0 r12 r13 r23 We note that q1 , q2 , and q3 appear symmetrically in the expression above, in spite of the fact that q3 was brought in last. We would have reached the same result if q3 had been brought in first. (Try it.) Thus U is independent of the order in which the charges were assembled. Since it is independent also of the route by which each charge was brought in, U must be a unique property of the final arrangement of charges. We may call it the electrical potential energy of this particular system. There is a certain arbitrariness, as always, in the definition of a potential energy. In this case we have chosen the zero of potential energy to correspond to the situation with the three charges already in existence but infinitely far apart from one another. The potential energy belongs to the configuration as a whole. There is no meaningful way of assigning a certain fraction of it to one of the charges. It is obvious how this very simple result can be generalized to apply to any number of charges. If we have N different charges, in any arrangement in space, the potential energy of the system is calculated by summing over all pairs, just as in Eq. (1.13). The zero of potential energy, as in that case, corresponds to all charges far apart.
q1
P
Figure 1.5. Because the force is central, the sections of different paths between r + dr and r require the same amount of work.
14
Electrostatics: charges and fields −e
(a)
−e −e −e +2e b
−e
−e –e
Example (Charges in a cube) What is the potential energy of an arrangement of eight negative charges on the corners of a cube of side b, with a positive charge in the center of the cube, as in Fig. 1.6(a)? Suppose each negative charge is an electron with charge −e, while the central particle carries a double positive charge, 2e. Solution Figure 1.6(b) shows that there are four different types of pairs. One type involves the center charge, while the other three involve the various edges and diagonals of the cube. Summing over all pairs yields 1 4.32e2 (−2e2 ) e2 e2 e2 1 ≈ 8· √ + 12 · √ . + 12 · +4· √ U= 4π 0 b 4π 0 b ( 3/2)b 3b 2b (1.14)
b b
−e
The energy is positive, indicating that work had to be done on the system to assemble it. That work could, of course, be recovered if we let the charges move apart, exerting forces on some external body or bodies. Or if the electrons were simply to fly apart from this configuration, the total kinetic energy of all the particles would become equal to U. This would be true whether they came apart simultaneously and symmetrically, or were released one at a time in any order. Here we see the power of this simple notion of the total potential energy of the system. Think what the problem would be like if we had to compute the resultant vector force on every particle at every stage of assembly of the configuration! In this example, to be sure, the geometrical symmetry would simplify that task; even so, it would be more complicated than the simple calculation above.
(b) 12 such pairs
One way of writing the instruction for the sum over pairs is this: 1 1 qj qk . 2 4π 0 rjk N
U= 12 such pairs 4 such pairs
8 such pairs
Figure 1.6. (a) The potential energy of this arrangement of nine point charges is given by Eq. (1.14). (b) Four types of pairs are involved in the sum.
(1.15)
j=1 k=j
The double-sum notation, N j=1 k=j , says: take j = 1 and sum over k = 2, 3, 4, . . . , N; then take j = 2 and sum over k = 1, 3, 4, . . . , N; and so on, through j = N. Clearly this includes every pair twice, and to correct for that we put in front the factor 1/2.
1.6 Electrical energy in a crystal lattice These ideas have an important application in the physics of crystals. We know that an ionic crystal like sodium chloride can be described, to a very good approximation, as an arrangement of positive ions (Na+ ) and negative ions (Cl− ) alternating in a regular three-dimensional array or lattice. In sodium chloride the arrangement is that shown in Fig. 1.7(a). Of course the ions are not point charges, but they are nearly spherical distributions of charge and therefore (as we shall prove in Section 1.11) the electrical forces they exert on one another are the same as if each ion
1.6 Electrical energy in a crystal lattice
were replaced by an equivalent point charge at its center. We show this electrically equivalent system in Fig. 1.7(b). The electrostatic potential energy of the lattice of charges plays an important role in the explanation of the stability and cohesion of the ionic crystal. Let us see if we can estimate its magnitude. We seem to be faced at once with a sum that is enormous, if not doubly infinite; any macroscopic crystal contains 1020 atoms at least. Will the sum converge? Now what we hope to find is the potential energy per unit volume or mass of crystal. We confidently expect this to be independent of the size of the crystal, based on the general argument that one end of a macroscopic crystal can have little influence on the other. Two grams of sodium chloride ought to have twice the potential energy of one gram, and the shape should not be important so long as the surface atoms are a small fraction of the total number of atoms. We would be wrong in this expectation if the crystal were made out of ions of one sign only. Then, 1 g of crystal would carry an enormous electric charge, and putting two such crystals together to make a 2 g crystal would take a fantastic amount of energy. (You might estimate how much!) The situation is saved by the fact that the crystal structure is an alternation of equal and opposite charges, so that any macroscopic bit of crystal is very nearly neutral. To evaluate the potential energy we first observe that every positive ion is in a position equivalent to that of every other positive ion. Furthermore, although it is perhaps not immediately obvious from Fig. 1.7, the arrangement of positive ions around a negative ion is exactly the same as the arrangement of negative ions around a positive ion, and so on. Hence we may take one ion as a center, it matters not which kind, sum over its interactions with all the others, and simply multiply by the total number of ions of both kinds. This reduces the double sum in Eq. (1.15) to a single sum and a factor N; we must still apply the factor 1/2 to compensate for including each pair twice. That is, the energy of a sodium chloride lattice composed of a total of N ions is 1 1 q1 qk . N 2 4π 0 r1k N
U=
(1.16)
k=2
Taking the positive ion at the center as in Fig. 1.7(b), our sum runs over all its neighbors near and far. The leading terms start out as follows: 1 1 U= N 2 4π 0
12e2 8e2 6e2 + ··· +√ −√ − a 3a 2a
.
(1.17)
The first term comes from the 6 nearest chlorine ions, at distance a, the second from the 12 sodium ions on the cube edges, and so on. It is clear, incidentally, that this series does not converge absolutely; if we were so
15
(a)
(b)
+ −
+
− +
+
+ −
− +
−−
+
+
+
a
+ −
− +
+ − −
+
Figure 1.7. A portion of a sodium chloride crystal, with the ions Na+ and Cl− shown in about the right relative proportions (a), and replaced by equivalent point charges (b).
16
Electrostatics: charges and fields
foolish as to try to sum all the positive terms first, that sum would diverge. To evaluate such a sum, we should arrange it so that as we proceed outward, including ever more distant ions, we include them in groups that represent nearly neutral shells of material. Then if the sum is broken off, the more remote ions that have been neglected will be such an even mixture of positive and negative charges that we can be confident their contribution would have been small. This is a crude way to describe what is actually a somewhat more delicate computational problem. The numerical evaluation of such a series is easily accomplished with a computer. The answer in this example happens to be U=
−0.8738Ne2 . 4π 0 a
(1.18)
Here N, the number of ions, is twice the number of NaCl molecules. The negative sign shows that work would have to be done to take the crystal apart into ions. In other words, the electrical energy helps to explain the cohesion of the crystal. If this were the whole story, however, the crystal would collapse, for the potential energy of the charge distribution is obviously lowered by shrinking all the distances. We meet here again the familiar dilemma of classical – that is, nonquantum – physics. No system of stationary particles can be in stable equilibrium, according to classical laws, under the action of electrical forces alone; we will give a proof of this fact in Section 2.12. Does this make our analysis useless? Not at all. Remarkably, and happily, in the quantum physics of crystals the electrical potential energy can still be given meaning, and can be computed very much in the way we have learned here.
1.7 The electric field Suppose we have some arrangement of charges, q1 , q2 , . . . , qN , fixed in space, and we are interested not in the forces they exert on one another, but only in their effect on some other charge q0 that might be brought into their vicinity. We know how to calculate the resultant force on this charge, given its position which we may specify by the coordinates x, y, z. The force on the charge q0 is F=
N 1 q0 qj rˆ 0j , 2 4π 0 r0j j=1
(1.19)
where r0j is the vector from the jth charge in the system to the point (x, y, z). The force is proportional to q0 , so if we divide out q0 we obtain a vector quantity that depends only on the structure of our original system of charges, q1 , . . . , qN , and on the position of the point (x, y, z). We call this vector function of x, y, z the electric field arising from the q1 , . . . , qN
1.7 The electric field
17 q2 = −1C
and use the symbol E for it. The charges q1 , . . . , qN we call sources of the field. We may take as the definition of the electric field E of a charge distribution, at the point (x, y, z), N 1 qj rˆ 0j . E(x, y, z) = 2 4π 0 r0j j=1
r02
−1r02 4
(1.20)
(x,y,z)
2 0 r02
+ 2r01 4
2 0 r01
r01
The force on some other charge q at (x, y, z) is then F = qE
E
r02
(1.21)
r01 q = +2 C
1 Figure 1.8 illustrates the vector addition of the field of a point charge of 2 C to the field of a point charge of −1 C, at a particular point in space. Figure 1.8. In the SI system of units, electric field strength is expressed in newtons The field at a point is the vector sum of the fields per unit charge, that is, newtons/coulomb. In Gaussian units, with the esu of each of the charges in the system. as the unit of charge and the dyne as the unit of force, the electric field strength is expressed in dynes/esu. After the introduction of the electric potential in Chapter 2, we shall have another, and completely equivalent, way of expressing the unit of electric field strength; namely, volts/meter in SI units and statvolts/ centimeter in Gaussian units. So far we have nothing really new. The electric field is merely another way of describing the system of charges; it does so by giving the force per unit charge, in magnitude and direction, that an exploring charge q0 would experience at any point. We have to be a little careful with that interpretation. Unless the source charges are really immovable, the introduction of some finite charge q0 may cause the source charges to shift their positions, so that the field itself, as defined by Eq. (1.20), is different. That is why we assumed fixed charges to begin our discussion. People sometimes define the field by requiring q0 to be an “infinitesimal” test charge, letting E be the limit of F/q0 as q0 → 0. Any flavor of rigor this may impart is illusory. Remember that in the real world we have never observed a charge smaller than e! Actually, if we take Eq. (1.20) as our definition of E, without reference to a test charge, no problem arises and the sources need not be fixed. If the introduction of a new charge causes a shift in the source charges, then it has indeed brought about a change in the electric field, and if we want to predict the force on the new charge, we must use the new electric field in computing it. Perhaps you still want to ask, what is an electric field? Is it something real, or is it merely a name for a factor in an equation that has to be multiplied by something else to give the numerical value of the force we measure in an experiment? Two observations may be useful here. First, since it works, it doesn’t make any difference. That is not a frivolous answer, but a serious one. Second, the fact that the electric field vector
18
Electrostatics: charges and fields
(a)
at a point in space is all we need know to predict the force that will act on any charge at that point is by no means trivial. It might have been otherwise! If no experiments had ever been done, we could imagine that, in two different situations in which unit charges experience equal force, test charges of strength 2 units might experience unequal forces, depending on the nature of the other charges in the system. If that were true, the field description wouldn’t work. The electric field attaches to every point in a system a local property, in this sense: if we know E in some small neighborhood, we know, without further inquiry, what will happen to any charges in that neighborhood. We do not need to ask what produced the field. To visualize an electric field, you need to associate a vector, that is, a magnitude and direction, with every point in space. We shall use various schemes in this book, none of them wholly satisfactory, to depict vector fields. It is hard to draw in two dimensions a picture of a vector function in three-dimensional space. We can indicate the magnitude and direction of E at various points by drawing little arrows near those points, making the arrows longer where E is larger.7 Using this scheme, we show in Fig. 1.9(a) the field of an isolated point charge of 3 units and in Fig. 1.9(b) the field of a point charge of −1 unit. These pictures admittedly add nothing whatsoever to our understanding of the field of an isolated charge; anyone can imagine a simple radial inverse-square field without the help of a picture. We show them in order to combine (side by side) the two fields in Fig. 1.10, which indicates in the same manner the field of two such charges separated by a distance a. All that Fig. 1.10 can show is the field in a plane containing the charges. To get a full three-dimensional representation, one must imagine the figure rotated around the symmetry axis. In Fig. 1.10 there is one point in space where E is zero. As an exercise, you can quickly figure out where this point lies. Notice also that toward the edge of the picture the field points more or less radially outward all around. One can see that at a very large distance from the charges the field will look very much like the field from a positive point charge. This is to be expected because the separation of the charges cannot make very much difference for points far away, and a point charge of 2 units is just what we would have left if we superimposed our two sources at one spot. Another way to depict a vector field is to draw field lines. These are simply curves whose tangent, at any point, lies in the direction of the field at that point. Such curves will be smooth and continuous except at singularities such as point charges, or points like the one in the example of Fig. 1.10 where the field is zero. A field line plot does not directly give
(b)
Charge +3 Charge −1
Figure 1.9. (a) Field of a charge q1 = 3. (b) Field of a charge q2 = −1. Both representations are necessarily crude and only roughly quantitative.
7 Such a representation is rather clumsy at best. It is hard to indicate the point in space to
which a particular vector applies, and the range of magnitudes of E is usually so large that it is impracticable to make the lengths of the arrows proportional to E.
1.7 The electric field
19
E = 0 here
Figure 1.10. The field in the vicinity of two charges, q1 = +3, q2 = −1, is the superposition of the fields in Figs. 1.9(a) and (b).
Charge +3 Charge −1
Charge +3 Charge −1
the magnitude of the field, although we shall see that, in a general way, the field lines converge as we approach a region of strong field and spread apart as we approach a region of weak field. In Fig. 1.11 are drawn some field lines for the same arrangement of charges as in Fig. 1.10, a positive charge of 3 units and a negative charge of 1 unit. Again, we are restricted
Figure 1.11. Some field lines in the electric field around two charges, q1 = +3, q2 = −1.
20
Electrostatics: charges and fields
by the nature of paper and ink to a two-dimensional section through a three-dimensional bundle of curves.
1.8 Charge distributions
r (x, y, z)
(x, y, z)
This is as good a place as any to generalize from point charges to continuous charge distributions. A volume distribution of charge is described by a scalar charge-density function ρ, which is a function of position, with the dimensions charge/volume. That is, ρ times a volume element gives the amount of charge contained in that volume element. The same symbol is often used for mass per unit volume, but in this book we shall always give charge per unit volume first call on the symbol ρ. If we write ρ as a function of the coordinates x, y, z, then ρ(x, y, z) dx dy dz is the charge contained in the little box, of volume dx dy dz, located at the point (x, y, z). On an atomic scale, of course, the charge density varies enormously from point to point; even so, it proves to be a useful concept in that domain. However, we shall use it mainly when we are dealing with largescale systems, so large that a volume element dv = dx dy dz can be quite small relative to the size of our system, although still large enough to contain many atoms or elementary charges. As we have remarked before, we face a similar problem in defining the ordinary mass density of a substance. If the source of the electric field is to be a continuous charge distribution rather than point charges, we merely replace the sum in Eq. (1.20) with the appropriate integral. The integral gives the electric field at (x, y, z), which is produced by charges at other points (x , y , z ): E(x, y, z) =
r
1 4π 0
ρ(x , y , z )ˆr dx dy dz
. r2
(1.22)
This is a volume integral. Holding (x, y, z) fixed, we let the variables of integration, x , y , and z , range over all space containing charge, thus summing up the contributions of all the bits of charge. The unit vector rˆ points from (x , y , z ) to (x, y, z) – unless we want to put a minus sign before the integral, in which case we may reverse the direction of rˆ . It is always hard to keep signs straight. Let’s remember that the electric field points away from a positive source (Fig. 1.12).
(x,y,z)
Figure 1.12. Each element of the charge distribution ρ(x , y , z ) makes a contribution to the electric field E at the point (x, y, z). The total field at this point is the sum of all such contributions; see Eq. (1.22).
Example (Field due to a hemisphere) A solid hemisphere has radius R and uniform charge density ρ. Find the electric field at the center. Solution Our strategy will be to slice the hemisphere into rings around the symmetry axis. We will find the electric field due to each ring, and then integrate over the rings to obtain the field due to the entire hemisphere. We will work with
1.8 Charge distributions
polar coordinates (or, equivalently, spherical coordinates), which are much more suitable than Cartesian coordinates in this setup. The cross section of a ring is (essentially) a little rectangle with side lengths dr and r dθ , as shown in Fig. 1.13. The cross-sectional area is thus r dr dθ. The radius of the ring is r sin θ , so the volume is (r dr dθ )(2πr sin θ). The charge in the ring is therefore ρ(2πr2 sin θ dr dθ ). Equivalently, we can obtain this result by using the standard spherical-coordinate volume element, r2 sin θ dr dθ dφ, and then integrating over φ to obtain the factor of 2π . Consider a tiny piece of the ring, with charge dq. This piece creates an electric field at the center of the hemisphere that points diagonally upward (if ρ is positive) with magnitude dq/4π 0 r2 . However, only the vertical component survives, because the horizontal component cancels with the horizontal component from the diametrically opposite charge dq on the ring. The vertical component involves a factor of cos θ . When we integrate over the whole ring, the dq simply integrates to the total charge we found above. The (vertical) electric field due to a given ring is therefore dEy =
ρ(2π r2 sin θ dr dθ ) ρ sin θ cos θ dr dθ cos θ = . 2 20 4π 0 r
21
q
r dr r dq
Figure 1.13. Cross section of a thin ring. The hemisphere may be considered to be built up from rings.
(1.23)
Integrating over r and θ to obtain the field due to the entire hemisphere gives R π/2 R π/2 ρ ρ sin θ cos θ dr dθ = dr sin θ cos θ dθ Ey = 20 20 0 0 0 0 sin2 θ π/2 ρR ρ ·R· = . (1.24) = 20 2 0 40
E
(a)
Note that the radius r canceled in Eq. (1.23). For given values of θ, dθ, and dr, the volume of a ring grows like r2 , and this exactly cancels the r2 in the denominator in Coulomb’s law. R EMARK As explained above, the electric field due to the hemisphere is vertical. This fact also follows from considerations of symmetry. We will make many symmetry arguments throughout this book, so let us be explicit here about how the reasoning proceeds. Assume (in search of a contradiction) that the electric field due to the hemisphere is not vertical. It must then point off at some angle, as shown in Fig. 1.14(a). Let’s say that the E vector lies above a given dashed line painted on the hemisphere. If we rotate the system by, say, 180◦ around the symmetry axis, the field now points in the direction shown in Fig. 1.14(b), because it must still pass over the dashed line. But we have exactly the same hemisphere after the rotation, so the field must still point upward to the right. We conclude that the field due to the hemisphere points both upward to the left and upward to the right. This is a contradiction. The only way to avoid this contradiction is for the field to point along the symmetry axis (possibly in the negative direction), because in that case it doesn’t change under the rotation.
In the neighborhood of a true point charge the electric field grows infinite like 1/r2 as we approach the point. It makes no sense to talk about the field at the point charge. As our ultimate physical sources of field are
(b) E
Figure 1.14. The symmetry argument that explains why E must be vertical.
22
(a)
Electrostatics: charges and fields
not, we believe, infinite concentrations of charge in zero volume, but instead finite structures, we simply ignore the mathematical singularities implied by our point-charge language and rule out of bounds the interior of our elementary sources. A continuous charge distribution ρ(x , y , z ) that is nowhere infinite gives no trouble at all. Equation (1.22) can be used to find the field at any point within the distribution. The integrand doesn’t blow up at r = 0 because the volume element in the numerator equals r2 sin φ dφ dθ dr in spherical coordinates, and the r2 here cancels the r2 in the denominator in Eq. (1.22). That is to say, so long as ρ remains finite, the field will remain finite everywhere, even in the interior or on the boundary of a charge distribution.
1.9 Flux
(b)
(c)
Figure 1.15. (a) A closed surface in a vector field is divided (b) into small elements of area. (c) Each element of area is represented by an outward vector.
The relation between the electric field and its sources can be expressed in a remarkably simple way, one that we shall find very useful. For this we need to define a quantity called flux. Consider some electric field in space and in this space some arbitrary closed surface, like a balloon of any shape. Figure 1.15 shows such a surface, the field being suggested by a few field lines. Now divide the whole surface into little patches that are so small that over any one patch the surface is practically flat and the vector field does not change appreciably from one part of a patch to another. In other words, don’t let the balloon be too crinkly, and don’t let its surface pass right through a singularity8 of the field such as a point charge. The area of a patch has a certain magnitude in square meters, and a patch defines a unique direction – the outward-pointing normal to its surface. (Since the surface is closed, you can tell its inside from its outside; there is no ambiguity.) Let this magnitude and direction be represented by a vector. Then for every patch into which the surface has been divided, such as patch number j, we have a vector aj giving its area and orientation. The steps we have just taken are pictured in Figs. 1.15(b) and (c). Note that the vector aj does not depend at all on the shape of the patch; it doesn’t matter how we have divided up the surface, as long as the patches are small enough. Let Ej be the electric field vector at the location of patch number j. The scalar product Ej · aj is a number. We call this number the flux through that bit of surface. To understand the origin of the name, imagine a vector function that represents the velocity of motion in a fluid – say in a river, where the velocity varies from one place to another but is constant in time at any one position. Denote this vector field by v, measured in 8 By a singularity of the field we would ordinarily mean not only a point source where
the field approaches infinity, but also any place where the field changes magnitude or direction discontinuously, such as an infinitesimally thin layer of concentrated charge. Actually this latter, milder, kind of singularity would cause no difficulty here unless our balloon’s surface were to coincide with the surface of discontinuity over some finite area.
1.10 Gauss’s law
23
v
a
a
a
Flux = va
Flux = 0
meters/second. Then, if a is the oriented area in square meters of a frame lowered into the water, v · a is the rate of flow of water through the frame in cubic meters per second (Fig. 1.16). The cos θ factor in the standard expression for the dot product correctly picks out the component of v along the direction of a, or equivalently the component of a along the direction of v. We must emphasize that our definition of flux is applicable to any vector function, whatever physical variable it may represent. Now let us add up the flux through all the patches to get the flux through the entire surface, a scalar quantity which we shall denote by : Ej · aj . (1.25) =
60
Flux = va cos 60 = 0.5va
Figure 1.16. The flux through the frame of area a is v · a, where v is the velocity of the fluid. The flux is the volume of fluid passing through the frame, per unit time.
all j
Letting the patches become smaller and more numerous without limit, we pass from the sum in Eq. (1.25) to a surface integral: = E · da. (1.26) entire surface
A surface integral of any vector function F, over a surface S, means just this: divide S into small patches, each represented by a vector outward, of magnitude equal to the patch area; at every patch, take the scalar product of the patch area vector and the local F; sum all these products, and the limit of this sum, as the patches shrink, is the surface integral. Do not be alarmed by the prospect of having to perform such a calculation for an awkwardly shaped surface like the one in Fig. 1.15. The surprising property we are about to demonstrate makes that unnecessary!
E a
q
r
1.10 Gauss’s law Take the simplest case imaginable; suppose the field is that of a single isolated positive point charge q, and the surface is a sphere of radius r centered on the point charge (Fig. 1.17). What is the flux through this surface? The answer is easy because the magnitude of E at every point on the surface is q/4π 0 r2 and its direction is the same as that of the outward normal at that point. So we have q q = E · (total area) = · 4πr2 = . (1.27) 2 0 4π 0 r
Figure 1.17. In the field E of a point charge q, what is the outward flux over a sphere surrounding q?
24
Electrostatics: charges and fields
A
q
R
a r q
The flux is independent of the size of the sphere. Here for the first time we see the benefit of including the factor of 1/4π in Coulomb’s law in Eq. (1.4). Without this factor, we would have an uncanceled factor of 4π in Eq. (1.27) and therefore also, eventually, in one of Maxwell’s equations. Indeed, in Gaussian units Eq. (1.27) takes the form of = 4π q. Now imagine a second surface, or balloon, enclosing the first, but not spherical, as in Fig. 1.18. We claim that the total flux through this surface is the same as that through the sphere. To see this, look at a cone, radiating from q, that cuts a small patch a out of the sphere and continues on to the outer surface, where it cuts out a patch A at a distance R from the point charge. The area of the patch A is larger than that of the patch a by two factors: first, by the ratio of the distance squared (R/r)2 ; and second, owing to its inclination, by the factor 1/ cos θ . The angle θ is the angle between the outward normal and the radial direction (see Fig. 1.18). The electric field in that neighborhood is reduced from its magnitude on the sphere by the factor (r/R)2 and is still radially directed. Letting E(R) be the field at the outer patch and E(r) be the field at the sphere, we have flux through outer patch = E(R) · A = E(R) A cos θ , flux through inner patch = E(r) · a = E(r) a.
Figure 1.18. Showing that the flux through any closed surface around q is the same as the flux through the sphere.
(1.28)
Using the above facts concerning the magnitude of E(R) and the area of A, the flux through the outer patch can be written as
2 2 1 r R cos θ = E(r) a, (1.29) E(R) A cos θ = E(r) a R r cos θ which equals the flux through the inner patch. Now every patch on the outer surface can in this way be put into correspondence with part of the spherical surface, so the total flux must be the same through the two surfaces. That is, the flux through the new surface must be just q/0 . But this was a surface of arbitrary shape and size.9 We conclude: the flux of the electric field through any surface enclosing a point charge q is q/0 . As a corollary we can say that the total flux through a closed surface is zero if the charge lies outside the surface. We leave the proof of this to the reader, along with Fig. 1.19 as a hint of one possible line of argument. There is a way of looking at all this that makes the result seem obvious. Imagine at q a source that emits particles – such as bullets or photons – in all directions at a steady rate. Clearly the flux of particles through a window of unit area will fall off with the inverse square of the window’s distance from q. Hence we can draw an analogy between the electric field strength E and the intensity of particle flow in bullets per unit area per 9 To be sure, we had the second surface enclosing the sphere, but it didn’t have to, really.
Besides, the sphere can be taken as small as we please.
1.10 Gauss’s law
unit time. It is pretty obvious that the flux of bullets through any surface completely surrounding q is independent of the size and shape of that surface, for it is just the total number emitted per unit time. Correspondingly, the flux of E through the closed surface must be independent of size and shape. The common feature responsible for this is the inversesquare behavior of the intensity. The situation is now ripe for superposition! Any electric field is the sum of the fields of its individual sources. This property was expressed in our statement, Eq. (1.19), of Coulomb’s law. Clearly flux is an additive quantity in the same sense, for if we have a number of sources, q1 , q2 , . . . , qN , the fields of which, if each were present alone, would be E1 , E2 , . . . , EN , then the flux through some surface S in the actual field can be written (1.30) = E · da = (E1 + E2 + · · · + EN ) · da. S
25
(a)
q
(b)
S
We have just learned that S Ei · da equals qi /0 if the charge qi is inside S and equals zero otherwise. So every charge q inside the surface contributes exactly q/0 to the surface integral of Eq. (1.30) and all charges outside contribute nothing. We have arrived at Gauss’s law. The flux of the
electric field E through any closed surface, that is, the integral E · da over the surface, equals 1/0 times the total charge enclosed by the surface: 1 1 ρ dv (Gauss’s law) (1.31) E · da = qi = 0 0 i
We call the statement in the box a law because it is equivalent to Coulomb’s law and it could serve equally well as the basic law of electrostatic interactions, after charge and field have been defined. Gauss’s law and Coulomb’s law are not two independent physical laws, but the same law expressed in different ways.10 In Gaussian units, the 1/0 in Gauss’s law is replaced with 4π. Looking back over our proof, we see that it hinged on the inversesquare nature of the interaction and of course on the additivity of interactions, or superposition. Thus the theorem is applicable to any inverse-square field in physics, for instance to the gravitational field. 10 There is one difference, inconsequential here, but relevant to our later study of the
fields of moving charges. Gauss’s law is obeyed by a wider class of fields than those represented by the electrostatic field. In particular, a field that is inverse-square in r but not spherically symmetrical can satisfy Gauss’s law. In other words, Gauss’s law alone does not imply the symmetry of the field of a point source which is implicit in Coulomb’s law.
q
Figure 1.19. To show that the flux through the closed surface in (a) is zero, you can make use of (b).
26
Electrostatics: charges and fields
It is easy to see that Gauss’s law would not hold if the law of force were, say, inverse-cube. For in that case the flux of electric field from a point charge q through a sphere of radius R centered on the charge would be q q · 4π R2 = . (1.32) = E · da = 3 0 R 4π 0 R By making the sphere large enough we could make the flux through it as small as we pleased, while the total charge inside remained constant. This remarkable theorem extends our knowledge in two ways. First, it reveals a connection between the field and its sources that is the converse of Coulomb’s law. Coulomb’s law tells us how to derive the electric field if the charges are given; with Gauss’s law we can determine how much charge is in any region if the field is known. Second, the mathematical relation here demonstrated is a powerful analytic tool; it can make complicated problems easy, as we shall see in the following examples. In Sections 1.11–1.13 we use Gauss’s law to calculate the electric field due to various nicely shaped objects. In all of these examples the symmetry of the object will play a critical role.
r0
Figure 1.20. A charge distribution with spherical symmetry.
1.11 Field of a spherical charge distribution
E1
P1 r1 E2
S1
P2 r2
S2
We can use Gauss’s law to find the electric field of a spherically symmetrical distribution of charge, that is, a distribution in which the charge density ρ depends only on the radius from a central point. Figure 1.20 depicts a cross section through some such distribution. Here the charge density is high at the center, and is zero beyond r0 . What is the electric field at some point such as P1 outside the distribution, or P2 inside it (Fig. 1.21)? If we could proceed only from Coulomb’s law, we should have to carry out an integration that would sum the electric field vectors at P1 arising from each elementary volume in the charge distribution. Let’s try a different approach that exploits both the symmetry of the system and Gauss’s law. Because of the spherical symmetry, the electric field at any point must be radially directed – no other direction is unique. Likewise, the field magnitude E must be the same at all points on a spherical surface S1 of radius r1 , for all such points are equivalent. Call this field magnitude E1 . The flux through this surface S1 is therefore simply 4π r12 E1 , and by Gauss’s law this must be equal to 1/0 times the charge enclosed by the surface. That is, 4πr12 E1 = (1/0 ) · (charge inside S1 ) or E1 =
Figure 1.21. The electric field of a spherical charge distribution.
charge inside S1 . 4π 0 r12
(1.33)
Comparing this with the field of a point charge, we see that the field at all points on S1 is the same as if all the charge within S1 were concentrated at the center. The same statement applies to a sphere drawn
1.11 Field of a spherical charge distribution
27
inside the charge distribution. The field at any point on S2 is the same as if all charge within S2 were at the center, and all charge outside S2 absent. Evidently the field inside a “hollow” spherical charge distribution is zero (Fig. 1.22). Problem 1.17 gives an alternative derivation of this fact.
Example (Field inside and outside a uniform sphere) A spherical charge distribution has a density ρ that is constant from r = 0 out to r = R and is zero beyond. What is the electric field for all values of r, both less than and greater than R?
E=0 inside
Solution For r ≥ R, the field is the same as if all of the charge were concentrated at the center of the sphere. Since the volume of the sphere is 4π R3 /3, the field is therefore radial and has magnitude E(r) =
ρR3 (4π R3 /3)ρ = 2 4π 0 r 30 r2
(r ≥ R).
(1.34)
For r ≤ R, the charge outside radius r effectively contributes nothing to the field, while the charge inside radius r acts as if it were concentrated at the center. The volume inside radius r is 4πr3 /3, so the field inside the given sphere is radial and has magnitude E(r) =
ρr (4π r3 /3)ρ = 30 4π 0 r2
(r ≤ R).
Figure 1.22. The field is zero inside a spherical shell of charge.
E(r)
(1.35)
In terms of the total charge Q = (4π R3 /3)ρ, this can be written as Qr/4π 0 R3 . The field increases linearly with r inside the sphere; the r3 growth of the effective charge outweighs the 1/r2 effect from the increasing distance. And the field decreases like 1/r2 outside the sphere. A plot of E(r) is shown in Fig. 1.23. Note that E(r) is continuous at r = R, where it takes on the value ρR/30 . As we will see in Section 1.13, field discontinuities are created by surface charge densities, and there are no surface charges in this system. The field goes to zero at the center, so it is continuous there also. How should the density vary with r so that the magnitude E(r) is uniform inside the sphere? That is the subject of Exercise 1.68.
The same argument applied to the gravitational field would tell us that the earth, assuming it is spherically symmetrical in its mass distribution, attracts outside bodies as if its mass were concentrated at the center. That is a rather familiar statement. Anyone who is inclined to think the principle expresses an obvious property of the center of mass must be reminded that the theorem is not even true, in general, for other shapes. A perfect cube of uniform density does not attract external bodies as if its mass were concentrated at its geometrical center. Newton didn’t consider the theorem obvious. He needed it as the keystone of his demonstration that the moon in its orbit around the earth and a falling body on the earth are responding to similar forces. The delay of nearly 20 years in the publication of Newton’s theory of gravitation
rR 3
0
r
1/r 2
r R
Figure 1.23. The electric field due to a uniform sphere of charge.
28
Electrostatics: charges and fields
z
(a)
m)
C/
l(
r
dx
P dE q dEy
q
R
dq
y
x
p −q 2 q
(b)
dx
R dq
cos q =
R dq dx
Figure 1.24. (a) The field at P is the vector sum of contributions from each element of the line charge. (b) Detail of (a).
was apparently due, in part at least, to the trouble he had in proving this theorem to his satisfaction. The proof he eventually devised and published in the Principia in 1686 (Book I, Section XII, Theorem XXXI) is a marvel of ingenuity in which, roughly speaking, a tricky volume integration is effected without the aid of the integral calculus as we know it. The proof is a good bit longer than our whole preceding discussion of Gauss’s law, and more intricately reasoned. You see, with all his mathematical resourcefulness and originality, Newton lacked Gauss’s law – a relation that, once it has been shown to us, seems so obvious as to be almost trivial.
1.12 Field of a line charge A long, straight, charged wire, if we neglect its thickness, can be characterized by the amount of charge it carries per unit length. Let λ, measured in coulombs/meter, denote this linear charge density. What is the electric field of such a line charge, assumed infinitely long and with constant linear charge density λ? We’ll do the problem in two ways, first by an integration starting from Coulomb’s law, and then by using Gauss’s law. To evaluate the field at the point P, shown in Fig. 1.24, we must add up the contributions from all segments of the line charge, one of which is indicated as a segment of length dx. The charge dq on this element is given by dq = λ dx. Having oriented our x axis along the line charge, we may as well let the y axis pass through P, which is a distance r from the nearest point on the line. It is a good idea to take advantage of symmetry at the outset. Obviously the electric field at P must point in the y direction, so that Ex and Ez are both zero. The contribution of the charge dq to the y component of the electric field at P is dEy =
dq λ dx cos θ = cos θ , 2 4π 0 R 4π 0 R2
(1.36)
where θ is the angle the electric field of dq makes with the y direction. The total y component is then ∞ λ cos θ dx. (1.37) Ey = dEy = 2 −∞ 4π 0 R It is convenient to use θ as the variable of integration. Since Figs. 1.24(a) and (b) tell us that R = r/ cos θ and dx = R dθ/ cos θ , we have dx = r dθ/ cos2 θ. (This expression for dx comes up often. It also follows from x = r tan θ ⇒ dx = r d(tan θ ) = r dθ/ cos2 θ .) Eliminating dx and R from the integral in Eq. (1.37), in favor of θ, we obtain π/2 π/2 λ cos θ dθ λ λ Ey = cos θ dθ = = . (1.38) 4π 0 r −π/2 2π 0 r −π/2 4π 0 r We see that the field of an infinitely long, uniformly dense line charge is proportional to the reciprocal of the distance from the line. Its direction
1.13 Field of an infinite flat sheet of charge
29
is of course radially outward if the line carries a positive charge, inward if negative. Gauss’s law leads directly to the same result. Surround a segment of the line charge with a closed circular cylinder of length L and radius r, as in Fig. 1.25, and consider the flux through this surface. As we have already noted, symmetry guarantees that the field is radial, so the flux through the ends of the “tin can” is zero. The flux through the cylindrical surface is simply the area, 2πrL, times Er , the field at the surface. On the other hand, the charge enclosed by the surface is just λL, so Gauss’s law gives us (2πrL)Er = λL/0 or Er =
λ , 2π 0 r
L
l
r
(1.39)
in agreement with Eq. (1.38).
Figure 1.25. Using Gauss’s law to find the field of a line charge.
1.13 Field of an infinite flat sheet of charge Electric charge distributed smoothly in a thin sheet is called a surface charge distribution. Consider a flat sheet, infinite in extent, with the constant surface charge density σ . The electric field on either side of the sheet, whatever its magnitude may turn out to be, must surely point perpendicular to the plane of the sheet; there is no other unique direction in the system. Also, because of symmetry, the field must have the same magnitude and the opposite direction at two points P and P equidistant from the sheet on opposite sides. With these facts established, Gauss’s law gives us at once the field intensity, as follows: draw a cylinder, as in Fig. 1.26 (actually, any shape with uniform cross section will work fine), with P on one side and P on the other, of cross-sectional area A. The outward flux is found only at the ends, so that if EP denotes the magnitude of the field at P, and EP the magnitude at P , the outward flux is AEP + AEP = 2AEP . The charge enclosed is σ A, so Gauss’s law gives 2AEP = σ A/0 , or σ EP = . (1.40) 20 We see that the field strength is independent of r, the distance from the sheet. Equation (1.40) could have been derived more laboriously by calculating the vector sum of the contributions to the field at P from all the little elements of charge in the sheet. In the more general case where there are other charges in the vicinity, the field need not be perpendicular to the sheet, or symmetric on either side of it. Consider a very squat Gaussian surface, with P and P infinitesimally close to the sheet, instead of the elongated surface in Fig. 1.26. We can then ignore the negligible flux through the cylindrical “side” of the pillbox, so the above reasoning gives E⊥,P + E⊥,P = σ/0 , where the “⊥” denotes the component perpendicular to the sheet. If you want
s (C/m2)
P P
EP r
EP
Figure 1.26. Using Gauss’s law to find the field of an infinite flat sheet of charge.
30
Electrostatics: charges and fields ˆ to write this in terms of vectors, it becomes E⊥,P − E⊥,P = (σ/0 )n, where nˆ is the unit vector perpendicular to the sheet, in the direction of P. In other words, the discontinuity in E⊥ across the sheet is given by σ ˆ (1.41) E⊥ = n. 0 Only the normal component is discontinuous; the parallel component is continuous across the sheet. So we can just as well replace the E⊥ in Eq. (1.41) with E. This result is also valid for any finite-sized sheet, because from up close the sheet looks essentially like an infinite plane, at least as far as the normal component is concerned. The field of an infinitely long line charge, we found, varies inversely as the distance from the line, while the field of an infinite sheet has the same strength at all distances. These are simple consequences of the fact that the field of a point charge varies as the inverse square of the distance. If that doesn’t yet seem compellingly obvious, look at it this way: roughly speaking, the part of the line charge that is mainly responsible for the field at P in Fig. 1.24 is the near part – the charge within a distance of order of magnitude r. If we lump all this together and forget the rest, we have a concentrated charge of magnitude q ≈ λr, which ought to produce a field proportional to q/r2 , or λ/r. In the case of the sheet, the amount of charge that is “effective,” in this sense, increases proportionally to r2 as we go out from the sheet, which just offsets the 1/r2 decrease in the field from any given element of charge.
1.14 The force on a layer of charge
E = s/
s
2)
/m (C
s dA
E=0
r0
Figure 1.27. A spherical surface with uniform charge density σ .
0
The sphere in Fig. 1.27 has a charge distributed over its surface with the uniform density σ , in C/m2 . Inside the sphere, as we have already learned, the electric field of such a charge distribution is zero. Outside the sphere the field is Q/4π 0 r2 , where Q is the total charge on the sphere, equal to 4π r02 σ . So just outside the surface of the sphere the field strength is σ (1.42) Ejust outside = . 0 Compare this with Eq. (1.40) and Fig. 1.26. In both cases Gauss’s law is obeyed: the change in the normal component of E, from one side of the layer to the other, is equal to σ/0 , in accordance with Eq. (1.41). What is the electrical force experienced by the charges that make up this distribution? The question may seem puzzling at first because the field E arises from these very charges. What we must think about is the force on some small element of charge dq, such as a small patch of area dA with charge dq = σ dA. Consider, separately, the force on dq due to all the other charges in the distribution, and the force on the patch due to the charges within the patch itself. This latter force is surely zero. Coulomb repulsion between charges within the patch is just another example of
1.14 The force on a layer of charge
Newton’s third law; the patch as a whole cannot push on itself. That simplifies our problem, for it allows us to use the entire electric field E, including the field due to all charges in the patch, in calculating the force dF on the patch of charge dq: dF = E dq = EĎƒ dA.
31
(a) Δr r
(1.43)
But what E shall we use, the field E = Ďƒ/0 outside the sphere or the field E = 0 inside? The correct answer, as we shall prove in a moment, is the average of the two fields that is, dF =
Ďƒ 2 dA 1 . Ďƒ/0 + 0 Ďƒ dA = 2 20
(1.44)
To justify this we shall consider a more general case, and one that will introduce a more realistic picture of a layer of surface charge. Real charge layers do not have zero thickness. Figure 1.28 shows some ways in which charge might be distributed through the thickness of a layer. In each example, the value of Ďƒ , the total charge per unit area of layer, is the same. These might be cross sections through a small portion of the spherical surface in Fig. 1.27 on a scale such that the curvature is not noticeable. To make it more general, however, we can let the field on the left be E1 (rather than 0, as it was inside the sphere), with E2 the field on the right. The condition imposed by Gauss’s law, for given Ďƒ , is, in each case, E2 − E1 =
Ďƒ . 0
(1.45)
Now let us look carefully within the layer where the field is changing continuously from E1 to E2 and there is a volume charge density Ď (x) extending from x = 0 to x = x0 , the thickness of the layer (Fig. 1.29). Consider a much thinner slab, of thickness dx x0 , which contains per unit area an amount of charge Ď dx. If the area of this thin slab is A, the force on it is dF = EĎ dx ¡ A. Thus the total force per unit area of our original charge layer is x0 dF F EĎ dx. = = A A 0
E = s/
E=0
0
rΔr = s
(b) Δr r
E = s/
0
E=0
(c)
(1.46) E = s/
0
(1.47)
But Gauss’s law tells us via Eq. (1.45) that dE, the change in E through the thin slab, is just Ď dx/0 . Hence Ď dx in Eq. (1.47) can be replaced by 0 dE, and the integral becomes E2 0 2 F (1.48) 0 E dE = = E2 − E12 . A 2 E1
E=0
Figure 1.28. The net change in ďŹ eld at a charge layer depends only on the total charge per unit area.
32
Electrostatics: charges and fields Since E2 − E1 = Ďƒ/0 , the force per unit area in Eq. (1.48), after being factored, can be expressed as
dx
F 1 = E1 + E2 Ďƒ A 2 E = E1
(1.49)
E = E2
r(x)
x=0
x = x0
Figure 1.29. Within the charge layer of density Ď (x), E(x + dx) − E(x) = Ď dx/0 .
We have shown, as promised, that for given Ďƒ the force per unit area on a charge layer is determined by the mean of the external field on one side and that on the other.11 This is independent of the thickness of the layer, as long as it is small compared with the total area, and of the variation Ď (x) in charge density within the layer. See Problem 1.30 for an alternative derivation of Eq. (1.49). The direction of the electrical force on an element of the charge on the sphere is, of course, outward whether the surface charge is positive or negative. If the charges do not fly off the sphere, that outward force must be balanced by some inward force, not included in our equations, that can hold the charge carriers in place. To call such a force “nonelectricalâ€? would be misleading, for electrical attractions and repulsions are the dominant forces in the structure of atoms and in the cohesion of matter generally. The difference is that these forces are effective only at short distances, from atom to atom, or from electron to electron. Physics on that scale is a story of individual particles. Think of a charged rubber balloon, say 0.1 m in radius, with 10−8 C of negative charge spread as uniformly as possible on its outer surface. It forms a surface charge of density Ďƒ = (10−8 C)/4Ď€(0.1 m)2 = 8 ¡ 10−8 C/m2 . The resulting outward force, per area of surface charge, is given by Eq. (1.44) as dF (8 ¡ 10−8 C/m2 )2 Ďƒ2 = 3.6 ¡ 10−4 N/m2 . (1.50) = = dA 20 2 8.85 ¡ 10−12 C2 /(N m2 ) In fact, our charge consists of about 6 ¡ 1010 electrons attached to the rubber film, which corresponds to about 50 million extra electrons per square centimeter. So the “graininessâ€? in the charge distribution is hardly apparent. However, if we could look at one of these extra electrons, we would find it roughly 10−4 cm – an enormous distance on an atomic scale – from its nearest neighbor. This electron would be stuck, electrically stuck, to a local molecule of rubber. The rubber molecule would be attached to adjacent rubber molecules, and so on. If you pull on the electron, the force is transmitted in this way to the whole piece of rubber. Unless, of course, you pull hard enough to tear the electron loose from the molecule to which it is attached. That would take an electric field many thousands of times stronger than the field in our example. 11 Note that this is not necessarily the same as the average field within the layer, a
quantity of no special interest or significance.
1.15 Energy associated with the electric field
33
1.15 Energy associated with the electric field Suppose our spherical shell of charge is compressed slightly, from an initial radius of r0 to a smaller radius, as in Fig. 1.30. This requires that work be done against the repulsive force, which we found above to be σ 2 /20 newtons for each square meter of surface. The displacement being dr, the total work done is (4π r02 )(σ 2 /20 ) dr, or (2π r02 σ 2 /0 ) dr. This represents an increase in the energy required to assemble the system of charges, the energy U we talked about in Section 1.5: dU =
2πr02 σ 2 dr. 0
0 E 2 (1.52) 4πr02 dr. 2 This is an instance of a general theorem which we shall not prove now (but see Problem 1.33): the potential energy U of a system of charges, which is the total work required to assemble the system, can be calculated from the electric field itself simply by assigning an amount of energy (0 E2 /2) dv to every volume element dv and integrating over all space where there is electric field: dU =
0 2
entire field
E2 dv
r0
–d
r
r0
(1.51)
Notice how the electric field E has been changed. Within the shell of thickness dr, the field was zero and is now σ/0 . Beyond r0 the field is unchanged. In effect we have created a field of strength E = σ/0 filling a region of volume 4π r02 dr. We have done so by investing an amount of energy given by Eq. (1.51) which, if we substitute 0 E for σ , can be written like this:
U=
dr
(1.53)
E2 is a scalar quantity, of course: E2 ≡ E · E. One may think of this energy as “stored” in the field. The system being conservative, that amount of energy can of course be recovered by allowing the charges to go apart; so it is nice to think of the energy as “being somewhere” meanwhile. Our accounting comes out right if we think of it as stored in space with a density of 0 E2 /2, in joules/m3 . There is no harm in this, but in fact we have no way of identifying, quite independently of anything else, the energy stored in a particular cubic meter of space. Only the total energy is physically measurable, that is, the work required to bring the charge into some configuration, starting from some other configuration. Just as the concept of electric field serves in place of Coulomb’s law to explain the behavior of electric charges, so when we use Eq. (1.53) rather than Eq. (1.15) to express the total potential energy of an electrostatic system, we are merely using a different kind of bookkeeping. Sometimes a change in viewpoint, even if it is at
Figure 1.30. Shrinking a spherical shell or charged balloon.
34
Electrostatics: charges and fields
first only a change in bookkeeping, can stimulate new ideas and deeper understanding. The notion of the electric field as an independent entity will take form when we study the dynamical behavior of charged matter and electromagnetic radiation. Example (Potential energy of a uniform sphere) What is the energy stored in a sphere of radius R with charge Q uniformly distributed throughout the interior? Solution The electric field is nonzero both inside and outside the sphere, so Eq. (1.53) involves two different integrals. Outside the sphere, the field at radius r is simply Q/4π 0 r2 , so the energy stored in the external field is 2 ∞ 2 ∞ dr Q2 Q 2 dr = Q . (1.54) 4πr = Uext = 0 2 R 8π 0 R r2 8π 0 R 4π 0 r2 The example in Section 1.11 gives the field at radius r inside the sphere as Er = ρr/30 . But the density equals ρ = Q/(4πR3 /3), so the field is Er = (3Q/4π R3 )r/30 = Qr/4π 0 R3 . The energy stored in the internal field is therefore 2 R R 2 1 Q2 Qr 2 dr = 4 dr = Q · . 4πr r Uint = 0 3 6 2 0 8π R 5 4π 0 R 8π 0 R 0 0 (1.55) This is one-fifth of the energy stored in the external field. The total energy is the sum of Uext and Uint , which we can write as (3/5)Q2 /4π 0 R. We see that it takes three-fifths as much energy to assemble the sphere as it does to bring in two point charges Q to a separation of R. Exercise 1.61 presents an alternative method of calculating the potential energy of a uniformly charged sphere, by imagining building it up layer by layer.
We run into trouble if we try to apply Eq. (1.53) to a system that contains a point charge, that is, a finite charge q of zero size. Locate q at the origin of the coordinates. Close to the origin, E2 will approach q2 /(4π 0 )2 r4 . With dv = 4π r2 dr, the integrand E2 dv will behave like dr/r2 , and our integral will blow up at the limit r = 0. That simply tells us that it would take infinite energy to pack finite charge into zero volume – which is true but not helpful. In the real world we deal with particles like electrons and protons. They are so small that for most purposes we can ignore their dimensions and think of them as point charges when we consider their electrical interaction with one another. How much energy it took to make such a particle is a question that goes beyond the range of classical electromagnetism. We have to regard the particles as supplied to us ready-made. The energy we are concerned with is the work done in moving them around. The distinction is usually clear. Consider two charged particles, a proton and a negative pion, for instance. Let Ep be the electric field of the proton, Eπ that of the pion. The total field is E = Ep + Eπ , and E · E
1.16 Applications equals Ep2 + Eπ2 + 2Ep · Eπ . According to Eq. (1.53) the total energy in the electric field of this two-particle system is 0 E2 dv U= 2 0 0 = (1.56) Ep2 dv + Eπ2 dv + 0 Ep · Eπ dv. 2 2 The value of the first integral is a property of any isolated proton. It is a constant of nature which is not changed by moving the proton around. The same goes for the second integral, involving the pion’s electric field alone. It is the third integral that directly concerns us, for it expresses the energy required to assemble the system given a proton and a pion as constituents. The distinction could break down if the two particles interact so strongly that the electrical structure of one is distorted by the presence of the other. Knowing that both particles are in a sense composite (the proton consisting of three quarks, the pion of two), we might expect that to happen during a close approach. In fact, nothing much happens down to a distance of 10−15 m. At shorter distances, for strongly interacting particles like the proton and the pion, nonelectrical forces dominate the scene anyway. That explains why we do not need to include “self-energy” terms like the first two integrals in Eq. (1.56) in our energy accounts for a system of elementary charged particles. Indeed, we want to omit them. We are doing just that, in effect, when we replace the actual distribution of discrete elementary charges (the electrons on the rubber balloon) by a perfectly continuous charge distribution.
1.16 Applications Each chapter of this book concludes with a list of “everyday” applications of the topics covered in the chapter. The discussions are brief. It would take many pages to explain each item in detail; real-life physics tends to involve countless variations, complications, and subtleties. The main purpose here is just to say a few words to convince you that the applications are interesting and worthy of further study. You can carry onward with some combination of books/internet/people/pondering. There is effectively an infinite amount of information out there, so you should take advantage of it! Two books packed full of real-life applications are: • The Flying Circus of Physics (Walker, 2007); • How Things Work (Bloomfield, 2010). And some very informative websites are: • The Flying Circus of Physics website: www.flyingcircusofphysics.com; • How Stuff Works: www.howstuffworks.com;
35
36
Electrostatics: charges and fields • Explain That Stuff: www.explainthatstuff.com; • and Wikipedia, of course: www.wikipedia.org. These websites can point you to more technical sources if you want to pursue things at a more advanced level. With the exception of the gravitational force keeping us on the earth, and ignoring magnets for the time being, essentially all “everyday” forces are electrostatic in origin (with some quantum mechanics mixed in, to make things stable; see Earnshaw’s theorem in Section 2.12). Friction, tension, normal force, etc., all boil down to the electric forces between the electrons in the various atoms and molecules. You can open a door by pushing on it because the forces between neighboring molecules in the door, and also in your hand, are sufficiently strong. We can ignore the gravitational force between everyday-sized objects because the gravitational force is so much weaker than the electric force (see Problem 1.1). Only if one of the objects is the earth does the gravitational force matter. And even in that case, it is quite remarkable that the electric forces between the molecules in, say, a wooden board that you might be standing on can completely balance the gravitational force on you due to the entire earth. However, this wouldn’t be the case if you attempt to stand on a lake (unless it’s frozen!). If you want to give an object a net charge, a possible way is via the triboelectric effect. If certain materials are rubbed against each other, they can become charged. For example, rubbing wool and Teflon together causes the wool to become positively charged and the Teflon negatively charged. The mechanism is simple: the Teflon simply grabs electrons from the wool. The determination of which material ends up with extra electrons depends on the electronic structure of the molecules in the materials. It turns out that actual rubbing isn’t necessary. Simply touching and separating the materials can produce an imbalance of charge. Triboelectric effects are mitigated by humid air, because the water molecules in the air are inclined to give or receive electrons, depending on which of these actions neutralizes the object. This is due to the fact that water molecules are polar, that is, they are electrically lopsided. (Polar molecules will be discussed in Chapter 10.) The electrical breakdown of air occurs when the electric field reaches a strength of about 3 · 106 V/m. In fields this strong, electrons are ripped from molecules in the air. They are then accelerated by the field and collide with other molecules, knocking electrons out of these molecules, and so on, in a cascading process. The result is a spark, because eventually the electrons will combine in a more friendly manner with molecules and drop down to a lower energy level, emitting the light that you see. If you shuffle your feet on a carpet and then bring your finger close to a grounded object, you will see a spark. The electric field near the surface of the earth is about 100 V/m, pointing downward. You can show that this implies a charge of −5 · 105 C
1.16 Applications
on the earth. The atmosphere contains roughly the opposite charge, so that the earth-plus-atmosphere system is essentially neutral, as it must be. (Why?) If there were no regenerative process, charge would leak between the ground and the atmosphere, and they would neutralize each other in about an hour. But there is a regenerative process: lightning. This is a spectacular example of electrical breakdown. There are millions of lightning strikes per day over the surface of the earth, the vast majority of which transfer negative charge to the earth. A lightning strike is the result of the strong electric field that is produced by the buildup (or rather, the separation) of charge in a cloud. This separation arises from the charge carried on moving raindrops, although the exact process is rather complicated (see the interesting discussion in Chapter 9 of Feynman et al. (1977)). “Lightning” can also arise from the charge carried on dust particles in coal mines, flour mills, grain storage facilities, etc. The result can be a deadly explosion. A more gentle form of electrical breakdown is corona discharge. Near the tip of a charged pointy object, such as a needle, the field is large but then falls off rapidly. (You can model the needle roughly as having a tiny charged sphere on its end.) Electrons are ripped off the needle (or off the air molecules) very close to the needle, but the field farther away isn’t large enough to sustain the breakdown. So there is a slow leakage instead of an abrupt spark. This leakage can sometimes be seen as a faint glow. Examples are St. Elmo’s fire at the tips of ship masts, and a glow at the tips of airplane wings. Electrostatic paint sprayers can produce very even coats of paint. As the paint leaves the sprayer, an electrode gives it a charge. This causes the droplets in the paint mist to repel each other, helping to create a uniform mist with no clumping. If the object being painted is grounded (or given the opposite charge), the paint will be attracted to it, leading to less wasted paint, less mess, and less inhalation of paint mist. When painting a metal pipe, for example, the mist will wrap around and partially coat the back side, instead of just sailing off into the air. Photocopiers work by giving the toner powder a charge, and giving certain locations on a drum or belt the opposite charge. These locations on the drum can be made to correspond to the locations of ink on the original paper. This is accomplished by coating the drum with a photoconductive material, that is, one that becomes conductive when exposed to light. The entire surface of the drum is given an initial charge and then exposed to light at locations corresponding to the white areas on the original page (accomplished by reflecting light off the page). The charge can be made to flow off these newly conductive locations on the drum, leaving charge only at the locations corresponding to the ink. When the oppositely charged toner is brought nearby, it is attracted to these locations on the drum. The toner is then transferred to a piece of paper, producing the desired copy. Electronic paper, used in many eBook readers, works by using electric fields to rotate or translate small black and white objects.
37
38
Electrostatics: charges and fields One technique uses tiny spheres (about 10−4 m in diameter) that are black on one side and white on the other, with the sides being oppositely charged. Another technique uses similarly tiny spheres that are filled with many even tinier charged white particles along with a dark dye. In both cases, a narrow gap between sheets of electrodes (with one sheet being the transparent sheet that you look through) is filled with the spheres. By depositing a specific pattern of charge on the sheets, the color of the objects facing your eye can be controlled. In the first system, the black and white spheres rotate accordingly. In the second system, the tiny white particles pile up on one side of the sphere. In contrast with a standard LCD computer screen, electronic paper acts like normal paper, in that it doesn’t produce its own light; an outside light source is needed to view the page. An important advantage of electronic paper is that it uses a very small amount of power. A battery is needed only when the page is refreshed, whereas an LCD screen requires continual refreshing.
CHAPTER SUMMARY • Electric charge, which can be positive or negative, is both conserved and quantized. The force between two charges is given by Coulomb’s law: F=
1 q1 q2 rˆ 21 . 2 4π 0 r21
(1.57)
Integrating this force, we find that the potential energy of a system of charges (the work necessary to bring them in from infinity) equals 1 1 qj qk . 2 4π 0 rjk N
U=
(1.58)
j=1 k=j
• The electric field due to a charge distribution is (depending on whether the distribution is continuous or discrete) 1 E= 4π 0
ρ(x , y , z )ˆr dx dy dz
r2
or
N 1 qj rˆ j . (1.59) 4π 0 r2 j=1 j
The force on a test charge q due to the field is F = qE. • The flux of an electric field through a surface S is = E · da.
(1.60)
S
Gauss’s law states that the flux of the electric field E through any closed surface equals 1/0 times the total charge enclosed by the
Problems
surface. That is (depending on whether the distribution is continuous or discrete), 1 1 Ď dv = qi . (1.61) E ¡ da = 0 0 i
Gauss’s law gives the fields for a sphere, line, and sheet of charge as Q Îť Ďƒ , Eline = . (1.62) , Esheet = 2 2Ď€ 0 r 20 4Ď€ 0 r More generally, the discontinuity in the normal component of E across a sheet is E⊼ = Ďƒ/0 . Gauss’s law is always valid, although it is useful for calculating the electric field only in cases where there is sufficient symmetry. • The force per unit area on a layer of charge equals the density times the average of the fields on either side: 1 F (1.63) = E1 + E2 Ďƒ . A 2 Esphere =
• The energy density of an electric field is 0 E2 /2, so the total energy in a system equals 0 (1.64) E2 dv. U= 2
Problems 1.1
Gravity vs. electricity * (a) In the domain of elementary particles, a natural unit of mass is the mass of a nucleon, that is, a proton or a neutron, the basic massive building blocks of ordinary matter. Given the nucleon mass as 1.67 ¡ 10−27 kg and the gravitational constant G as 6.67 ¡ 10−11 m3 /(kg s2 ), compare the gravitational attraction of two protons with their electrostatic repulsion. This shows why we call gravitation a very weak force. (b) The distance between the two protons in the helium nucleus could be at one instant as much as 10−15 m. How large is the force of electrical repulsion between two protons at that distance? Express it in newtons, and in pounds. Even stronger is the nuclear force that acts between any pair of hadrons (including neutrons and protons) when they are that close together.
1.2
Zero force from a triangle ** Two positive ions and one negative ion are fixed at the vertices of an equilateral triangle. Where can a fourth ion be placed, along the symmetry axis of the setup, so that the force on it will be zero? Is there more than one such place? You will need to solve something numerically.
39
40
Electrostatics: charges and fields q
1.3
Force from a cone ** (a) A charge q is located at the tip of a hollow cone (such as an ice cream cone without the ice cream) with surface charge density σ . The slant height of the cone is L, and the half-angle at the vertex is θ . What can you say about the force on the charge q due to the cone? (b) If the top half of the cone is removed and thrown away (see Fig. 1.31), what is the force on the charge q due to the remaining part of the cone? For what angle θ is this force maximum?
1.4
Work for a rectangle ** Two protons and two electrons are located at the corners of a rectangle with side lengths a and b. There are two essentially different arrangements. Consider the work required to assemble the system, starting with the particles very far apart. Is it possible for the work to be positive for either of the arrangements? If so, how must a and b be related? You will need to solve something numerically.
1.5
Stable or unstable? ** In the setup in Exercise 1.37, is the charge −Q at the center of the square in stable or unstable equilibrium? You can answer this by working with either forces or energies. The latter has the advantage of not involving components, although things can still get quite messy. However, the math is simple if you use a computer. Imagine moving the −Q charge infinitesimally to the point (x, y), and use, for example, the Series operation in Mathematica to calculate the new energy of the charge, to lowest nontrivial order in x and y. If the energy decreases for at least one direction of displacement, then the equilibrium is unstable. (The equilibrium is certainly stable with respect to displacements perpendicular to the plane of the square, because the attractive force from the other charges is directed back toward the plane. The question is, what happens in the plane of the square?)
1.6
Zero potential energy for equilibrium ** (a) Two charges q are each located a distance d from a charge Q, as shown in Fig. 1.32(a). What should the charge Q be so that the system is in equilibrium; that is, so that the force on each charge is zero? (The equilibrium is an unstable one, which can be seen by looking at longitudinal displacements of the (negative) charge Q. This is consistent with a general result that we will derive Section 2.12.) (b) Same question, but now with the setup in Fig. 1.32(b). The three charges q are located at the vertices of an equilateral triangle. (c) Show that the total potential energy in each of the above systems is zero.
q q L/ 2
L/ 2 s
Figure 1.31.
(a) q
Q
q
d
d
q
(b)
Q d q
Figure 1.32.
q
Problems
41
(d) In view of the previous result, we might make the following conjecture: “The total potential energy of any system of charges in equilibrium is zero.” Prove that this conjecture is indeed true. Hint: The goal is to show that zero work is required to move the charges out to infinity. Since the electrostatic force is conservative, you need only show that the work is zero for one particular set of paths of the charges. And there is indeed a particular set of paths that makes the result clear. 1.7
Potential energy in a two-dimensional crystal ** Use a computer to calculate numerically the potential energy, per ion, for an infinite two-dimensional square ionic crystal with separation a; that is, a plane of equally spaced charges of magnitude e and alternating sign (as with a checkerboard).
1.8
Oscillating in a ring *** A ring with radius R has uniform positive charge density λ. A particle with positive charge q and mass m is initially located at the center of the ring and is then given a tiny kick. If it is constrained to move in the plane of the ring, show that it undergoes simple harmonic motion (for small oscillations), and find the frequency. Hint: Find the potential energy of the particle when it is at a (small) radius, r, by integrating over the ring, and then take the negative derivative to find the force. You √ will need to use the law of cosines and also the Taylor series 1/ 1 + ≈ 1 − /2 + 3 2 /8.
1.9
Field from two charges ** A charge 2q is at the origin, and a charge −q is at x = a on the x axis. (a) Find the point on the x axis where the electric field is zero. (b) Consider the vertical line passing through the charge −q, that is, the line given by x = a. Locate, at least approximately, a point on this line where the electric field is parallel to the x axis.
1.10 45-degree field line ** A half-infinite line has linear charge density λ. Find the electric field at a point that is “even” with the end, a distance from it, as shown in Fig. 1.33. You should find that the field always points up at a 45◦ angle, independent of . 1.11 Field at the end of a cylinder ** (a) Consider a half-infinite hollow cylindrical shell (that is, one that extends to infinity in one direction) with radius R and uniform surface charge density σ . What is the electric field at the midpoint of the end face? (b) Use your result to determine the field at the midpoint of a half-infinite solid cylinder with radius R and uniform volume
l
Figure 1.33.
42
Electrostatics: charges and fields charge density ρ, which can be considered to be built up from many cylindrical shells.
z
1.12 Field from a hemispherical shell *** A hemispherical shell has radius R and uniform surface charge density σ (see Fig. 1.34). Find the electric field at a point on the symmetry axis, at position z relative to the center, for any z value from −∞ to ∞.
R
Figure 1.34.
−Q
h
Q r
Figure 1.35.
1.13 A very uniform field *** (a) Two rings with radius r have charge Q and −Q uniformly distributed around them. The rings are parallel and located a distance h apart, as shown in Fig. 1.35. Let z be the vertical coordinate, with z = 0 taken to be at the center of the lower ring. As a function of z, what is the electric field at points on the axis of the rings? (b) You should find that the electric field is an even function with respect to the z = h/2 point midway between the rings. This implies that, at this point, the field has a local extremum as a function of z. The field is therefore fairly uniform there; there are no variations to first order in the distance along the axis from the midpoint. What should r be in terms of h so that the field is very uniform? By “very” uniform we mean that additionally there aren’t any variations to second order in z. That is, the second derivative vanishes. This then implies that the leading-order change is fourth order in z (because there are no variations at any odd order, since the field is an even function around the midpoint). Feel free to calculate the derivatives with a computer. 1.14 Hole in a plane ** (a) A hole of radius R is cut out from a very large flat sheet with uniform charge density σ . Let L be the line perpendicular to the sheet, passing through the center of the hole. What is the electric field at a point on L, a distance z from the center of the hole? Hint: Consider the plane to consist of many concentric rings. (b) If a charge −q with mass m is released from rest on L, very close to the center of the hole, show that it undergoes oscillatory motion, and find the frequency ω of these oscillations. What is ω if m = 1 g, −q = −10−8 C, σ = 10−6 C/m2 , and R = 0.1 m? (c) If a charge −q with mass m is released from rest on L, a distance z from the sheet, what is its speed when it passes through the center of the hole? What does your answer reduce to for large z (or, equivalently, small R)?
Problems
1.15 Flux through a circle ** A point charge q is located at the origin. Consider the electric field flux through a circle a distance from q, subtending an angle 2θ , as shown in Fig. 1.36. Since there are no charges except at the origin, any surface that is bounded by the circle and that stays to the right of the origin must contain the same flux. (Why?) Calculate this flux by taking the surface to be: (a) the flat disk bounded by the circle;
43
q
q q
Figure 1.36.
(b) the spherical cap (with the sphere centered at the origin) bounded by the circle. 1.16 Gauss’s law and two point charges ** (a) Two point charges q are located at positions x = Âą . At points close to the origin on the x axis, find Ex . At points close to the origin on the y axis, find Ey . Make suitable approximations with x and y . (b) Consider a small cylinder centered at the origin, with its axis along the x axis. The radius is r0 and the length is 2x0 . Using your results from part (a), verify that there is zero flux through the cylinder, as required by Gauss’s law. 1.17 Zero field inside a spherical shell ** Consider a hollow spherical shell with uniform surface charge density. By considering the two small patches at the ends of the thin cones in Fig. 1.37, show that the electric field at any point P in the interior of the shell is zero. This then implies that the electric potential (defined in Chapter 2) is constant throughout the interior. 1.18 Fields at the surfaces ** Consider the electric field at a point on the surface of (a) a sphere with radius R, (b) a cylinder with radius R whose length is infinite, and (c) a slab with thickness 2R whose other two dimensions are infinite. All of the objects have the same volume charge density Ď . Compare the fields in the three cases, and explain physically why the sizes take the order they do.
P
Figure 1.37.
r
B
1.19 Sheet on a sphere ** Consider a large flat horizontal sheet with thickness x and volume charge density Ď . This sheet is tangent to a sphere with radius R and volume charge density Ď 0 , as shown in Fig. 1.38. Let A be the point of tangency, and let B be the point opposite to A on the top side of the sheet. Show that the net upward electric field (from the sphere plus the sheet) at B is larger than at A if Ď > (2/3)Ď 0 . (Assume x R.)
x A R r
0
Figure 1.38.
44
Electrostatics: charges and fields
1.20 Thundercloud ** You observe that the passage of a particular thundercloud overhead causes the vertical electric field strength in the atmosphere, measured at the ground, to rise to 3000 N/C (or V/m). (a) How much charge does the thundercloud contain, in coulombs per square meter of horizontal area? Assume that the width of the cloud is large compared with the height above the ground. (b) Suppose there is enough water in the thundercloud in the form of 1 mm diameter drops to make 0.25 cm of rainfall, and that it is those drops that carry the charge. How large is the electric field strength at the surface of one of the drops? 1.21 Field in the end face * Consider a half-infinite hollow cylindrical shell (that is, one that extends to infinity in one direction) with uniform surface charge density. Show that at all points in the circular end face, the electric field is parallel to the cylinder’s axis. Hint: Use superposition, along with what you know about the field from an infinite (in both directions) hollow cylinder. 1.22 Field from a spherical shell, right and wrong ** The electric field outside and an infinitesimal distance away from a uniformly charged spherical shell, with radius R and surface charge density σ , is given by Eq. (1.42) as σ/0 . Derive this in the following way. (a) Slice the shell into rings (symmetrically located with respect to the point in question), and then integrate the field contributions from all the rings. You should obtain the incorrect result of σ/20 . (b) Why isn’t the result correct? Explain how to modify it to obtain the correct result of σ/0 . Hint: You could very well have performed the above integral in an effort to obtain the electric field an infinitesimal distance inside the shell, where we know the field is zero. Does the above integration provide a good description of what’s going on for points on the shell that are very close to the point in question? 1.23 Field near a stick ** A stick with length 2 has uniform linear charge density λ. Consider a point P, a distance η from the center (where 0 ≤ η < 1), and an infinitesimal distance away from the stick. Up close, the stick looks infinitely long, as far as the E component perpendicular to the stick is concerned. So we have E⊥ = λ/2π 0 r. Find the E component parallel to the stick, E . Does it approach infinity, or does it remain finite at the end of the stick?
Problems
45
1.24 Potential energy of a cylinder *** A cylindrical volume of radius a is filled with charge of uniform density ρ. We want to know the potential energy per unit length of this cylinder of charge, that is, the work done per unit length in assembling it. Calculate this by building up the cylinder layer by layer, making use of the fact that the field outside a cylindrical distribution of charge is the same as if all the charge were located on the axis. You will find that the energy per unit length is infinite if the charges are brought in from infinity, so instead assume that they are initially distributed uniformly over a hollow cylinder with large radius R. Write your answer in terms of the charge per unit length of the cylinder, which is λ = ρπa2 . (See Exercise 1.83 for a different method of solving this problem.) 1.25 Two equal fields ** The result of Exercise 1.78 is that the electric field at the center of a small hole in a spherical shell equals σ/20 . This happens to be the same as the field due to an infinite flat sheet with the same density σ . That is, at the center of the hole at the top of the spherical shell in Fig. 1.39, the field from the shell equals the field from the infinite horizontal sheet shown. (This sheet could actually be located at any height.) Demonstrate this equality by explaining why the rings on the shell and sheet that are associated with the angle θ and angular width dθ yield the same field at the top of the shell. 1.26 Stable equilibrium in electron jelly ** The task of Exercise 1.77 is to find the equilibrium positions of two protons located inside a sphere of electron jelly with total charge −2e. Show that the equilibria are stable. That is, show that a displacement in any direction will result in a force directed back toward the equilibrium position. (There is no need to know the exact locations of the equilibria, so you can solve this problem without solving Exercise 1.77 first.) 1.27 Uniform field in a cavity ** A sphere has radius R1 and uniform volume charge density ρ. A spherical cavity with radius R2 is carved out at an arbitrary location inside the larger sphere. Show that the electric field inside the cavity is uniform (in both magnitude and direction). Hint: Find a vector expression for the field in the interior of a charged sphere, and then use superposition. What are the analogous statements for the lower-dimensional analogs with cylinders and slabs? Are the statements still true? 1.28 Average field on/in a sphere ** (a) A point charge q is located at an arbitrary position inside a sphere (just an imaginary sphere in space) with radius R. Show
Shell q
dq
Sheet
Figure 1.39.
46
Electrostatics: charges and fields
that the average electric field over the surface of the sphere is zero. Hint: Use an argument involving Newton’s third law, along with what you know about spherical shells. (b) If the point charge q is instead located outside the sphere, a distance r from the center, show that the average electric field over the surface of the sphere has magnitude q/4π 0 r. (c) Return to the case where the point charge q is located inside the sphere of radius R. Let the distance from the center be r. Use the above results to show that the average electric field over the entire volume of the sphere of radius R has magnitude qr/4π 0 R3 and points toward the center (if q is positive). 1.29 Pulling two sheets apart ** Two parallel sheets each have large area A and are separated by a small distance . The surface charge densities are σ and −σ . You wish to pull one of the sheets away from the other, by a small distance x. How much work does this require? Calculate this by: (a) using the relation W = (force) × (distance); (b) calculating the increase in energy stored in the electric field. Show that these two methods give the same result. 1.30 Force on a patch ** Consider a small patch of charge that is part of a larger surface. The surface charge density is σ . If E1 and E2 are the electric fields on either side of the patch, show that the force per unit area on the patch equals σ (E1 + E2 )/2. This is the result we derived in Section 1.14, for the case where the field is perpendicular to the surface. Derive it here by using the fact that the force on the patch is due to the field Eother from all the other charges in the system (excluding the patch), and then finding an expression for Eother in terms of E1 and E2 . 1.31 Decreasing energy? * A hollow spherical shell with radius R has charge Q uniformly distributed over it. The task of Problem 1.32 is to show that the energy stored in this system is Q2 /8π 0 R. (You can derive this here if you want, or you can just accept it for the purposes of this problem.) Now imagine taking all of the charge and concentrating it in two point charges Q/2 located at diametrically opposite positions on the shell. The energy of this new system is (Q/2)2 /4π 0 (2R) = Q2 /32π 0 R, which is less than the energy of the uniform spherical shell. Does this make sense? If not, where is the error in this reasoning?
Exercises
1.32 Energy of a shell ** A hollow spherical shell with radius R has charge Q uniformly distributed over it. Show that the energy stored in this system is Q2 /8π 0 R. Do this in two ways as follows. (a) Use Eq. (1.53) to find the energy stored in the electric field. (b) Imagine building up the shell by successively adding on infinitesimally thin shells with charge dq. Find the energy needed to add on a shell when the charge already there is q, and then integrate over q. 1.33 Deriving the energy density *** Consider the electric field of two protons a distance b apart. According to Eq. (1.53) (which we stated but did not prove), the potential energy of the system ought to be given by 0 0 2 E dv = (E1 + E2 )2 dv U= 2 2 0 0 (1.65) E21 dv + E22 dv + 0 E1 · E2 dv, = 2 2 where E1 is the field of one particle alone and E2 that of the other. The first of the three integrals on the right might be called the “electrical self-energy” of one proton; an intrinsic property of the particle, it depends on the proton’s size and structure. We have always disregarded it in reckoning the potential energy of a system of charges, on the assumption that it remains constant; the same goes for the second integral. The third integral involves the distance between the charges. Evaluate this integral. This is most easily done if you set it up in spherical polar coordinates with one of the protons at the origin and the other on the polar axis, and perform the integration over r before the integration over θ . Thus, by direct calculation, you can show that the third integral has the value e2 /4π 0 b, which we already know to be the work required to bring the two protons in from an infinite distance to positions a distance b apart. So you will have proved the correctness of Eq. (1.53) for this case, and by invoking superposition you can argue that Eq. (1.53) must then give the energy required to assemble any system of charges.
Exercises 1.34 Aircraft carriers and specks of gold * Imagine (quite unrealistically) removing one electron from every atom in a tiny cube of gold 1 mm on a side. (Never mind how you would hold the resulting positively charged cube together.) Do the same thing with another such cube a meter away. What is the repulsive force between the two cubes? How many aircraft carriers
47
48
Electrostatics: charges and fields
would you need in order to have their total weight equal this force? Some data: The density of gold is 19.3 g/cm3 , and its molecular weight is 197; that is, 1 mole (6.02 · 1023 ) of gold atoms has a mass of 197 grams. The mass of an aircraft carrier is around 100 million kilograms. 1.35 Balancing the weight * On the utterly unrealistic assumption that there are no other charged particles in the vicinity, at what distance below a proton would the upward force on an electron equal the electron’s weight? The mass of an electron is about 9 · 10−31 kg. 2.5 m
1.36 Repelling volley balls * Two volley balls, mass 0.3 kg each, tethered by nylon strings and charged with an electrostatic generator, hang as shown in Fig. 1.40. What is the charge on each, assuming the charges are equal? 1.37 Zero force at the corners ** (a) At each corner of a square is a particle with charge q. Fixed at the center of the square is a point charge of opposite sign, of magnitude Q. What value must Q have to make the total force on each of the four particles zero? (b) With Q taking on the value you just found, show that the potential energy of the system is zero, consistent with the result from Problem 1.6. 0.5 m
1.38 Oscillating on a line ** Two positive point charges Q are located at points (± , 0). A particle with positive charge q and mass m is initially located midway between them and is then given a tiny kick. If it is constrained to move along the line joining the two charges Q, show that it undergoes simple harmonic motion (for small oscillations), and find the frequency.
Figure 1.40.
q q Q
Q
q
Figure 1.41.
1.39 Rhombus of charges ** Four positively charged bodies, two with charge Q and two with charge q, are connected by four unstretchable strings of equal length. In the absence of external forces they assume the equilibrium configuration shown in Fig. 1.41. Show that tan3 θ = q2 /Q2 . This can be done in two ways. You could show that this relation must hold if the total force on each body, the vector sum of string tension and electrical repulsion, is zero. Or you could write out the expression for the energy U of the assembly (like Eq. (1.13) but for four charges instead of three) and minimize it. 1.40 Zero potential energy ** Find a geometrical arrangement of one proton and two electrons such that the potential energy of the system is exactly zero. How
Exercises
many such arrangements are there with the three particles on the same straight line? You should find that the ratio of two of the distances involved is the golden ratio. 1.41 Work for an octahedron ** Three protons and three electrons are to be placed at the vertices of a regular octahedron of edge length a. We want to find the energy of the system, that is, the work required to assemble it starting with the particles very far apart. There are two essentially different arrangements. What is the energy of each? 1.42 Potential energy in a one-dimensional crystal ** Calculate the potential energy, per ion, for an infinite 1D ionic crystal with separation a; that is, a row of equally spaced charges of magnitude e and alternating sign. Hint: The power-series expansion of ln(1 + x) may be of use. 1.43 Potential energy in a three-dimensional crystal ** In the spirit of Problem 1.7, use a computer to calculate numerically the potential energy, per ion, for an infinite 3D cubic ionic crystal with separation a. In other words, derive Eq. (1.18). 1.44 Chessboard ** An infinite chessboard with squares of side s has a charge e at the center of every white square and a charge −e at the center of every black square. We are interested in the work W required to transport one charge from its position on the board to an infinite distance from the board. Given that W is finite (which is plausible but not so easy to prove), do you think it is positive or negative? Calculate an approximate value for W by removing the charge from the central square of a 7 × 7 board. (Only nine different terms are involved in that sum.) For larger arrays you can write a program to compute the work numerically. This will give you some idea of the rate of convergence toward the value for the infinite array; see Problem 1.7. 1.45 Zero field? ** Four charges, q, −q, q, and −q, are located at equally spaced intervals on the x axis. Their x values are −3a, −a, a, and 3a, respectively. Does there exist a point on the y axis for which the electric field is zero? If so, find the y value. 1.46 Charges on a circular track ** Suppose three positively charged particles are constrained to move on a fixed circular track. If the charges were all equal, an equilibrium arrangement would obviously be a symmetrical one with the particles spaced 120◦ apart around the circle. Suppose that two
49
50
Electrostatics: charges and fields
of the charges are equal and the equilibrium arrangement is such that these two charges are 90◦ apart rather than 120◦ . What is the relative magnitude of the third charge? 1.47 Field from a semicircle * A thin plastic rod bent into a semicircle of radius R has a charge Q distributed uniformly over its length. Find the electric field at the center of the semicircle. 1.48 Maximum field from a ring ** A charge Q is distributed uniformly around a thin ring of radius b that lies in the xy plane with its center at the origin. Locate the point on the positive z axis where the electric field is strongest. y E
x
Figure 1.42.
1.49 Maximum field from a blob ** (a) A point charge is placed somewhere on the curve shown in Fig. 1.42. This point charge creates an electric field at the origin. Let Ey be the vertical component of this field. What shape (up to a scaling factor) should the curve take so that Ey is independent of the position of the point charge on the curve? (b) You have a moldable material with uniform volume charge density. What shape should the material take if you want to create the largest possible electric field at a given point in space? Be sure to explain your reasoning clearly. 1.50 Field from a hemisphere ** (a) What is the electric field at the center of a hollow hemispherical shell with radius R and uniform surface charge density σ ? (This is a special case of Problem 1.12, but you can solve the present exercise much more easily from scratch, without going through all the messy integrals of Problem 1.12.) (b) Use your result to show that the electric field at the center of a solid hemisphere with radius R and uniform volume charge density ρ equals ρR/40 . 1.51 N charges on a circle *** N point charges, each with charge Q/N, are evenly distributed around a circle of radius R. What is the electric field at the location of one of the charges, due to all the others? (You can leave your answer in the form of a sum.) In the N → ∞ limit, is the field infinite or finite? In the N → ∞ limit, is the force on one of the charges infinite or finite? 1.52 An equilateral triangle * Three positive charges, A, B, and C, of 3 · 10−6 , 2 · 10−6 , and 2 · 10−6 coulombs, respectively, are located at the corners of an equilateral triangle of side 0.2 m.
Exercises
(a) Find the magnitude in newtons of the force on each charge. (b) Find the magnitude in newtons/coulomb of the electric field at the center of the triangle.
51
axis
1.53 Concurrent field lines ** A semicircular wire with radius R has uniform charge density −λ. Show that at all points along the “axis” of the semicircle (the line through the center, perpendicular to the plane of the semicircle, as shown in Fig. 1.43), the vectors of the electric field all point toward a common point in the plane of the semicircle. Where is this point? 1.54 Semicircle and wires ** (a) Two long, thin parallel rods, a distance 2b apart, are joined by a semicircular piece of radius b, as shown in Fig. 1.44. Charge of uniform linear density λ is deposited along the whole filament. Show that the field E of this charge distribution vanishes at the point C. Do this by comparing the contribution of the element at A to that of the element at B which is defined by the same values of θ and dθ . (b) Consider the analogous two-dimensional setup involving a cylinder and a hemispherical end cap, with uniform surface charge density σ . Using the result from part (a), do you think that the field at the analogous point C is directed upward, downward, or is zero? (No calculations needed!) 1.55 Field from a finite rod ** A thin rod 10 cm long carries a total charge of 24 esu = 8 · 10−9 C uniformly distributed along its length. Find the strength of the electric field at each of the two points A and B located as shown in Fig. 1.45.
−l R
Figure 1.43. A dq q C
q
l dq
B
1.56 Flux through a cube * (a) A point charge q is located at the center of a cube of edge d.
What is the value of E · da over one face of the cube? (b) The charge q is moved to one corner of the cube. Now what is the value of the flux of E through each of the faces of the cube? (To make things well defined, treat the charge like a tiny sphere.)
2b
Figure 1.44.
1.57 Escaping field lines ** Charges 2q and −q are located on the x axis at x = 0 and x = a, respectively. (a) Find the point on the x axis where the electric field is zero, and make a rough sketch of some field lines. (b) You should find that some of the field lines that start on the 2q charge end up on the −q charge, while others head off to infinity. Consider the field lines that form the cutoff between these two cases. At what angle (with respect to the x axis) do
52
Electrostatics: charges and fields
10 cm
these lines leave the 2q charge? Hint: Draw a wisely chosen Gaussian surface that mainly follows these lines.
A
3 cm 5 cm
B
Figure 1.45.
1.58 Gauss’s law at the center of a ring ** (a) A ring with radius R has total charge Q uniformly distributed around it. To leading order, find the electric field at a point along the axis of the ring, a very small distance z from the center. (b) Consider a small cylinder centered at the center of the ring, with small radius r0 and small height 2z0 , with z0 lying on either side of the plane of the ring. There is no charge in this cylinder, so the net flux through it must be zero. Using a result given in the solution to Problem 1.8, verify that this is indeed the case (to leading order in the small distances involved). 1.59 Zero field inside a cylindrical shell * Consider a distribution of charge in the form of a hollow circular cylinder, like a long charged pipe. In the spirit of Problem 1.17, show that the electric field inside the pipe is zero. 1.60 Field from a hollow cylinder * Consider the hollow cylinder from Exercise 1.59. Use Gauss’s law to show that the field inside the pipe is zero. Also show that the field outside is the same as if the charge were all on the axis. Is either statement true for a pipe of square cross section on which the charge is distributed with uniform surface density? 1.61 Potential energy of a sphere ** A spherical volume of radius R is filled with charge of uniform density ρ. We want to know the potential energy U of this sphere of charge, that is, the work done in assembling it. In the example in Section 1.15, we calculated U by integrating the energy density of the electric field; the result was U = (3/5)Q2 /4π 0 R. Derive U here by building up the sphere layer by layer, making use of the fact that the field outside a spherical distribution of charge is the same as if all the charge were at the center. 1.62 Electron self-energy * At the beginning of the twentieth century the idea that the rest mass of the electron might have a purely electrical origin was very attractive, especially when the equivalence of energy and mass was revealed by special relativity. Imagine the electron as a ball of charge, of constant volume density out to some maximum radius r0 . Using the result of Exercise 1.61, set the potential energy of this system equal to mc2 and see what you get for r0 . One defect of the model is rather obvious: nothing is provided to hold the charge together!
Exercises
1.63 Sphere and cones ** (a) Consider a fixed hollow spherical shell with radius R and surface charge density σ . A particle with mass m and charge −q that is initially at rest falls in from infinity. What is its speed when it reaches the center of the shell? (Assume that a tiny hole has been cut in the shell, to let the charge through.) (b) Consider two fixed hollow conical shells (that is, ice cream cones without the ice cream) with base radius R, slant height L, and surface charge density σ , arranged as shown in Fig. 1.46. A particle with mass m and charge −q that is initially at rest falls in from infinity, along the perpendicular bisector line, as shown. What is its speed when it reaches the tip of the cones? You should find that your answer relates very nicely to your answer for part (a).
53
(a) R
R
(b)
L
1.64 Field between two wires * Consider a high-voltage direct current power line that consists of two parallel conductors suspended 3 meters apart. The lines are oppositely charged. If the electric field strength halfway between them is 15,000 N/C, how much excess positive charge resides on a 1 km length of the positive conductor? 1.65 Building a sheet from rods ** An infinite uniform sheet of charge can be thought of as consisting of an infinite number of adjacent uniformly charged rods. Using the fact that the electric field from an infinite rod is λ/2π 0 r, integrate over these rods to show that the field from an infinite sheet with charge density σ is σ/20 . 1.66 Force between two strips ** (a) The two strips of charge shown in Fig. 1.47 have width b, infinite height, and negligible thickness (in the direction perpendicular to the page). Their charge densities per unit area are ±σ . Find the magnitude of the electric field due to one of the strips, a distance x away from it (in the plane of the page). (b) Show that the force (per unit height) between the two strips equals σ 2 b(ln 2)/π0 . Note that this result is finite, even though you will find that the field due to a strip diverges as you get close to it.
Figure 1.46.
b
b
s
−s
1.67 Field from a cylindrical shell, right and wrong ** Find the electric field outside a uniformly charged hollow cylindrical shell with radius R and charge density σ , an infinitesimal distance away from it. Do this in the following way. (a) Slice the shell into parallel infinite rods, and integrate the field contributions from all the rods. You should obtain the incorrect result of σ/20 .
Figure 1.47.
54
Electrostatics: charges and fields
(b) Why isn’t the result correct? Explain how to modify it to obtain the correct result of σ/0 . Hint: You could very well have performed the above integral in an effort to obtain the electric field an infinitesimal distance inside the cylinder, where we know the field is zero. Does the above integration provide a good description of what’s going on for points on the shell that are very close to the point in question?
A
r
a
B
Figure 1.48.
s s
s
Figure 1.49.
1.68 Uniform field strength * We know from the example in Section 1.11 that the electric field inside a solid sphere with uniform charge density is proportional to r. Assume instead that the charge density is not uniform, but depends only on r. What should this dependence be so that the magnitude of the field at points inside the sphere is independent of r (except right at the center, where it isn’t well defined)? What should the dependence be in the analogous case where we have a cylinder instead of a sphere? 1.69 Carved-out sphere ** A sphere of radius a is filled with positive charge with uniform density ρ. Then a smaller sphere of radius a/2 is carved out, as shown in Fig. 1.48, and left empty. What are the direction and magnitude of the electric field at A? At B? 1.70 Field from two sheets * Two infinite plane sheets of surface charge, with densities 3σ0 and −2σ0 , are located a distance apart, parallel to one another. Discuss the electric field of this system. Now suppose the two planes, instead of being parallel, intersect at right angles. Show what the field is like in each of the four regions into which space is thereby divided.
d
1.71 Intersecting sheets ** (a) Figure 1.49 shows the cross section of three infinite sheets intersecting at equal angles. The sheets all have surface charge density σ . By adding up the fields from the sheets, find the electric field at all points in space. (b) Find the field instead by using Gauss’s law. You should explain clearly why Gauss’s law is in fact useful in this setup. (c) What is the field in the analogous setup where there are N sheets instead of three? What is your answer in the N → ∞ limit? This limit is related to the cylinder in Exercise 1.68.
Figure 1.50.
1.72 A plane and a slab ** An infinite plane has uniform surface charge density σ . Adjacent to it is an infinite parallel layer of charge of thickness d and uniform volume charge density ρ, as shown in Fig. 1.50. All charges are fixed. Find E everywhere.
r s
Exercises
55
1.73 Sphere in a cylinder ** An infinite cylinder with uniform volume charge density ρ has its axis lying along the z axis. A sphere is carved out of the cylinder and then filled up with a material with uniform density −ρ/2. Assume that the center of the sphere is located on the x axis at position x = a. Show that inside the sphere the component of the field in the xy plane is uniform, and find its value. Hint: The technique used in Problem 1.27 will be helpful. 1.74 Zero field in a sphere ** In Fig. 1.51 a sphere with radius R is centered at the origin, an infinite cylinder with radius R has its axis along the z axis, and an infinite slab with thickness 2R lies between the planes z = − R and z = R. The uniform volume densities of these objects are ρ1 , ρ2 , and ρ3 , respectively. The objects are superposed on top of each other; the densities add where the objects overlap. How should the three densities be related so that the electric field is zero everywhere throughout the volume of the sphere? Hint: Find a vector expression for the field inside each object, and then use superposition. 1.75 Ball in a sphere ** We know that if a point charge q is located at radius a in the interior of a sphere with radius R and uniform volume charge density ρ, then the force on the point charge is effectively due only to the charge that is located inside radius a. (a) Consider instead a uniform ball of charge located entirely inside a larger sphere of radius R. Let the ball’s radius be b, and let its center be located at radius a in the larger sphere. Its volume charge density is such that its total charge is q. Assume that the ball is superposed on top of the sphere, so that all of the sphere’s charge is still present. Can the force on the ball be obtained by treating it like a point charge and considering only the charge in the larger sphere that is inside radius a? (b) Would the force change if we instead remove the charge in the larger sphere where the ball is? So now we are looking at the force on the ball due to the sphere with a cavity carved out, which is a more realistic scenario. 1.76 Hydrogen atom ** The neutral hydrogen atom in its normal state behaves, in some respects, like an electric charge distribution that consists of a point charge of magnitude e surrounded by a distribution of negative charge whose density is given by ρ(r) = −Ce−2r/a0 . Here a0 is the Bohr radius, 0.53 · 10−10 m, and C is a constant with the value required to make the total amount of negative charge exactly e.
r2 Cylinder
R
R r1
Sphere
Figure 1.51.
r3 Slab
56
Electrostatics: charges and fields
What is the net electric charge inside a sphere of radius a0 ? What is the electric field strength at this distance from the nucleus? 1.77 Electron jelly ** Imagine a sphere of radius a filled with negative charge of uniform density, the total charge being equivalent to that of two electrons. Imbed in this jelly of negative charge two protons, and assume that, in spite of their presence, the negative charge distribution remains uniform. Where must the protons be located so that the force on each of them is zero? (This is a surprisingly realistic caricature of a hydrogen molecule; the magic that keeps the electron cloud in the molecule from collapsing around the protons is explained by quantum mechanics!)
Figure 1.52.
1.78 Hole in a shell ** Figure 1.52 shows a spherical shell of charge, of radius a and surface density Ďƒ , from which a small circular piece of radius b a has been removed. What is the direction and magnitude of the field at the midpoint of the aperture? There are two ways to get the answer. You can integrate over the remaining charge distribution to sum the contributions of all elements to the field at the point in question. Or, remembering the superposition principle, you can think about the effect of replacing the piece removed, which itself is practically a little disk. Note the connection of this result with our discussion of the force on a surface charge – perhaps that is a third way in which you might arrive at the answer. 1.79 Forces on three sheets ** Consider three charged sheets, A, B, and C. The sheets are parallel with A above B above C. On each sheet there is surface charge of uniform density: −4 ¡ 10−5 C/m2 on A, 7 ¡ 10−5 C/m2 on B, and −3 ¡ 10−5 C/m2 on C. (The density given includes charge on both sides of the sheet.) What is the magnitude of the electrical force per unit area on each sheet? Check to see that the total force per unit area on the three sheets is zero. 1.80 Force in a soap bubble ** Like the charged rubber balloon described at the end of Section 1.14, a charged soap bubble experiences an outward electrical force on every bit of its surface. Given the total charge Q on a bubble of radius R, what is the magnitude of the resultant force tending to pull any hemispherical half of the bubble away from the other half? (Should this force divided by 2Ď€ R exceed the surface tension of the soap film, interesting behavior might be expected!) 1.81 Energy around a sphere * A sphere of radius R has a charge Q distributed uniformly over its surface. How large a sphere contains 90 percent of the energy stored in the electrostatic field of this charge distribution?
Exercises
1.82 Energy of concentric shells * (a) Concentric spherical shells of radius a and b, with a < b, carry charge Q and −Q, respectively, each charge uniformly distributed. Find the energy stored in the electric field of this system. (b) Calculate the stored energy in a second way: start with two neutral shells, and then gradually transfer positive charge from the outer shell to the inner shell in a spherically symmetric manner. At an intermediate stage when there is charge q on the inner shell, find the work required to transfer an additional charge dq. And then integrate over q. 1.83 Potential energy of a cylinder ** Problem 1.24 gives one way of calculating the energy per unit length stored in a solid cylinder with radius a and uniform volume charge density Ď . Calculate the energy here by using Eq. (1.53) to find the total energy per unit length stored in the electric field. Don’t forget to include the field inside the cylinder. You will find that the energy is infinite, so instead calculate the energy relative to the configuration where all the charge is initially distributed uniformly over a hollow cylinder with large radius R. (The field outside radius R is the same in both configurations, so it can be ignored when calculating the relative energy.) In terms of the total charge Îť per unit length in the final cylinder, show that the energy per unit length can be written as (Îť2 /4Ď€ 0 ) 1/4+ln(R/a) .
57
2 The electric potential
Overview The first half of this chapter deals mainly with the potential associated with an electric field. The second half covers a number of mathematical topics that will be critical in our treatment of electromagnetism. The potential difference between two points is defined to be the negative line integral of the electric field. Equivalently, the electric field equals the negative gradient of the potential. Just as the electric field is the force per unit charge, the potential is the potential energy per unit charge. We give a number of examples involving the calculation of the potential due to a given charge distribution. One important example is the dipole, which consists of two equal and opposite charges. We will have much more to say about the applications of dipoles in Chapter 10. Turning to mathematics, we introduce the divergence, which gives a measure of the flux of a vector field out of a small volume. We prove Gauss’s theorem (or the divergence theorem) and then use it to write Gauss’s law in differential form. The result is the first of the four equations known as Maxwell’s equations (the subject of Chapter 9). We explicitly calculate the divergence in Cartesian coordinates. The divergence of the gradient is known as the Laplacian operator. Functions whose Laplacian equals zero have many important properties, one of which leads to Earnshaw’s theorem, which states that it is impossible to construct a stable electrostatic equilibrium in empty space. We introduce the curl, which gives a measure of the line integral of a vector field around a small closed curve. We prove Stokes’ theorem and explicitly calculate the curl in Cartesian coordinates. The conservative nature of a static electric
2.1 Line integral of the electric field
59
field implies that its curl is zero. See Appendix F for a discussion of the various vector operators in different coordinate systems.
P2
P2
P2
2.1 Line integral of the electric field
E
h
ds
Pa t
Suppose that E is the field of some stationary distribution of electric charges. Let P1 and P2 denote two points anywhere in the field. The line
P integral of E between the two points is P12 E · ds, taken along some path that runs from P1 to P2 , as shown in Fig. 2.1. This means: divide the chosen path into short segments, each segment being represented by a vector connecting its ends; take the scalar product of the path-segment vector with the field E at that place; add these products up for the whole path. The integral as usual is to be regarded as the limit of this sum as the segments are made shorter and more numerous without limit. Let’s consider the field of a point charge q and some paths running from point P1 to point P2 in that field. Two different paths are shown in Fig. 2.2. It is easy to compute the line integral of E along path A, which is made up of a radial segment running outward from P1 and an arc of
P1
P1
P1
Figure 2.1. Showing the division of the path into path elements ds. E
Path B
E
Path
A
ds
E
E E
P2
ds
ds
r r2
P1
r1
q
Figure 2.2. The electric field E is that of a positive point charge q. The line integral of E from P1 to P2 along path A has the value (q/4π 0 )(1/r1 − 1/r2 ). It will have exactly the same value if calculated for path B, or for any other path from P1 to P2 .
60
The electric potential
radius r2 . Along the radial segment of path A, E and ds are parallel, the magnitude of E is q/4π 0 r2 , and E · ds is simply (q/4π 0 r2 ) ds. Thus the line integral on that segment is
r2 r1
q dr q = 2 4π 0 4π 0 r
1 1 − r1 r2
.
(2.1)
The second leg of path A, the circular segment, gives zero because E is perpendicular to ds everywhere on that arc. The entire line integral is therefore
P2
E · ds =
P1
q 4π 0
1 1 − r1 r2
.
(2.2)
Now look at path B. Because E is radial with magnitude q/4π 0 r2 , E·ds = (q/4π 0 r2 ) dr even when ds is not radially oriented. The corresponding pieces of path A and path B indicated in the diagram make identical contributions to the integral. The part of path B that loops beyond r2 makes a net contribution of zero; contributions from corresponding outgoing and incoming parts cancel. For the entire line integral, path B will give the same result as path A. As there is nothing special about path B, Eq. (2.1) must hold for any path running from P1 to P2 . Here we have essentially repeated, in different language, the argument in Section 1.5, illustrated in Fig. 1.5, concerning the work done in moving one point charge near another. But now we are interested in the total electric field produced by any distribution of charges. One more step will bring us to an important conclusion. The line integral of the sum of fields equals the sum of the line integrals of the fields calculated separately. Or, stated more carefully, if E = E1 + E2 + · · · , then
P2 P1
E · ds =
P2
P1
E1 · ds +
P2
E2 · ds + · · · ,
(2.3)
P1
where the same path is used for all the integrations. Now any electrostatic field can be regarded as the sum of a number (possibly enormous) of point-charge fields, as expressed in Eq. (1.20) or Eq. (1.22). Therefore if the line integral from P1 to P2 is independent of path for each of the point-charge fields E1 , E2 , . . . , the total field E must have this property:
P The line integral P12 E · ds for any given electrostatic field E has the same value for all paths from P1 to P2 .
2.2 Potential difference and the potential function
The points P2 and P1 may coincide. In that case the paths are all closed curves, among them paths of vanishing length. This leads to the following corollary: The line integral field is zero.
E · ds around any closed path in an electrostatic
By electrostatic field we mean, strictly speaking, the electric field of stationary charges. Later on, we shall encounter electric fields in which the line integral is not path-independent. Those fields will usually be associated with rapidly moving charges. For our present purposes we can say that, if the source charges are moving slowly enough, the field
E will be such that E · ds is practically
path-independent. Of course, if E itself is varying in time, the E in E · ds must be understood as the field that exists over the whole path at a given instant of time. With that understanding we can talk meaningfully about the line integral in a changing electrostatic field.
2.2 Potential difference and the potential function Because the line integral in the electrostatic field is path-independent, we can use it to define a scalar quantity φ21 , without specifying any particular path: φ21 = −
P2
E · ds.
(2.4)
P1
With the minus sign included here, φ21 is the work per unit charge done by an external agency in moving a positive charge from P1 to P2 in the field E. (The external agency must supply a force Fext = −qE to balance the electrical force Felec = qE; hence the minus sign.) Thus φ21 is a single-valued scalar function of the two positions P1 and P2 . We call it the electric potential difference between the two points. In our SI system of units, potential difference is measured in joule/ coulomb. This unit has a name of its own, the volt: joule . (2.5) coulomb One joule of work is required to move a charge of one coulomb through a potential difference of one volt. In the Gaussian system of units, potential difference is measured in erg/esu. This unit also has a name of its own, the statvolt (“stat” comes from “electrostatic”). As an exercise, you can use the 1 C ≈ 3 · 109 esu relation from Section 1.4 to show that one volt is equivalent to approximately 1/300 statvolt. These two relations are accurate to better than 0.1 percent, thanks to the accident that c is that 1 volt = 1
61
62
The electric potential close to 3 · 108 m/s. Appendix C derives the conversion factors between all of the corresponding units in the SI and Gaussian systems. Further discussion of the exact relations between SI and Gaussian electrical units is given in Appendix E, which takes into account the definition of the meter in terms of the speed of light. Suppose we hold P1 fixed at some reference position. Then φ21 becomes a function of P2 only, that is, a function of the spatial coordinates x, y, z. We can write it simply φ(x, y, z), without the subscript, if we remember that its definition still involves agreement on a reference point P1 . We can say that φ is the potential associated with the vector field E. It is a scalar function of position, or a scalar field (they mean the same thing). Its value at a point is simply a number (in units of work per unit charge) and has no direction associated with it. Once the vector field E is given, the potential function φ is determined, except for an arbitrary additive constant allowed by the arbitrariness in our choice of P1 . Example Find the potential associated with the electric field described in Fig. 2.3, the components of which are Ex = Ky, Ey = Kx, Ez = 0, with K a constant. This is a possible electrostatic field; we will see why in Section 2.17. Some field lines are shown. Solution Since Ez = 0, the potential will be independent of z and we need consider only the xy plane. Let x1 , y1 be the coordinates of P1 , and x2 , y2 the coordinates of P2 . It is convenient to locate P1 at the origin: x1 = 0, y1 = 0. To evaluate − E · ds from this reference point to a general point (x2 , y2 ) it is easiest to use a path like the dashed path ABC in Fig. 2.3: (x2 ,y2 ) (x2 ,0) (x2 ,y2 ) E · ds = − Ex dx − Ey dy. (2.6) φ(x2 , y2 ) = −
y
(0,0)
C
2
(0,0)
(x2 ,0)
The first of the two integrals on the right is zero because Ex is zero along the x axis. The second integration is carried out at constant x, with Ey = Kx2 : (x2 ,y2 ) y2 − Ey dy = − Kx2 dy = −Kx2 y2 . (2.7) (x2 ,0)
1
0
There was nothing special about the point (x2 , y2 ) so we can drop the subscripts: A
−1
B 1
2
φ(x, y) = −Kxy x
(2.8)
for any point (x, y) in this field, with zero potential at the origin. Any constant could be added to this. That would only mean that the reference point to which zero potential is assigned had been located somewhere else.
Ex = Ky Ey = Kx
Figure 2.3. A particular path, ABC, in the electric field Ex = Ky, Ey = Kx. Some field lines are shown.
Example (Potential due to a uniform sphere) A sphere has radius R and uniform volume charge density ρ. Use the results from the example in Section 1.11 to find the potential for all values of r, both inside and outside the sphere. Take the reference point P1 to be infinitely far away.
2.3 Gradient of a scalar function
63
Solution From the example in Section 1.11, the magnitude of the (radial) electric field inside the sphere is E(r) = ρr/30 , and the magnitude outside is E(r) = ρR3 /30 r2 . Equation (2.4) tells us that the potential equals the negative of the line integral of the field, from P1 (which we are taking to be at infinity) down to a given radius r. The potential outside the sphere is therefore r r 3 ρR3
= ρR . (2.9) E(r ) dr = − dr φout (r) = − 30 r ∞ ∞ 30 r 2 In terms of the total charge in the sphere, Q = (4π R3 /3)ρ, this potential is simply φout (r) = Q/4π 0 r. This is as expected, because we already knew that the potential energy of a charge q due to the sphere is qQ/4π 0 r. And the potential φ equals the potential energy per unit charge. To find the potential inside the sphere, we must break the integral into two pieces: R r R r
ρR3 ρr
− E(r ) dr − E(r ) dr = − dr dr
φin (r) = −
2 ∞ R ∞ 30 r R 30 ρ 2 ρR3 ρR2 ρr2 − = (r − R2 ) = − . 30 R 60 20 60
(2.10)
Note that Eqs. (2.9) and (2.10) yield the same value of φ at the surface of the sphere, namely φ(R) = ρR2 /30 . So φ is continuous across the surface, as it should be. (The field is everywhere finite, so the line integral over an infinitesimal interval must yield an infinitesimal result.) The slope of φ is also continuous, because E(r) (which is the negative derivative of φ, because φ is the negative integral of E) is continuous. A plot of φ(r) is shown in Fig. 2.4. The potential at the center of the sphere is φ(0) = ρR2 /20 , which is 3/2 times the value at the surface. So if you bring a charge in from infinity, it takes 2/3 of your work to reach the surface, and then 1/3 to go the extra distance of R to the center.
We must be careful not to confuse the potential φ associated with a given field E with the potential energy of a system of charges. The potential energy of a system of charges is the total work required to assemble it, starting with all the charges far apart. In Eq. (1.14), for example, we expressed U, the potential energy of the charge system in Fig. 1.6. The electric potential φ(x, y, z) associated with the field in Fig. 1.6 would be the work per unit charge required to move a unit positive test charge from some chosen reference point to the point (x, y, z) in the field of that structure of nine charges.
2.3 Gradient of a scalar function Given the electric field, we can find the electric potential function. But we can also proceed in the other direction; from the potential we can derive the field. It appears from Eq. (2.4) that the field is in some sense the derivative of the potential function. To make this idea precise we introduce the gradient of a scalar function of position. Let f (x, y, z) be
f(r) rR 2 2 0
a − br 2
rR 2 3 0 cr R
r
Figure 2.4. The potential due to a uniform sphere of charge.
64
The electric potential
(a)
some continuous, differentiable function of the coordinates. With its partial derivatives ∂f /∂x, ∂f /∂y, and ∂f /∂z we can construct at every point in space a vector, the vector whose x, y, z components are equal to the respective partial derivatives.1 This vector we call the gradient of f , written “grad f ,” or ∇f :
f(x, y)
y
∇f ≡ xˆ
(x1, y1)
Direction of steepest slope
x (b)
y
(x1, y1)
x
Figure 2.5. The scalar function f (x, y) is represented by the surface in (a). The arrows in (b) represent the vector function, grad f .
∂f ∂f ∂f + yˆ + zˆ . ∂x ∂y ∂z
(2.13)
∇f is a vector that tells how the function f varies in the neighborhood of a point. Its x component is the partial derivative of f with respect to x, a measure of the rate of change of f as we move in the x direction. The direction of the vector ∇f at any point is the direction in which one must move from that point to find the most rapid increase in the function f . Suppose we were dealing with a function of two variables only, x and y, so that the function could be represented by a surface in three dimensions. Standing on that surface at some point, we see the surface rising in some direction, sloping downward in the opposite direction. There is a direction in which a short step will take us higher than a step of the same length in any other direction. The gradient of the function is a vector in that direction of steepest ascent, and its magnitude is the slope measured in that direction. Figure 2.5 may help you to visualize this. Suppose some particular function of two coordinates x and y is represented by the surface f (x, y) sketched in Fig. 2.5(a). At the location (x1 , y1 ) the surface rises most steeply in a direction that makes an angle of about 80◦ with the positive x direction. The gradient of f (x, y), ∇f , is a vector function of x and y. Its character is suggested in Fig. 2.5(b) by a number of vectors at various points in the two-dimensional space, including the point (x1 , y1 ). The vector function ∇f defined in Eq. (2.13) is simply an extension of this idea to three-dimensional space. (Be careful not to confuse Fig. 2.5(a) with real three-dimensional xyz space; the third coordinate there is the value of the function f (x, y).) As one example of a function in three-dimensional space, suppose f is a function of r only, where r is the distance from some fixed point O. On a sphere of radius r0 centered about O, f = f (r0 ) is constant. On a slightly larger sphere of radius r0 + dr it is also constant, with the value f = f (r0 + dr). If we want to make the change from f (r0 ) to f (r0 + dr), 1 We remind the reader that a partial derivative with respect to x, of a function of x, y, z,
written simply ∂f /∂x, means the rate of change of the function with respect to x with the other variables y and z held constant. More precisely, f (x + x, y, z) − f (x, y, z) ∂f = lim . ∂x x→0 x
(2.11)
As an example, if f = x2 yz3 , ∂f = 2xyz3 , ∂x
∂f = x2 z3 , ∂y
∂f = 3x2 yz2 . ∂z
(2.12)
2.5 Potential of a charge distribution
the shortest step we can make is to go radially (as from A to B) rather than from A to C, in Fig. 2.6. The “slope” of f is thus greatest in the radial direction, so ∇f at any point is a radially pointing vector. In fact ∇f = rˆ (df /dr) in this case, rˆ denoting, for any point, a unit vector in the radial direction. See Section F.2 in Appendix F for further discussion of the gradient.
65
B C
A
r0
2.4 Derivation of the field from the potential
O
It is now easy to see that the relation of the scalar function f to the vector function ∇f is the same, except for a minus sign, as the relation of the potential φ to the field E. Consider the value of φ at two nearby points, (x, y, z) and (x + dx, y + dy, z + dz). The change in φ, going from the first point to the second, is, in first-order approximation, dφ =
∂φ ∂φ ∂φ dx + dy + dz. ∂x ∂y ∂z
(2.15)
The infinitesimal vector displacement ds is just xˆ dx + yˆ dy + zˆ dz. Thus if we identify E with −∇φ, where ∇φ is defined via Eq. (2.13), then Eqs. (2.14) and (2.15) become identical. So the electric field is the negative of the gradient of the potential: E = −∇φ
dr
(2.14)
On the other hand, from the definition of φ in Eq. (2.4), the change can also be expressed as dφ = −E · ds.
r0+
(2.16)
The minus sign came in because the electric field points from a region of greater potential toward a region of lesser potential, whereas the vector ∇φ is defined so that it points in the direction of increasing φ. To show how this works, we go back to the example of the field in Fig. 2.3. From the potential given by Eq. (2.8), φ = −Kxy, we can recover the electric field we started with: ∂ ∂ + yˆ (−Kxy) = K(ˆxy + yˆ x). (2.17) E = −∇(−Kxy) = − xˆ ∂x ∂y
2.5 Potential of a charge distribution We already know the potential that goes with a single point charge, because we calculated the work required to bring one charge into the neighborhood of another in Eq. (1.9). The potential at any point, in the field of an isolated point charge q, is just q/4π 0 r, where r is the distance
Figure 2.6. The shortest step for a given change in f is the radial step AB, if f is a function of r only.
66
The electric potential
z “Field” point (x, y, z) r
dx, dy, dz
(x, y, z)
Charge distribution
y
from the point in question to the source q, and where we have assigned zero potential to points infinitely far from the source. Superposition must work for potentials as well as fields. If we have several sources, the potential function is simply the sum of the potential functions that we would have for each of the sources present alone – providing we make a consistent assignment of the zero of potential in each case. If all the sources are contained in some finite region, it is always possible, and usually the simplest choice, to put zero potential at infinite distance. If we adopt this rule, the potential of any charge distribution can be specified by the integral ρ(x , y , z ) dx dy dz
, (2.18) φ(x, y, z) = all 4π 0 r sources
x x x
Figure 2.7. Each element of the charge distribution ρ(x , y , z ) contributes to the potential φ at the point (x, y, z). The potential at this point is the sum of all such contributions; see Eq. (2.18).
where r is the distance from the volume element dx dy dz to the point (x, y, z) at which the potential is being evaluated (Fig. 2.7). That is, r = [(x − x )2 + (y − y )2 + (z − z )2 ]1/2 . Notice the difference between this and the integral giving the electric field of a charge distribution; see Eq. (1.22). Here we have r in the denominator, not r2 , and the integral is a scalar not a vector. From the scalar potential function φ(x, y, z) we can always find the electric field by taking the negative gradient of φ, according to Eq. (2.16). In the case of a discrete distribution of source charges, the above integral is replaced by a sum over all the charges, indexed by i: φ(x, y, z) =
all sources
qi , 4π 0 r
(2.19)
where r is the distance from the charge qi to the point (x, y, z). Example (Potential of two point charges) Consider a very simple example, the potential of the two point charges shown in Fig. 2.8. A positive charge of 12 μC is located 3 m away from a negative charge, −6 μC. (The “μ” prefix stands for “micro,” or 10−6 .) The potential at any point in space is the sum of the potentials due to each charge alone. The potentials for some selected points in space are given in the diagram. No vector addition is involved here, only the algebraic addition of scalar quantities. For instance, at the point on the far right, which is 6 m from the positive charge and 5 m from the negative charge, the potential has the value 0.8 · 10−6 C/m 12 · 10−6 C −6 · 10−6 C 1 + = 4π 0 6m 5m 4π 0 = 7.2 · 103 J/C = 7.2 · 103 V,
(2.20)
where we have used 1/4π 0 ≈ 9 · 109 N m2 /C2 (and also 1 N m = 1 J). The potential approaches zero at infinite distance. It would take 7.2 · 103 J of work
2.5 Potential of a charge distribution
67
6m
Charge −6 C
3m
f=0
f=0
3m
−8 4p 0
3m
3m
f=
2m
1m
4m
0.5
5m
f = +0.8 4p 0
6m
f = +10 4p 0
Charge +12 C
to bring a unit positive charge in from infinity to a point where φ = 7.2 · 103 V. Note that two of the points shown on the diagram have φ = 0. The net work done in bringing in any charge to one of these points would be zero. You can see that there must be an infinite number of such points, forming a surface in space surrounding the negative charge. In fact, the locus of points with any particular value of φ is a surface – an equipotential surface – which would show on our two-dimensional diagram as a curve.
There is one restriction on the use of Eq. (2.18): it may not work unless all sources are confined to some finite region of space. A simple example of the difficulty that arises with charges distributed out to infinite distance is found in the long charged wire whose field E we studied in Section 1.12. If we attempt to carry out the integration over the charge distribution indicated in Eq. (2.18), we find that the integral diverges – we get an infinite result. No such difficulty arose in finding the electric field of the infinitely long wire, because the contributions of elements of the line charge to the field decrease so rapidly with distance. Evidently we had better locate the zero of potential somewhere close to home, in a system that has charges distributed out to infinity. Then it is simply a matter of calculating the difference in potential φ21 , between the general point (x, y, z) and the selected reference point, using the fundamental relation, Eq. (2.4).
Example (Potential of a long charged wire) To see how this goes in the case of the infinitely long charged wire, let us arbitrarily locate the reference point P1 at a distance r1 from the wire. Then to carry a charge from P1 to
Figure 2.8. The electric potential φ at various points in a system of two point charges. φ goes to zero at infinite distance and is given in units of volts, or joules per coulomb.
68
The electric potential
any other point P2 at distance r2 requires the work per unit charge, using Eq. (1.39): P2 r2 Îť dr E ¡ ds = − φ21 = − 2Ď€ 0 r P1 r1 Îť Îť ln r2 + ln r1 . (2.21) =− 2Ď€ 0 2Ď€ 0 This shows that the electric potential for the charged wire can be taken as φ=−
Îť ln r + constant. 2Ď€ 0
(2.22)
The constant, (Îť/2Ď€ 0 ) ln r1 in this case, has no effect when we take −grad φ to get back to the field E. In this case, E = âˆ’âˆ‡Ď† = −ˆr
Νˆr dφ = . dr 2π 0 r
(2.23)
2.6 Uniformly charged disk Let us now study the electric potential and field around a uniformly charged disk. This is a charge distribution like that discussed in Section 1.13, except that it has a limited extent. The flat disk of radius a in Fig. 2.9 carries a positive charge spread over its surface with the constant density Ďƒ , in C/m2 . (This is a single sheet of charge of infinitesimal thickness, not two layers of charge, one on each side. That is, the total charge in the system is Ď€ a2 Ďƒ .) We shall often meet surface charge distributions in the future, especially on metallic conductors. However, the object just described is not a conductor; if it were, as we shall soon see, the charge could not remain uniformly distributed but would redistribute itself, crowding more toward the rim of the disk. What we have is an insulating disk, like a sheet of plastic, upon which charge has been “sprayedâ€? so that every square meter of the disk has received, and holds fixed, the same amount of charge.
z
ds
a
s P2 x
(0, y, 0)
s (C/m2)
P1 y
Figure 2.9. Finding the potential at a point P1 on the axis of a uniformly charged disk.
Example (Potential on the axis) Let us find the potential due to our uniformly charged disk, at some point P1 on the axis of symmetry, which we have made the y axis. All charge elements in a thin, ring-shaped segment of the disk lie at the same distance from P1 . If s denotes the radius of such an annular segment and ds is its width, its area is 2Ď€ s ds. The amount of charge it contains, dq, is therefore dq = Ďƒ 2Ď€sds. Since all parts of this ring are the same distance away 2 , the contribution of the ring to the potential at from P1 , namely, r = y2 + s P1 is dq/4Ď€ 0 r = Ďƒ s ds 20 y2 + s2 . To get the potential due to the whole disk, we have to integrate over all such rings: a a Ďƒ Ďƒ s ds dq = = y2 + s2 . (2.24) φ(0, y, 0) = 2 2 4Ď€ 0 r 2 0 20 y + s 0 0
2.6 Uniformly charged disk
69
Putting in the limits, we obtain φ(0, y, 0) =
σ 20
y2 + a2 − y
for y > 0.
(2.25)
A minor point deserves a comment. The result we have written down in Eq. (2.25) holds for all points on the positive y axis. It is obvious from the physical symmetry of the system (there is no difference between one face of the disk and the other) that the potential must have the same value for negative and positive y, and this is reflected in Eq. (2.24), where only y2 appears. But in writing Eq. (2.25) we made a choice of sign in taking the square root of y2 , with the consequence that it holds only for positive y. The correct expression for y < 0 is obtained by the other choice of root and is given by σ y2 + a2 + y for y < 0. (2.26) φ(0, y, 0) = 20 In view of this, we should not be surprised to find a kink in the plot of φ(0, y, 0) at y = 0. Indeed, the function has an abrupt change of slope there, as we see in Fig. 2.10, where we have plotted as a function of y the potential on the axis. The potential at the center of the disk is φ(0, 0, 0) =
σa . 20
(2.27)
This much work would be required to bring a unit positive charge in from infinity, by any route, and leave it sitting at the center of the disk. The behavior of φ(0, y, 0) for very large y is interesting. For y a we can approximate Eq. (2.25) as follows: ⎡ ⎤
2 1/2 a a2 1 a2 2 2 ⎣ ⎦ 1+ 2 + · · · − 1 ≈ . −1 =y 1+ y +a −y=y 2 y2 2y y (2.28)
f
a2s 4 0y
f on axis
−2a
−a
0
a
2a
y
Figure 2.10. A graph of the potential on the axis. The dashed curve is the potential of a point charge q = π a2 σ .
70
The electric potential
Hence φ(0, y, 0) ≈
a2 σ 40 y
for y a.
(2.29)
Now π a2 σ is the total charge q on the disk, and Eq. (2.29), which can be written as π a2 σ/4π 0 y, is just the expression for the potential due to a point charge of this magnitude. As we should expect, at a considerable distance from the disk (relative to its diameter), it doesn’t matter much how the charge is shaped; only the total charge matters, in first approximation. In Fig. 2.10 we have drawn, as a dashed curve, the function a2 σ/40 y. You can see that the axial potential function approaches its asymptotic form pretty quickly.
It is not quite so easy to derive the potential for general points away from the axis of symmetry, because the definite integral isn’t so simple. It proves to be something called an elliptic integral. These functions are well known and tabulated, but there is no point in pursuing here mathematical details peculiar to a special problem. However, one further calculation, which is easy enough, may be instructive.
Example (Potential on the rim) We can find the potential at a point on the very edge of the disk, such as P2 in Fig. 2.11. To calculate the potential at P2 we can consider first the thin wedge of length R and angular width dθ, as shown. An element of the wedge, the black patch at distance r from P2 , contains an amount of charge dq = σ r dθ dr. Its contribution to the potential at P2 is therefore dq/4π 0 r = σ dθ dr/4π 0 . The contribution of the entire wedge is then R (σ dθ/4π 0 ) dr = (σ R/4π 0 ) dθ. Now R is 2a cos θ, from the geometry of
R
0
the right triangle, and the whole disk is swept out as θ ranges from −π/2 to π/2. Thus we find the potential at P2 :
dr dq q
φ=
r P2 a s
Figure 2.11. Finding the potential at a point P2 on the rim of a uniformly charged disk.
π/2 σa σa cos θ dθ = . 2π 0 −π/2 π 0
(2.30)
Comparing this with the potential at the center of the disk, σ a/20 , we see that, as we should expect, the potential falls off from the center to the edge of the disk. The electric field, therefore, must have an outward component in the plane of the disk. That is why we remarked earlier that the charge, if free to move, would redistribute itself toward the rim. To put it another way, our uniformly charged disk is not a surface of constant potential, which any conducting surface must be unless charge is moving.2
2 The fact that conducting surfaces have to be equipotentials will be discussed
thoroughly in Chapter 3.
2.6 Uniformly charged disk Let us now examine the electric field due to the disk. For y > 0, the field on the symmetry axis can be computed directly from the potential function given in Eq. (2.25): âˆ‚Ď† d Ďƒ 2 2 y +a −y =− Ey = − ∂y dy 20
Ďƒ y = 1− y > 0. (2.31) 20 y2 + a2 To be sure, it is not hard to compute Ey directly from the charge distribution, for points on the axis. We can again slice the disk into concentric rings, as we did prior to Eq. (2.24). But we must remember that E is a vector and that only the y component survives in the present setup, whereas we did not need to worry about components when calculating the scalar function φ above. As y approaches zero from the positive side, Ey approaches Ďƒ/20 . On the negative y side of the disk, which we shall call the back, E points in the other direction and its y component Ey is âˆ’Ďƒ/20 . This is the same as the field of an infinite sheet of charge of density Ďƒ , derived in Section 1.13. It ought to be, for at points close to the center of the disk, the presence or absence of charge out beyond the rim can’t make much difference. In other words, any sheet looks infinite if viewed from close up. Indeed, Ey has the value Ďƒ/20 not only at the center, but also all over the disk. For large y, we can find an approximate expression for Ey by using a Taylor series approximation as we did in Eq. (2.28). You can show that Ey approaches a2 Ďƒ/40 y2 , which can be written as Ď€a2 Ďƒ/4Ď€ 0 y2 . This is correctly the field due to a point charge with magnitude Ď€ a2 Ďƒ . In Fig. 2.12 we show some field lines for this system and also, plotted as dashed curves, the intersections on the yz plane of the surfaces of constant potential. Near the center of the disk these are lens-like surfaces, while at distances much greater than a they approach the spherical form of equipotential surfaces around a point charge. Figure 2.12 illustrates a general property of field lines and equipotential surfaces. A field line through any point and the equipotential surface through that point are perpendicular to one another, just as, on a contour map of hilly terrain, the slope is steepest at right angles to a contour of constant elevation. This must be so, because if the field at any point had a component parallel to the equipotential surface through that point, it would require work to move a test charge along a constant-potential surface. The energy associated with this electric field could be expressed as the integral over all space of (0 /2)E2 dv. It is equal to the work done in assembling this distribution, starting with infinitesimal charges far apart. In this particular example, as Exercise 2.56 will demonstrate, that work
71
72
The electric potential
ace Surf
of constant potentia l
e
d
el Fi
lin
y
Figure 2.12. The electric field of the uniformly charged disk. Solid curves are field lines. Dashed curves are intersections, with the plane of the figure, of surfaces of constant potential.
is not hard to calculate directly if we know the potential at the rim of a uniformly charged disk. There is a general relation between the work U required to assemble a charge distribution ρ(x, y, z) and the potential φ(x, y, z) of that distribution: U=
1 2
ρφ dv
(2.32)
Equation (1.15), which gives the energy of a system of discrete point charges, could have been written in this way: 1 1 qk qj . 2 4π 0 rjk N
U=
j=1
(2.33)
k=j
The second sum is the potential at the location of the jth charge, due to all the other charges. To adapt this to a continuous distribution we merely
2.7 Dipoles
73 y
replace qj with ρ dv and the sum over j by an integral, thus obtaining Eq. (2.32).
q
2.7 Dipoles
/2
Consider a setup with two equal and opposite charges ±q located at positions ± /2 on the y axis, as shown in Fig. 2.13. This configuration is called a dipole. The purpose of this section is to introduce the basics of dipoles. We save further discussion for Chapter 10, where we define the word “dipole” more precisely, derive things in more generality, and discuss examples of dipoles in actual matter. For now we just concentrate on determining the electric field and potential of a dipole. We have all of the necessary machinery at our disposal, so let’s see what we can find. We will restrict the treatment to points far away from the dipole (that is, points with r ). Although it is easy enough to write down an exact expression for the potential φ (and hence the field E = −∇φ) at any position, the result isn’t very enlightening. But when we work in the approximation of large distances, we obtain a result that, although isn’t exactly correct, is in fact quite enlightening. That’s how approximations work – you trade a little bit of precision for a large amount of clarity. Our strategy will be to find the potential φ in polar (actually spherical) coordinates, and then take the gradient to find the electric field E. We then determine the shape of the field-line and constant-potential curves. To make things look a little cleaner in the calculations below, we write 1/4π 0 as k in some intermediate steps.
First note that, since the dipole setup is rotationally symmetric around the line containing the two charges, it suffices to find the potential in an arbitrary plane containing this line. We will use spherical coordinates, which reduce to polar coordinates in a plane because the angle φ doesn’t come into play (but note that θ is measured down from the vertical axis). Consider a point P with coordinates (r, θ ), as shown in Fig. 2.14. Let r1 and r2 be the distances from P to the two charges. Then the exact expression for the potential at P is (with k ≡ 1/4π 0 ) kq kq − . r1 r2
/2
−q
Figure 2.13. Two equal and opposite charges form a dipole. P
r1 r q r2 /2
q
/2
−q
2.7.1 Calculation of φ and E
φP =
x
Figure 2.14. Finding the potential φ at point P. r1 ( /2) cos q P to
q
r
(2.34)
If desired, the law of cosines can be used to write r1 and r2 in terms of r, θ , and . Let us now derive an approximate form of this result, valid in the r limit. One way to do this is to use the law-of-cosines expressions for r1 and r2 ; this is the route we will take in Chapter 10. But for the present purposes a simpler method suffices. In the r limit, a closeup view of the dipole is shown in Fig. 2.15. The two lines from the charges to P are essentially parallel, so we see from the figure that the lengths of
r2 /2 q −q
( /2) cos q
Figure 2.15. Closeup view of Fig. 2.14.
74
The electric potential these lines are essentially r1 = r − ( /2) cos θ and r2 = r + ( /2) cos θ . Using the approximation 1/(1 ± ) ≈ 1 ∓ , Eq. (2.34) becomes ⎡ ⎤ 1 kq kq ⎢ 1 kq ⎥ − = − ⎣
cos θ
cos θ
cos θ
cos θ ⎦ r r− r+ 1− 1+ 2r 2 2 2r kq
cos θ
cos θ ≈ 1+ − 1− r 2r 2r
φ(r, θ ) =
=
−q
q
Figure 2.16. Two possible kinds of quadrupoles.
kq cos θ ≡ r2
q cos θ 4π 0 r2
p cos θ , 4π 0 r2
(2.35)
where p ≡ q is called the dipole moment. There are three important things to note about this result. First, φ(r, θ ) depends on q and only through their product, p ≡ q . This means that if we make q ten times larger and ten times smaller, the potential at a given point P stays the same (at least in the r approximation). An idealized dipole or point dipole is one where → 0 and q → ∞, with the product p = q taking on a particular finite value. In the other extreme, if we make q smaller and proportionally larger, the potential at P again stays the same. Of course, if we make too large, our r assumption eventually breaks down. Second, φ(r, θ ) is proportional to 1/r2 , in contrast with the 1/r dependence for a point-charge potential. We will see below that the present 1/r2 dependence in φ(r, θ ) leads to an E field that falls off like 1/r3 , in contrast with the 1/r2 dependence for a point-charge field. It makes sense that the potential (and field) falls off faster for a dipole, because the potentials from the two opposite point charges nearly cancel. The dipole potential is somewhat like the derivative of the point-charge potential, in that we are taking the difference of two nearby values. Third, there is angular dependence in φ(r, θ ), in contrast with the point-charge potential. This is expected, in view of the fact that the dipole has a preferred direction along the line joining the charges, whereas a point charge has no preferred direction. We will see in Chapter 10 that the q/r point-charge (or monopole) potential and the q /r2 dipole potential (just looking at the r dependence) are the first two pieces of what is called the multipole expansion. A general charge distribution also has a quadrupole term in the potential that goes like q 2 /r3 (where is some length scale of the system), and an octupole term that goes like q 3 /r4 , and so on. These pieces have more complicated angular dependences. Two examples of quadrupole arrangements are shown in Fig. 2.16. A quadrupole is formed by placing two oppositely charged dipoles near each other, just as a dipole is formed by placing two oppositely charged monopoles near each other. The various terms in the expansion are called the moments of the distribution.
2.7 Dipoles
Even the simple system of the dipole shown in Fig. 2.13 has higher terms in its multipole expansion. If you keep additional terms in the 1/(1 Âą ) Taylor series in Eq. (2.35), you will find that the quadrupole term is zero, but the octupole term is nonzero. It is easy to see that the terms with even powers of r are nonzero. However, in the limit of an idealized dipole ( → 0 and q → ∞, with q fixed), only the dipole potential survives, because the higher-order terms are suppressed by additional powers of /r. Along the same lines, we can back up a step in the expansion and consider the monopole term. If an object has a nonzero net charge (note that our dipole does not), then the monopole potential, q/r, dominates, and all higher-order terms are comparatively negligible in the r limit. The distribution of charge in an object determines which of the terms in the expansion is the first nonzero one, and it is this term that determines the potential (and hence field) at large distances. We label the object according to the first nonzero term; see Fig. 2.17. Let’s now find the electric field, E = âˆ’âˆ‡Ď†, associated with the dipole potential in Eq. (2.35). In spherical coordinates (which reduce to polar coordinates in this discussion) the gradient of φ is âˆ‡Ď† = rˆ (âˆ‚Ď†/∂r) + θˆ(1/r)(âˆ‚Ď†/∂θ ); see Appendix F. So the electric field is ∂ E(r, θ ) = −ˆr ∂r =
≥
≥
kq cos θ r2
1 ∂ − θˆ r ∂θ
kq cos θ r2
75
Monopole
q
−q Dipole
Quadrupole
kq 2 cos θ rˆ + sin θ θˆ 3 r q 2 cos θ rˆ + sin θ θˆ 3 4π 0 r p 2 cos θ rˆ + sin θ θˆ . 3 4π 0 r
Octupole
Figure 2.17. Examples of different objects in the multipole expansion.
(2.36)
A few field lines are shown in Fig. 2.18. Let’s look at some special cases for θ. Equation (2.36) says that E points in the positive radial direction for θ = 0 and the negative radial direction for θ = π. These facts imply that E points upward everywhere on the y axis. Equation (2.36) also says that E points in the positive tangential direction for θ = π/2 and the negative tangential direction for θ = 3π/2. In view of the local rˆ and θˆ basis vectors shown in Fig. 2.18 (which vary with position, unlike the Cartesian xˆ and yˆ basis vectors), this means that E points downward everywhere on the x axis. We haven’t drawn the lines for small r, to emphasize the fact that our results are valid only in the limit r . There is a field for small r, of course (and it diverges near each charge); it’s just that it doesn’t take the form given in Eq. (2.36).
76
The electric potential
r
(q = 0) q
q (q = 3p/2)
r
r q
q
(q = p/2)
(q = p)
r
Figure 2.18. Electric field lines for a dipole. Note that the rˆ and θˆ basis vectors depend on position.
q=0
q = p/2
2.7.2 The shapes of the curves Let us now be quantitative about the shape of the E and φ curves. More precisely, let us determine the equations that describe the field-line curves and the constant-potential curves. In the process we will also determine the slopes of the tangents to these curves. We know that the two classes of curves are orthogonal wherever they meet, because E is the (negative) gradientofφ,andbecausethegradientofafunctionisalwaysperpendicular to the level-surface curves. This orthogonality is evident in Fig. 2.19. Our task now is to derive the two expressions for r given in this figure. Let’s look at φ first. We will find the equation for the constantpotential curves and then use this to find the slope of the tangent at any point. The equation for the curves is immediately obtained from Eq. (2.35). The set of points for which φ takes on the constant value φ0 is given by kq cos θ = φ0 ⇒ r2 = r2
Figure 2.19. Field lines and constant-potential curves for a dipole. The two sets of curves are orthogonal at all intersections. The solid√lines show constant-φ curves (r = r0 cos θ ), and the dashed lines show E field lines (r = r0 sin2 θ ).
kq
cos θ ⇒ φ0
√ r = r0 cos θ
(2.37) √ where r0 ≡ kq /φ0 is the radius associated with the angle θ = 0. This result is valid in the upper half-plane where −π/2 < θ < π/2. In the negative, so we need to add lower half-plane, both φ0 and cos θ are √ √ in some absolute-value signs. That is, r = r0 | cos θ |, where r0 ≡ kq /|φ0 |. The constant-potential curves in Fig. 2.19 are the intersections of the constant-potential surfaces with the plane of the paper. These surfaces are generated by rotating the curves around the vertical axis. The curves are stretched horizontally compared with the circles described by the relation r = r0 cos θ (which you can verify is indeed a circle).
12.10 Chapter 10
We see that t = RC is independent of A, because R ∝ 1/A and C ∝ A. (Basically, if a given patch of the membrane leaks its charge on a given time scale, then putting a bunch of these patches together shouldn’t change the time scale, because each patch doesn’t care that there are others next to it.) Using the information given for 1 cm2 of the membrane, we have t = RC = (1000 )(10−6 F) = 10−3 s. Since R = ρs/A, the resistivity is given by ρ=
(1000 )(10−4 m2 ) RA = ≈ 4 · 107 ohm-m. s 2.7 · 10−9 m
(12.453)
From Fig. 4.8, this is a little more than 100 times the resistivity of pure water. 10.2 Force on a dielectric (a) The equivalent capacitance of two capacitors in parallel is simply the sum of the capacitances. (The rule is opposite to that for resistors; see Problem 3.18.) The capacitance of the part with the dielectric is κ times what it would be if there were vacuum there. So the total capacitance is given by κ A 0 A 1 + 0 2 C = C1 + C 2 = s s ! a 0 a(b − x) κ0 ax + = 0 b + (κ − 1)x . = s s s
(12.454)
The stored energy is then U=
Q2 s Q2 = . 2C 20 a[b + (κ − 1)x]
(12.455)
Note that as x changes, the charge stays constant (by assumption), but the potential does not. So the Qφ/2 and Cφ 2 /2 forms of the energy aren’t useful. (b) The force is F=−
Q2 s(κ − 1) dU = . dx 20 a[b + (κ − 1)x]2
(12.456)
The positive sign here means that the force points in the direction of increasing x. That is, the dielectric slab is pulled into the capacitor. But it’s risky to trust this sign blindly. Physically, the force points in the direction of decreasing energy. And we see from the above expression for U that the energy decreases as x increases (because κ > 1). The force F is correctly zero if κ = 1, because in that case we don’t actually have a dielectric. The κ → ∞ limit corresponds to a conductor. In that case, both U and F are zero. Basically, all of the charge on the plates shifts to the overlap x region, and compensating charge gathers there in the dielectric, so in the end there is no field anywhere. Note that F decreases as x increases. You should think about why this is the case. Hint: First convince yourself why the force
745
746
(a)
Solutions to the problems
d q
–q (b)
Figure 12.129.
d
should be proportional to the product of the charge densities (and not the total charges) on the two parts of the plates. And then look at Exercise 10.15. 10.3 Energy of dipoles The first configuration is shown in Fig. 12.129(a). There are four relevant (non-internal) pairs of charges, so the potential energy is (with d) q2 2q2 q2 1 1 2¡ = −2¡ 1− U= 4Ď€ 0 d 4Ď€ 0 d 1 + 2 /d2 d2 + 2 2 2 2 2 2 q
2q p = 1− 1− 2 ≈ ≥ , (12.457) 3 4Ď€ 0 d 2d 4Ď€ 0 d 4Ď€ 0 d3 √ where we have used 1/ 1 + ≈ 1 − /2. The second configuration is shown in Fig. 12.129(b). The potential energy is now q2 q2 q2 q2 1 1 1 2¡ − − = 2− − 4Ď€ 0 d d− d+
4Ď€ 0 d 1 − /d 1 + /d
2
2 q2 2− 1+ + 2 − 1− + 2 ≈ 4Ď€ 0 d d d d d p2 2 2 q2 − 2 =− = , (12.458) 4Ď€ 0 d d 2Ď€ 0 d3 where we have used 1/(1 + ) ≈ 1 − + 2 . Note that we needed to go to second order in the Taylor expansions here. By looking at the initial expressions for U for each setup, it is clear why the first U is positive, but not so clear why the second U is negative. However, in the limit where the dipoles nearly touch, the second U is certainly negative. 10.4 Dipole polar components Remember that our convention for the angle θ is that it is measured down from the z axis in Fig. 10.6. So the radial unit vector is given by rˆ = sin θ xˆ + cos θ zˆ . The tangential unit vector, which is perpendicular to rˆ , is then given by θˆ = cos θ xˆ − sin θ zˆ ; this makes the dot product of rˆ and θˆ equal to zero, and you can check that the overall sign is correct. Inverting these expressions for rˆ and θˆ gives xˆ = sin θ rˆ + cos θ θˆ
and
ˆ zˆ = cos θ rˆ − sin θ θ.
(12.459)
Therefore, E = Ex xˆ + Ez zˆ ˆ + Ez (cos θ rˆ − sin θ θ) ˆ = Ex (sin θ rˆ + cos θ θ) ˆ x cos θ − Ez sin θ) = rˆ (Ex sin θ + Ez cos θ) + θ(E + , p 2 θ − 1) cos θ ˆ = r (3 sin θ cos θ) sin θ + (3 cos 4Ď€ 0 r3 , + (12.460) + θˆ (3 sin θ cos θ) cos θ − (3 cos2 θ − 1) sin θ .
12.10 Chapter 10
Using sin2 θ + cos2 θ = 1 in the rˆ term, E quickly simplifies to E=
p 2 cos θ rˆ + sin θ θˆ , 3 4π 0 r
(12.461)
as desired. Alternatively, Er equals the projection of E = (Ex , Ez ) onto rˆ = (sin θ, cos θ ). Since rˆ is a unit vector, this projection equals the dot product E ¡ rˆ . Therefore, Er = E ¡ rˆ = (Ex , Ez ) ¡ (sin θ , cos θ ) = Ex sin θ + Ez cos θ,
(12.462)
in agreement with the third line in Eq. (12.460). Likewise, Eθ = E ¡ θˆ = (Ex , Ez ) ¡ (cos θ , − sin θ ) = Ex cos θ − Ez sin θ, (12.463) again in agreement with the third line in Eq. (12.460). 10.5 Average field (a) From part (c) of Problem 1.28 we know that the average electric field over the volume of a sphere of radius R, due to a given charge q at radius r < R, has magnitude qr/4Ď€ 0 R3 and points toward the center (if q is positive). In vector form, this average field can be written as over all the −qr/4Ď€ 0 R3 . If we sum this
charges inside the sphere, then the numerator becomes qi ri (or rĎ dv if we have a continuous charge distribution). But this sum is, by definition, the dipole moment p, where p is measured relative to the center. So the average field over the volume of the sphere is Eavg = −p/4Ď€ 0 R3 , as desired. Note that all that matters here is the dipole moment; the monopole moment (the total charge) doesn’t come into play. (b) Since Eavg is proportional to 1/R3 , and since volume is proportional to R3 , the total integral of E over the volume of a sphere is independent of R (provided that R is large enough to contain all the charges). This means that if we increase the radius by dR, we don’t change the integral of E. This implies that the average value of E over the surface of any sphere containing all the charges equals zero. (We actually already knew this from part (a) of Problem 1.28. Each individual charge yields zero average field over the surface.) A special case of this result is the centered point-dipole case in Exercise 10.25. So for the specific case shown in Fig. 10.32(a), the average value of the field over the surface of the sphere is zero. And since the dipole moment has magnitude p = 2q and points upward, the result from part (a) tells us that the average value over the volume of the sphere, Eavg = −p/4Ď€ 0 R3 , has magnitude q /2Ď€ 0 R3 and points downward. (c) The average value of the field over the surface of the sphere in Fig. 10.32(b) is not zero. From part (b) of Problem 1.28, the average field due to each charge has magnitude q/4Ď€ 0 2 and points downward. So the average field over the surface, due to both charges, has magnitude q/2Ď€ 0 2 and points downward. Since this is independent of the radius of the sphere, the average field over the volume of a sphere with R < also has magnitude q/2Ď€ 0 2 and points downward.
747
748
Solutions to the problems
The moral of all this is that “outside� the dipole, the field points in various directions and averages out over the surface of a sphere. But “inside� the dipole, the field points generally in one direction, so the average is nonzero over the surface of a sphere. Note that volume average of E is continuous as R crosses the R =
cutoff between the two cases in parts (a) and (b); in both cases it has magnitude q/2Ď€ 0 2 . If we multiply this by / and use p = q , we can write it as p/2Ď€ 0 3 . Multiplying by the volume 4Ď€ 3 /3 then tells us that the total volume integral of E, over a sphere of radius
, has magnitude 2p/30 and points downward. In other words, for a fixed value of p,
even the limit of an idealized dipole still has a nonzero value of E dv, despite the fact that the only shells yielding nonzero contributions are infinitesimal ones. 10.6 Quadrupole tensor Our goal is to find the potential φ(r) at the point r = (x1 , x2 , x3 ). As in Section 10.2, primed coordinates will denote the position of a point in the charge distribution. The distance from r to a particular point r = (x1 , x2 , x3 ) in the distribution is
(x1 − x1 )2 + (x2 − x2 )2 + (x3 − x3 )2 & & 2 xi xi
2 xˆ i xi
r 2 r 2 , =r 1+ 2 − =r 1+ 2 − r r r2 r
R=
(12.464)
where we have used xi2 = r2 and xi 2 = r 2 , and where (ˆx1 , xˆ 2 , xˆ 3 ) = (x1 , x2 , x3 )/r is the unit vector rˆ in the r direction. Assuming that r is much smaller than r, we can use the expansion (1 + δ)−1/2 = 1 − δ/2 + 3δ 2 /8 − ¡ ¡ ¡ to write (dropping terms of order 1/r4 and higher)
2
xˆ i xi 3 xˆ i xi 1 r 2 1 = 1+ + − 2 R r r 2r2 2r
2 2 2
xˆ i xi 3 xˆ i xi xˆ i r 1 . 1+ + − = 2 r r 2r 2r2
(12.465)
In the last term here, we have multiplied by 1 in the form of the square of the length of a unit vector, for future purposes. It is easier to understand this result for 1/R if we write it in terms of vectors and matrices: ⎛ ⎞ x1 1 1 1 ⎜ âŽ&#x; = + 2 (ˆx1 , xˆ 2 , xˆ 3 ) ¡ âŽ? x2 ⎠(12.466) R r r x3
⎛ ⎞⎛ ⎞ 3x1 2 − r 2 3x1 x2
3x1 x3
xˆ 1 ⎜ âŽ&#x;⎜ âŽ&#x; 1
2
2 + 3 (ˆx1 , xˆ 2 , xˆ 3 ) ¡ ⎜ 3x2 x3 âŽ&#x; âŽ? 3x2 x1 3x2 − r ⎠âŽ? xˆ 2 ⎠. 2r
2
2 xˆ 3 3x3 x1 3x3 x2 3x3 − r
12.10 Chapter 10
You should verify that this is equivalent to Eq. (12.465). If desired, the diagonal terms of this matrix can be written in a slightly different form. Since r 2 = x1 2 + x2 2 + x3 2 , the upper left entry equals 2x1 2 − x2 2 − x3 2 . Likewise for the other two diagonal entries. Note that there are only five independent entries in the matrix, because it is symmetric and has trace zero. To obtain φ(r), we must compute the integral, Ď (r )dv
1 . (12.467) φ(r) = 4Ď€ 0 R In other words, we must compute the volume integral of Eq. (12.466) times Ď (r ), and then tack on a 1/4Ď€ 0 . When the 1/r term is integrated, it simply gives q/r, where q is the total charge in the distribution. To write the other two terms in a cleaner way, define the vector p to be the vector whose entries are the Ď dv integrals of the entries in the above (x1 , x2 , x3 ) vector. And likewise define the matrix Q to be the Ď dv integral of the above matrix. For example, the first component of p and the upper-left entry of Q are 2 and Q11 = 3x1 − r 2 Ď (r )dv , p1 = x1 Ď (r )dv
(12.468) and so on. We can then write the result for the potential at an arbitrary point r in the compact form, 1 q rˆ ¡ p rˆ ¡ Qˆr φ(r) = + 2 + . (12.469) 4π 0 r r 2r3 The advantage of Eq. (12.469) over Eq. (10.9) in the text is the following. The latter gives the correct value of φ at points on the z axis. However, if we want to find φ at another point, we must redefine θ as the angle with respect to the direction to the new point, and then recalculate all the Ki . The present result in Eq. (12.469) has the benefit that, although it involves calculating a larger number of quantities, it is valid for any choice of the point r. The quantities q, p, and Q depend only on the distribution, and not on the point r at which we want to calculate the potential. Conversely, the quantities rˆ and r in Eq. (12.469) depend only on r and not on the distribution. So, for a given charge distribution, we can calculate (with respect to a given set of coordinate axes) p and Q once and for all. We then simply need to plug our choice of r into Eq. (12.469), and this correctly gives φ(r) up to order 1/r3 . In the special case where r lies on the z ≥ x3 axis, we have rˆ = (0, 0, 1). Since only xˆ 3 is nonzero, only Q33 (the lower right entry in Q) survives in the dot product rˆ ¡ Qˆr. Furthermore, if θ is the angle of r with respect to the x3 axis, then we have x3 = r cos θ. So Q33 =
2 r (3 cos2 θ −1)Ď dv . When the 1/2r3 factor in Eq. (12.469) is included, we correctly arrive at the result Eq. (10.9). For a spherical shell, which we know has only a monopole moment, you can quickly verify that all of the entries in Q are zero. The off-diagonal
749
750
Solutions to the problems
entries are zero from symmetry, and the diagonal elements are zero due to the example in Section 10.2 combined with the previous paragraph. Alternatively, the average value of, say, x1 2 over the surface of a sphere equals r 2 /3, because it has the same average value as x2 2 and x3 2 , and the sum of all three averages is r 2 . If you want to get some practice with Q, Exercise 10.26 deals with the quadrupole arrangement in Fig. 10.5. 10.7 Force on a dipole Let the dipole consist of a charge −q at position r and a charge q at position r + s. Then the dipole vector is p = qs. If the dipole is placed in an electric field E, the net force on it is F = (−q)E(r) + qE(r + s).
(12.470)
The x component of this is Fx = (−q)Ex (r)+qEx (r+s). Now, the change in a function f due to a small displacement s is ∇f · s, by the definition of the gradient (or at least that’s one way of defining it). So we can write Fx as ! Fx = q Ex (r + s) − Ex (r) = q∇Ex · s = (qs) · ∇Ex ≡ p · ∇Ex ,
(12.471)
as desired. Likewise for the other two components. 10.8 Force from an induced dipole If q is the charge of the ion, then the magnitude of the electric field of the ion at the location of the atom is E = q/4π 0 r2 . If the polarizability of the atom is α, then the induced dipole moment of the atom is p = αE = αq/4π 0 r2 . This dipole moment points along the line from the ion to the atom (see Fig. 12.130), so the magnitude of the field of the induced dipole at the location of the ion is Edipole = 2p/4π 0 r3 . The magnitude of the force on the ion is therefore F = qEdipole =
2pq 2(αq/4π 0 r2 )q 2αq2 = = . 3 3 4π 0 r 4π 0 r (4π 0 )2 r5
(12.472)
You can quickly show that the force is attractive for either sign of q. The potential energy relative to infinity is r r 2αq2 dr
αq2 F(r )dr = − − =− . U(r) = − 2
5 2(4π 0 )2 r4 ∞ ∞ (4π 0 ) r (12.473) Atom
Ion r
p
q
The polarizability of sodium is given by α/4π 0 = 27 · 10−30 m3 . If the magnitude of the potential energy equals |U| = 4 · 10−21 J, then solving for r and setting q = e gives ⎤1/4 ⎡ 1/4
2 −30 3 −19 2 (27 · 10 m )(1.6 · 10 C) (α/4π 0 )q ⎥ ⎢ =⎣ r= ⎦ 2 C2 s 2(4π 0 )|U| −12 −21 (4 · 10 2 · 4π 8.85 · 10 J) kg m3
Eion
Figure 12.130.
Edipole
= 9.4 · 10−10 m.
(12.474)
If r is larger than this, then (on average) the thermal energy is sufficient to kick the ion out to infinity.
12.10 Chapter 10
751
10.9 Polarized water We must determine the number, n, of molecules of water per cubic centimeter. A mole of something with molecular mass M has a mass of M grams. (Equivalently, since the proton mass is 1.67 ¡ 10−24 g, it takes 1/(1.67 ¡ 10−24 ) = 6 ¡ 1023 protons to make 1 gram, and this number is essentially Avogadro’s number.) Water has a molecular weight of 18, so the number of water molecules per gram (= cm3 ) is n = (6 ¡ 1023 /mole)/ (18 cm3 /mole) = 3.33 ¡ 1022 cm−3 . The dipole moment of water can be written as p = 6.13 ¡ 10−28 C-cm. Assuming the dipoles all point down, the polarization density is therefore P = np = (3.33 ¡ 1022 cm−3 )(6.13 ¡ 10−28 C-cm) = 2.04 ¡ 10−5 C/cm2 . (12.475) From the reasoning in Section 10.7, this is the surface charge density, Ďƒ . The number of electrons per square centimeter it corresponds to is Ďƒ/e = (2.04 ¡ 10−5 C/cm2 )/(1.6 ¡ 10−19 C) = 1.3 ¡ 1014 cm−2 . This is somewhat smaller than the number of surface molecules per square centimeter, which equals n2/3 = 1.0 ¡ 1015 cm−2 because each edge of the 1 cm3 cube is (approximately) n1/3 molecules long. 10.10 Tangent field lines Consider the Gaussian surface indicated by the heavy line in Fig. 12.131. The side part of the surface is constructed to follow the field lines, so there is no flux there. Likewise, there is no flux through the top circular face, because the field is zero outside the capacitor plates. So the only flux comes from the great circle inside the sphere. From Eq. (10.53) the field inside the sphere has the uniform value of 3E0 /(2 + Îş). So the flux out of the Gaussian surface equals âˆ’Ď€R2 ¡ 3E0 /(2 + Îş), where the minus arises because the flux is inward. The total charge enclosed in the Gaussian surface comes from two places: the negative charge in the circle on the upper capacitor plate, and the positive charge on the upper hemisphere. The former is simply qcap = (âˆ’Ďƒ )Ď€ r2 = (−0 E0 )Ď€ r2 , where we have used the fact that the charge densities on the capacitor plates are what cause the uniform field E0 ; hence E0 = Ďƒ/0 . The latter charge is just qsph = PĎ€ R2 , where P is the polarization, because the top patch of the column in Fig. 10.21(a) has a charge of P da (where da is the horizontal cross-sectional area), independent of the tilt angle of the actual end face. And all the da areas simply add up to the great-circle area, Ď€ R2 . (Or you could just integrate the P cos θ surface density over the hemisphere.) Using the value of P from Eq. (10.54), Gauss’s law gives 1 qcap + qsph 0 1 Îş −1 2 2 = 0 E0 ¡ Ď€ R −0 E0 Ď€ r + 3 0 Îş +2 Îş −1 = −r2 + 3R2 Îş +2 3Îş . (12.476) =R Îş +2
E=0 –s
=–
0E0
E0
3E0
Îş+2
= 3E0 Îş +2 1 ⇒ −3R2 Îş +2
⇒ âˆ’Ď€ R2
⇒ r
s
Figure 12.131.
=
0E0
752
Solutions to the problems
As a check, we have r = R when κ = 1. In this case, our dielectric is just vacuum, so the field remains E0 everywhere; the field lines are all √ straight. Also, we have r = √3R when κ → ∞. In this limit the sphere is a conductor. The factor of 3 isn’t so obvious. Note that, in the case of a conductor, a field line can’t actually be tangent to the surface, because field lines must always be perpendicular to the surface of a conductor. What happens is that the external field approaches zero along the equator (the zero vector is, in some sense, both parallel and perpendicular to the surface). But a tiny distance away from the equator, the field is nonzero, so it is meaningful to ask where that field line ends up on the distant capacitor plates.
(Inside S)
–q
s
(Outside S)
q s
Figure 12.132.
10.11 Bound charge and divergence of P If we take the volume integral of both sides of Eq. (10.61) and use the divergence theorem, we see that our goal is to show that S P · da = −qbound , where qbound is the bound charge enclosed within the surface S. Assume that the polarization P arises from N dipoles per unit volume, each with a dipole moment p = qs. Then P = Np = Nqs. If the dipoles point in random directions, so that P = 0, then there is no extra bound charge in a given volume. But if they are aligned, so that P = 0, and if additionally P varies with position, then there may be a net bound charge in the volume. The reasoning is as follows. Consider a collection of dipoles, as shown in Fig. 12.132. The vertical line represents a patch of the right-hand surface of S. How much extra negative charge is there inside S, that is, to the left of the line? If a given dipole lies entirely inside or outside S, then it contributes nothing to the net charge. But if a dipole is cut by the vertical line, then there is an extra charge of −q inside S. How many dipoles are cut by the line? Any dipole whose center lies within s/2 of the line gets cut by it. So the center must lie in a slab with thickness s, indicated by the shaded region in the figure. The two extreme dipole positions are indicated by the boxes. If the area of a given patch of the surface is da, then any dipole whose center lies in a slab of volume s da will contribute a charge of −q to S. Since there are N dipoles per unit volume, we see that N(s da) dipoles are cut by the line. The extra charge associated with the patch is therefore dqbound = N(s da)(−q), which can be written as dqbound = −(Nqs)da = −P da. If a dipole is tilted at an angle θ with respect to the normal to the patch, then the volume of the relevant slab is decreased by a factor of cos θ. If we tack this factor onto P, it simply turns P into the component P⊥ perpendicular to the surface. So in general the extra charge inside the volume, near a given patch with area da, equals dqbound = −P⊥ da, which can be written as the dot product, dqbound = −P · da. Integrating this over the entire surface gives the total enclosed bound charge as (12.477) qbound = − P · da, as desired. Although we motivated this result in Section 10.11 by considering dielectrics, this problem shows (as mentioned in the text) that this result is
12.10 Chapter 10
quite independent of dielectrics. No matter how the polarization P comes about, the result in Eq. (12.477) is still valid. (You can manually twist the dipoles in whatever way you want, provided that P changes slowly on the length scale of the dipoles, so that we can talk about smooth averages.) To emphasize what we said in the text, the logical route to Eq. (10.62) is to start with Eqs. (10.59) and (10.61), both of which are universally true, and then Eq. (10.62) immediately follows. No mention has been made of dielectrics. But if we are in fact dealing with a (linear) dielectric, then P = χe 0 E, and we can use 1 + χe = κ to say that additionally 0 E + P = 0 E + χe 0 E = κ0 E ≡ E.
(12.478)
In all cases the relation D ≡ 0 E + P holds, but that is just a definition. 10.12 Boundary conditions for D D⊥ is continuous. This follows from div D = ρfree ; there is no free charge in the setup, so the divergence of D is zero. The divergence theorem then tells us that D · da = 0 for any closed surface. That is, there is zero flux through any surface. So if we draw a pancake-like pillbox with one face just inside the slab and one face just outside, the inward flux through one face must equal the outward flux through the other. Hence Din ⊥A = in = Dout . That is, D is continuous across the boundary. Dout A ⇒ D ⊥ ⊥ ⊥ ⊥ For D , we know that E is continuous across the boundary, because all we have at the boundary is a layer of bound charge, which produces no discontinuity in E . So D ≡ 0 E+P tells us that the discontinuity in D is the same as the discontinuity in P . Since P = 0 outside, the discontinuity in P is simply −Pin . That is, the change in D when going from inside to outside is −Pin .
10.13 Q for a leaky capacitor From Exercise 10.42, the energy density in the electric field is E2 /2. √ And it is the same for the magnetic field, by plugging B = μ0 E into B2 /2μ0 . The total energy density is therefore E2 , or E02 cos2 ωt. But the time average of cos2 ωt is 1/2, so the average energy density is E02 /2. The energy in the fields will decay due to ohmic resistance. To calculate this power dissipation, consider a tube of cross-sectional area A and length L. The power dissipated in this tube is P = I 2 R = (JA)2 (ρL/A) = J 2 ρ(AL) 1 = (σ E)2 (volume) = σ E2 (volume). σ
(12.479)
The power dissipated per unit volume is therefore σ E2 . The time average of this is σ E02 /2. Hence Q=
ω(E02 /2) ω · (energy stored) ω = , = power loss σ σ E02 /2
(12.480)
753
754
Solutions to the problems
as desired. From Table 4.1, the conductivity of seawater is σ = 4 (ohm-m)−1 . And from Fig. 10.29, the dielectric constant κ is still about 80 at a frequency of 1000 MHz (109 Hz). Therefore, since = κ0 , we have 2 2 (2π · 109 s−1 ) 80 · 8.85 · 10−12 s C 3 kg m = 1.1. (12.481) Q= 4 (ohm-m)−1 Since Q equals the number of radians of ωt required for the energy to decrease by a factor of 1/e, we see that by the end of one cycle (2π radians) there is practically no energy left. The wavelength corresponding to √ 1000 MHz is (c/ κ)/ν = 0.033 m. So microwave radar won’t find submarines! 10.14 Boundary conditions on E and B With no free charges or currents, the equations describing the system are ∇ · D = 0,
∇ × E = −∂B/∂t;
∇ · B = 0,
∇ × B = μ0 ∂D/∂t.
(12.482)
The two equations involving D come from Eqs. (10.64) and (10.78) with ρfree and Jfree set equal to zero. The other two equations are two of Maxwell’s equations. We can now apply the standard arguments. For the perpendicular components, we can apply the divergence theorem to the two “div” equations, with the volume chosen to be a squat pillbox, of vanishing thickness, spanning the surface. Our equations tell us that the net flux out of the volume is zero, so the perpendicular field on one side must equal the perpendicular field on the other. And for the parallel components, we can apply Stokes’ theorem to the two “curl” equations, with the area chosen to be a thin rectangle, of vanishing area, spanning the surface. Our equations tell us that the line integral around the rectangle is zero, so the parallel field on one side must equal the parallel field on the other. (The finite non-zero entries on the right-hand sides of the curl equations are inconsequential, because they provide zero contribution when integrated over the area of an infinitesimally thin rectangle.) The above four equations therefore yield (with 1 and 2 labeling the two regions) D1,⊥ = D2,⊥ , B1,⊥ = B2,⊥ ,
E1, = E2, ; B1, = B2, .
(12.483)
Since D = E for a linear dielectric, the first of these equations gives 1 E1,⊥ = 2 E2,⊥ .
(12.484)
So E⊥ is discontinuous. But the other three components are continuous across the boundary. That is, the entire B field is continuous, as is the parallel component of E. Note that we are assuming that the materials aren’t magnetic. After reading Section 11.10, you can show that in magnetic materials there is a discontinuity in B .
12.11 Chapter 11
12.11 Chapter 11 11.1
Maxwell’s equations with magnetic charge Maxwell’s equations with only electric charge and electric current are given in Eq. (9.17). If magnetic charge existed, the last equation would have to be replaced, as discussed in Section 11.2, by ∇ · B = b1 η, where η is the magnetic charge density, and b1 is a constant that depends on how the unit of magnetic charge is chosen. With the conventional definition of the direction of B, a positive magnetic charge would be attracted to the north pole of the earth, so it would behave like the north pole of a compass. Magnetic charge in motion with velocity v would constitute a magnetic current. Let K be the magnetic current density. Then K = ηv, in analogy with J = ρv. Conservation of magnetic charge would then be expressed by the “continuity equation,” ∇ · K = −∂η/∂t, in analogy with ∇ · J = −∂ρ/∂t. A magnetic current would be the source of an electric field, just as an electric current is the source of a magnetic field. So we must add to the right side of the first Maxwell equation in Eq. (9.17) a term proportional to K. (Equivalently, if we didn’t add such a term, we would end up with a contradiction, similar to the one in Section 9.1, arising from the fact that ∇ · (∇ × E) = 0 is identically zero.) Let this new term be b2 K. Then we have ∇ ×E=−
∂B + b2 K. ∂t
(12.485)
To determine the constant b2 , we can take the divergence of both sides of this equation. The left-hand side is identically zero because ∇ · (∇ × E) = 0, so we have (using the continuity equation) ∂B + b2 ∇ · K 0 = −∇ · ∂t ∂η ∂ = − (∇ · B) + b2 − ∂t ∂t ∂ ∂η = − (b1 η) − b2 ∂t ∂t ∂η (12.486) = −(b1 + b2 ) . ∂t Therefore b2 must equal −b1 . So the generalized Maxwell’s equations take the form (with b ≡ b1 = −b2 ), ∂B − bK, ∂t ∂E + μ0 J, ∇ × B = μ0 0 ∂t ρ ∇ ·E= , 0
∇ ×E=−
∇ · B = bη.
(12.487)
The constant b can be chosen arbitrarily. Two common conventions are b = 1 and b = μ0 .
755
756
Solutions to the problems
11.2
Magnetic dipole If we treat the current loop like an exact dipole, then the dipole moment is m = Ia = IĎ€ b2 . Equation (11.15) gives the magnetic field at position z along the axis of the dipole as Îź0 m/2Ď€ z3 , which here equals Îź0 (IĎ€ b2 )/ 2Ď€z3 = Îź0 Ib2 /2z3 . If we treat the current loop (correctly) as a loop of finite size, then Eq. (6.53) gives the field at position z on the axis as Bz = Îź0 Ib2 /2(z2 + b2 )3/2 . For z b we can ignore the b2 term in the denominator, yielding Bz ≈ Îź0 Ib2 /2z3 , which agrees with the above result for the idealized dipole. The correct result is smaller than the idealized-dipole result by the factor z3 /(z2 + b2 )3/2 . This factor approaches 1 as z → ∞. It is larger than a given number Ρ (we are concerned with Ρ = 0.99) if z3 (z2 + b2 )3/2
> Ρ ⇒
z2 z2 + b2
> Ρ2/3 ⇒ z >
Ρ1/3 b 1 − Ρ2/3
.
(12.488) For Ρ = 0.99 this gives z > (12.2)b. You can show that if we want the factor to be larger than 1 − (so = 0.01 here), then √ to a good approx3/2. And indeed, imation (in the limit of small ) we need z/b > √ √ 3/2(0.01) = 150 = 12.2. 11.3
Dipole in spherical coordinates Using the ∇ Ă— (A Ă— B) vector identity from Appendix K, with m constant, we find (ignoring the Îź0 /4Ď€ for now) ! B âˆ? ∇ Ă— m Ă— (ˆr/r2 ) = m ∇ ¡ (ˆr/r2 ) − (m ¡ ∇)(ˆr/r2 ).
But the divergence of rˆ /r2 is zero (except at r = 0), because we know that the divergence of the Coulomb field is zero; alternatively we can just use the expression for the divergence in spherical coordinates. So we are left with only the second term. Therefore, using the expression for ∇ in spherical coordinates,
m sin q r m
q m cos q
q
q
Figure 12.133.
(12.489)
∂ 1 ∂ rˆ + mθ B � − mr . ∂r r ∂θ r2
(12.490)
In the ∂/∂r term here, the vector rˆ doesn’t depend on r, but r2 does, of course, so mr (∂/∂r)(ˆr/r2 ) = −2mr rˆ /r3 . In the ∂/∂θ term, r2 doesn’t depend of θ, but the vector rˆ does. If we increase θ by dθ, then rˆ changes direction by the angle dθ. Since rˆ has length 1, it therefore picks up a component with length dθ in the θˆ direction. See Fig. F.3 in Appendix F; that figure is relevant to the oppositely defined θ in cylindrical ˆ So we have coordinates, but the result is the same. Hence ∂ rˆ /∂θ = θ. ˆ 3. (mθ /r)(∂/∂θ )(ˆr/r2 ) = mθ θ/r Finally, in Fig. 12.133 we see that the components of the fixed vector m = mˆz relative to the local rˆ -θˆ basis are mr = m cos θ, and mθ = −m sin θ. The negative sign here comes from the fact that m points
12.11 Chapter 11
partially in the direction of decreasing θ (at least for the right half of the sphere). Putting this all together, and bringing the μ0 /4π back in, gives rˆ μ0 θˆ −2(m cos θ ) 3 + (−m sin θ) 3 B=− 4π r r μ μ0 m m cos θ + θˆ 0 3 sin θ, (12.491) = rˆ 2πr3 4πr in agreement with Eq. (11.15). 11.4
Force on a dipole (a) The expression (m · ∇)B is shorthand for ∂ ∂ ∂ + my + mz (Bx , By , Bz ). (m · ∇)B = mx ∂x ∂y ∂z
(12.492)
The operator in parentheses is to be applied to each of the three components of B, generating the three components of a vector. In the setup in Fig. 11.9 with the ring and diverging B field, mz is the only nonzero component of m. Also, Bx and By are identically zero on the z axis, so ∂Bx /∂z and ∂By /∂z are both zero (or negligibly small close to the z axis). Therefore only one of the nine possible terms in Eq. (12.492) survives, and we have ∂Bz , (12.493) (m · ∇)B = 0, 0, mz ∂z as desired. (b) The expression ∇(m · B) is shorthand for ∂ ∂ ∂ ∇(m · B) = , , (mx Bx + my By + mz Bz ). ∂x ∂y ∂z
(12.494)
Each derivative acts on the whole sum in the parentheses. But again, only mz is nonzero. Also, on the z axis, Bz doesn’t depend on x or y, to first order (because, by symmetry, Bz achieves a maximum or minimum on the z axis, so the slope as a function of x and y must be zero). Hence ∂Bz /∂x and ∂Bz /∂y are both zero (or negligibly small close to the z axis). So again only one term survives and we have ∂Bz , (12.495) ∇(m · B) = 0, 0, mz ∂z as desired. (c) Let’s first see what the two expressions yield for the force on the given square loop. Then we will calculate what the force actually is. The dipole moment m points out of the page with magnitude I(area), so we have m = zˆ Ia2 . Using the above expressions for (m · ∇)B and ∇(m · B) in Eqs. (12.492) and (12.494), we obtain ∂ (0, 0, B0 x) = (0, 0, 0) (12.496) (m · ∇)B = 0 + 0 + (Ia2 ) ∂z
757
758
Solutions to the problems
and
∇(m ¡ B) =
∂ ∂ ∂ , , 0 + 0 + (Ia2 )B0 x = (Ia2 B0 , 0, 0). ∂x ∂y ∂z (12.497)
We see that the first expression yields zero force on the loop, while the second yields a force of Ia2 B0 in the positive x direction. Let’s now explicitly calculate the force. We quickly find that the net force on the top side of the square is zero (the right half cancels the left half). Likewise for the bottom side. Alternatively, the corresponding pieces of the top and bottom sides have canceling forces. So we need only look at the left and right sides. By the right-hand rule, the force on the right side is directed to the right with magnitude IB = I(B0 a/2)(a) = IB0 a2 /2. The force on the left side also points to the right (both I and B switch sign) with the same magnitude. The total force is therefore F = IB0 a2 in the positive x direction, in agreement with Eq. (12.497). So ∇(m ¡ B) is the correct expression for the force. (Actually, all that we’ve done is rule out the (m ¡ ∇)B force. But ∇(m ¡ B) is in fact correct in all cases.) 11.5
Converting χm Consider a setup in which the SI quantities are M = 1 amp/m and B = 1 tesla. Then χm = Îź0 M/B = 4Ď€ ¡ 10−7 . You can verify that the units do indeed cancel so that χm is dimensionless. How would someone working with Gaussian units describe this setup? Since 1 amp/m equals (3 ¡ 109 esu/s)/(100 cm), this would be the value of M in Gaussian units if there weren’t the extra factor of c in the definition of m. This factor reduces the value of all dipole moments m (and hence all magnetizations M) by 3 ¡ 1010 cm/s. The value of M in Gaussian units is therefore M=
3 ¡ 109 esu/s esu 1 = 10−3 2 . 100 cm 3 ¡ 1010 cm/s cm
(12.498)
Both of the factors of 3 here are actually 2.998, so this result is exact. The magnetic field in Gaussian units that corresponds to 1 tesla is 104 gauss, so the susceptibility in Gaussian units for the given setup is χm =
10−3 esu/cm2 M esu = = 10−7 = 10−7 . B 104 gauss cm2 gauss
(12.499)
The units do indeed cancel, because the expression for the Lorentz force tells us that a gauss has the units of force per charge. So the units of χm are esu2 /(cm2 ¡force). And these units cancel, as you can see by looking at the units in Coulomb’s law. The above value of χm in SI units was 4Ď€ ¡ 10−7 , which is 4Ď€ times the Gaussian value, as desired. 11.6
Paramagnetic susceptibility of liquid oxygen Equation (11.20) gives the force on a magnetic moment as F = m(∂Bz /∂z). Using the data in Table 11.1, and taking upward to be positive for all quantities, the magnetic moment of a 10−3 kg sample is
12.11 Chapter 11
m=
−7.5 · 10−2 N F = = 4.4 · 10−3 J/T. ∂Bz /∂z −17 T/m
(12.500)
The magnetic susceptibility is defined via M = χm B/μ0 . (The accepted M = χm H definition would give essentially the same result, because χm will turn out to be very small. See Exercise 11.38.) The volume of 1 gram of liquid oxygen is V = (10−3 kg)/(850 kg/m3 ) = 1.18 · 10−6 m3 . So χm = =
M (m/V) mμ0 = = B/μ0 B/μ0 BV (4.4 · 10−3 J/T)(4π · 10−7 kg m/C2 ) = 2.6 · 10−3 . (1.8 T)(1.18 · 10−6 m3 )
(12.501)
11.7
Rotating shell For the magnetized sphere, we know from Eq. (11.55) that near the equator the surface current density is equal to M, because the sphere looks essentially like a cylinder there (the surface is parallel to M). But away from the equator, the surface is tilted with respect to M. From the example at the end of Section 11.8, the surface current density is given by J = M ⇒ J (θ ) = M sin θ , where θ is the angle down from the top of the sphere (assuming that M points up). Now consider a rotating sphere with uniform surface charge density σ . The surface current density at any point is J = σ v, where v = ω(R sin θ ) is the speed due to the rotation. Hence J (θ ) = σ ωR sin θ. The J (θ ) expressions for the magnetized and rotating spheres have the same functional dependence on θ, so they will be equal for all θ provided that M = σ ωR.
11.8
B inside a magnetized sphere (a) The field in Eq. (11.15) is obtained from the field in Eq. (10.18) by letting p → m and 0 → 1/μ0 . If we replace all the electric dipoles p in a polarized sphere with magnetic dipoles m, then at an external point, the field from each dipole is simply multiplied by (m/p)(μ0 0 ). The integral over all the dipole fields is multiplied by this same factor, so the new magnetic field at any external point equals (m/p)(μ0 0 ) times the old electric field. We know from Section 10.9 that the old external electric field is the same as the field due to an electric dipole with strength p0 = (4π R3 /3)P, with P = Np, located at the center. You can quickly check that (m/p)(μ0 0 ) times this field is the same as the magnetic field due to a magnetic dipole with strength m0 = (4π R3 /3)M, with M = Nm. (b) If m0 points in the z direction, then from Eq. (11.12) the Cartesian components of A at points (x, y, z) on the surface of the sphere are μ m y My , Ax = − 0 03 = −μ0 4π R 3 Ay =
μ0 m 0 x Mx , = μ0 4π R3 3
Az = 0.
(12.502)
759
760
Solutions to the problems
Note that the result from Problem 11.7 then tells us that the A on the surface of a spinning spherical shell equals (μ0 σ ωR/3)(−y, x, 0). This agrees with the A we found in a different manner in Problem 6.7. Recall from Section 6.3 that Ax satisfies ∇ 2 Ax = −μ0 Jx . And similarly for Ay . But J = 0 inside the sphere, so both Ax and Ay satisfy Laplace’s equation there. By the uniqueness theorem, this means that if we can find a solution to Laplace’s equation inside the sphere that satisfies the boundary conditions on the surface of the sphere, then we know that we have found the solution. And just as with the φ for the polarized sphere in Section 10.9, the solutions for Ax and Ay are easy to come by. They are simply the functions given in Eq. (12.502); their second derivatives are zero, so they each satisfy Laplace’s equation. The magnetic field inside the sphere is then xˆ yˆ zˆ 2μ0 M μ0 M ∂/∂x ∂/∂y ∂/∂z = zˆ . (12.503) B=∇ ×A= 3 3 −y x 0 Like the E inside the polarized sphere, this B is uniform and points vertically. But that is where the similarities end. This B field points upward, whereas the old E field pointed downward. Additionally, the numerical factor here is 2/3, whereas it was (negative) 1/3 in E. The 2/3 is exactly what is needed to make the component normal to the surface be continuous, and to make the tangential component have the proper discontinuity (see Exercise 11.31). Equation (12.503), combined with the result from Problem 11.7, tells us that the field throughout the interior of a spinning spherical shell is uniform and has magnitude 2μ0 σ ωR/3. This is consistent with the result from Problem 6.11 for the field at the center of the sphere. 11.9
B at the north pole of a spinning sphere From Problem 11.7, we know that the magnetic field due to a spinning shell with radius r and uniform surface charge density σ is the same (both inside and outside) as the field due to a sphere with uniform magnetization Mr = σ ωr. And then from Problem 11.8 we know that the external field of a magnetized sphere is that of a dipole with strength m = (4π r3 /3)Mr located at the center. So the (radial) field at radius R outside a spinning shell with radius r (at a point located above the north pole) is B=
2μ0 σ ωr4 μ0 4πr3 (σ ωr) μ0 m = = . 3 3 3 2πR 2πR 3R3
(12.504)
We can consider the solid spinning sphere to be the superposition of many spinning shells with radii ranging from r = 0 to r = R, with uniform surface charge density σ = ρ dr. The north pole of the solid sphere is outside all of the shells, so we can use the above dipole form of B for every shell. The total field at the north pole (that is, at radius R) is therefore R 2μ0 ρωR2 2μ0 (ρ dr)ωr4 . (12.505) = B= 3 15 3R 0
12.11 Chapter 11
This field is 2/5 as large as the field at the center of the sphere; see Exercise 11.32. In terms of the total charge Q = (4π R3 /3)ρ, we can write B as B = μ0 ωQ/10π R. 11.10 Surface current on a cube Equation (11.55) gives the surface current density as J = M. Since the units of magnetization (J/Tm3 ) can also be written as A/m, we have J = 4.8 · 105 A/m. This current density spans a ribbon that is = 0.05 m wide, so the current is I = J = (4.8 · 105 A/m)(0.05 m) = 24,000 A. The dipole moment of the cube is m = MV = (4.8 · 105 J T−1 m−3 )(0.05 m)3 = 60 J/T.
(12.506)
The field at a distance of 2 meters, along the axis, is given by Eq. (11.15) as B=
(4π · 10−7 kg m/C2 )(60 J/T) μ0 m = = 1.5 · 10−6 T, (12.507) 3 2π r 2π(2 m)3
or 0.015 gauss. This is about 30 times smaller than the earth’s field of ≈ 0.5 gauss, so it wouldn’t disturb a compass much. 11.11 An iron torus From Fig. 11.32, a B field of
1.2 tesla requires an H field of about 120 A/m. Consider the line integral H · dl around the “middle” circle of the solenoid, with diameter 11 cm. If I is the current in the wire, then NI = 20I is the free current enclosed by our circular loop. Therefore, H · dl = Ifree ⇒ (120 A/m) · π(0.11 m) = 20I ⇒ I = 2.1 A. (12.508)
761
A Differences between SI and Gaussian units
In this appendix we discuss the differences between the SI and Gaussian systems of units. First, we will look at the units in each system, and then we will talk about the clear and not so clear ways in which they differ.
A.1 SI units Consider the SI system, which is the one we use in this book. The four main SI units that we deal with are the meter (m), kilogram (kg), second (s), and coulomb (C). The coulomb actually isn’t a fundamental SI unit; it is defined in terms of the ampere (A), which is a measure of current (charge per time). The coulomb is a derived unit, defined to be 1 amperesecond. The reason why the ampere, and not the coulomb, is the fundamental unit involving charge is one of historical practicality. It is relatively easy to measure current via a galvanometer (see Section 7.1). More crudely, a current can be determined by measuring the magnetic force that two pieces of a current-carrying wire in a circuit exert on each other (see Fig. 6.4). Once we determine the current that flows onto an object during a given time, we can then determine the charge on the object. On the other hand, although it is possible to measure charge directly via the force that two equally charged objects exert on each other (imagine two balls hanging from strings, repelling each other, as in Exercise 1.36), the setup is a bit cumbersome. Furthermore, it tells us only what the product of the charges is, in the event that they aren’t equal. The point is that it is
A.1 SI units
easy to measure current by hooking up an ammeter (the main component of which is a galvanometer) to a circuit.1 The exact definition of an ampere is: if two parallel wires carrying equal currents are separated by 1 meter, and if the force per meter on one wire, due to the entirety of the other wire, is 2 · 10−7 newtons, then the current in each wire is 1 ampere. The power of 10 here is an arbitrary historical artifact, as is the factor of 2. This force is quite small, but by decreasing the separation the effect can be measured accurately enough with the setup shown in Fig. 6.4. Having defined the ampere in this manner, and then having defined the coulomb as 1 ampere-second (which happens to correspond to the negative of the charge of about 6.24 · 1018 electrons), a reasonable thing to do, at least in theory, is to find the force between two 1 coulomb charges located, say, 1 meter apart. Since the value of 1 coulomb has been fixed by the definition of the ampere, this force takes on a particular value. We are not free to adjust it by tweaking any definitions. It happens to be about 9 · 109 newtons – a seemingly arbitrary number, but in fact related to the speed of light. (It has the numerical value of c2 /107 ; we see why in Section 6.1.) This (rather large) number therefore appears out in front of Coulomb’s law. We could label this constant with one letter, such as “k,” but for various reasons it is labeled as 1/4π 0 , with 0 = 8.85 · 10−12 C2 s2 kg−1 m−3 . These units are what are needed to make the right-hand side of Coulomb’s law, F = (1/4π 0 )q1 q2 /r2 , have units of newtons (namely kg m s−2 ). In terms of the fundamental ampere unit, the units of 0 are A2 s4 kg−1 m−3 . The upshot of all this is that because we made the choice to define current via the Lorentz force (specifically, the magnetic part of the Lorentz force) between two wires carrying current I, the Coulomb force between two objects of charge q ends up being a number that we just have to accept. We can make the pre-factor be a nice simple number in either one of these force laws, but not both.2 The SI system gives preference to the Lorentz force, due to the historical matters of practicality mentioned above. It turns out that there are actually seven fundamental units in the SI system. They are listed in Table A.1. The candela isn’t relevant to our study of electromagnetism, and the mole and kelvin come up only occasionally. So for our purposes the SI system consists of essentially just the first four units.
1 If we know the capacitance of an object, then we can easily measure the charge on it
by measuring the voltage with a voltmeter. But the main component of a voltmeter is again a galvanometer, so the process still reduces to measuring a current. 2 The Biot–Savart law, which allows us to calculate the magnetic field that appears in the Lorentz force, contains what appears to be a messy pre-factor, namely μ0 /4π . But since μ0 is defined to be exactly 4π · 10−7 kg m/C2 , this pre-factor takes on the simple value of 10−7 kg m/C2 .
763
764
Differences between SI and Gaussian units
Table A.1. SI base units Quantity
Name
Symbol
Length Mass Time Electric current Thermodynamic temperature Amount of substance Luminous intensity
meter kilogram second ampere kelvin mole candela
m kg s A K mol cd
A.2 Gaussian units What do the units look like in the Gaussian system? As with the SI system, the last three of the above units (or their analogs) rarely come up, so we will ignore them. The first two units are the centimeter and gram. These differ from the SI units simply by a few powers of 10, so it is easy to convert from one system to the other. The third unit, the second, is the same in both systems. The fourth unit, that of charge, is where the two systems fundamentally diverge. The Gaussian unit of charge is the esu (short for “electrostatic unit”), which isn’t related to the coulomb by a simple power of 10. The reason for this non-simple relation is that the coulomb and esu are defined in different ways. The coulomb is a derivative unit of the ampere (which is defined via the Lorentz force) as we saw above, whereas the esu is defined via the Coulomb force. In particular, it is defined so that Coulomb’s law, q1 q2 rˆ , (A.1) r2 takes on a very simple form with k = 1. The price to pay for this simple form of the Coulomb force is the not as simple form of the Lorentz force between two current-carrying wires (although it isn’t so bad; like the Coulomb force in SI units, it just involves a factor of c2 ; see Eq. (6.16)). This is the opposite of the situation with the SI system, where the Lorentz force is the “nice” one. Again, in each system we are free to define things so that one, but not both, of the Lorentz force and Coulomb force takes on a nice form. F=k
A.3 Main differences between the systems In Section A.2 we glossed over what turns out to be the most important difference between the SI and Gaussian systems. In the SI system, the constant in Coulomb’s law, kSI ≡
N m2 1 = 8.988 · 109 , 4π 0 C2
(A.2)
A.3 Main differences between the systems
has nontrivial dimensions, whereas in the Gaussian system the constant kG = 1
(A.3)
is dimensionless. We aren’t just being sloppy and forgetting to write the units; k is simply the number 1. Although the first thing that may strike you about the two k constants is the large difference in their numerical values, this difference is fairly inconsequential. It simply changes the numerical size of various quantities. The truly fundamental and critical difference is that kSI has units whereas kG does not. We could, of course, imagine a system of units where k = 1 dyne-cm2 /esu2 . This definition would parallel the units of kSI , with the only difference being the numerical value. But this is not what the Gaussian system does. The reason why the dimensionlessness of kG creates such a profound difference between the two systems is that it allows us to solve for the esu in terms of other Gaussian units. In particular, from looking at the units in Coulomb’s law, we can write (using 1 dyne = 1 g · cm/s2 ) & esu2 g · cm3 dyne = (dimensionless) · ⇒ esu = . (A.4) 2 cm s2 The esu is therefore not a fundamental unit. It can be expressed in terms of the gram, centimeter, and second. In contrast, the SI unit of charge, the coulomb, cannot be similarly expressed. Since kSI has units of N m2 /C2 , the C’s (and everything else) cancel in Coulomb’s law, and we can’t solve for C in terms of other units. For our purposes, therefore, the SI system has four fundamental units (m, kg, s, A), whereas the Gaussian system has only three (cm, g, s). We will talk more about this below, but first let us summarize the three main differences between the SI and Gaussian systems. We state them in order of increasing importance. (1) The SI system uses kilograms and meters, whereas the Gaussian system uses grams and centimeters. This is the most trivial of the three differences, because all it does is introduce some easily dealt with powers of 10. (2) The SI unit of charge (the coulomb) is defined via the ampere, which in turn is defined in terms of the force between current-carrying wires. The Gaussian unit of charge (the esu) is defined directly in terms of Coulomb’s law. This latter definition is the reason why Coulomb’s law takes on a nicer form in Gaussian units. The differences between the two systems now involve more than simple powers of 10. However, although these differences can sometimes be a hassle, they aren’t terribly significant. They are just numbers – no different from powers of 10, except a little messier. All of the conversions you might need to use are listed in Appendix C.
765
766
Differences between SI and Gaussian units
(3) In Gaussian units, the k in Coulomb’s law is chosen to be dimensionless, whereas in SI units the k (which involves 0 ) has units.3 The result is that the esu can be expressed in terms of other Gaussian units, whereas the analogous statement is not true for the coulomb. This is the most important difference between the two systems.
A.4 Three units versus four Let us now discuss in more detail the issue of the number of units in each system. The Gaussian system has one fewer because the esu can be expressed in terms of other units via Eq. (A.4). This has implications with regard to checking units at the end of a calculation. In short, less information is gained when checking units in the Gaussian system, because the charge information is lost when the esu is written in terms of the other units. Consider the following example. In SI units the electric field due to a sheet of charge is given in Eq. (1.40) as Ďƒ/20 . In Gaussian units the field is 2Ď€ Ďƒ . Recalling the units of 0 in Eq. (1.3), the units of the SI field are kg m C−1 s−2 (or kg m A−1 s−3 if you want to write it in terms of amperes, but we use coulombs here to show analogies with the esu). This correctly has dimensions of (force)/(charge). The units of the Gaussian 2Ď€ Ďƒ field are simply esu/cm2 , but since the esu is given by Eq. (A.4), the units are g1/2 cm−1/2 s−1 . These are the true Gaussian units of the electric field when written in terms of fundamental units. Now let’s say that two students working in the Gaussian system are given a problem where the task is to find the electric field due to a thin sheet with charge density Ďƒ , mass m, volume V, moving with a nonrelativistic speed v. The first student realizes that most of this information is irrelevant and solves the problem correctly, obtaining the answer of 2Ď€ Ďƒ (ignoring relativistic corrections). The second student royally messes things up and obtains an answer of Ďƒ 3 Vm−1 v−2 . Since the fundamental Gaussian units of Ďƒ are g1/2 cm−1/2 s−1 , the units of this answer are 1/2 −1/2 −1 3 g cm s (cm)3 Ďƒ 3V g1/2 , (A.5) −→ = 2 2 mv (g)(cm/s) cm1/2 s which are the correct Gaussian units of electric field that we found above. More generally, in view of any answer with the Eq. (A.4) we seethat n units of (g1/2 cm−1/2 s−1 ) esu g−1/2 cm−3/2 s has the correct units for the field. The present example has n = 3. There are, of course, also many ways to obtain incorrect answers in the SI system that just happen by luck to have the correct units. Correctness of the units doesn’t guarantee correctness of the answer. But the 3 To draw a more accurate analogy: in SI units the defining equation for the ampere
(from which the coulomb is derived) contains the dimensionful constant Îź0 in the force between two wires.
A.5 The definition of B
point is that because the charge information is swept under the rug in Gaussian units, we have at our disposal the information of only three fundamental units instead of four. Compared with the SI system, there is therefore a larger class of incorrect answers in the Gaussian system that have the correct units.
A.5 The definition of B Another difference between the SI and Gaussian systems of units is the way in which the magnetic field is defined. In SI units the Lorentz force (or rather the magnetic part of it) is F = qv × B, whereas in Gaussian units it is F = (q/c)v × B. This means that wherever a B appears in an SI expression, a B/c appears in the corresponding Gaussian expression (among other possible modifications). Or equivalently, a Gaussian B turns into an SI cB. This difference, however, is a trivial definitional one and has nothing to do with the far more important difference discussed above, where the esu can be expressed in terms of other Gaussian units. In the Gaussian system, E and B have the same dimensions. In the SI system they do not; the dimensions of E are velocity times the dimensions of B. In this sense the Gaussian definition of B is more natural, because it makes sense for two quantities to have the same dimensions if they are related by a Lorentz transformation, as the E and B fields are; see Eq. (6.76) for the SI case and Eq. (6.77) for the Gaussian case. After all, the Lorentz transformation tells us that the E and B fields are simply different ways of looking at the same field, depending on the frame of reference. However, having a “cB” instead of a “B” in the SI Lorentz transformation can’t be so bad, because x and t are also related by a Lorentz transformation, and they don’t have the same dimensions (the direct correspondence is between x and ct). Likewise for p and E (where the direct correspondence is between pc and E). At any rate, this issue stems from the arbitrary choice of whether a factor of c is included in the expression for the Lorentz force. One can easily imagine an SI-type system (where charge is a distinct unit) in which the Lorentz force takes the form F = qE + (q/c)v × B, yielding the same dimensions for E and B.
A.6 Rationalized units You might wonder why there are factors of 4π in the SI versions of Coulomb’s law and the Biot–Savart law; see Eqs. (1.4) and (6.49). These expressions would certainly look a bit less cluttered without these factors. The reason is that the presence of 4π ’s in these laws leads to the absence of such factors in Maxwell’s equations. And for various reasons it is deemed more important to have Maxwell’s equations be the “clean” ones without the 4π factors. The procedure of inserting 4π into Coulomb’s law and the Biot–Savart law, in order to keep them out of Maxwell’s equations, is called “rationalizing” the units. Of course, for
767
768
Differences between SI and Gaussian units
people concerned more with applications of Coulomb’s law than with Maxwell’s equations, this procedure might look like a step in the wrong direction. But since Maxwell’s equations are the more fundamental equations, there is logic in this convention. It is easy to see why the presence of 4π factors in Coulomb’s law and the Biot–Savart law leads to the absence of 4π factors in Gauss’s law and Ampère’s law, which are equivalent to two of Maxwell’s equations (or actually one and a half; Ampère’s law is supplemented with another term). In the case of Gauss’s law, the absence of the 4π basically boils down to the area of a sphere being 4π r2 (see the derivation in Section 1.10). In the case of Ampère’s law, the absence of the 4π is a consequence of the reasoning in Sections 6.3 and 6.4, which again boils down to the area of a sphere being 4π r2 (because Eq. (6.44) was written down by analogy with Eq. (6.30)). Or more directly: the 1/4π in the Biot–Savart law turns into a 1/2π in the field from an infinite straight wire (see Eq. (6.6)), and this 2π is then canceled when we take the line integral around a circle with circumference 2π r. If there were no factors of 4π in Coulomb’s law or the Biot–Savart law, then there would be factors of 4π in Maxwell’s equations. This is exactly what happens in the Gaussian system, where the “curl B” and “div E” Maxwell equations each involve a 4π; see Eq. (9.20). Note, however, that one can easily imagine a Gaussian-type system (that is, one where the pre-factor in Coulomb’s law is dimensionless) that has factors of 4π in Coulomb’s law and the Biot–Savart law, and none in Maxwell’s equations. This is the case in a variation of Gaussian units called Heaviside–Lorentz units.
B We begin this appendix with the definitions of all of the derived SI units relevant to electromagnetism (for example, the joule, ohm, etc.). We then list the units of all of the main quantities that appear in this book (basically, anything that has earned the right to be labeled with its own letter). In SI units the ampere is the fundamental unit involving charge. The coulomb is a derived unit, being defined as one ampere-second. However, since most people find it more natural to think in terms of charge than current, we treat the coulomb as the fundamental unit in this appendix. The ampere is then defined as one coulomb/second. For each of the main quantities listed, we give the units in terms of the fundamental units (m, kg, s, C, and occasionally K), and then also in terms of other derived units in certain forms that come up often. For example, the units of electric field are kg m C−1 s−2 , but they are also newtons/coulomb and volts/meter. The various derived units are as follows: newton (N) =
kg m s2
joule (J) = newton-meter = ampere (A) = volt (V) =
kg m2 s2
coulomb C = second s kg m2 joule = coulomb C s2
SI units of common quantities
770
SI units of common quantities
farad (F) =
coulomb C2 s2 = volt kg m2
ohm () =
volt kg m2 = 2 ampere C s
watt (W) =
kg m2 joule = second s3
tesla (T) =
newton kg = coulomb · meter/second Cs
henry (H) =
kg m2 volt = ampere/second C2
The main quantities are listed by chapter. Chapter 1 charge q: C k in Coulomb’s law: 0 : E field (force per charge): flux (E field times area): charge density λ, σ , ρ:
N m2 kg m3 = 2 2 C s C2 C2 s2 C2 C F = = = Vm m kg m3 N m2 N V kg m = = 2 C m Cs N m2 kg m3 = = Vm C C s2 C C C , , m m2 m3
Chapter 2 potential φ (energy per charge):
kg m2 J = =V C C s2
dipole moment p: C m Chapter 3 capacitance C (charge per potential):
C C2 s2 = =F 2 V kg m
SI units of common quantities
Chapter 4 current I (charge per time): current density J (current per area):
C =A s A C = 2 2 m s m
conductivity σ (current density per field):
C2 s 1 = m kg m3
resistivity ρ (field per current density):
kg m3 = m C2 s
resistance R (voltage per current):
V kg m2 = = A C2 s
power P (energy per time):
J kg m2 = =W s s3
Chapter 5 speed of light c:
m s
Chapter 6 B field (force per charge-velocity):
kg =T Cs
μ0 :
kg m Tm = 2 A C
vector potential A:
kg m = Tm Cs
surface current density J (current per length):
A C = ms m
Chapter 7 electromotive force E: flux (B field times area): inductance M, L:
kg m2 J = = A = V 2 C Cs kg m2 = T m2 Cs kg m2 Vs = =H A C2
771
772
SI units of common quantities
Chapter 8 1 s
frequency ω:
quality factor Q: 1 (dimensionless) phase φ: 1 (dimensionless) admittance Y (current per voltage):
C2 s A 1 = = V kg m2
impedance Z (voltage per current):
V kg m2 = = A C2 s
Chapter 9 power density S (power per area):
W J kg = 2 = 2 s3 m s m
Chapter 10 dielectric constant κ: 1 (dimensionless) dipole moment p: C m torque N:
kg m2 = Nm s2
atomic polarizability α/4π 0 : m3 polarization density P:
C m2
electric susceptibility χe : 1 (dimensionless) permittivity : displacement vector D:
C2 C 2 s2 = 3 kg m N m2 C m2
temperature T: K Boltzmann’s constant k:
J kg m2 = K s2 K
SI units of common quantities
Chapter 11 magnetic moment m: angular momentum L: Planck’s constant h: magnetization M (m per volume):
C m2 J = A m2 = s T kg m2 s kg m2 = Js s A J C = = ms m T m3
magnetic susceptibility χm : 1 (dimensionless) H field: permeability μ:
C A = ms m Tm kg m = 2 A C
773
C Unit conversions
In this appendix we list, and then derive, the main unit conversions between the SI and Gaussian systems. As you will see below, many of the conversions involve simple plug-and-chug calculations involving conversions that are already known. However, a few of them (charge, B field, H field) require a little more thought, because the relevant quantities have different definitions in the two systems.
C.1 Conversions Except for the first five (nonelectrical) conversions below, we technically shouldn’t be using “=” signs, because they suggest that the units in the two systems are actually the same, up to a numerical factor. This is not the case. All of the electrical relations involve charge in one way or another, and a coulomb cannot be expressed in terms of an esu. This is a consequence of the fact that the esu is defined in terms of the other Gaussian units; see Appendix A for a discussion of how the coulomb and esu differ. The proper way to express, say, the sixth relation below is “1 coulomb is equivalent to 3 · 109 esu.” But we’ll generally just use the “=” sign, and you’ll know what we mean. The “[3]” in the following relations stands for the “2.998” that appears in the speed of light, c = 2.998 · 108 m/s. The coulomb-esu discussion below explains how this arises. time: length: mass:
1 second = 1 second 1 meter = 102 centimeter 1 kilogram = 103 gram
C.2 Derivations 1 newton = 105 dyne
force:
1 joule = 107 erg
energy:
B field:
1 coulomb = [3] · 109 esu 1 1 volt = statvolt [3] · 102 1 statvolt/cm 1 volt/meter = [3] · 104 1 farad = [3]2 · 1011 cm 1 1 ohm = s/cm [3]2 · 1011 1 s 1 ohm-meter = 2 [3] · 109 1 s2 /cm 1 henry = [3]2 · 1011 1 tesla = 104 gauss
H field:
1 amp/meter = 4π · 10−3 oersted
charge: E potential: E field: capacitance: resistance: resistivity: inductance:
C.2 Derivations C.2.1 Force: newton vs. dyne 1 newton = 1
kg m g cm (1000 g)(100 cm) = = 105 2 = 105 dynes. s2 s2 s (C.1)
C.2.2 Energy: joule vs. erg 1 joule = 1
2 (1000 g)(100 cm)2 kg m2 7 g cm = = 10 = 107 ergs. s2 s2 s2 (C.2)
C.2.3 Charge: coulomb vs. esu From Eqs. (1.1) and (1.2), two charges of 1 coulomb separated by a distance of 1 m exert a force on each other equal to 8.988 · 109 N ≈ 9 · 109 N, or equivalently 9 · 1014 dynes. How would someone working in Gaussian units describe this situation? In Gaussian units, Coulomb’s law gives the force simply as q2 /r2 . The separation is 100 cm, so if 1 coulomb equals N esu (with N to be determined), the 9 · 1014 dyne force between the charges can be expressed as 9 · 1014 dyne =
(N esu)2 ⇒ N 2 = 9 · 1018 ⇒ N = 3 · 109 . (100 cm)2 (C.3)
775
776
Unit conversions So 1 coulomb equals 3 ¡ 109 esu. If we had used the more exact√ value of k in Eq. (1.2), the “3â€? in this result would have been replaced by 8.988 = 2.998, which is precisely the 2.998 that appears in the speed of light, c = 2.998 ¡ 108 m/s. The reason for this is the following. If you follow through the above derivation while keeping things in terms of k ≥ 1/4Ď€ 0 , you will see that the number 3 ¡ 109 is actually {k} ¡ 105 ¡ 104 , where we have put the braces around k to signify that it is just the number 8.988 ¡ 109 without the SI units. (The factors of 105 and 104 come from the conversions to dynes and centimeters, respectively.) But we know from Eq. (6.8) that 0 = 1/Îź0 c2 , so we have k = Îź0 c2 /4Ď€. Furthermore, the numerical value of Îź0 is {Îź0 } = 4Ď€ ¡ 10−7 , so the numerical value of k is {k} = {c}2 ¡ 10−7 . Therefore, the number N that appears in Eq. (C.3) is really 9 N = {k} ¡ 10 = ({c}2 ¡ 10−7 )109 = {c} ¡ 10 = 2.998 ¡ 109 ≥ [3] ¡ 109 . (C.4) C.2.4 Potential: volt vs. statvolt 1 volt = 1
1 erg 107 erg 1 J = statvolt. = = C [3] ¡ 109 esu [3] ¡ 102 esu [3] ¡ 102 (C.5)
C.2.5 Electric field: volt/meter vs. statvolt/centimeter 1 statvolt statvolt 1 volt [3] ¡ 102 = = . 1 meter 100 cm [3] ¡ 104 cm
(C.6)
C.2.6 Capacitance: farad vs. centimeter 1 farad = 1
C = V
esu [3] ¡ 109 esu = [3]2 ¡ 1011 . 1 statvolt statvolt [3] ¡ 102
(C.7)
We can alternatively write these Gaussian units as centimeters. This is true because 1 statvolt = 1 esu/cm (because the potential from a point charge is q/r), so 1 esu/statvolt = 1 cm. We therefore have 1 farad = [3]2 ¡ 1011 cm.
(C.8)
C.2.7 Resistance: ohm vs. second/centimeter 1 statvolt 1 s V V [3] ¡ 102 = = 1 ohm = 1 = 1 A C/s [3] ¡ 109 esu/s [3]2 ¡ 1011 esu/statvolt 1 s = , (C.9) [3]2 ¡ 1011 cm where we have used 1 esu/statvolt = 1 cm.
C.2 Derivations
C.2.8 Resistivity: ohm-meter vs. second s 1 1 s. (100 cm) = 1 ohm-meter = [3]2 · 1011 cm [3]2 · 109
(C.10)
C.2.9 Inductance: henry vs. second2 /centimeter 1 statvolt V V [3] · 102 1 henry = 1 = =1 A/s C/s2 [3] · 109 esu/s2 2 s s2 1 1 = = , [3]2 · 1011 esu/statvolt [3]2 · 1011 cm
(C.11)
where we have used 1 esu/statvolt = 1 cm. C.2.10 Magnetic field B: tesla vs. gauss Consider a setup in which a charge of 1 C travels at 1 m/s in a direction perpendicular to a magnetic field with strength 1 tesla. Equation (6.1) tells us that the force on the charge is 1 newton. Let us express this fact in terms of the Gaussian force relation in Eq. (6.9), which involves a factor of c. We know that 1 N = 105 dyne and 1 C = [3] · 109 esu. If we let 1 tesla = N gauss, then the way that Eq. (6.9) describes the given situation is [3] · 109 esu cm (N gauss). (C.12) 100 105 dyne = s [3] · 1010 cm/s Since 1 gauss equals 1 dyne/esu, all the units cancel (as they must), and we end up with N = 104 , as desired. This is an exact result because the two factors of [3] cancel. C.2.11 Magnetic field H: ampere/meter vs. oersted The H field is defined differently in the two systems (there is a μ0 in the SI definition), so we have to be careful. Consider a B field of 1 tesla in vacuum. What H field does this B field correspond to in each system? In the Gaussian system, B is 104 gauss. But in Gaussian units H = B in vacuum, so H = 104 oersted, because an oersted and a gauss are equivalent units. In the SI system we have (you should verify these units) H=
1 tesla 107 A B = = . μ0 4π m 4π · 10−7 kg m/C2
(C.13)
Since this is equivalent to 104 oersted, we arrive at 1 amp/meter = 4π · 10−3 oersted. Going the other way, 1 oersted equals roughly 80 amp/meter.
777
D SI and Gaussian formulas
The following pages provide a list of all the main results in this book, in both SI and Gaussian units. After looking at a few of the corresponding formulas, you will discover that transforming from SI units to Gaussian units involves one or more of the three types of conversions discussed below. Of course, even if a formula takes exactly the same form in the two systems of units, it says two entirely different things. For example, the formula relating force and electric field is the same in both systems: F = qE. But in SI units this equation says that a charge of 1 coulomb placed in an electric field of 1 volt/meter feels a force of 1 newton, whereas in Gaussian units it says that a charge of 1 esu placed in an electric field of 1 statvolt/centimeter feels a force of 1 dyne. When we say that two formulas are the “same,” we mean that they look the same on the page, even though the various letters mean different things in the two systems. The three basic types of conversions from SI to Gaussian units are given in Sections D.1 to D.3. We then list the formulas in Section D.4 by chapter.
D.1 Eliminating 0 and μ0 Our starting point in this book was Coulomb’s law in Eq. (1.4). The SI expression for this law contains the factor 1/4π 0 , whereas the Gaussian expression has no factor (or rather just a 1). To convert from SI units to Gaussian units, we therefore need to set 4π 0 = 1, or equivalently 0 = 1/4π (along with possibly some other changes, as we will see below). That is, we need to erase all factors of 4π 0 that appear, or equivalently replace all 0 ’s with 1/4π’s. In many formulas this change
D.2 Changing B to B/c
is all that is needed. A few examples are: Gauss’s law, Eq. (1.31) in the list in Section D.4;1 the field due to a line or sheet, Eqs. (1.39) and (1.40); the energy in an electric field, Eq. (1.53); and the capacitance of a sphere or parallel plates, Eqs. (3.10) and (3.15). A corollary of the 0 → 1/4π rule is the μ0 → 4π/c2 rule. We introduced μ0 in Chapter 6 via the definition μ0 ≡ 1/0 c2 , so if we replace 0 with 1/4π, we must also replace μ0 with 4π/c2 . An example of this μ0 → 4π/c2 rule is the force between two current-carrying wires, Eq. (6.15). It is also possible to use these rules to convert formulas in the other direction, from Gaussian units to SI units, although the process isn’t quite as simple. The conversion must (at least for conversions where only 0 and μ0 are relevant) involve multiplying by some power of 4π 0 (or equivalently 4π/μ0 c2 ). And there is only one power that will make the units of the resulting SI expression correct, because 0 has units, namely C2 s2 kg−1 m−3 . For example, the Gaussian expression for the field due to a sheet of charge is 2π σ in Eq. (1.40) in the list below, so the SI expression must take the form of 2π σ (4π 0 )n . You can quickly show that 2π σ (4π 0 )−1 = σ/20 has the correct units of electric field (it suffices to look at the power of any one of the four units: kg, m, s, C).
D.2 Changing B to B/c If all quantities were defined in the same way in the two systems of units (up to factors of 4π 0 and 4π/μ0 c2 ), then the above rules involving 0 and μ0 would be sufficient for converting from SI units to Gaussian units. But unfortunately certain quantities are defined differently in the two systems, so we can’t convert from one system to the other without knowing what these arbitrary definitions are. The most notable example of differing definitions is the magnetic field. In SI units the Lorentz force (or rather the magnetic part of it) is F = qv × B, while in Gaussian units it is F = (q/c)v × B. To convert from an SI formula to a Gaussian formula, we therefore need to replace every B with a B/c (and likewise for the vector potential A). An example of this is the B field from an infinite wire, Eq. (6.6). In SI units we have B = μ0 I/2πr. Applying our rules for μ0 and B, the Gaussian B field is obtained as follows: μ0 I B 4π 2I I B= −→ = ⇒ B = , (D.1) 2 2π r c 2πr rc c which is the correct result. Other examples involving the B → B/c rule include Ampère’s law, Eqs. (6.19) and (6.25); the Lorentz transformations, Eq. (6.76); and the energy in a magnetic field, Eq. (7.79). 1 The “double” equations in the list in Section D.4, where the SI and Gaussian formulas
are presented side by side, are labeled according to the equation number that the SI formula has in the text.
779
780
SI and Gaussian formulas
D.3 Other definitional differences The above two conversion procedures are sufficient for all formulas up to and including Chapter 9. However, in Chapters 10 and 11 we encounter a number of new quantities (χe , D, H, etc.), and many of these quantities are defined differently in the two systems of units,2 mainly due to historical reasons. For example, after using the 0 → 1/4π rule in Eq. (10.41), we see that we need to replace χe by 4π χe in going from SI to Gaussian units. The Gaussian expression is then given by P −→ (4π χe ) = χe = 0 E
4π 1
P P ⇒ χe = , E E
(D.2)
which is correct. This χe → 4π χe rule is consistent with Eq. (10.42). Similarly, Eq. (10.63) shows that D is replaced by D/4π. On the magnetic side of things, a few examples are the following. Equation (11.9) shows that m (and hence M) is replaced by cm when going from SI to Gaussian units (because m = Ia → cm = Ia ⇒ m = Ia/c, which is the correct Gaussian expression). Also, Eqs. (11.69) and (11.70) show that H is replaced by (c/4π )H. Let’s check that Eq. (11.68) is consistent with these rules. The SI expression for H is converted to Gaussian as follows: c c2 B 1 B − M −→ H = − (cM) H= μ0 4π 4π c ⇒ H = B − 4π M,
(D.3)
which is the correct Gaussian expression. Although it is possible to remember all the different rules and then convert things at will, there are so many differing definitions in Chapters 10 and 11 that it is probably easiest to look up each formula as you need it. But for Chapters 1–9, you can get a lot of mileage out of the first two rules above, namely (1) 0 → 1/4π, μ0 → 4π/c2 , and (2) B → B/c.
D.4 The formulas In the pages that follow, the SI formula is given first, followed by the Gaussian equivalent.
2 The preceding case with B is simply another one of these differences, but we have
chosen to discuss it separately because the B field appears so much more often in this book than other such quantities.
D.4 The formulas
Chapter 1 Coulomb’s law (1.4):
F=
1 q1 q2 rˆ 4π 0 r2
F=
q1 q2 rˆ r2
potential energy (1.9):
U=
1 q1 q2 4Ď€ 0 r
U=
q1 q2 r
electric field (1.20):
E=
1 qˆr 4π 0 r2
E=
qˆr r2
force and field (1.21):
F = qE = E ¡ da
(same)
flux (1.26): Gauss’s law (1.31): field due to line (1.39): field due to sheet (1.40): E across sheet (1.41): field near shell (1.42): F/(area) on sheet (1.49): energy in E field (1.53):
E ¡ da =
q 0
Îť 2Ď€ 0 r Ďƒ E= 20 Ďƒ E = nˆ 0 Ďƒ Er = 0 F 1 = E1 + E2 Ďƒ A 2 0 U= E2 dv 2 Er =
Chapter 2 φ=−
field and potential (2.16):
E = âˆ’âˆ‡Ď† Ď dv φ= 4Ď€ 0 r 1 Ď Ď† dv U= 2
potential energy (2.32):
E ¡ da = 4π q Er =
2Îť r
E = 2Ď€ Ďƒ E = 4Ď€ Ďƒ nˆ Er = 4Ď€ Ďƒ (same) U=
1 8Ď€
E2 dv
electric potential (2.4):
potential and density (2.18):
(same)
E ¡ ds
q cos θ 4π 0 r2
dipole potential (2.35):
φ=
dipole moment (2.35):
p = q
(same) (same) Ď dv φ= r (same) φ=
q cos θ r2
(same)
781
782
SI and Gaussian formulas
dipole field (2.36):
E=
q 2 cos θ rˆ + sin θ θˆ 3 4π 0 r
F ¡ da =
divergence theorem (2.49):
div F dv
S
Ď 0
div E = 4Ď€Ď
div E =
E and φ (2.70):
div E = −∇ 2 φ
Stokes’ theorem (2.83):
(same)
V
E and Ď (2.52):
φ and Ď (2.72):
(same)
Ď 0 F ¡ ds = curl F ¡ da ∇ 2φ = −
C
∇ 2 φ = −4Ď€Ď (same)
S
Chapter 3 charge and capacitance (3.7):
Q = Cφ
(same)
sphere C (3.10):
C = 4Ď€ 0 a
C=a
parallel-plate C (3.15):
C=
energy in capacitor (3.29):
0 A s 1 U = Cφ 2 2
Chapter 4
C=
A 4Ď€ s
(same)
current, current density (4.7):
I=
J and Ď (4.10):
div J = −
conductivity (4.11):
J = ĎƒE
(same)
Ohm’s law (4.12):
V = IR 1 J= E Ď
(same)
resistivity (4.16):
q E = 3 2 cos θ rˆ + sin θ θˆ r
J ¡ da
(same)
âˆ‚Ď âˆ‚t
(same)
(same)
resistance, resistivity (4.17):
R=
Ď L A
(same)
power (4.31):
P = IV = I 2 R
(same)
R, C time constant (4.43):
Ď„ = RC
(same)
D.4 The formulas
Chapter 5
783
charge in a region (5.2):
F = qE + qv × B Q = 0 E · da
q F = qE + v × B c 1 E · da Q= 4π
E transformations (5.7):
E = E , E⊥ = γ E⊥
(same)
E from moving Q (5.15):
E =
F transformations (5.17):
dp dp⊥ dp 1 dp ⊥ = , = dt dt dt γ dt
F from current (5.28):
Fy =
Lorentz force (5.1):
Q 1 − β2
2 4π 0 r (1 − β 2 sin2 θ )3/2
1 μ0 0
(no analog)
speed of light (6.8):
c2 =
F on a wire (6.14):
F = IBl
vector potential (6.32): A and J (6.44):
2qvx I rc2
B = zˆ
B = zˆ
(differential form) (6.25):
Fy =
μ0 I I = zˆ 2π r 2π 0 rc2
B due to wire (6.3), (6.6):
Ampère’s law (6.19):
(same)
qvx I 2π 0 rc2
Chapter 6
F between wires (6.15):
Q 1 − β2 E = 2 r (1 − β 2 sin2 θ )3/2
μ 0 I1 I2 l F= 2πr B · ds = μ0 I
2I rc
IBl c 2I1 I2 l F= 2 c r 4π B · ds = I c
F=
curl B = μ0 J
curl B =
B = curl A J dv μ0 A= 4π r
(same)
μ0 I dl × rˆ 4π r2
Biot–Savart law (6.49):
dB =
B in solenoid (6.57):
Bz = μ0 nI
B across sheet (6.58):
B = μ0 J
F/(area) on sheet (6.63):
2 (B+ )2 − (B− F z ) = z A 2μ0
1 A= c
4π J c J dv r
I dl × rˆ c r2 4π nI Bz = c 4π J B = c dB =
2 (B+ )2 − (B− F z ) = z A 8π
784
SI and Gaussian formulas
E, B transforms (6.76):
Hall Et field (6.84):
E = E
(same)
B = B E ⊼ = Îł E⊼ + β Ă— cB⊼ cB ⊼ = Îł cB⊼ − β Ă— E⊼
(same)
Et =
−J Ă— B nq
Chapter 7 electromotive force (7.5):
1 E= q
Faraday’s law (7.26):
E =−
Et =
mutual inductance (7.37), (7.38): self-inductance (7.57), (7.58): L of toroid (7.62):
f ¡ ds d dt
∂B ∂t dI1 E21 = −M21 dt dI1 E11 = −L1 dt 2 b Îź0 N h ln L= 2Ď€ a
R, L time constant (7.69):
Ď„ = L/R
energy in inductor (7.74):
U=
1 2 LI 2 1 B2 dv U= 2Îź0
energy in B field (7.79):
−J Ă— B nqc
curl E = −
(differential form) (7.31):
E ⊼ = Îł E⊼ + β Ă— B⊼ B ⊼ = Îł B⊼ − β Ă— E⊼
(same) 1 d c dt 1 ∂B curl E = − c ∂t E =−
(same) (same) b 2N 2 h L = 2 ln a c (same) (same) U=
1 8Ď€
Chapter 8 RLC time constant (8.8):
RLC frequency (8.9): Q factor (8.12): I0 for series RLC (8.38):
1 2L = Îą R & 1 R2 ω= − 2 LC 4L energy Q=ω¡ power Ď„=
E0 I0 = R2 + (ωL − 1/ωC)2
(same)
(same) (same) (same)
B2 dv
D.4 The formulas
φ for series RLC (8.39): resonant ω (8.41):
1 ωL − RωC R 1 ω0 = √ LC tan φ =
(same) (same)
width of I curve (8.45):
1 2| ω| = ω0 Q
(same)
admittance (8.61):
I˜ = Y V˜
(same)
impedance (8.62):
V˜ = Z I˜
(same)
impedances (Table 8.1):
R, iωL, −i/ωC
(same)
average power in R (8.81):
PR =
average power (general) (8.85):
P = Vrms Irms cos φ
2 Vrms R
(same) (same)
Chapter 9 displacement current (9.15): Maxwell’s equations (9.17):
Jd = 0
∂E ∂t
∂B ∂t ∂E + μ0 J curl B = μ0 0 ∂t ρ div E = 0 curl E = −
div B = 0 1 =c μ0 0
1 ∂E 4π ∂t 1 ∂B curl E = − c ∂t 1 ∂E 4π curl B = + J c ∂t c Jd =
div E = 4πρ (same) v=c
speed of wave (9.26), (9.27):
v= √
E, B amplitudes (9.26), (9.27):
E0 = √
power density (9.34):
S = 0 E 2 c
Poynting vector (9.42):
S=
invariant 1 (9.51):
E · B = E · B
(same)
invariant 2 (9.51):
E 2 − c2 B 2 = E2 − c2 B2
E 2 − B 2 = E2 − B2
B0 = cB0 μ0 0
E×B μ0
E0 = B0 E2 c 4π c S= E×B 4π
S=
785
786
SI and Gaussian formulas
Chapter 10
dipole moment (10.13):
κ = Q/Q0 p = r ρ dv
dipole potential (10.14):
φ(r) =
dipole (Er , Eθ ) (10.18):
p (2 cos θ, sin θ ) 4π 0 r3
p (2 cos θ, sin θ ) r3
torque on dipole (10.21):
N=p×E
(same)
force on dipole (10.26):
Fx = p · grad Ex
(same)
polarizability (10.29):
p = αE
(same)
polarization density (10.31):
P = pN
φ due to column (10.34):
P da φ= 4π 0
surface density (10.35):
σ =P
average field (10.37):
E = −
susceptibility (10.41):
χe =
χe and κ (10.42):
χe = κ − 1
E in polar sphere (10.47):
Ein = −
permittivity (10.56):
= κ0
(no analog)
P divergence (10.61):
div P = −ρbound
(same)
displacement D (10.63):
D = 0 E + P
D = E + 4π P
D divergence (10.64):
div D = ρfree
div D = 4πρfree
D for linear (10.65):
D = E
D = κE
χe for weak E (10.73):
χe ≈
dielectric constant (10.3):
bound current J (10.74): curl of B (10.78):
(same) (same)
rˆ · p 4π 0 r2
1 1 − r2 r1
φ(r) =
(same)
1 1 − φ = P da r2 r1
(same) P 0
P 0 E
P 30
Np2 0 kT
∂P ∂t ∂D + μ0 J curl B = μ0 ∂t Jbound =
rˆ · p r2
E = −4π P χe =
P E
κ −1 4π 4π P Ein = − 3
χe =
χe ≈
Np2 kT
(same) curl B =
1 ∂D 4π + J c ∂t c
D.4 The formulas
speed of wave (10.83):
c v= √ κ
(same)
E, B amplitudes (10.83):
cB0 E0 = √ = vB0 κ
B0 E0 = √ κ
Chapter 11 dipole moment (11.9):
m = Ia
vector potential (11.10):
A=
dipole (Br , Bθ ) (11.15):
μ0 m (2 cos θ , sin θ ) 4πr3
Ia c m × rˆ A= r2 m (2 cos θ, sin θ ) r3
force on dipole (11.23):
F = ∇(m · B)
(same)
orbital m for e (11.29):
m=
polarizability (11.41):
e2 r2 m =− B 4me
m e2 r2 =− B 4me c2
torque on dipole (11.47):
N=m×B
(same)
polarization density (11.51):
M=
susceptibility χm (11.52):
μ0 m × rˆ 4π r2
−e L 2me
m volume B M = χm μ0 μ0 Nm2 kT
m=
m=
−e L 2me c
(same) M = χm B
χpm ≈
surface density J (11.55):
J =M
J = Mc
volume density J (11.56):
J = curl M
J = c curl M
H field (11.68):
H=
curl of H (11.69):
curl H = Jfree H · dl = Ifree
4π curl H = Jfree c 4π H · dl = Ifree c
χm (accepted def.) (11.72):
M = χm H
(same)
permeability (11.74):
μ = μ0 (1 + χm )
μ = 1 + 4π χm
B and H (11.74):
B = μH
(same)
(integrated form) (11.70):
B −M μ0
χpm ≈
Nm2 kT
χpm for weak B (11.53):
H = B − 4π M
787
788
SI and Gaussian formulas
Appendix H
qa sin θ 4π 0 c2 R
Eθ =
q2 a2 6π 0 c3
Prad =
tangential Eθ (H.3):
Eθ =
power (H.7):
Prad =
qa sin θ c2 R 2q2 a2 3c3
E In 1983 the General Conference on Weights and Measures officially redefined the meter as the distance that light travels in vacuum during a time interval of 1/299,792,458 of a second. The second is defined in terms of a certain atomic frequency in a way that does not concern us here. The nine-digit integer was chosen to make the assigned value of c agree with the most accurate measured value to well within the uncertainty in the latter. Henceforth the velocity of light is, by definition, 299,792,458 meters/second. An experiment in which the passage of a light pulse from point A to point B is timed is to be regarded as a measurement of the distance from A to B, not a measurement of the speed of light. While this step has no immediate practical consequences, it does bring a welcome simplification of the exact relations connecting various electromagnetic units. As we learn in Chapter 9, Maxwell’s equations for the vacuum fields, formulated in SI units, have a solution in the form of a traveling wave with velocity c = (μ0 0 )−1/2 . The SI constant μ0 has always been defined exactly as 4π · 10−7 kg m/C2 , whereas the value of 0 has depended on the experimentally determined value of the speed of light, any refinement of which called for adjustment of the value of 0 . But now 0 acquires a permanent and perfectly precise value of its own, through the requirement that (μ0 0 )−1/2 = 299,792,458 meters/second.
(E.1)
In the Gaussian system no such question arises. Wherever c is involved, it appears in plain view, and all other quantities are defined exactly, beginning with the electrostatic unit of charge, the esu, whose definition by Coulomb’s law involves no arbitrary factor.
Exact relations among SI and Gaussian units
790
Exact relations among SI and Gaussian units
With the adoption of Eq. (E.1) in consequence of the redefinition of the meter, the relations among the units in the systems we have been using can be stated with unlimited precision. These relations are listed at the beginning of Appendix C for the principal quantities we deal with. In the list the symbol [3] stands for the precise decimal 2.99792458. The exact numbers are uninteresting and for our work quite unnecessary. It is sheer luck that [3] happens to be so close to 3, an accidental consequence of the length of the meter and the second. When 0.1 percent accuracy is good enough we need only remember that “300 volts is a statvolt” and “3 · 109 esu is a coulomb.” Much less precisely, but still within 12 percent, a capacitance of 1 cm is equivalent to 1 picofarad. An important SI constant is (μ0 /0 )1/2 , which is a resistance in ohms. Since 0 = 1/μ0 c2 , this resistance equals μ0 c. Using the exact values of μ0 and c, we find (μ0 /0 )1/2 = 40π ·[3] ohms ≈ 376.73 ohms. One tends to remember it, and even refer to it, as “377 ohms.” It is the ratio of the electric field strength E, in volts/meter, in a plane wave in vacuum, to the strength, in amperes/meter, of the accompanying magnetic field H. For this reason the constant (μ0 /0 )1/2 is sometimes denoted by Z0 and called, rather cryptically, the impedance of the vacuum. In a plane wave in vacuum in which Erms is the rms electric field in volts/meter, the 2 /Z . mean density of power transmitted, in watts/m2 , is Erms 0 The logical relation of the SI electrical units to one another now takes on a slightly different aspect. Before the redefinition of the meter, it was customary to designate one of the electrical units as primary, in this sense: its precise value could, at least in principle, be established by a procedure involving the SI mechanical and metrical units only. Thus the ampere, to which this role has usually been assigned, was defined in terms of the force in newtons between parallel currents, using the relation in Eq. (6.15). This was possible because the constant μ0 in that relation has the precise value 4π · 10−7 kg m/C2 . Then with the ampere as the primary electrical unit, the coulomb was defined precisely as 1 amperesecond. The coulomb itself, owing to the presence of 0 in Coulomb’s law, was not eligible to serve as the primary unit. Now with 0 as well as μ0 assigned an exact numerical value, the system can be built up with any unit as the starting point. All quantities are in this sense on an equal footing, and the choice of a primary unit loses its significance. Never a very interesting question anyway, it can now be relegated to history.
F We begin this appendix by listing the main vector operators (gradient, divergence, curl, Laplacian) in Cartesian, cylindrical, and spherical coordinates. We then talk a little about each operator – define things, derive a few results, give some examples, etc. You will note that some of the expressions below are rather scary looking. However, you won’t have to use their full forms in this book. In the applications that come up, invariably only one or two of the terms in the expressions are nonzero.
F.1 Vector operators F.1.1 Cartesian coordinates ds = dx xˆ + dy yˆ + dz zˆ , ∇ = xˆ ∇f =
∂ ∂ ∂ + yˆ + zˆ , ∂x ∂y ∂z
∂f ∂f ∂f xˆ + yˆ + zˆ , ∂x ∂y ∂z
∂Ay ∂Ax ∂Az + + , ∂x ∂y ∂z ∂Ay ∂Ay ∂Ax ∂Az ∂Ax ∂Az xˆ + yˆ + zˆ , − − − ∇ ×A= ∂y ∂z ∂z ∂x ∂x ∂y ∇ ·A=
∇ 2f =
∂ 2f ∂ 2f ∂ 2f + + . ∂x2 ∂y2 ∂z2
(F.1)
Curvilinear coordinates
792
Curvilinear coordinates
F.1.2 Cylindrical coordinates ds = dr rˆ + r dθ θˆ + dz zˆ , ∇ = rˆ ∇f =
1 ∂ ∂ ∂ + θˆ + zˆ , ∂r r ∂θ ∂z
1 ∂f ˆ ∂f ∂f rˆ + θ+ zˆ , ∂r r ∂θ ∂z
∂Az 1 ∂(rAr ) 1 ∂Aθ + + , r ∂r r ∂θ ∂z 1 ∂Az ∂Aθ ∂Az ˆ ∂Ar ∇ ×A= − rˆ + − θ r ∂θ ∂z ∂z ∂r 1 ∂(rAθ ) ∂Ar zˆ , − + r ∂r ∂θ 1 ∂ ∂ 2f ∂f 1 ∂ 2f ∇ 2f = r + 2 2 + 2. r ∂r ∂r r ∂θ ∂z ∇ ·A=
(F.2)
F.1.3 Spherical coordinates ˆ ds = dr rˆ + r dθ θˆ + r sin θ dφ φ, ∇ = rˆ ∇f =
∂ 1 ∂ 1 ∂ + θˆ + φˆ , ∂r r ∂θ r sin θ ∂φ
∂f 1 ∂f ˆ 1 ∂f ˆ rˆ + θ+ φ, ∂r r ∂θ r sin θ ∂φ
1 ∂(Aθ sin θ ) 1 ∂Aφ 1 ∂(r2 Ar ) + + , 2 ∂r r sin θ ∂θ r sin θ ∂φ r ∂(Aφ sin θ ) ∂Aθ ∂(rAφ ) ˆ 1 1 ∂Ar 1 rˆ + − − θ, ∇ ×A= r sin θ ∂θ ∂φ r sin θ ∂φ ∂r 1 ∂(rAθ ) ∂Ar ˆ − φ, + r ∂r ∂θ ∂f 1 ∂ 1 ∂f 1 ∂ 2f ∂ . r2 + 2 sin θ + ∇ 2f = 2 2 ∂r ∂θ r ∂r r sin θ ∂θ r2 sin θ ∂φ 2 (F.3) ∇ ·A=
F.2 Gradient The gradient produces a vector from a scalar. The gradient of a function f , written as ∇f or grad f , may be defined1 as the vector with the 1 We used a different definition in Section 2.3, but we will show below that the two
definitions are equivalent.
F.2 Gradient
property that the change in f brought about by a small change ds in position is df = ∇f · ds.
(F.4)
The vector ∇f depends on position; there is a different gradient vector associated with each point in the parameter space. You might wonder whether a vector that satisfies Eq. (F.4) actually exists. We are claiming that if f is a function of, say, three variables, then at every point in space there exists a unique vector, ∇f , such that for any small displacement ds from a given point, the change in f equals ∇f · ds. It is not immediately obvious why a single vector gets the job done for all possible displacements ds from a given point. But the existence of such a vector can be demonstrated in two ways. First, we can explicitly construct ∇f ; we will do this below in Eq. (F.5). Second, any (well-behaved) function looks like a linear function up close, and for a linear function a vector ∇f satisfying Eq. (F.4) does indeed exist. We will explain why in what follows. However, before addressing this issue, let us note an important property of the gradient. From the definition in Eq. (F.4), it immediately follows (as mentioned in Section 2.3) that ∇f points in the direction of steepest ascent of f . This is true because we can write the dot product ∇f · ds as |∇f ||ds| cos θ, where θ is the angle between the vector ∇f and the vector ds. So for a given length of the vector ds, this dot product is maximized when θ = 0. We therefore want the displacement ds to point in the direction of ∇f , if we want to produce the maximum change in f . If we consider the more easily visualizable case of a function of two variables, the function can be represented by a surface above the xy plane. This surface is locally planar; that is, a sufficiently small bug walking around on it would think it is a (generally tilted) flat plane. If we look at the direction of steepest ascent in the local plane, and then project this line onto the xy plane, the resulting line is the direction of ∇f ; see Fig. 2.5. The function f is constant along the direction perpendicular to ∇f . The magnitude of ∇f equals the change in f per unit distance in the parameter space, in the direction of ∇f . Equivalently, if we restrict the parameter space to the one-dimensional line in the direction of steepest ascent, then the gradient is simply the standard single-variable derivative in that direction. We could alternatively work “backwards” and define the gradient as the vector that points in the direction (in the parameter space) of steepest ascent, with its magnitude equal to the rate of change in that direction. It then follows that the general change in f , for any displacement ds in the parameter space, is given by Eq. (F.4). This is true because the dot product picks out the component of ds along the direction of ∇f . This component causes a change in f , whereas the orthogonal component does not.
793
794
f (x, y)
Curvilinear coordinates ds associated with P (direction of gradient) P
y Q
x Components of ds associated with Q
Figure F.1. Only the component of ds in the direction of the gradient causes a change in f .
Figure F.1 shows how this works in the case of a function of two variables. We have assumed for simplicity that the local plane representing the surface of the function intersects the xy plane along the x axis. (We can always translate and rotate the coordinate system so that this is true at a given point.) The gradient then points in the y direction. The point P shown lies in the direction straight up the plane from the given point. The projection of this direction onto the xy plane lies along the gradient. The point Q is associated with a ds interval that doesn’t lie along the gradient in the xy plane. This ds can be broken up into an interval along the x axis, which causes no change in f , plus an interval in the y direction, or equivalently the direction of the gradient, which causes the change in f up to the point Q. The preceding two paragraphs explain why the vector ∇f defined by Eq. (F.4) does in fact exist; any well-behaved function is locally linear, and a unique vector ∇f at each point will get the job done in Eq. (F.4) if f is linear. But as mentioned above, we can also demonstrate the existence of such a vector by simply constructing it. Let’s calculate the gradient in Cartesian coordinates, and then in spherical coordinates. F.2.1 Cartesian gradient In Cartesian coordinates, a general change in f for small displacements can be written as df = (∂f /∂x)dx + (∂f /∂y)dy + (∂f /∂z)dz. This is just the start of the Taylor series in three variables. The interval ds is simply (dx, dy, dz), so if we want ∇f · ds to be equal to df , we need ∂f ∂f ∂f ∂f ∂f ∂f , , ≡ xˆ + yˆ + zˆ , (F.5) ∇f = ∂x ∂y ∂z ∂x ∂y ∂z in agreement with the ∇f expression in Eq. (F.1). In Section 2.3 we took Eq. (F.5) as the definition of the gradient and then discussed its other properties. F.2.2 Spherical gradient In spherical coordinates, a general change in f is given by df = (∂f /∂r)dr + (∂f /∂θ)dθ + (∂f /∂φ)dφ. However, the interval ds takes a more involved form compared with the Cartesian ds. It is ˆ ds = (dr, r dθ , r sin θ dφ) ≡ dr rˆ + r dθ θˆ + r sin θ dφ φ.
(F.6)
If we want ∇f · ds to be equal to df , then we need ∇f =
1 ∂f ∂f 1 ∂f , , ∂r r ∂θ r sin θ ∂φ
in agreement with Eq. (F.3).
≡
∂f 1 ∂f ˆ 1 ∂f ˆ rˆ + θ+ φ, (F.7) ∂r r ∂θ r sin θ ∂φ
F.3 Divergence
795
We see that the extra factors (compared with the Cartesian case) in the denominators of the gradient come from the coefficients of the unit vectors in the expression for ds. Similarly, the form of the gradient in cylindrical coordinates in Eq. (F.2) can be traced to the fact that the interval ds equals dr rˆ + r dθ θˆ + dz zˆ . Since the extra factors that appear in ds show up in the denominators of the ∇-operator terms, and since the ∇ operator determines all of the other vector operators, we see that every result in this appendix can be traced back to the form of ds in the different coordinate systems. For example, the big scary expression listed in Eq. (F.3) for the curl in spherical coordinates is a direct consequence of the ds = dr rˆ + r dθ θˆ + r sin θ dφ φˆ interval. Note that the consideration of units tells us that there must be a factor of r in the denominators in the ∂f /∂θ and ∂f /∂φ terms in the spherical gradient, and in the ∂f /∂θ term in the cylindrical gradient.
F.3 Divergence The divergence produces a scalar from a vector. The divergence of a vector function was defined in Eq. (2.47) as the net flux out of a given small volume, divided by the volume. In Section 2.10 we derived the form of the divergence in Cartesian coordinates, and it turned out to be the dot product of the ∇ operator with a vector A, that is, ∇ · A. We use the same method here to derive the form in cylindrical coordinates. We then give a second, more mechanical, derivation. A third derivation is left for Exercise F.2. F.3.1 Cylindrical divergence, first method Consider the small volume that is generated by taking the region in the r-θ plane shown in Fig. F.2 and sweeping it through a span of z values from a particular z up to z + z (the zˆ axis points out of the page). Let’s first look at the flux of a vector field A through the two faces perpendicular to the zˆ direction. As in Section 2.10, only the z component of A is relevant to the flux through these faces. In the limit of a small volume, the area of these faces is r r θ. The inward flux through the bottom face equals Az (z) r r θ, and the outward flux through the top face equals Az (z + z) r r θ . We have suppressed the r and θ arguments of Az for simplicity, and we have chosen points at the midpoints of the faces, as in Fig. 2.22. The net outward flux is therefore z faces = Az (z + z) r r θ − Az (z) r r θ Az (z + z) − Az (z) r r θ z = z =
∂Az r r θ z. ∂z
(F.8)
(r + Δr) Δq
Δr
r dq
r Δq
q
Figure F.2. A small region in the r-θ plane.
796
Curvilinear coordinates Upon dividing this net outward flux by the volume r r θ z, we obtain ∂Az /∂z, in agreement with the third term in ∇ ¡ A in Eq. (F.2). This was exactly the same argument we used in Section 2.10. The z coordinate in cylindrical coordinates is, after all, basically a Cartesian coordinate. However, things get more interesting with the r coordinate. Consider the flux through the two faces (represented by the curved lines in Fig. F.2) that are perpendicular to the rˆ direction. The key point to realize is that the areas of these two faces are not equal. The upper right one is larger. So the difference in flux through these faces depends not only on the value of Ar , but also on the ! area. The inward flux through the lower left face equals Ar (r) r θ z , and the outward ! flux through the upper right face equals Ar (r + r) (r + r) θ z . As above, we have suppressed the θ and z arguments for simplicity, and we have chosen points at the midpoints of the faces. The net outward flux is therefore r faces = (r + r)Ar (r + r) θ z − rAr (r) θ z (r + r)Ar (r + r) − rAr (r) r θ z = r =
∂(rAr ) r θ z. ∂r
(F.9)
Upon dividing this net outward flux by the volume r r θ z, we have a leftover r in the denominator, so we obtain (1/r) ∂(rAr )/∂r , in agreement with the first term in Eq. (F.2). For the last two faces, the ones perpendicular to the θˆ direction, we don’t have to worry about different areas, so we quickly obtain θ
faces
= Aθ (θ + θ ) r z − Aθ (θ ) r z Aθ (θ + θ ) − Aθ (θ ) r θ z = θ =
∂Aθ r θ z. ∂θ
(F.10)
Upon dividing this net outward flux by the volume r r θ z, we again have a leftover r in the denominator, so we obtain (1/r)(∂Aθ /∂θ), in agreement with the second term in Eq. (F.2). If you like this sort of calculation, you can repeat this derivation for the case of spherical coordinates. However, it’s actually not too hard to derive the general form of the divergence for any set of coordinates; see Exercise F.3. You can then check that this general formula reduces properly for spherical coordinates.
F.3 Divergence
797
F.3.2 Cylindrical divergence, second method Let’s determine the divergence in cylindrical coordinates by explicitly calculating the dot product, 1 ∂ ∂ ∂ ˆ θ + zˆ Az . + zˆ ¡ rˆ Ar + θA (F.11) ∇ ¡ A = rˆ + θˆ ∂r r ∂θ ∂z At first glance, it appears that ∇ ¡A doesn’t produce the form of the divergence given in Eq. (F.2). The second two terms work out, but it seems like the first term should simply be ∂Ar /∂r instead of (1/r) ∂(rAr )/∂r . However, the dot product does indeed correctly yield the latter term, because we must remember that, in contrast with Cartesian coordinates, in cylindrical coordinates the unit vectors themselves depend on position. This means that in Eq. (F.11) the derivatives in the ∇ operator also act on the unit vectors in A. This issue doesn’t come up in Cartesian coordinates because xˆ , yˆ , and zˆ are fixed vectors, but that is more the exception than the rule. Writing A in the abbreviated form (Ar , Aθ , Az ) tends to hide important information. The full expression for A is rˆ Ar + θˆAθ + zˆ Az . There are six quantities here (three vectors and three components), and if any of these quantities vary with the coordinates, then these variations cause A to change. The derivatives of the unit vectors that are nonzero are ∂ rˆ = θˆ ∂θ
and
∂ θˆ = −ˆr. ∂θ
(F.12)
To demonstrate these relations, we can look at what happens to rˆ and θˆ if we rotate them through an angle dθ . Since the unit vectors have length 1, we see from Fig. F.3 that rˆ picks up a component of length dθ in the θˆ direction, and θˆ picks up a component of length dθ in the −ˆr direction. The other seven of the nine possible derivatives are zero because none of the unit vectors depends on r or z, and furthermore zˆ doesn’t depend on θ. Due to the orthogonality of the unit vectors, we quickly see that, in addition to the three “correspondingâ€? terms that survive in Eq. (F.11), one more term is nonzero: 1 ∂ rˆ ∂Ar Ar 1 ˆ 1 ∂ (ˆrAr ) = θˆ ¡ Ar + rˆ = θˆ ¡ θA . θˆ ¡ r +0= r ∂θ r ∂θ ∂θ r r (F.13)
1 ∂Aθ ∂Az Ar ∂Ar + + + . ∂r r ∂θ ∂z r
q dq r q
q
r (Length = 1)
dq q
Figure F.3. How the rˆ and θˆ unit vectors depend on θ.
Equation (F.11) therefore becomes ∇ ¡A=
– r dq
(F.14)
The sum of the first and last terms here can be rewritten as the first term in ∇ ¡ A in Eq. (F.2), as desired.
798
Curvilinear coordinates
F.4 Curl The curl produces a vector from a vector. The curl of a vector function was defined in Eq. (2.80) as the net circulation around a given small area, divided by the area. (The three possible orientations of the area yield the three components.) In Section 2.16 we derived the form of the curl in Cartesian coordinates, and it turned out to be the cross product of the ∇ operator with the vector A, that is, ∇ Ă— A. We’ll use the same method here to derive the form in cylindrical coordinates, after which we derive it a second way, analogous to the above second method for the divergence. Actually, we’ll calculate just the z component; this should make the procedure clear. As an exercise you can calculate the other two components. F.4.1 Cylindrical curl, first method The z component of ∇ Ă— A is found by looking at the circulation around a small area in the r-θ plane (or more generally, in some plane parallel to the r-θ plane). Consider the upper right and lower left (curved) edges in Fig. F.2. Following the strategy in Section 2.16, the counterclockwise line integral along the upper right edge equals Aθ (r + r) (r + r) θ ], and the counterclockwise line integral along the lower left edge equals ! −Aθ (r) r θ . We have suppressed the θ and z arguments for simplicity, and we have chosen points at the midpoints of the edges. Note that we have correctly incorporated the fact that the upper right edge is longer than the lower left edge (the same issue that came up in the above calculation of the divergence). The net circulation along these two edges is Cθ
sides
= (r + r)Aθ (r + r) θ − rAθ (r) θ (r + r)Aθ (r + r) − rAθ (r) r θ = r
∂(rAθ ) r θ . (F.15) ∂r Upon dividing this circulation by the area r r θ,we have a leftover r in the denominator, so we obtain (1/r) ∂(rAθ )/∂r , in agreement with the first of the two terms in the z component of ∇ Ă— A in Eq. (F.2). Now consider the upper left and lower right (straight) edges. The counterclockwise line integral along the upper left edge equals −Ar (θ + θ ) r, and the counterclockwise line integral along the lower right edge equals Ar (θ ) r. The net circulation along these two edges is =
Cr sides = −Ar (θ + θ ) r + Ar (θ ) r Ar (θ + θ ) − Ar (θ ) r θ =− θ =−
∂Ar r θ . ∂θ
(F.16)
F.5 Laplacian Upon dividing this circulation by the area r r θ , we again have a leftover r in the denominator, so we obtain −(1/r)(∂Ar /∂θ), in agreement with Eq. (F.2). F.4.2 Cylindrical curl, second method Our goal is to calculate the cross product, 1 ∂ ∂ ∂ ˆ θ + zˆ Az , + zˆ × rˆ Ar + θA ∇ × A = rˆ + θˆ ∂r r ∂θ ∂z
(F.17)
while remembering that some of the unit vectors depend on the coordinates according to Eq. (F.12). As above, we’ll look at just the z component. This component arises from terms of the form rˆ × θˆ or θˆ × rˆ . In addition to the two obvious terms of this form, we also have the one involving θˆ × (∂ θˆ/∂θ), which from Eq. (F.12) equals θˆ × (−ˆr) = zˆ . The complete z component of the cross product is therefore ˆ θ) ∂(θˆAθ ) 1 ∂(ˆrAr ) 1 ∂(θA + θˆ × + θˆ × ∂r r ∂θ r ∂θ ∂Aθ 1 ∂Ar Aθ = zˆ − + . (F.18) ∂r r ∂θ r
(∇ × A)z = rˆ ×
The sum of the first and last terms here can be rewritten as the first term in the z component of ∇ × A in Eq. (F.2), as desired.
F.5 Laplacian The Laplacian produces a scalar from a scalar. The Laplacian of a function f (written as ∇ 2f or ∇·∇f ) is defined as the divergence of the gradient of f . Its physical significance is that it gives a measure of how the average value of f over the surface of a sphere compares with the value of f at the center of the sphere. Let’s be quantitative about this. Consider the average value of a function f over the surface of a sphere of radius r. Call it favg,r . If we choose the origin of our coordinate system to be the center of the sphere, then favg,r can be written as (with A being the area of the sphere) 1 1 1 2 f dA = f d, (F.19) f r d = favg,r = A 4π 4πr2 where d = sin θ dθ dφ is the solid-angle element. We are able to take the r2 outside the integral and cancel it because r is constant over the sphere. This expression for favg,r is no surprise, of course, because the integral of d over the whole sphere is 4π . But let us now take the d/dr derivative of both sides of Eq. (F.19), which will alow us to invoke
799
800
Curvilinear coordinates
the divergence theorem. On the right-hand side, the integration doesn’t involve r, so we can bring the derivative inside the integral. This yields (using rˆ · rˆ = 1) dfavg,r ∂f 1 ∂f 1 ∂f 1 rˆ · rˆ r2 d. = d = rˆ · rˆ d = 2 dr 4π ∂r 4π ∂r ∂r 4π r (F.20) (Again, we are able to bring the r2 inside the integral because r is constant over the sphere.) But rˆ r2 d is just the vector area element of the sphere, da. And rˆ (∂f /∂r) is the rˆ component of ∇f in spherical coordinates. The other components of ∇f give zero when dotted with da, so we can write dfavg,r 1 ∇f · da. (F.21) = dr 4π r2 The divergence theorem turns this into dfavg,r 1 = dr 4π r2
∇ · ∇f dV ⇒
dfavg,r 1 = dr 4π r2
∇ 2f dV (F.22)
There are two useful corollaries of this result. First, if ∇ 2f = 0 everywhere, then dfavg,r /dr = 0 for all r. In other words, the average value of f over the surface of a sphere doesn’t change as the sphere grows (while keeping the same center). So all spheres centered at a given point have the same average value of f . In particular, they have the same average value that an infinitesimal sphere has. But the average value over an infinitesimal sphere is simply the value at the center. Therefore, if ∇ 2f = 0, then the average value of f over the surface of a sphere (of any size) equals the value at the center: ∇ 2f = 0 ⇒ favg,r = fcenter .
(F.23)
This is the result we introduced in Section 2.12 and proved for the special case of the electrostatic potential φ. Second, we can derive an expression for how f changes, for small values of r. Up to this point, all of our results have been exact. We will now work in the small-r approximation. In this limit we can say that ∇ 2f is essentially constant throughout the interior of the sphere (assuming that f is well-enough behaved). So its value everywhere is essentially the value at the center. The volume integral in Eq. (F.22) then equals (4πr3 /3)(∇ 2f )center , and we have dfavg,r dfavg,r 1 4π r3 2 r = (∇ f )center ⇒ = (∇ 2f )center . (F.24) 2 dr dr 3 4π r 3
Exercises Since (∇ 2f )center is a constant, we can quickly integrate both sides of this relation to obtain r2 2 (for small r), (F.25) (∇ f )center 6 where the constant of integration has been chosen to give equality at r = 0. We see that the average value of f over a (small) sphere grows quadratically, with the quadratic coefficient being 1/6 times the value of the Laplacian at the center. Let’s check this result for the function f (r, θ , φ) = r2 , or equivalently f (x, y, z) = x2 + y2 + z2 . By using either Eq. (F.1) or Eq. (F.3) we obtain ∇ 2f = 6. If our sphere is centered at the origin, then Eq. (F.25) gives favg,r = 0 + (r2 /6)(6) = r2 , which is correct because f takes on the constant value of r2 over the sphere. In this simple case, the result is exact for all r. favg,r = fcenter +
F.5.1 Cylindrical Laplacian Let’s explicitly calculate the Laplacian in cylindrical coordinates by calculating the divergence of the gradient of f . As we’ve seen in a few cases above, we must be careful to take into account the position dependence of some of the unit vectors. We have 1 ∂ ∂ ∂f 1 ∂f ∂f ∂ + zˆ · rˆ + θˆ + zˆ . (F.26) ∇ · ∇f = rˆ + θˆ ∂r r ∂θ ∂z ∂r r ∂θ ∂z In addition to the three “corresponding” terms, we also have the term involving θˆ · (∂ rˆ /∂θ), which from Eq. (F.12) equals θˆ · θˆ = 1. So this fourth term reduces to (1/r)(∂f /∂r). The Laplacian is therefore ∂ ∂f 1 ∂ 1 ∂f ∂ ∂f 1 ∂f 2 + + + ∇f = ∂r ∂r r ∂θ r ∂θ ∂z ∂z r ∂r =
∂ 2f 1 ∂ 2f ∂ 2f 1 ∂f + + + . r ∂r ∂r2 r2 ∂θ 2 ∂z2
(F.27)
The sum of the first and last terms here can be rewritten as the first term in the ∇ 2f expression in Eq. (F.2), as desired.
Exercises F.1
Divergence using two systems ** (a) The vector A = x xˆ + y yˆ in Cartesian coordinates equals the vector A = r rˆ in cylindrical coordinates. Calculate ∇ · A in both Cartesian and cylindrical coordinates, and verify that the results are equal. (b) Repeat (a) for the vector A = x xˆ + 2y yˆ . You will need to find the cylindrical components of A, which you can do by using xˆ = rˆ cos θ − θˆ sin θ and yˆ = rˆ sin θ + θˆ cos θ. Alternatively,
801
802
Curvilinear coordinates you can project A onto the unit vectors, rˆ = xˆ cos θ + yˆ sin θ and θˆ = −ˆx sin θ + yˆ cos θ . F.2
Cylindrical divergence *** Calculate the divergence in cylindrical coordinates in the following way. We know that the divergence in Cartesian coordinates is ∇ · A = ∂Ax /∂x + ∂Ay /∂y + ∂Az /∂z. To rewrite this in terms of cylindrical coordinates, show that the Cartesian derivative operators can be written as (the ∂/∂z derivative stays the same) ∂ 1 ∂ ∂ = cos θ − sin θ , ∂x ∂r r ∂θ ∂ 1 ∂ ∂ = sin θ + cos θ , ∂y ∂r r ∂θ
(F.28)
and that the components of A can be written as (Az stays the same) Ax = Ar cos θ − Aθ sin θ , Ay = Ar sin θ + Aθ cos θ .
(F.29)
Then explicitly calculate ∇ · A = ∂Ax /∂x + ∂Ay /∂y + ∂Az /∂z. It gets to be a big mess, but it simplifies in the end. F.3
General expression for divergence *** Let xˆ 1 , xˆ 2 , xˆ 3 be the (not necessarily Cartesian) basis vectors of a coordinate system. For example, in spherical coordinates these ˆ Note that the ds line elements listed at the vectors are rˆ , θˆ, φ. beginning of this appendix all take the form of ds = f1 dx1 xˆ 1 + f2 dx2 xˆ 2 + f3 dx3 xˆ 3 ,
(F.30)
where the f factors are (possibly trivial) functions of the coordinates. For example, in Cartesian coordinates, f1 , f2 , f3 are 1, 1, 1; in cylindrical coordinates they are 1, r, 1; and in spherical coordinates they are 1, r, r sin θ . As we saw in Section F.2, these values of f determine the form of ∇ (the f factors simply end up in the denominators), so they determine everything about the various vector operators. Show, by applying the first method we used in Section F.3, that the general expression for the divergence is ∂(f2 f3 A1 ) ∂(f1 f3 A2 ) ∂(f1 f2 A3 ) 1 + + . (F.31) ∇ ·A= f1 f2 f3 ∂x1 ∂x2 ∂x3 Verify that this gives the correct result in the case of spherical coordinates. (The general expression for the curl can be found in a similar way.)
Exercises
F.4
Laplacian using two systems ** (a) The function f = x2 + y2 in Cartesian coordinates equals the function f = r2 in cylindrical coordinates. Calculate ∇ 2f in both Cartesian and cylindrical coordinates, and verify that the results are equal. (b) Repeat (a) for the function f = x4 + y4 . You will need to determine what f looks like in cylindrical coordinates.
F.5
“Sphere” averages in one and two dimensions ** Equation (F.25) holds for a function f in 3D space, but analogous results also hold in 2D space (where the “sphere” is a circle bounding a disk) and in 1D space (where the “sphere” is two points bounding a line segment). Derive those results. Although it is possible to be a little more economical in the calculations by stripping off some dimensions at the start, derive the results in a 3D manner exactly analogous to the way we derived Eq. (F.25). For the 2D case, the relevant volume is a cylinder, with f having no dependence on z. For the 1D case, the relevant volume is a rectangular slab, with f having no dependence on y or z. The 1D result should look familiar from the standard 1D Taylor series.
F.6
Average over a cube *** By using the second-order Taylor expansion for a function of three Cartesian coordinates, show that the average value of a function f over the surface of a cube of side 2 (with edges parallel to the coordinate axes) is 5 2 2 (F.32) (∇ f )center . 18 You should convince yourself why the factor of 5/18 here √ is correctly larger than the 1/6 in Eq. (F.25) and smaller than ( 3)2 /6. favg = fcenter +
803
G A short review of special relativity
G.1 Foundations of relativity We assume that the reader has already been introduced to special relativity. Here we shall review the principal ideas and formulas that are used in the text beginning in Chapter 5. Most essential is the concept of an inertial frame of reference for space-time events and the transformation of the coordinates of an event from one inertial frame to another. A frame of reference is a coordinate system laid out with measuring rods and provided with clocks. Clocks are everywhere. When something happens at a certain place, the time of its occurrence is read from a clock that was at, and stays at, that place. That is, time is measured by a local clock that is stationary in the frame. The clocks belonging to the frame are all synchronized. One way to accomplish this (not the only way) was described by Einstein in his great paper of 1905. Light signals are used. From a point A, at time tA , a short pulse of light is sent out toward a remote point B. It arrives at B at the time tB , as read on a clock at B, and is immediately reflected back toward A, where it arrives at tA . If tB = (tA + tA )/2, the clocks at A and B are synchronized. If not, one of them requires adjustment. In this way, all clocks in the frame can be synchronized. Note that the job of observers in this procedure is merely to record local clock readings for subsequent comparison. An event is located in space and time by its coordinates x, y, z, t in some chosen reference frame. The event might be the passage of a particle at time t1 , through the space point (x1 , y1 , z1 ). The history of the particle’s motion is a sequence of such events. Suppose the sequence has the special property that x = vx t, y = vy t, z = vz t, at every time t, with vx , vy , and vz constant. That describes motion in a straight line at
G.2 Lorentz transformations
constant speed with respect to this frame. An inertial frame of reference is a frame in which an isolated body, free from external influences, moves in this way. An inertial frame, in other words, is one in which Newton’s first law is obeyed. Behind all of this, including the synchronization of clocks, are two assumptions about empty space: it is homogeneous (that is, all locations in space are equivalent) and it is isotropic (that is, all directions in space are equivalent). Two frames, let us call them F and F , can differ in several ways. One can simply be displaced with respect to the other, the origin of coordinates in F being fixed at a point in F that is not at the F coordinate origin. Or the axes in F might not be parallel to the axes in F. As for the timing of events, if F and F are not moving with respect to one another, a clock stationary in F is stationary also in F . In that case we can set all F clocks to agree with the F clocks and then ignore the distinction. Differences in frame location and frame orientation only have no interesting consequences if space is homogeneous and isotropic. Suppose now that the origin of frame F is moving relative to the origin of frame F. The description of a sequence of events by coordinate values and clock times in F can differ from the description of the same events by space coordinate values in F and times measured by clocks in F . How must the two descriptions be related? In answering that we shall be concerned only with the case in which F is an inertial frame and F is a frame that is moving relative to F at constant velocity and without rotating. In that case F is also an inertial frame. Special relativity is based on the postulate that physical phenomena observed in different inertial frames of reference appear to obey exactly the same laws. In that respect one frame is as good as another; no frame is unique. If true, this relativity postulate is enough to determine the way a description of events in one frame is related to the description in a different frame of the same events. In that relation there appears a universal speed, the same in all frames, whose value must be found by experiment. Sometimes added as a second postulate is the statement that a measurement of the velocity of light in any frame of reference gives the same result whether the light’s source is stationary in that frame or not. One may regard this as a statement about the nature of light rather than an independent postulate. It asserts that electromagnetic waves in fact travel with the limiting speed implied by the relativity postulate. The deductions from the relativity postulate, expressed in the formulas of special relativity, have been precisely verified by countless experiments. Nothing in physics rests on a firmer foundation.
G.2 Lorentz transformations Consider two events, A and B, observed in an inertial frame F. Observed, in this usage, is short for “whose space-time coordinates are determined with the measuring rods and clocks of frame F.” (Remember
805
806
A short review of special relativity
that our observers are equipped merely with pencil and paper, and we must post an observer at the location of every event!) The displacement of one event from the other is given by the four numbers xB − xA ,
yB − yA ,
z B − zA ,
tB − tA .
(G.1)
The same two events could have been located by giving their coordinates in some other frame F . Suppose F is moving with respect to F in the manner indicated in Fig. G.1. The spatial axes of F remain parallel to those in F, while, as seen from F, the frame F moves with speed v in the positive x direction. This is a special case, obviously, but it contains most of the interesting physics. Event A, as observed in F , occurred at xA , y A , z A , tA , the last of these numbers being the reading of a clock belonging to (that is, stationary in) F . The space-time displacement, or interval between events A and B in F , is not the same as in F. Its components are related to those in F by the Lorentz transformation, xB − xA = Îł (xB − xA ) − βγ c(tB − tA ), y B − y A = yB − yA , z B − z A = zB − zA , tB − tA = Îł (tB − tA ) − βγ (xB − xA )/c.
(G.2)
In these equations c is the speed of light, β = v/c, and Îł = 1/ 1 − β 2 . The inverse transformation has a similar appearance – as it should if no frame is unique. It can be obtained from Eq. (G.2) simply by exchanging primed and unprimed symbols and reversing the sign of β, as you can verify by explicitly solving for the quantities xB − xA and tB − tA . Two events A and B are simultaneous in F if tB − tA = 0. But that does not make tB − tA = 0 unless xB = xA . Thus events that are simultaneous in one inertial frame may not be so in another. Do not confuse this fundamental “relativity of simultaneityâ€? with the obvious fact that an observer not equally distant from two simultaneous explosions will receive light flashes from them at different times. The times tA and tB are recorded by local clocks at each event, clocks stationary in F that have previously been perfectly synchronized. Consider a rod stationary in F that is parallel to the x axis and extends from xA to xB . Its length in F is just xB − xA . The rod’s length as measured in frame F is the distance xB − xA between two points in the frame F that its ends pass simultaneously according to clocks in F. For these two events, then, tB − tA = 0. With this condition the first of the Lorentz transformation equations above gives us at once xB − xA = (xB − xA )/Îł .
(G.3)
G.2 Lorentz transformations
807
(a) y y
v
4
F
F
2 3 1 2
1
1
1
(b)
2
3
y
2
4
3
4
5
6
5
6
x
x
Figure G.1. Two frames moving with relative speed v. The “E” is stationary in frame F. The “L” is stationary in frame F . In this example β = v/c = 0.866; γ = 2. (a) Where everything was, as determined by observers in F at a particular instant of time t according to clocks in F. (b) Where everything was, as determined by observers in F at a particular instant of time t according to clocks in F .
y
v F
F 2 3 1 2
1
1
1
2
3
4
5
6
2
3
4
x
x
This is the famous Lorentz contraction. Loosely stated, lengths between fixed points in F , if parallel to the relative velocity of the frames, are judged by observers in F to be shorter by the factor 1/γ . This statement remains true if F and F are interchanged. Lengths perpendicular to the relative velocity measure the same in the two frames.
Question: Suppose the clocks in the two frames happened to be set so that the left edge of the E touched the left edge of the L at t = 0 according to a local clock in F, and at t = 0 according to a local clock in F . Let the distances be in feet and take c as 1 foot/nanosecond. What is the reading t of all the F clocks in (a)? What is the reading t of all the F clocks in (b)? Answer: t = 4.62 nanoseconds; t = 4.04 nanoseconds. If you don’t agree, study the example again.
808
A short review of special relativity Consider one of the clocks in F . It is moving with speed v through the frame F. Let us record as tA its reading as it passes one of our local clocks in F; the local clock reads at that moment tA . Later this moving clock passes another F clock. At that event the local F clock reads tB , and the reading of the moving clock is recorded as tB . The two events are separated in the F frame by a distance xB − xA = v(tB − tA ). Substituting this into the fourth equation of the Lorentz transformation, Eq. (G.2), we obtain tB − tA = γ (tB − tA )(1 − β 2 ) = (tB − tA )/γ .
(G.4)
According to the moving clock, less time has elapsed between the two events than is indicated by the stationary clocks in F. This is the time dilation that figures in the “twin paradox.” It has been verified in many experiments, including one in which an atomic clock was flown around the world. Remembering that “moving clocks run slow, by the factor 1/γ ,” and that “moving graph paper is shortened parallel to its motion by the factor 1/γ ,” you can often figure out the consequences of a Lorentz transformation without writing out the equations. This behavior, it must be emphasized, is not a peculiar physical property of our clocks and paper, but is intrinsic in space and time measurement under the relativity postulate.
G.3 Velocity addition The formula for the addition of velocities, which we use in Chapter 5, is easily derived from the Lorentz transformation equations. Suppose an object is moving in the positive x direction in frame F with velocity ux . What is its velocity in the frame F ? To simplify matters let the moving object pass the origin at t = 0. Then its position in F at any time t is simply x = ux t. To simplify further, let the space and time origins of F and F coincide. Then the first and last of the Lorentz transformation equations become x = γ x − βγ ct
and
t = γ t − βγ x/c.
(G.5)
By substituting ux t for x on the right side of each equation, and dividing the first by the second, we get x
ux − βc = .
t 1 − βux /c
(G.6)
On the left we have the velocity of the object in the F frame, u x . The formula is usually written with v instead of βc. u x =
ux − v . 1 − ux v/c2
(G.7)
G.4 Energy, momentum, force
By solving Eq. (G.7) for ux you can verify that the inverse is ux =
u x + v , 1 + u x v/c2
(G.8)
and that in no case will these relations lead to a velocity, either ux or u x , larger than c. As with the inverse Lorentz transformation, you can also obtain Eq. (G.8) from Eq. (G.7) simply by exchanging primed and unprimed symbols and reversing the sign of v. A velocity component perpendicular to v, the relative velocity of the frames, transforms differently, of course. Analogous to Eq. (G.5), the second and last of the Lorentz transformation equations are y = y
t = γ t − βγ x/c.
and
(G.9)
If we have x = ux t and y = uy t in frame F (in general the object can be moving diagonally), then we can substitute these into Eq. (G.9) and divide the first equation by the second to obtain uy y
=
t γ (1 − βux /c)
⇒
u y =
uy . γ (1 − ux v/c2 )
(G.10)
In the special case where ux = 0 (which means that the velocity points in the y direction in frame F), we have u y = uy /γ . That is, the y speed is slower in the frame F where the object is flying by diagonally. In the special case where ux = v (which means that the object travels along with the F frame, as far as the x direction is concerned), you can show that Eq. (G.10) reduces to u y = γ uy ⇒ uy = u y /γ . This makes sense; the object has u x = 0, so this result is analogous to the preceding u y = uy /γ result for the ux = 0 case. In effect we have simply switched the primed and unprimed labels. These special cases can also be derived directly from time dilation.
G.4 Energy, momentum, force A dynamical consequence of special relativity can be stated as follows. Consider a particle moving with velocity u in an inertial frame F. We find that energy and momentum are conserved in the interactions of this particle with others if we attribute to the particle a momentum and an energy given by p = γ m0 u
and
E = γ m0 c2 ,
(G.11)
where m0 is a constant characteristic of that particle. We call m0 the rest mass (or just the mass) of the particle. It could have been determined in a frame in which the particle is moving so slowly that Newtonian mechanics applies – for instance, by bouncing the particle against some standard mass. The factor γ multiplying m0 is (1 − u2 /c2 )−1/2 , where u is the speed of the particle as observed in our frame F.
809
810
A short review of special relativity
Given p and E, the momentum and energy of a particle as observed in F, what is the momentum of that particle, and its energy, as observed in another frame F ? As before, we assume F is moving in the positive x direction, with speed v, as seen from F. The transformation turns out to be this: p x = γ px − βγ E/c, p y = py , p z = pz , E = γ E − βγ cpx .
(G.12)
Note that βc is here the relative velocity of the two frames, as it was in Eq. (G.2), not the particle velocity. Compare this transformation with Eq. (G.2). The resemblance would be perfect if we considered cp instead of p in Eq. (G.12), and ct rather than t in Eq. (G.2). A set of four quantities that transform in this way is called a four-vector. The meaning of force is rate of change of momentum. The force acting on an object is simply dp/dt, where p is the object’s momentum in the chosen frame of reference and t is measured by clocks in that frame. To find how forces transform, consider a particle of mass m0 initially at rest at the origin in frame F upon which a force f acts for a short time t. We want to find the rate of change of momentum dp /dt , observed in a frame F . As before, we shall let F move in the x direction as seen from F. Consider first the effect of the force component fx . In time t, px will increase from zero to fx t, while x increases by 1 fx x = (G.13) ( t)2 , 2 m0 and the particle’s energy increases by E = (fx t)2 /2m0 ; this is the kinetic energy it acquires, as observed in F. (The particle’s speed in F is still so slight that Newtonian mechanics applies there.) Using the first of Eqs. (G.12) we find the change in p x : p x = γ px − βγ E/c,
(G.14)
and using the fourth of Eqs. (G.2) gives t = γ t − βγ x/c.
(G.15)
Now both E and x are proportional to ( t)2 , so when we take the limit t → 0, the last term in each of these equations will drop out, giving p x γ (fx t) dp x = lim = = fx .
dt γ t t →0 t
(G.16)
G.4 Energy, momentum, force
Conclusion: the force component parallel to the relative frame motion has the same value in the moving frame as in the rest frame of the particle. A transverse force component behaves differently. In frame F, py = fy t. But now p y = py , and t = γ t, so we get dp y dt
=
fy t fy = . γ t γ
(G.17)
A force component perpendicular to the relative frame motion, observed in F , is smaller by the factor 1/γ than the value determined by observers in the rest frame of the particle. The transformation of a force from F to some other moving frame
F would be a little more complicated. We can always work it out, if we have to, by transforming to the rest frame of the particle and then back to the other moving frame. We conclude our review with a remark about Lorentz invariance. If you square both sides of Eq. (G.12) and remember that γ 2 − β 2 γ 2 = 1, you can easily show that
2
2
2 2 2 2 2 2 c2 (p 2 x + py + pz ) − E = c (px + py + pz ) − E .
(G.18)
Evidently this quantity c2 p2 − E2 is not changed by a Lorentz transformation. It is often called the invariant four-momentum (even though it has dimensions of energy squared). It has the same value in every frame of reference, including the particle’s rest frame. In the rest frame the particle’s momentum is zero and its energy E is just m0 c2 . The invariant four-momentum is therefore −m20 c4 . It follows that in any other frame E2 = c2 p2 + m20 c4 .
(G.19)
The invariant constructed in the same way with Eq. (G.2) is (xB − xA )2 + (yB − yA )2 + (zB − zA )2 − c2 (tB − tA )2 .
(G.20)
Two events, A and B, for which this quantity is positive are said to have a spacelike separation. It is always possible to find a frame in which they are simultaneous. If the invariant is negative, the events have a timelike separation. In that case a frame exists in which they occur at different times, but at the same place. If this “invariant interval” is zero, the two events can be connected by a flash of light.
811
H Radiation by an accelerated charge
A particle with charge q has been moving in a straight line at constant speed v0 for a long time. It runs into something, let us imagine, and in a short period of constant deceleration, of duration τ , the particle is brought to rest. The graph of velocity versus time in Fig. H.1 describes its motion. What must the electric field of this particle look like after that? Figure H.2 shows how to derive it. We shall assume that v0 is small compared with c. Let t = 0 be the instant the deceleration began, and let x = 0 be the position of the particle at that instant. By the time the particle has completely stopped it will have moved a little farther on, to x = v0 τ/2. That distance, indicated in Fig. H.2, is small compared with the other distances that will be involved. We now examine the electric field at a time t = T τ . Observers farther away from the origin than R = cT cannot have learned that the particle was decelerated. Throughout that region, region I in Fig. H.2, the field must be that of a charge that has been moving and is still moving at the constant speed v0 . That field, as we discovered in Section 5.7, appears to emanate from the present position of the charge, which for an observer anywhere in region I is the point x = v0 T on the x axis. That is where the particle would be now if it hadn’t been decelerated. On the other hand, for any observer whose distance from the origin is less than c(T − τ ), that is to say, for any observer in region II, the field is that of a charge at rest close to the origin (actually at x = v0 τ/2). What must the field be like in the transition region, the spherical shell of thickness cτ ? Gauss’s law provides the key. A field line such as AB lies on a cone around the x axis that includes a certain amount of flux from the charge q. If CD makes the same angle θ with the axis,
Radiation by an accelerated charge
the cone on which it lies includes that same amount of flux. (Because v0 is small, the relativistic compression of field lines visible in Fig. 5.15 and Fig. 5.19 is here negligible.) Hence AB and CD must be parts of the same field line, connected by a segment BC. This tells us the direction of the field E within the shell; it is the direction of the line segment BC. This field E within the shell has both a radial component Er and a transverse component Eθ . From the geometry of the figure their ratio is easily found: v0 T sin θ Eθ = . Er cτ
(H.1)
813 v v0 t=0 t=τ
t=T
Figure H.1. Velocity-time diagram for a particle that traveled at constant speed v0 until t = 0. It then experienced a constant negative acceleration of magnitude a = v0 /τ , which brought it to rest at time t = τ . We assume v0 is small compared with c.
Now Er must have the same value within the shell thickness that it does in region II near B. (Gauss’s law again!) Therefore Er = q/4π 0 R2 = q/4π 0 c2 T 2 , and substituting this into Eq. (H.1) we obtain v0 T sin θ qv0 sin θ . Er = cτ 4π 0 c3 Tτ
Eθ =
Region I
(H.2)
Er Shell E
Eq
D
Region II
− t)
B C
R = c(T
R = cT
ct
v0 T sin q
q
q A x=0 1 x = v0t (where 2 the particle is now at rest)
x
x = v0T (where the particle would be now if it hadn’t stopped)
Figure H.2. Space diagram for the instant t = T τ , a long time after the particle has stopped. For observers in region I, the field must be that of a charge located at the position x = v0 T; for observers in region II, it is that of a particle at rest close to the origin. The transition region is a shell of thickness cτ .
814
Radiation by an accelerated charge But v0 /τ = a, the magnitude of the (negative) acceleration, and cT = R, so our result can be written as follows: Eθ =
qa sin θ 4π 0 c2 R
(H.3)
A remarkable fact is here revealed: Eθ is proportional to 1/R, not to 1/R2 ! As time goes on and R increases, the transverse field Eθ will eventually become very much stronger than Er . Accompanying this transverse (that is, perpendicular to R) electric field will be a magnetic field of strength Eθ /c perpendicular to both R and E. This is a general property of an electromagnetic wave, explained in Chapter 9. Let us calculate the energy stored in the transverse electric field above, in the whole spherical shell. The energy density is 0 Eθ2 q2 a2 sin2 θ . = 2 32π 2 0 R2 c4
(H.4)
The volume of the shell is 4π R2 cτ , and the average value of sin2 θ over a sphere1 is 2/3. The total energy of the transverse electric field is therefore q2 a2 q2 a2 τ 2 = . 4π R2 cτ 3 32π 2 0 R2 c4 12π 0 c3
(H.5)
To this we must add an equal amount (see Section 9.6.1) for the energy stored in the transverse magnetic field: Total energy in transverse electromagnetic field =
q2 a2 τ . 6π 0 c3
(H.6)
The radius R has canceled out. This amount of energy simply travels outward, undiminished, with speed c from the site of the deceleration. Since τ is the duration of the deceleration, and is also the duration of the electromagnetic pulse a distant observer measures, we can say that the power radiated during the acceleration process was Prad =
q2 a2 6π 0 c3
(H.7)
As it is the square of the instantaneous acceleration that appears in Eq. (H.7), it doesn’t matter whether a is positive or negative. Of course it ought not to, for stopping in one inertial frame could be starting in 1 Our polar axis in Fig. H.2 is the x axis: cos2 θ = x2 /R2 . With a bar denoting an average over the sphere, x2 = y2 = z2 = R2 /3. Hence cos2 θ = 1/3, and
sin2 θ = 1 − cos2 θ = 2/3. Or you can just do an integral; the area of a circular strip around the x axis is proportional to sin θ , so you end up integrating sin3 θ .
Exercises
another. Speaking of different frames, Prad itself turns out to be Lorentzinvariant, which is sometimes very handy. That is because Prad is energy/ time, and energy transforms like time, each being the fourth component of a four-vector, as noted in Appendix G. We have here a more general result than we might have expected. Equation (H.7) correctly gives the instantaneous rate of radiation of energy by a charged particle moving with variable acceleration – for instance, a particle vibrating in simple harmonic motion. It applies to a wide variety of radiating systems from radio antennas to atoms and nuclei.
Exercises H.1 Ratio of energies * An electron moving initially at constant (nonrelativistic) speed v is brought to rest with uniform deceleration a lasting for a time t = v/a. Compare the electromagnetic energy radiated during the deceleration with the electron’s initial kinetic energy. Express the ratio in terms of two lengths, the distance light travels in time t and the classical electron radius r0 , defined as e2 /4Ď€ 0 mc2 . H.2 Simple harmonic moton ** An elastically bound electron vibrates in simple harmonic motion at frequency ω with amplitude A. (a) Find the average rate of loss of energy by radiation. (b) If no energy is supplied to make up the loss, how long will it take for the oscillator’s energy to fall to 1/e of its initial value? (Answer: 6Ď€ 0 mc3 /e2 ω2 .) H.3 Thompson scattering ** A plane electromagnetic wave with frequency ω and electric field amplitude E0 is incident on an isolated electron. In the resulting sinusoidal oscillation of the electron the maximum acceleration is E0 e/m (the maximum force divided by m). How much power is radiated by this oscillating charge, averaged over many cycles? (Note that it is independent of the frequency ω.) Divide this average radiated power by 0 E02 c/2, the average power density (power per unit area of wavefront) in the incident wave. This gives a constant Ďƒ with the dimensions of area, called a scattering cross section. The energy radiated, or scattered, by the electron, and thus lost from the plane wave, is equivalent to that falling on an area Ďƒ . (The case here considered, involving a free electron moving nonrelativistically, is often called Thomson scattering after J. J. Thomson, the discoverer of the electron, who first calculated it.) H.4 Synchrotron radiation ** Our master formula, Eq. (H.7), is useful for relativistically moving particles, even though we assumed v0 c in the derivation.
815
816
Radiation by an accelerated charge All we have to do is transform to an inertial frame F in which the particle in question is, at least temporarily, moving slowly, apply Eq. (H.7) in that frame, then transform back to any frame we choose. Consider a highly relativistic electron (Îł 1) moving perpendicular to a magnetic field B. It is continually accelerated perpendicular to the field, and must radiate. At what rate does it lose energy? To answer this, transform to a frame F moving momentarily along with the electron, find E in that frame, and P rad . Now show that, because power is (energy)/(time), Prad = P rad . This radiation is generally called synchrotron radiation. (Answer: Prad = Îł 2 e4 B2 /6Ď€ 0 m2 c.)
I The metal lead is a moderately good conductor at room temperature. Its resistivity, like that of other pure metals, varies approximately in proportion to the absolute temperature. As a lead wire is cooled to 15 K its resistance falls to about 1/20 of its value at room temperature, and the resistance continues to decrease as the temperature is lowered further. But as the temperature 7.22 K is passed, there occurs without forewarning a startling change: the electrical resistance of the lead wire vanishes! So small does it become that a current flowing in a closed ring of lead wire colder than 7.22 K – a current that would ordinarily die out in much less than a microsecond – will flow for years without measurably decreasing. This phenomenon has been directly demonstrated. Other experiments indicate that such a current could persist for billions of years. One can hardly quibble with the flat statement that the resistivity is zero. Evidently something quite different from ordinary electrical conduction occurs in lead below 7.22 K. We call it superconductivity. Superconductivity was discovered in 1911 by the great Dutch lowtemperature experimenter Kamerlingh Onnes. He observed it first in mercury, for which the critical temperature is 4.16 K. Since then hundreds of elements, alloys, and compounds have been found to become superconductors. Their individual critical temperatures range from roughly a millikelvin up to the highest yet discovered, 138 K. Curiously, among the elements that do not become superconducting are some of the best normal conductors such as silver, copper, and the alkali metals. Superconductivity is essentially a quantum-mechanical phenomenon, and a rather subtle one at that. The freely flowing electric current consists of electrons in perfectly orderly motion. Like the motion of an electron in an atom, this electron flow is immune to small disturbances – and for
Superconductivity
818
Superconductivity
a similar reason: a finite amount of energy would be required to make any change in the state of motion. It is something like the situation in an insulator in which all the levels in the valence band are occupied and separated by an energy gap from the higher energy levels in the conduction band. But unlike electrons filling the valence band, which must in total give exactly zero net flow, the lowest energy state of the superconducting electrons can have a net electron velocity, hence current flow, in some direction. Why should such a strange state become possible below a certain critical temperature? We can’t explain that here.1 It involves the interaction of the conduction electrons not only with each other, but also with the whole lattice of positive ions through which they are moving. That is why different substances can have different critical temperatures, and why some substances are expected to remain normal conductors right down to absolute zero. In the physics of superconductivity, magnetic fields are even more important than you might expect. We must state at once that the phenomena of superconductivity in no way violate Maxwell’s equations. Thus the persistent current that can flow in a ring of superconducting wire is a direct consequence of Faraday’s law of induction, given that the resistance of the ring is really zero. For if we start with a certain amount of flux 0 threading the ring, then because E · ds around the ring remains always zero (otherwise there would be infinite current due to the zero resistance), d/dt must be zero. The flux cannot change; the current I in the ring will automatically assume whatever value is necessary to maintain the flux at 0 . Figure I.1 outlines a simple demonstration of this, and shows how a persistent current can be established in an isolated superconducting circuit. Superconductors can be divided into two types. In Type 1 superconductors, the magnetic field inside the material itself (except very near the surface) is always zero. That is not a consequence of Maxwell’s equations, but a property of the superconducting state, as fundamental, and once as baffling, a puzzle as the absence of resistance. The condition B = 0 inside the bulk of a Type 1 superconductor is automatically maintained by currents flowing in a thin surface layer. In Type 2 superconductors, quantized magnetic flux tubes may exist for a certain range of temperature and external magnetic field. These tubes are surrounded by vortices of current (essentially little solenoids) which allow the magnetic field to be zero in the rest of the material. Outside the flux tubes the material is superconducting. A strong magnetic field destroys superconductivity, although Type 2 superconductors generally can tolerate much larger magnetic fields than 1 The abrupt emergence of a state of order at a certain critical temperature reminds us
of the spontaneous alignment of electron spins that occurs in iron below its Curie temperature (mentioned in Section 11.11). Such cooperative phenomena always involve a large number of mutually interacting particles. A more familiar cooperative phenomenon is the freezing of water, also characterized by a well-defined critical temperature.
Superconductivity
(a)
819
Ring of solder (lead–tin alloy); normal conductor; current zero; permanent magnet causes flux Φ0 through ring.
String
Magnet
Liquid helium 4.2 K
(b)
Ring cooled below its critical temperature. (Some helium has boiled away.) Flux through ring unchanged. Ring is now a superconductor.
(c)
I
Magnet removed. Persistent current I now flows in ring to maintain flux at value Φ0. Compass needle responds to field of persistent current.
Type 1. None of the superconductors known before 1957 could stand more than a few hundred gauss. That discouraged practical applications of zero-resistance conductors. One could not pass a large current through a superconducting wire because the magnetic field of the current itself would destroy the superconducting state. But then a number of Type 2 superconductors were discovered that could preserve zero resistance in fields up to 10 tesla or more. A widely used Type 2 superconductor is
Figure I.1. Establishing a persistent current in a superconducting ring. The ring is made of ordinary solder, a lead–tin alloy. (a) The ring, not yet cooled, is a normal conductor with ohmic resistance. Bringing up the permanent magnet will induce a current in the ring that will quickly die out, leaving the magnetic flux from the magnet, in amount , passing through the ring. (b) The helium bath is raised without altering the relative position of the ring and the permanent magnet. The ring, now cooled below its critical temperature, is a superconductor with resistance zero. (c) The magnet is removed. The flux through the zero resistance ring cannot change. It is maintained at the value by a current in the ring that will flow as long as the ring remains below the critical temperature. The magnetic field of the persistent current can be demonstrated with the compass.
820
Superconductivity
an alloy of niobium and tin that has a critical temperature of 18 K and if cooled to 4 K remains superconducting in fields up to 25 tesla. Type 2 superconducting solenoids are now common that produce steady magnetic fields of 20 tesla without any cost in power other than that incident to their refrigeration. Uses of superconductors include magnetic resonance imaging (MRI) machines (which are based on the physics discussed in Appendix J) and particle accelerators. There are also good prospects for the widespread use of superconductors in large electrical machinery, maglev trains, and the long-distance transmission of electrical energy. In addition to the critical magnetic field, the critical temperature is also a factor in determining the large-scale utility of a superconductor. In particular, a critical temperature higher than 77 K allows relatively cheap cooling with liquid nitrogen (as opposed to liquid helium at 4 K). Prior to 1986, the highest known critical temperature was 23 K. Then a new type of superconductor (a copper oxide, or cuprate) was observed with a critical temperature of 30 K. The record critical temperature was soon pushed to 138 K. These superconductors are called high-temperature superconductors. Unfortunately, although they are cheaper to cool, their utility is limited because they tend to be brittle and hence difficult to shape into wires. However, in 2008 a new family of high-temperature superconductors was discovered, with iron as a common element. This family is more ductile than cuprates, but the highest known critical temperature is 55 K. The hope is that this will eventually cross the 77 K threshold. The mechanism that leads to high-temperature superconductivity is more complex than the mechanism for low-temperature superconductivity. In contrast with the well-established BCS theory (named after Bardeen, Cooper, and Schrieffer; formulated in 1957) for low-temperature superconductors, a complete theory of high-temperature superconductors does not yet exist. All known high-temperature superconductors are Type 2, but not all Type 2 superconductors are high-temperature. Indeed, low-temperature Type 2 superconductors (being both ductile and tolerant of large magnetic fields) are the ones presently used in MRI machines and other large-scale applications. At the other end of the scale, the quantum physics of superconductivity makes possible electrical measurements of unprecedented sensitivity and accuracy – including the standardization of the volt in terms of an easily measured oscillation frequency. To the physicist, superconductivity is a fascinating large-scale manifestation of quantum mechanics. We can trace the permanent magnetism of the magnet in Fig. I.1 down to the intrinsic magnetic moment of a spinning electron – a kind of supercurrent in a circuit less than 10−10 m in size. The ring of solder wire with the persistent current flowing in it is, in some sense, like a gigantic atom, the motion of its associated electrons, numerous as they are, marshaled into the perfectly ordered behavior of a single quantum state.
J The electron has angular momentum of spin, J. Its magnitude is always the same, h/4π, or 5.273 · 10−35 kg m2 /s. Associated with the axis of spin is a magnetic dipole moment μ of magnitude 0.9285 · 10−23 joule/ tesla (see Section 11.6). An electron in a magnetic field experiences a torque tending to align the magnetic dipole in the field direction. It responds like any rapidly spinning gyroscope: instead of lining up with the field, the spin axis precesses around the field direction. Let us see why any spinning magnet does this. In Fig. J.1 the magnetic moment μ is shown pointing opposite to the angular momentum J, as it would for a negatively charged body like an electron. The magnetic field B (the field of some solenoid or magnet not shown) causes a torque equal to μ × B. This torque is a vector in the negative xˆ direction at the time of our picture. Its magnitude is given by Eq. (11.48); it is μB sin θ. In a short time t, the torque adds to the angular momentum of our top a vector increment J in the direction of the torque vector and of magnitude μB sin θ t. The horizontal component of J, in magnitude J sin θ , is thereby rotated through a small angle ψ given by ψ =
μB t J = . J sin θ J
(J.1)
As this continues, the upper end of the vector J will simply move around the circle with constant angular velocity ωp : ωp =
ψ μB = . t J
(J.2)
Magnetic resonance
822
Magnetic resonance z
B
J sin q q
ΔJ
Δf
J
y
m x
Figure J.1. The precession of a magnetic top in an external field. The angular momentum of spin J and the magnetic dipole moment μ are oppositely directed, as they would be for a negatively charged rotor.
B
m
This is the rate of precession of the axis of spin. Note that it is the same for any angle of tip; sin θ has canceled out. For the electron, μ/J has the value 1.761 · 1011 s−1 tesla−1 . In a field of 1 gauss (10−4 tesla) the spin vector precesses at 1.761 · 107 radians/s, or 2.80 · 106 revolutions per second. The proton has exactly the same intrinsic spin angular momentum as the electron, h/4π, but the associated magnetic moment is smaller. That is to be expected since the mass of the proton is 1836 times the mass of the electron; as in the case of orbital angular momentum (see Eq. (11.29)), the magnetic moment of an elementary particle with spin ought to be inversely proportional to its mass, other things being equal. Actually the proton’s magnetic moment is 1.411 · 10−26 joule/tesla, only about 660 times smaller than the electron moment, which shows that the proton is in some way a composite particle. In a field of 1 gauss the proton spin precesses at 4258 revolutions per second. About 40 percent of the stable atomic nuclei have intrinsic angular momenta and associated magnetic dipole moments. We can detect the precession of magnetic dipole moments through their influence on an electric circuit. Imagine a proton in a magnetic field B, with its spin axis perpendicular to the field, and surrounded by a small coil of wire, as in Fig. J.2. The precession of the proton causes some alternating flux through the coil, as would the end-over-end rotation of a little bar magnet. A voltage alternating at the precession frequency will be induced in the coil. As you might expect, the voltage thus induced by a single proton would be much too feeble to detect. But it is easy to provide more protons – 1 cm3 of water contains about 7 · 1022 protons (we’re concerned with the two hydrogen atoms in each water molecule), and all of them will precess at the same frequency. Unfortunately they will not all be pointing in the same direction at the same instant. In fact, their spin axes and magnetic moments will be distributed so uniformly over all possible directions that their fields will very nearly cancel one another. But not quite, if we introduce another step. If we apply a strong magnetic field B to water, for several seconds there will develop a slight excess of proton moments pointing in the direction of B, the direction they energetically favor. The fractional excess will be μB/kT in order of magnitude, as in ordinary paramagnetism. It may be no more than one in a million, but these uncanceled moments, if they are now caused to precess in our coil, will induce an observable signal. A simple method for observing nuclear spin precession in weak fields, such as the earth’s field, is described in Fig. J.3. Many other schemes are used to observe the spin precession of electrons and of Figure J.2. A precessing magnetic dipole moment at the center of a coil causes a periodic change in the flux through the coil, inducing an alternating electromotive force in the coil. Note that the flux from the dipole m that links the coil is that which loops around outside it. See Exercise J.1.
Magnetic resonance
z Be
Amplifier S2
m
B0 S1
nuclei. They generally involve a combination of a steady magnetic field and oscillating magnetic fields with frequency in the neighborhood of ωp . For electron spins (electron paramagnetic resonance, or EPR) the frequencies are typically several thousand megahertz, while for nuclear spins (nuclear magnetic resonance, or NMR) they are several tens of megahertz. The exact frequency of precession, or resonance, in a given applied field can be slightly shifted by magnetic interactions within a molecule. This has made NMR, in particular, useful in chemistry. The position of a proton in a complex molecule can often be deduced from the small shift in its precession frequency. Magnetic fields easily penetrate ordinary nonmagnetic materials, and that includes alternating magnetic fields if their frequency or the electric conductivity of the material is not too great. A steady field of 2000 gauss applied to the bottle of water in our example would cause any proton polarization to precess at a frequency of 8.516 · 106 revolutions per second. The field of the precessing moments would induce a signal of 8.516 MHz frequency in the coil outside the bottle. This applies as well to the human body, which, viewed as a dielectric, is simply an assembly of more or less watery objects. In NMR imaging (or magnetic resonance imaging, MRI) the interior of the body is mapped by means of nuclear magnetic resonance. The concentration of hydrogen atoms at a
823
Figure J.3. Apparatus for observing proton spin precession in the earth’s field Be . A bottle of water is surrounded by two orthogonal coils. With switch S2 open and switch S1 closed, the large solenoid creates a strong magnetic field B0 . As in ordinary paramagnetism (Section 11.6), the energy is lowered if the dipoles point in the direction of the field, but thermal agitation causes disorder. Our dipoles here are the protons (hydrogen nuclei) in the molecules of water. When thermal equilibrium has been attained, which in this case takes several seconds, the magnetization is what you would get by lining up with the magnetic field the small fraction μB0 /kT of all the proton moments. We now switch off the strong field B0 and close switch S2 to connect the coil around the bottle to the amplifier. The magnetic moment m now precesses in the xy plane around the remaining, relatively weak, magnetic field Be , with precession frequency given by Eq. (J.2). The alternating y component of the rotating vector m induces an alternating voltage in the coil which can be amplified and observed. From its frequency, Be can be very precisely determined. This signal itself will die away in a few seconds as thermal agitation destroys the magnetization the strong field B0 had brought about. Magnetic resonance magnetometers of this and other types are used by geophysicists to explore the earth’s field, and even by archaeologists to locate buried artifacts.
824
Magnetic resonance
particular location is revealed by the radiofrequency signal induced in an external coil by the precessing protons. The location of the source within the body can be inferred from the precise frequency of the signal if the steady field B, which determines the frequency according to Eq. (J.2), varies spatially with a known gradient.
Exercises J.1
Emf from a proton ** At the center of the four-turn coil of radius a in Fig. J.2 is a single proton, precessing at angular rate ωp . Derive a formula for the amplitude of the induced alternating electromotive force in the coil, given that the proton moment is 1.411 ¡ 10−26 joule/tesla.
J.2
Emf from a bottle *** (a) If the bottle in Fig. J.3 contains 200 cm3 of H2 O at room temperature, and if the field B0 is 1000 gauss, how large is the net magnetic moment m? (b) Using the result of Exercise J.1, make a rough estimate of the signal voltage available from a coil of 500 turns and 4 cm radius when the field strength Be is 0.4 gauss.
K K.1 Fundamental constants speed of light
c
2.998 · 108 m/s
elementary charge
e
1.602 · 10−19 C 4.803 · 10−10 esu
electron mass
me
9.109 · 10−31 kg
proton mass
mp
1.673 · 10−27 kg
Avogadro’s number
NA
6.022 · 10−23 mole−1
Boltzmann constant
k
1.381 · 10−23 J/K
Planck constant
h
6.626 · 10−34 J s
gravitational constant
G
6.674 · 10−11 m3 /(kg s2 )
electron magnetic moment
μe
9.285 · 10−24 J/T
proton magnetic moment
μp
1.411 · 10−26 J/T
permittivity of free space
0
8.854 · 10−12 C2 /(N m2 )
permeability of free space
μ0
1.257 · 10−6 T m/A
The exact numerical value of μ0 is 4π · 10−7 (by definition). The exact numerical value of 0 is (4π · [3]2 · 109 )−1 , where [3] ≡ 2.99792458 (see Appendix E).
Helpful formulas/facts
826
Helpful formulas/facts
K.2 Integral table
dx 1 −1 x = tan r r x2 + r 2
dx = sin−1 x √ 1 − x2
(K.2)
dx = ln x + x2 − 1 √ 2 x −1 dx = ln x2 + a2 + x √ x2 + a2 (a2
dx x = 2 2 2 3/2 +x ) a (a + x2 )1/2 ln x dx = x ln x − x
xn ln
a x
dx =
xn+1 a xn+1 + ln n+1 x (n + 1)2
xe−x dx = −(x + 1)e−x x2 e−x dx = −(x2 + 2x + 2)e−x
sin3 x dx = − cos x + cos3 x dx = sin x −
(K.4) (K.5) (K.6) (K.7) (K.8) (K.9) (K.10) (K.11) (K.12) (K.13) (K.14)
− cos x (1 − a2 ) 1 − a2 sin2 x
(K.15)
sin x dx
cos x dx
sin3 x 3
(K.3)
cos x dx sin x = √ 2 2 3/2 2 (1 − a cos x) (1 − a ) 1 − a2 cos2 x (1 − a2 sin2 x)3/2
cos3 x 3
dx 1 + sin x = ln cos x cos x dx 1 − cos x = ln sin x sin x
(K.1)
=
1 − b2 sin2 (x − a)
3/2 =
(2 − b2 ) sin x + b2 sin(2a − x) (K.16) 2(1 − b2 ) 1 − b2 sin2 (a − x)
sin x(a cos x − b) dx −a + b cos x = √ 2 2 (a2 + b2 − 2ab cos x)3/2 b a + b2 − 2ab cos x
(K.17)
K.4 Taylor series
K.3 Vector identities ∇ · (∇ × A) = 0 ∇ · (f A) = f ∇ · A + A · ∇f ∇ · (A × B) = B · (∇ × A) − A · (∇ × B) ∇ × (∇f ) = 0 ∇ × (f A) = f ∇ × A + (∇f ) × A ∇ × (∇ × A) = ∇(∇ · A) − ∇ 2 A ∇ × (A × B) = A(∇ · B) − B(∇ · A) + (B · ∇)A − (A · ∇)B A × (B × C) = B(A · C) − C(A · B) ∇(A · B) = (A · ∇)B + (B · ∇)A + A × (∇ × B) + B × (∇ × A)
K.4 Taylor series The general form of a Taylor series is f
(x0 ) 2 f
(x0 ) 3 x + x + · · · . (K.18) 2! 3! This equality can be verified by taking successive derivatives and then setting x = 0. For example, taking the first derivative and then setting x = 0 gives f (x0 ) on the left, and also f (x0 ) on the right, because the first term is a constant and gives zero when differentiated, the second term gives f (x0 ), and all the rest of the terms give zero once we set x = 0 because they all contain at least one power of x. Likewise, if we take the second derivative of each side and then set x = 0, we obtain f
(x0 ) on both sides. And so on for all derivatives. Therefore, since the two functions on each side of Eq. (K.18) are equal at x = 0 and also have their nth derivatives equal at x = 0 for all n, they must in fact be the same function (assuming that they are nicely behaved functions, which we generally assume in physics). Some specific Taylor series that come up often are listed below; they are all expanded around x0 = 0. We use these series countless times throughout this book when checking how expressions behave in the limit of some small quantity. The series are all derivable via Eq. (K.18), but sometimes there are quicker ways of obtaining them. For example, Eq. (K.20) is most easily obtained by taking the derivative of Eq. (K.19), which itself is simply the sum of a geometric series. f (x0 + x) = f (x0 ) + f (x0 )x +
1 = 1 + x + x2 + x 3 + · · · 1−x
(K.19)
1 = 1 + 2x + 3x2 + 4x3 + · · · (1 − x)2
(K.20)
ln(1 − x) = −x −
x2 x3 − − ··· 2 3
(K.21)
827
828
Helpful formulas/facts
ex = 1 + x +
x2 x3 + + ··· 2! 3!
(K.22)
cos x = 1 −
x2 x4 + − ··· 2! 4!
(K.23)
sin x = x −
x3 x5 + − ··· 3! 5!
(K.24)
√ x x2 1+x=1+ − + ··· 2 8
(K.25)
x 3x2 1 =1− + + ··· √ 2 8 1+x n 2 n 3 n x + x + ··· (1 + x) = 1 + nx + 2 3
(K.26) (K.27)
K.5 Complex numbers
The imaginary number i is defined to be the number for which i2 = −1. (Of course, −i also has its square equal to −1.) A general complex number z with both real and imaginary parts can be written in the form a + bi, where a and b are real numbers. Such a number can be described by the point (a, b) in the complex plane, with the x and y axes being the real and imaginary axes, respectively. The most important formula involving complex numbers is eiθ = cos θ + i sin θ .
(K.28)
This can quickly be proved by writing out the Taylor series for both sides. Using Eq. (K.22), the first, third, fifth, etc. terms on the left-hand side of Eq. (K.28) are real, and from Eq. (K.23) their sum is cos θ . Similarly, the second, fourth, sixth, etc. terms are imaginary, and from Eq. (K.24) their sum is i sin θ . Writing it all out, we have (iθ )2 (iθ )3 (iθ )4 (iθ )5 + + + + ··· 2! 3! 4! 5! θ2 θ4 θ3 θ5 = 1− + + ··· + i θ − + + ··· 2! 4! 3! 5!
eiθ = 1 + iθ +
= cos θ + i sin θ ,
(K.29)
as desired. Letting θ → −θ in Eq. (K.28) yields e−iθ = cos θ − i sin θ. Combining this with Eq. (K.28) allows us to solve for cos θ and sin θ in terms of the complex exponentials: cos θ =
eiθ + e−iθ , 2
sin θ =
eiθ − e−iθ . 2i
(K.30)
K.6 Trigonometric identities A complex number z described by the Cartesian coordinates (a, b) in the complex plane can also be described by the polar coordinates (r, θ ). The radius r and angle θ are given by the usual relation between Cartesian and polar coordinates (see Fig. K.1), r = a2 + b2 and θ = tan−1 (b/a). (K.31) Using Eq. (K.28), we can write z in polar form as a + bi = (r cos θ ) + (r sin θ )i = r(cos θ + i sin θ ) = re .
(K.32)
We see that the quantity in the exponent (excluding the i) equals the angle of the vector in the complex plane. The complex conjugate of z, denoted by z∗ (or by zÂŻ), is defined to ∗ be z ≥ a − bi, or equivalently z∗ ≥ re−iθ . It is obtained by reflecting the Cartesian point (a, b) across the real axis. Note that √ either of these expressions for z∗ implies that r can be written as r = zz∗ . The radius r is known as the magnitude or absolute value of z, and is commonly denoted by |z|. The complex conjugate of a product is the product of the complex conjugates, that is, (z1 z2 )∗ = z∗1 z∗2 . You can quickly verify this by writing z1 and z2 in polar form. The Cartesian form works too, but that takes a little longer. The same result holds for the quotient of two complex numbers. As an example of the use of Eq. (K.28), we can quickly derive the double-angle formulas for sine and cosine. We have 2 cos 2θ + i sin 2θ = ei2θ = eiθ = (cos θ + i sin θ )2 = (cos2 θ − sin2 θ ) + i(2 sin θ cos θ ).
(K.33)
Equating the real parts of the expressions on either end of this equation gives cos 2θ = cos2 θ − sin2 θ . And equating the imaginary parts gives sin 2θ = 2 sin θ cos θ . This method easily generalizes to other trig sum formulas.
K.6 Trigonometric identities cos 2θ = cos2 θ − sin2 θ
(K.34)
sin(ι + β) = sin ι cos β + cos ι sin β
(K.35)
cos(Îą + β) = cos Îą cos β − sin Îą sin β
(K.36)
tan(ι + β) =
tan Îą + tan β 1 − tan Îą tan β
y
2
2
a r=
+b
b
q iθ
sin 2θ = 2 sin θ cos θ,
829
(K.37)
a
x
Figure K.1. Cartesian and polar coordinates in the complex plane.
830
Helpful formulas/facts 1 + cos θ 1 − cos θ θ θ cos = ± , sin = ± 2 2 2 2 1 − cos θ 1 − cos θ sin θ θ = = tan = ± 2 1 + cos θ sin θ 1 + cos θ
(K.38) (K.39)
The hyperbolic trig functions are defined by analogy with Eq. (K.30), with the i’s omitted: ex + e−x ex − e−x , sinh x = 2 2 2 2 cosh x − sinh x = 1 d d cosh x = sinh x, sinh x = cosh x dx dx
cosh x =
(K.40) (K.41) (K.42)
Andrews, M. (1997). Equilibrium charge density on a conducting needle. Am. J. Phys., 65, 846–850. Assis, A. K. T., Rodrigues, W. A., Jr., and Mania, A. J. (1999). The electric field outside a stationary resistive wire carrying a constant current. Found. Phys., 29, 729–753. Auty, R. P. and Cole, R. H. (1952). Dielectric properties of ice and solid D2 O. J. Chem. Phys., 20, 1309–1314. Blakemore, R. P. and Frankel, R. B. (1981). Magnetic navigation in bacteria. Sci. Am., 245, (6), 58–65. Bloomfield, L.A. (2010). How Things Work, 4th edn. (New York: John Wiley & Sons). Boos, F. L., Jr. (1984). More on the Feynman’s disk paradox. Am. J. Phys., 52, 756–757. Bose, S. K. and Scott, G. K. (1985). On the magnetic field of current through a hollow cylinder. Am. J. Phys., 53, 584–586. Crandall, R. E. (1983). Photon mass experiment. Am. J. Phys., 51, 698–702. Crawford, F. S. (1992). Mutual inductance M12 = M21 : an elementary derivation. Am. J. Phys., 60, 186. Crosignani, B. and Di Porto, P. (1977). Energy of a charge system in an equilibrium configuration. Am. J. Phys., 45, 876. Davis, L., Jr., Goldhaber, A. S., and Nieto, M. M. (1975). Limit on the photon mass deduced from Pioneer-10 observations of Jupiter’s magnetic field. Phys. Rev. Lett., 35, 1402–1405. Faraday, M. (1839). Experimental Researches in Electricity (London: R. and J. E. Taylor). Feynman, R. P., Leighton, R. B., and Sands, M. (1977). The Feynman Lectures on Physics, vol. II (Reading, MA: Addision-Wesley). Friedberg, R. (1993). The electrostatics and magnetostatics of a conducting disk. Am. J. Phys., 61, 1084–1096.
References
832
References
Galili, I. and Goihbarg, E. (2005). Energy transfer in electrical circuits: a qualitative account. Am. J. Phys., 73, 141–144. Goldhaber, A. S. and Nieto, M. M. (1971). Terrestrial and extraterrestrial limits on the photon mass. Rev. Mod. Phys., 43, 277–296. Good, R. H. (1997). Comment on “Charge density on a conducting needle,” by David J. Griffiths and Ye Li [Am. J. Phys. 64(6), 706–714 (1996)]. Am. J. Phys., 65, 155–156. Griffiths, D. J. and Heald, M. A. (1991). Time-dependent generalizations of the Biot–Savart and Coulomb laws. Am. J. Phys., 59, 111–117. Griffiths, D. J. and Li, Y. (1996). Charge density on a conducting needle. Am. J. Phys., 64, 706–714. Hughes, V. W. (1964). In Chieu, H. Y. and Hoffman, W. F. (eds.), Gravitation and Relativity. (New York: W. A. Benjamin), chap. 13. Jackson, J. D. (1996). Surface charges on circuit wires and resistors play three roles. Am. J. Phys., 64, 855–870. Jefimenko, O. (1962). Demonstration of the electric fields of current-carrying conductors. Am. J. Phys., 30, 19–21. King, J. G. (1960). Search for a small charge carried by molecules. Phys. Rev. Lett., 5, 562–565. Macaulay, D. (1998). The New Way Things Work (Boston: Houghton Mifflin). Marcus, A. (1941). The electric field associated with a steady current in long cylindrical conductor. Am. J. Phys., 9, 225–226. Maxwell, J. C. (1891). Treatise on Electricity and Magnetism, vol. I, 3rd edn. (Oxford: Oxford University Press), chap. VII. (Reprinted New York: Dover, 1954.) Mermin, N. D. (1984a). Relativity without light. Am. J. Phys., 52, 119–124. Mermin, N. D. (1984b). Letter to the editor. Am. J. Phys., 52, 967. Nan-Xian, C. (1981). Symmetry between inside and outside effects of an electrostatic shielding. Am. J. Phys., 49, 280–281. O’Dell, S. L. and Zia, R. K. P. (1986). Classical and semiclassical diamagnetism: a critique of treatment in elementary texts. Am. J. Phys., 54, 32–35. Page, L. (1912). A derivation of the fundamental relations of electrodynamics from those of electrostatics. Am. J. Sci., 34, 57–68. Press, F. and Siever, R. (1978). Earth, 2nd edn. (New York: W. H. Freeman). Priestly, J. (1767). The History and Present State of Electricity, vol. II, London. Roberts, D. (1983). How batteries work: a gravitational analog. Am. J. Phys., 51, 829–831. Romer, R. H. (1982). What do “voltmeters” measure? Faraday’s law in a multiply connected region. Am. J. Phys., 50, 1089–1093. Semon, M. D. and Taylor, J. R. (1996). Thoughts on the magnetic vector potential. Am. J. Phys., 64, 1361–1369. Smyth, C. P. (1955). Dielectric Behavior and Structure (New York: McGrawHill). Varney, R. N. and Fisher, L. H. (1980). Electromotive force: Volta’s forgotten concept. Am. J. Phys., 48, 405–408. Waage, H. M. (1964). Projection of electrostatic field lines. Am. J. Phys., 32, 388. Whittaker, E. T. (1960). A History of the Theories of Aether and Electricity, vol. I (New York: Harper), p. 266. Williams, E. R., Faller, J. E., and Hill, H. A. (1971). New experimental test of Coulomb’s law: a laboratory upper limit on the photon rest mass. Phys. Rev. Lett., 26, 721–724.
Index Addition of velocities, relativistic, 808–809
orbital, relation to magnetic moment, 541
Boltzmann’s constant k, 202, 503
additivity of interactions, 10, 13
precession of, 822–823
Boos, F. L., 460
admittance, 408–414
anode of vacuum diode, 181
boost converter, 372
Alnico V, B-H curve for, 569
antimatter, 3
Bose, S. K., 305
alternating current, 394–418
antineutron, 3
bound and free charge, 497–498
representation by complex number, 406–408 alternating-current circuit, 405–414 power and energy in, 415–418
antiproton, 3
arbitrariness of the distinction, 506–507
Assis, A. K. T., 263
bound-charge current, 505–507
atom, electric current in, 540
bound-charge density, 498
alternating electromotive force, 395
atomic polarizability, 480–482
bound currents, 559–560
alternator, 371
aurora borealis, 318
boundary of dielectric, change in E at, 494–495
aluminum, doping of silicon with, 203–204
Auty, R. P., 505
ammeter, 224 ammonia molecule, dipole moment of, 483 ampere (unit of current), 178, 283, 762–763, 790
boundary-value problem, 132, 151–153 bridge network, 208, 233
B, magnetic field, 239, 278 and M, and H inside magnetized cylinder, 565
capacitance, 141–147
Ampère, Andre-Marie, 2, 236, 238, 259, 531
bacteria, magnetic, 571, 580
of cell membrane, 513
Ampère’s law, 288
battery, lead–sulfuric acid, 209–212
coefficients of, 148
B-H curve, 569–570
of prolate spheroid, 171
amplitude modulation (AM), 455
Biot–Savart law, 298, 435
units of, 142
Andrews, M., 640
Bitter plates, 320
angular momentum
Blakemore, R. P., 580
differential form, 291
illustrated, 145 capacitor, 141–147
conservation of, in changing magnetic field, 580
Bloomfield, L. A., 35
dielectric-filled, 489–492
Bohr radius a0 , 55, 481, 544
energy stored in, 149–151
of electron spin, 546–547
Boltzmann factor, 202
parallel-plate, 143–144, 467
834
capacitor (cont.) uses of, 153 vacuum, 467 capacitor plate, force on, 151, 162 carbon monoxide molecule, dipole moment of, 483 cartesian coordinates, 791 cassette tape, 570 cathode of vacuum diode, 181 Cavendish, Henry, 11 centimeter (as unit of capacitance), 145 CH3 OH (methanol) molecule, dipole moment of, 483 charge electric, see electric charge magnetic, absence of, 529 in motion, see moving charge charge density, linear, 28 charge distribution cylindrical, field of, 83 electric, 20–22 moments of, 74, 471–474 spherical, field of, 26–28 on a surface, 29 charged balloon, 32 charged disk, 68–71 field lines and equipotentials of, 72 potential of, 69 charged wire potential of, 68 circuit breaker, 320 circuit element, 205 circuits LR, 366–367 RC, 215–216 RLC, 389, 398, 410 alternating-current, 394–418 direct-current, 204–207 equivalent, 206 resonant, 388–394 circulation, 90 Clausius–Mossotti relation, 502 CO (carbon monoxide) molecule, dipole moment of, 483 coefficients of capacitance, 148 of potential, 148
Index
coil cylindrical (solenoid), magnetic field of, 300–303, 338 toroidal energy stored in, 369 inductance of, 364 Cole, R. H., 505 comets, 454 compass needle, 239 complex exponential solutions, 402–405 complex-number representation of alternating current, 406–408 complex numbers, review of, 828–829 conduction, electrical, 181–204 ionic, 189–195 in metals, 198–200 in semiconductors, 200–204 conduction band, 201–202 conductivity, electrical, 182–188 anisotropic, 182 of metals, 198–200 units for, 182 of various materials, 188, 195–197 conductors, electrical, 125–141 charged, system of, 128 properties of, 129 spherical, field around, 131 conformal mapping, 151 conservation of electric charge, 4–5, 180–181 distinguished from charge invariance, 242 conservative forces, 12 continuity equation, 181 copper, resistivity of, 188, 196–197 copper chloride, paramagnetism of, 526 corona discharge, 37 coulomb (SI unit of charge), 8, 762 relation to esu, 9 Coulomb, Charles de, 10 Coulomb’s law, 7–11, 259 tests of, 10–11 Crandall, R. E., 11 Crawford, F. S., 378 critical damping, 394 Crosignani, B., 590 cross product (vector product) of two vectors, 238
Curie, Pierre, 566 Curie point, 566 curl, 90–99, 798–799 in Cartesian coordinates, 93–95, 100 physical meaning of, 95 curlmeter, 96 current density J, 177–180 current loop magnetic dipole moment of, 534 magnetic field of, 531–535 torque on, 547 current ring, magnetic field of, 299 current sheet, 303–306 magnetic field of, 303–304 currents alternating, 394–418 bound and free, 559–560 bound-charge, 505–507 displacement, 433–436 electric, see electric currents fluctuations of, random, 195 curvilinear coordinates, 791–801 cylinder, magnetized, compared with cylinder polarized, 557 cylindrical coordinates, 792 damped harmonic oscillator, 389 damped sinusoidal oscillation, 392 damping of resonant circuit, 388–394 critical, 394 Davis, L., Jr., 11 decay of proton, 6 decay time for earth’s magnetic field, 386 deer, flying, 102 “del” notation, 83, 95, 100 detergent, 510 deuterium molecule, 242 Di Porto, P., 590 diamagnetic substances, 526 diamagnetism, 527, 540, 546 of electron orbits, 545 diamond crystal structure of, 200 wide band gap of, 203 dielectric constant κ, 468 of various substances, 469 dielectric sphere in uniform field, 495–496 dielectrics, 467–471
Index
diode, 219 silicon junction, 229 vacuum, 181 dipole comparison of electric and magnetic, 535–536 electric, see electric dipole magnetic, see magnetic dipole dipole moment electric, see electric dipole moment magnetic, see magnetic dipole moment disk conducting, field of, 140 charged, 68–72 displacement, electric, D, 499, 560–561 displacement current, 433–436 distribution of electric charge, 20–22 divergence, 78–79, 795–797 in Cartesian coordinates, 81–83, 100 divergence theorem, 79–80, 100 domains, magnetic, 567 doorbell, 321 doping of silicon, 203–204 dot product of two vectors, 12 dynamic random access memory (DRAM), 153 dynamo, 379, 386 dyne (Gaussian unit of force), 8 0 , permittivity of free space, 8 Earnshaw’s theorem, 87 earth’s magnetic field, 280, 577 decay time of, 386 possible source of, 380 eddy-current braking, 370 Edison, Thomas, 419 Einstein, Albert, 2, 236, 281, 314 electret, 558 electric charge, 1–11, 242 additivity of, 10, 13 conservation of, 4–5, 180–181 distribution of, 20–22 free and bound, 497–498, 506–507 fundamental quantum of, 8 invariance of, 241–243 quantization of, 5–7, 242 sign of, 4 electric currents, 177–189 and charge conservation, 180–181
energy dissipation in flow of, 207–208 parallel, force between, 283 variable in capacitors and resistors, 215–216 in inductors and resistors, 366–367 electric dipole potential and field of, 73–77, 474–476 torque and force on, in external field, 477–478 electric dipole moment, 74, 473, 475 induced, 479–482 permanent, 482–483 electric displacement D, 499, 560–561 electric eels, 219 electric field definition of, 17 in different reference frames, 243–246 of dipole, 75, 476 of Earth, 36 energy stored in, 33 of flat sheet of charge, 29 flux of, 22–26 Gauss’s law, 23–26 inside hollow conductor, 134 of line charge, 28 line integral of, 59–61 macroscopic, 488–489 in matter, spatial average of, 487 microscopic, 488 of point charge with constant velocity, 247–251 relation to φ and ρ, 89 transformation of, 245, 310 units of, 17 visualization of, 18–20 electric field lines, 18, 19, 71, 72, 76–77 electric generator, 370 electric guitar, 370 electric potential, see potential, electric electric quadrupole moment, 74, 473 electric susceptibility χe , 490, 501, 503 electrical breakdown, 36, 100 electrical conduction, see conduction, electrical electrical conductivity, see conductivity, electrical electrical conductors, see conductors, electrical electrical insulators, 125–126
835
electrical potential energy, 13–16 of a system of charges, 33, 63 electrical shielding, 135 electrodynamic tether, 369 electromagnet, 320 design of, 584 electromagnetic field components, transformation of, 310 electromagnetic force, range of, 11 electromagnetic induction, 343–357 electromagnetic wave, 254, 438–453 in dielectric, 507–509 in different reference frames, 452–453 energy transport by, 446–452 general properties of, 440–441 reflection of, 445, 447, 521 standing, 442–446 traveling pulse, 441 electromotive force, 209–211, 347, 357 alternating, 395 electron, 3, 5, 6, 198–204, 540–549 charge of, 8 magnetic moment of, 547 valence, 200 electron motion, wave aspect of, 199 electron orbit, 540–545 diamagnetism of, 545 magnetic moment of, 540–541 electron paramagnetic resonance (EPR), 823 electron radius, classical, 52, 545 electron spin, 546–549 angular momentum of, 546–547 electronic paper, 37 electrostatic field, 61, see also electric field equilibrium in, 88 electrostatic unit (esu) of charge, 8, 765 energy, see also potential energy, electrical in alternating-current circuit, 415–418 dissipation of, in resistor, 207–208 electrical, of ionic crystal, 14–16 stored in capacitor, 150 in electric field, 33 in inductor, 368 in magnetic field, 369 of system of charges, 11–14 energy gap, 201 equilibrium of charged particle, 88
836
equipotential surfaces, 71, 131 in field of conducting disk, 140 in field of dipole, 76 in field of uniformly charged disk, 72 equivalence of inertial frames, 237, 805 equivalent circuit, 206 for voltaic cell, 211 esu (electrostatic unit), 8, 765 Faller, J. E., 11 farad (unit of capacitance), 142 Faraday, Michael, 2, 236, 314 discovery of induction by, 343–345 reconstruction of experiment by, 384 Waterloo Bridge experiment by, 380 Faraday’s law of induction, 356–357 ferrofluid, 572 ferromagnetic substances, 526 ferromagnetism, 527, 565–568 Feynman, R. P., 37, 539 field electric, see electric field magnetic, see magnetic field meaning of, 245 Fisher, L. H., 348 fluctuations of current, random, 195 flux of electric field, definition of, 22–26 magnetic, 348–351 flux tube, 349, 351 force components, Lorentz transformation of, 810–811 application of, 255–257 force(s) between parallel currents, 283 on capacitor plate, 151, 162 conservative, 12 on electric dipole, 478 electromotive, 209–211, 347, 357, 395 with finite range, 88 on layer of charge, 30–32, 46 magnetic, 237–239 on magnetic dipole, 535–539 on moving charged particle, 255–267, 278 Foster’s theorem, 224 Frankel, R. B., 580 Franklin, Benjamin, 10, 516, 529
Index
free and bound charge, 497–498 arbitrariness of the distinction, 506–507 free currents, 559–560 frequency modulation (FM), 455 Friedberg, R., 639 fundamental constants, 825 fuse, 219 Galili, I., 452, 464 Galvani, Luigi, 209, 236 galvanic currents, 236 galvanometer, 224, 344 Gauss, C. F., 286 gauss (unit of magnetic field strength), 282 Gaussian units, 762–768 Gauss’s law, 23–26, 80, 88 applications of, 26–30, 88, 243–245, 254, 262, 266, 488, 812 and fields in a dielectric, 497–498 Gauss’s theorem, 79–80, 100 gecko, 510 generator, electric, 370 germanium, 202 conductivity of, 195 crystal structure of, 200 resistivity of, 188 Gilbert, William, 236 Goihbarg, E., 452, 464 golden ratio, 49, 168, 231, 665 Goldhaber, A. S., 11 Good, R. H., 157, 639, 640 gradient, 63–65, 792–795 graphite anisotropic conductivity of, 183 diamagnetism of, 546 gravitation, 3, 10, 28, 39, 163 gravitational field and Gauss’s law, 25 Gray, Stephen, 125 Griffiths, D. J., 298, 640 ground-fault circuit interrupter (GFCI), 371 gyromagnetic ratio, 541 H, magnetic field, 560–565 and B, and M inside magnetized cylinder, 565 relation to free current, 560, 561 H2 O molecule, dipole moment of, 483 hadron, 6
Hall, E. H., 317 Hall effect, 314–317 hard disk, 571 harmonic functions, 87, 152 harmonic oscillator, 389 HCl (hydrogen chloride) molecule, dipole moment of, 482, 483 Heald, M. A., 298 helical coil, magnetic field of, 302 helicopters, static charge on, 102 helium atom, neutrality of, 241 helix, handedness of, 279 Henry, Joseph, 361 henry (SI unit of inductance), 361 Hertz, Heinrich, 236, 281, 314, 394 hertz (unit of frequency), 394 Hill, H. A., 11 hole, 201 Hughes, V. W., 5 hybrid car, 371 hydrogen atom charge distribution in, 479 polarizability of, 481 hydrogen chloride molecule, dipole moment of, 482, 483 hydrogen ions, 189 hydrogen molecule, 5, 242 hydrogen negative ion, 328 hyperbolic functions, 830 hysteresis, magnetic, 569 ice, dielectric constant of, 505 ignition system coil, 372 image charge, 136–140 for a spherical shell, 159 impedance, 408–414 index of refraction, 509 inductance mutual, 359–364 reciprocity theorem for, 362–364 self-, 364–366 circuit containing, 366–367 induction electromagnetic, 343–357 Faraday’s law of, 356–357 inductive reactance, 396 insulators, electrical, 125–126 integral table, 826 internal resistance of electrolytic cell, 210
Index
interstellar magnetic field, 286, 386 invariance of charge, 241–243 distinguished from charge conservation, 242 evidence for, 241 ionic crystal, energy of, 14–16 ions, 189–198 in air, 190 in gases, 190 in water, 189–190 iron, B-H curve for, 569 Jackson, J. D., 189, 452 Jefimenko, O., 188 junction, silicon diode, 229 junkyard magnet, 321 Karlsruhe, University of, 394 King, J. G., 5 Kirchhoff’s loop rule, 207, 359 Kirchhoff’s rules, 206, 212 Laplace’s equation, 86–88, 132–134 Laplacian operator, 85–86, 799–801 lead superconductivity of, 197 resistivity of, 197 lead–sulfuric acid cell, 209–212 Leighton, R. B., 37, 539 Lenz’s law, 351 Leyden jar, 516 Li, Y., 640 Liénard–Wiechert potential, 707 light, velocity of, definition of, 789 light-emitting diode, 220 lightning, 37 lightning rod, 153 line charge density, 28 line integral of electric field, 59–61 of magnetic field, 287–291 linear dielectric, 490 linear physical system, 148 liquid oxygen, paramagnetism of, 525, 526, 548 lodestone (magnetite), 236, 526, 527, 565, 570 long straight wire, magnetic field of, 280 loop of a network, 207 Lorentz, H. A., 2, 236
Lorentz contraction, 261, 807 Lorentz force, 278 Lorentz invariants, 465, 811 Lorentz transformation applications of, 247–248, 255–257 of electric and magnetic field components, 310 of force components, 810–811 of momentum and energy, 810 of space-time coordinates, 806 LR circuits, 366–367 time constant of, 367 μ0 , permeability of free space, 281 M, magnetization, 550 and B, and H inside magnetized cylinder, 565 macroscopic description of matter, 470 macroscopic electric field in matter, 488–489 maglev train, 321 magnetic bottle, 318 magnetic charge, absence of, 529 magnetic dipole field of, 534–535 compared with electric dipole field, 535 force on, 535–539 torque on, 547 vector potential of, 531–534 magnetic dipole moment of current loop, 534 of electron orbit, 540–541 associated with electron spin, 547 magnetic domains, 567 magnetic field, 238, 278, see also earth’s magnetic field of current loop, 531–535 of current ring, 299 of current sheet, 303–304 of Earth, 373 energy stored in, 368–369 of helical coil, 302 interstellar, 386 line integral of, 287–291 of long straight wire, 280 of solenoid (coil), 300–303, 338 transformation of, 310 magnetic field B, see B, magnetic field magnetic field H, see H, magnetic field magnetic flux, 348–350
837
magnetic forces, 237–239 magnetic monopole, 529 magnetic permeability μ, 563 magnetic polarizability of electron orbit, 544 magnetic pressure, 306 magnetic susceptibility χm , 550, 563 magnetite (lodestone), 236, 526, 527, 565, 570 magnetization M, see M, magnetization magnetogyric ratio, 541 magnetohydrodynamics, 306 magnetomechanical ratio, orbital, 541 magnetron, 419 Mania, A. J., 263 Marcus, A., 188 mass spectrometer, 317 Maxwell, James Clerk, 2, 11, 141, 236, 436 Maxwell’s equations, 436–438 Mermin, N. D., 237 metal detector, 370 methane, structure and polarizability of, 481 methanol molecule, dipole moment of, 483 method of images, see image charge microphone condenser, 154 dynamic, 371 microscopic description of matter, 470 microscopic electric field in matter, 488 microwave background radiation, 454 microwave oven, 419, 510 mine-shaft problem, 601 moments of charge distribution, 74, 471–474 momentum, see angular momentum motor, electric, 319 moving charge force on, 255–267, 278 interaction with other moving charges, 259–267 measurement of, 239–240 multipole expansion, 74, 472 muon, trajectory in magnetized iron, 582 mutual inductance, 359–364 reciprocity theorem for, 362–364 Nan-Xian, C., 643 network alternating current, 405–414 bridge, 208, 233 direct-current, 205–207 ladder, 231
838
neurons, 102 neutron, 3, 6 Newton, Isaac, 27 NH3 (ammonia) molecule, dipole moment of, 483 nickel, Curie point of, 566 nickel sulfate, paramagnetism of, 526 Nieto, M. M., 11 niobium, 819 nitric oxide, paramagnetism of, 548 node of a network, 207 north pole, definition of, 280, 529 n-type semiconductor, 203–204 nuclear magnetic resonance (NMR), 823 nucleon, 39 nucleus, atomic, 3 octupole moment, 74, 473 O’Dell, S. L., 546 Oersted, Hans Christian, 236–237, 259, 331 oersted (unit of field H), 775 ohm (SI unit of resistance), 186 ohmmeter, 232 Ohm’s law, 181–183, 193 breakdown of, 198 deviations from, in metals, 200 Onnes, H. K., 817 orbital magnetic moment, 540–541 oscillator, harmonic, 389 oxygen, negative molecular ion, 190 Page, L., 237 paint sprayer, electrostatic, 37 pair creation, 4 parallel currents, force between, 283 Parallel-plate capacitor, 144 filled with dielectric, 467, 489–492 parallel RLC circuit, 410 paramagnetic substances, 526 paramagnetism, 527, 540, 548 partial derivative, definition of, 64 permanent magnet, field of, 557–559 permeability, magnetic, μ, 563 permittivity, , 497 pH value of hydrogen ion concentration, 189 phase angle in alternating-current circuit, 402, 404, 409
Index
phosphorous, doping of silicon with, 203 photocopiers, 37 photon, 4, 460 photovoltaic effect, 220 picofarad (unit of capacitance), 142 piezoelectric effect, 511 pion, 34 Planck, Max, 2 Planck’s constant h, 546 p–n junction, 219 point charge, 21 accelerated, radiation by, 812–815 moving with constant velocity, 247–251 near conducting disk, 139 starting or stopping, 251–255 Poisson’s equation, 86, 89 polar molecules, dipole moments of, 483 polarizability magnetic, of electron orbit, 544 of various atoms, 481–482 polarization, frequency dependence of, 504 polarization density P, 484, 498, 501, 503 polarized matter, 483–489 polarized sphere, electric field of, 492–495 pollination, by bees, 509 positron, 3 potential coefficients of, 148 electric, φ, 61–73, 86–89 of charged disk, 69 of charged wire, 67 derivation of field from, 65 of electric dipole, 73–74, 475 of two point charges, 66 vector, 293–296 of current loop, 531–534 potential energy, electrical, 13–16 of a system of charges, 33, 63 power in alternating-current circuit, 415–418 dissipated in resistor, 208 radiated by accelerated charge, 814 power adapter, 420 power-factor correction, 420 Poynting vector, 448–452 precession of magnetic top, 821, 822
Press, F., 380 Priestly, Joseph, 10 proton, 3 decay of, 6 and electron charge equality, 5 magnetic moment of, 822 p-type semiconductor, 203–204 Q, of resonant circuit, 392, 402 quadrupole moment, 74, 473 tensor, 514 quantization of charge, 5–7, 242 quantum electrodynamics, 2 quark, 6, 35 quartz clock, 511 radiation by accelerated charge, 812–815 radio frequency identification (RFID) tags, 454 railgun, 319 random fluctuations of current, 195 range of electromagnetic force, 11 rare-earth magnets, 573 rationalized units, 767 RC circuit, 215–216 time constant of, 216 reactance, inductive, 396 reciprocity theorem for mutual inductance, 362–364 recombination of ions, 190 refractive index, 509 regenerative braking, 371 relaxation method, 153, 174 relaxation of field in conductor, 217 relaxation time, 217 relay, electric, 320 remanence, magnetic, 569 resistance, electrical, 183–187 resistances in parallel and in series, 206 resistivity, 186 of various materials, 188, 196 resistor, 205, 207 resonance, 418 resonant circuit, 388–394 damping of, 391–394 critical, 394 energy transfer in, 392 resonant frequency, 400 retarded potential, 329 Roberts, D., 211
Index
Rodrigues, W. A. Jr., 263 Romer, R. H., 359 Rowland, Henry, 259, 314, 315, 317 Rowland’s experiment, 315 RLC circuit parallel, 410 series, 389, 398 Sands, M., 37, 539 saturation magnetization, 565 scalar product of two vectors, 12 Scott, G. K., 305 seawater, resistivity of, 188, 190, 196 second (as Gaussian unit of resistivity), 187 self-energy of elementary particles, 35 self-inductance, 364–366 circuit containing, 366–367 semiconductors, 126, 195, 200–204 n-type, 203–204 p-type, 203, 204 Semon, M. D., 296 series RLC circuit, 389, 398 shake flashlight, 370 sheets of charge, moving, electric field of, 243–245 shielding, electrical, 135 SI units, 762–768 derived, 769 Siever, R., 380 silicon, 195, 200–204 band gap in, 201 crystal structure of, 200 slope detection, 455 smoke detector, 219 Smyth, C. P., 505 sodium and chlorine ions in water, 190 sodium chloride crystal diamagnetism of, 526 electrical potential energy of, 14–16 free and bound charge in, 507 sodium metal, conductivity of, 198–199 solar cells, 220 solenoid (coil), magnetic field of, 300–303, 338 speakers, 321 spherical coordinates, 792 spin of electron, 546–549
sprites, 219 St. Elmo’s fire, 37 standing wave, electromagnetic, 442–446 Starfish Prime, 318 statvolt (Gaussian unit of electric potential), 61 Stokes’ theorem, 92–93, 100 storage battery, lead-sulfuric acid, 209–212 supercapacitor, 154 superconductivity, 197, 817–820 superposition, principle of, 10 applications of, 25, 147, 207, 245, 301, 442, 490, 492 surface charge on current-carrying wire, 188–189, 263, 452 density, 129 distribution, 29 surface current density, 303 surface integral, definition of, 23 surfaces, equipotential, see equipotential surfaces surfactant, 510 susceptibility electric χe , 490, 501, 503 magnetic χm , 550, 563 symmetry argument, 21 synchrotron radiation, 815
839
transistor, 220 triboelectric effect, 36 trigonometric identities, 829 uniqueness theorem, 132–133 units, SI and Gaussian, 762–768 conversions, 774–777, 789–790 formulas, 778–788 vacuum capacitor, 467 valence band, 201–204 valence electrons, 200 Van Allen belts, 318 Van de Graaff generator, 182, 209, 211 van der Waals force, 510 Varney, R. N., 348 vector identities, 827 vector potential, 293–296 of current loop, 531–534 vector product (cross product) of two vectors, 238 volt (SI unit of electric potential), 61 Volta, Alessandro, 209, 236 Voltaic cell, 209 equivalent circuit for, 211 voltmeter, 224 Waage, H. M., 530
Taylor, J. R., 296 Taylor series, 827–828 television set, 318 temperature, effect of on alignment of electron spins, 548–549 on alignment of polar molecules, 503 on conductivity, 195–197 Tesla, Nikola, 286, 419 tesla (SI unit of magnetic field strength), 280 Thévenin’s theorem, 213–215, 225 three-phase power, 419 torque on current loop, 332, 547 on electric dipole, 477, 478 transatlantic telegraph, 227 transatlantic telegraph cable, 217 transformation, see Lorentz transformation transformer, 372
Walker, J., 35 War of Currents, 419 water dielectric constant of, 505 ions in, 189–190 pure, resistivity of, 188, 196 water molecule, dipole moment of, 483 watt (SI unit of power), 208 wave, electromagnetic, see electromagnetic wave weber (SI unit of magnetic flux), 357 Whittaker, E., 500 Williams, E. R., 11 wire charged, potential of, 67 magnetic field of, 280 work, by magnetic force, 572 Zia, R. K. P., 546
Derived units
Maxwell’s equations
kg m newton (N) = 2 s
∂B ∂t ∂E curl B = μ0 0 + μ0 J ∂t ρ div E = 0 div B = 0 curl E = −
joule (J) = newton-meter = ampere (A) =
kg m2 s2
coulomb C = second s
volt (V) =
joule kg m2 = coulomb C s2
farad (F) =
coulomb C2 s2 = volt kg m2
ohm () =
volt kg m2 = 2 ampere C s
joule kg m2 = second s3 newton kg tesla (T) = = coulomb · meter/second Cs
watt (W) =
henry (H) =
volt kg m2 = ampere/second C2
Fundamental constants
Divergence theorem
speed of light
c
2.998 · 108
elementary charge
e
1.602 · 10−19 C
m/s
F · da = surface
4.803 · 10−10 esu
div F dv volume
electron mass
me
9.109 · 10−31 kg
proton mass
mp
1.673 · 10−27 kg
Avogadro’s number
NA
6.022 · 10−23
Boltzmann constant
k
1.381 · 10−23 J/K
Planck constant
h
6.626 · 10−34 J s
gravitational constant
G
6.674 · 10−11 m3 /(kg s2 )
Gradient theorem
electron magnetic moment
μe
9.285 · 10−24 J/T
φ 2 − φ1 =
proton magnetic moment
μp
1.411 · 10−26 J/T
permittivity of free space
0
8.854 · 10−12 C2 s2 /(kg m3 )
permeability of free space
μ0
1.257 · 10−6 kg m/C2
mole
Stokes’ theorem
−1
A · ds = curve
curl A · da surface
grad φ · ds curve
Vector operators Cartesian coordinates ds = dx xˆ + dy yˆ + dz zˆ ∂ ∂ ∂ + yˆ + zˆ ∂x ∂y ∂z
∇ = xˆ ∇f =
∂f ∂f ∂f xˆ + yˆ + zˆ ∂x ∂y ∂z
∂Ay ∂Az ∂Ax + + ∂x ∂y ∂z ∂Ay ∂Ay ∂Az ∂Ax ∂Az ∂Ax ∇ ×A= − xˆ + − yˆ + − zˆ ∂y ∂z ∂z ∂x ∂x ∂y ∇ ·A=
∇2f =
∂ 2f ∂ 2f ∂ 2f + 2 + 2 ∂x2 ∂y ∂z
Cylindrical coordinates ds = dr rˆ + r dθ θˆ + dz zˆ ∇ = rˆ ∇f =
∂ 1 ∂ ∂ + θˆ + zˆ ∂r r ∂θ ∂z
∂f 1 ∂f ˆ ∂f rˆ + θ+ zˆ ∂r r ∂θ ∂z
1 ∂(rAr ) 1 ∂Aθ ∂Az + + r ∂r r ∂θ ∂z 1 ∂Az ∂Ar ∂Aθ ∂Az ˆ 1 ∂(rAθ ) ∂Ar ∇ ×A= − rˆ + − θ+ − zˆ r ∂θ ∂z ∂z ∂r r ∂r ∂θ 1 ∂ ∂ 2f ∂f 1 ∂ 2f r + 2 2 + 2 ∇2f = r ∂r ∂r r ∂θ ∂z ∇ ·A=
Spherical coordinates ds = dr rˆ + r dθ θˆ + r sin θ dφ φˆ ∇ = rˆ ∇f =
∂ 1 ∂ 1 ∂ + θˆ + φˆ ∂r r ∂θ r sin θ ∂φ
∂f 1 ∂f ˆ 1 ∂f ˆ rˆ + θ+ φ ∂r r ∂θ r sin θ ∂φ
1 ∂(Aθ sin θ ) 1 ∂Aφ 1 ∂(r2 Ar ) + + ∇ ·A= 2 ∂r r sin θ ∂θ r sin θ ∂φ r ∂(Aφ sin θ ) ∂(rAφ ) 1 ∂Ar 1 ∂Aθ 1 1 ∂(rAθ ) ∂Ar ˆ ∇ ×A= − rˆ + − θˆ + − φ r sin θ ∂θ ∂φ r sin θ ∂φ ∂r r ∂r ∂θ ∂f ∂ 2f ∂ 1 ∂ 1 ∂f 1 r2 + 2 sin θ + ∇2f = 2 2 ∂r ∂θ r ∂r r sin θ ∂θ r2 sin θ ∂φ 2
Electricity and magnetism purcell 01 100 conif
Electricity and magnetism purcell 01 100 conif
Advertisement
|
__label__pos
| 0.950337 |
SCP-3032
rating: +103+x
Item #: SCP-3032
Object Class: Keter
Special Containment Procedures: Reports of forest fires with unknown/unusual causes are to be constantly monitored, with an increased priority in regions with a history of SCP-3032 instances. [Consult Document 3032-Regions for further information]
Identified instances of SCP-3032 outside of containment are to be neutralized via aerial-strike by local Armed Observation Posts [See Incident Report 3032-01]. Once an instance of SCP-3032 has been identified, it is to be immediately reported to the nearest Biological Containment Site equipped for SCP-3032. Identified instances are to be kept under constant surveillance; should it enter an active state, the appropriate Site is to deploy anti-air guided missiles in order to neutralize the object before it enters Phase 7. Should object succeed in entering Phase 7, Foundation personnel are to be deployed to destroy any cones that have been released. A thin acid spray has been found to be the most effective method thus far for quick disposal of cones.
A current total of 14 13 instances of SCP-3032 are contained in an 18 meters2 open-air greenhouse area. Each specimen is to be planted within a 2 meters2 plot of soil extending 10 meters deep maximum, in order to minimize chances of a coordinated assault. In the event a contained instance should enter Phase 1, the root system is to be immediately flooded with water, which will neutralize the active state and prevent the specimen from entering Phase 3. Should the specimen achieve Phase 3, the neutralization strategy detailed above is to be employed.
Description: SCP-3032 is the collective designation for an anomalous strain of Larix laricina.1 New instances of SCP-3032 develop complex, repetitive root systems, which seem to prioritize stability over resource collection. Instances possess extremely durable bark, rendering most tree felling tools and methods ineffective. Due to these properties, as well as the objects' other anomalous properties, instances take approximately 2x longer to reach maturity than their non-anomalous counterparts.
The primary anomalous property of SCP-3032 specimens manifest when instances are ready to reproduce, or are under threat. Specimens, upon entering an active state, are capable of simulating the launch sequence of conventional ballistic missiles. Specimens appear to target random locations, unless preparing for a coordinated assault [SEE INCIDENT REPORT 3032-01]. To accommodate for this unconventional means of dispersal, cones produced by SCP-3032 are noted to be highly resistant to impact forces and extreme heat, and will naturally angle downwards during descent. Cones will impact the ground at terminal velocity, capable of causing severe damage to impact zone. Additionally, attempts to tamper with instances of SCP-3032, or after successfully penetrating the outer bark, will result in the object entering a "panic" state, resulting in premature, rushed flight. Panicking SCP-3032 instances seem to possess a 43% failure rate, wherein fuel is improperly created and the object either explodes violently or fails to achieve liftoff.
The following is a list of flight phases SCP-3032 instances undergo:
Incident 3032-01: On ██/██/19██, less than 12 hours after destruction of a group of SCP-3032 instances, three other identified groves of SCP-3032 within the vicinity of the neutralized group suddenly became active and appeared to actively target the missile silos and hangar area of Site-██, resulting in █ casualties and ██ injuries. It is currently theorized that instances possess some unknown means of short-to-mid range communication among each other, and use this system as a means to calculate the origin point of threats. Confirmed communication system; root systems appear to be capable of communicating with neighboring systems through unknown mechanism. Containment procedures revised to prevent further coordinated assault.
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License
|
__label__pos
| 0.597423 |
O'Reilly logo
Stay ahead with the world's most comprehensive technology and business learning platform.
With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.
Start Free Trial
No credit card required
Developing and Applying Optoelectronics in Machine Vision
Book Description
Sensor technologies play a large part in modern life as they are present in security systems, digital cameras, smartphones, and motion sensors. While these devices are always evolving, research is being done to further develop this technology to help detect and analyze threats, perform in-depth inspections, and perform tracking services. Developing and Applying Optoelectronics in Machine Vision evaluates emergent research and theoretical concepts in scanning devices and 3D reconstruction technologies being used to measure their environment. Examining the development of the utilization of machine vision practices and research, optoelectronic devices, and sensor technologies, this book is ideally suited for academics, researchers, students, engineers, and technology developers.
Table of Contents
1. Cover
2. Title Page
3. Copyright Page
4. Book Series
1. Mission
2. Coverage
5. Editorial Advisory Board
6. List of Reviewers
7. Preface
1. HISTORY
2. IMPORTANCE OF OPTOELECTRONIC DEVICES AND MACHINE VISION
3. IMPACT OF THE BOOK
4. ORGANIZATION OF THE BOOK
8. Introduction
1. 3D OPTOELECTRONIC SCANNING TECHNOLOGIES
2. MACHINE VISION
3. TRENDS OF OPTOELECTRONIC SYSTEMS AND MACHINE VISION
4. SCOPE OF THE BOOK
5. REFERENCES
9. Chapter 1: Applying Optoelectronic Devices Fusion in Machine Vision
1. ABSTRACT
2. INTRODUCTION
3. BACKGROUND
4. OPTOELECTRONIC SENSORS FUSION IN MACHINE VISION
5. MACHINE VISION FOR SPATIAL COORDINATE MEASUREMENT
6. EXPERIMENTAL RESULTS
7. CONCLUSION
8. REFERENCES
10. Chapter 2: CMOS Image Sensor
1. ABSTRACT
2. INTRODUCTION
3. REVIEW OF THE STATE OF THE ART OF CMOS IMAGE SENSOR
4. SIMPLE ANALOG AND MIXED-SIGNAL CIRCUITS FOR CIS
5. FUTURE RESEARCH DIRECTION
6. CONCLUSION
7. REFERENCES
11. Chapter 3: Automated Visual Inspection System for Printed Circuit Boards for Small Series Production
1. ABSTRACT
2. INTRODUCTION
3. VISUAL SMD INSPECTION SYSTEM AND COMMUNICATION PROTOCOL BETWEEN AGENT AND MACHINE
4. FUTURE RESEARCH DIRECTIONS
5. CONCLUSION
6. REFERENCES
7. KEY TERMS AND DEFINITIONS
12. Chapter 4: Laser Scanners
1. ABSTRACT
2. INTRODUCTION
3. REFERENCES
13. Chapter 5: Machine Vision Application on Science and Industry
1. ABSTRACT
2. INTRODUCTION
3. DESIGN OF FACE SENSING AND RECOGNITION SYSTEMS
4. FUTURE RESEARCH DIRECTIONS
5. CONCLUSION
6. ACKNOWLEDGMENT
7. REFERENCES
14. Chapter 6: Theoretical Methods of Images Processing in Optoelectronic Systems
1. ABSTRACT
2. 1. PURPOSE AND METHODS OF IMPROVING OPTOELECTRONIC SYSTEMS
3. 2. FORMATION OF IMAGES IN OPTOELECTRONIC SYSTEMS
4. 3. STATISTICAL PROPERTIES OF SIGNALS IN OPTOELECTRONIC SYSTEMS
5. 4. IMAGE PROCESSING IN OPTOELECTRONIC SYSTEMS
6. 5. CONCLUSION
7. REFERENCES
15. Chapter 7: Machine Vision Optical Scanners for Landslide Monitoring
1. ABSTRACT
2. INTRODUCTION
3. 1. BACKGROUND
4. 2. OPTOELECTRONIC DEVICES FOR LANDSLIDE MONITORING
5. 3. TYPICAL OPTOELECTRONIC SCANNERS
6. 4. INCOHERENT VS. COHERENT LIGHT IN SCANNERS FOR LANDSLIDE MONITORING
7. 5. A NEW APPROACH BASED IN OPTICAL SCANNERS
8. 6. FUTURE RESEARCH DIRECTIONS
9. 7. CONCLUSION
10. REFERENCES
16. Chapter 8: 3D Imaging Systems for Agricultural Applications
1. ABSTRACT
2. INTRODUCTION
3. 3D USE FOR CROP CHARACTERIZATION
4. 3D USE FOR ROOT PHENOTYPING
5. FUTURE RESEARCH DIRECTIONS
6. CONCLUSION
7. REFERENCES
8. KEY TERMS AND DEFINITIONS
17. Chapter 9: Analysis of New Opotoelectronic Device for Detection of Heavy Metals in Corroded Soils
1. ABSTRACT
2. INTRODUCTION
3. INTRODUCTION
4. METHODOLOGY
5. RESULTS
6. DISCUSSION OF THE RESULTS
7. CONCLUSION
8. ACKNOWLEDGMENT
9. REFERENCES
18. Compilation of References
19. About the Contributors
|
__label__pos
| 1 |
#!/usr/bin/perl -wT # # EMULAB-COPYRIGHT # Copyright (c) 2008-2009 University of Utah and the Flux Group. # All rights reserved. # package GeniCM; # # The server side of the CM interface on remote sites. Also communicates # with the GMC interface at Geni Central as a client. # use strict; use Exporter; use vars qw(@ISA @EXPORT); @ISA = "Exporter"; @EXPORT = qw ( ); # Must come after package declaration! use lib '@prefix@/lib'; use GeniDB; use Genixmlrpc; use GeniResponse; use GeniTicket; use GeniCredential; use GeniCertificate; use GeniSlice; use GeniAggregate; use GeniAuthority; use GeniSliver; use GeniUser; use GeniRegistry; use libtestbed; # Hate to import all this crap; need a utility library. use libdb qw(TBGetUniqueIndex TBcheck_dbslot TBGetSiteVar TBDB_CHECKDBSLOT_ERROR); use User; use Node; use libadminctrl; use Interface; use English; use Data::Dumper; use XML::Simple; use Date::Parse; use POSIX qw(strftime); use Time::Local; use Experiment; use Firewall; # Configure variables my $TB = "@prefix@"; my $TBOPS = "@TBOPSEMAIL@"; my $TBAPPROVAL = "@TBAPPROVALEMAIL@"; my $TBAUDIT = "@TBAUDITEMAIL@"; my $BOSSNODE = "@BOSSNODE@"; my $OURDOMAIN = "@OURDOMAIN@"; my $CREATEEXPT = "$TB/bin/batchexp"; my $ENDEXPT = "$TB/bin/endexp"; my $NALLOC = "$TB/bin/nalloc"; my $NFREE = "$TB/bin/nfree"; my $AVAIL = "$TB/sbin/avail"; my $PTOPGEN = "$TB/libexec/ptopgen"; my $TBSWAP = "$TB/bin/tbswap"; my $SWAPEXP = "$TB/bin/swapexp"; my $PLABSLICE = "$TB/sbin/plabslicewrapper"; my $NAMEDSETUP = "$TB/sbin/named_setup"; my $VNODESETUP = "$TB/sbin/vnode_setup"; my $GENTOPOFILE = "$TB/libexec/gentopofile"; # # Respond to a Resolve request. # sub Resolve($) { my ($argref) = @_; my $uuid = $argref->{'uuid'}; my $cred = $argref->{'credential'}; my $type = $argref->{'type'}; my $hrn; if (! defined($cred)) { return GeniResponse->MalformedArgsResponse(); } if (! (defined($type) && ($type =~ /^(Node)$/))) { return GeniResponse->MalformedArgsResponse(); } # Allow lookup by uuid or hrn. if (! defined($uuid)) { return GeniResponse->MalformedArgsResponse(); } if (defined($uuid) && !($uuid =~ /^[-\w]*$/)) { return GeniResponse->MalformedArgsResponse(); } my $credential = GeniCredential->CreateFromSigned($cred); if (!defined($credential)) { return GeniResponse->Create(GENIRESPONSE_ERROR, undef, "Could not create GeniCredential object"); } # # Make sure the credential was issued to the caller, but no special # permission required to resolve component resources. # if ($credential->owner_uuid() ne $ENV{'GENIUUID'}) { return GeniResponse->Create(GENIRESPONSE_ERROR, undef, "This is not your credential!"); } if ($type eq "Node") { my $node; if (defined($uuid)) { $node= Node->Lookup($uuid); } else { # # We only want the last token for node lookup. # if ($hrn =~ /\./) { ($hrn) = ($hrn =~ /\.(\w*)$/); } $node= Node->Lookup($hrn); } if (!defined($node)) { return GeniResponse->Create(GENIRESPONSE_SEARCHFAILED, undef, "Nothing here by that name"); } # Return a blob. my $blob = { "hrn" => "${OURDOMAIN}." . $node->node_id(), "uuid" => $node->uuid(), "role" => $node->role(), }; # # Get the list of interfaces for the node. # my @interfaces; if ($node->AllInterfaces(\@interfaces) != 0) { return GeniResponse->Create(GENIRESPONSE_ERROR, undef, "Could not get interfaces for $uuid"); } my @iblobs = (); foreach my $interface (@interfaces) { next if (!defined($interface->switch_id())); my $iblob = { "uuid" => $interface->uuid(), "iface" => $interface->iface(), "type" => $interface->type(), "card" => $interface->card(), "port" => $interface->port(), "role" => $interface->role(), "IP" => $interface->IP() || "", "mask" => $interface->mask() || "", "MAC" => $interface->mac(), "switch_id" => "${OURDOMAIN}." . $interface->switch_id(), "switch_card" => $interface->switch_card(), "switch_port" => $interface->switch_port(), "wire_type" => $interface->wire_type(), }; push(@iblobs, $iblob); } $blob->{'interfaces'} = \@iblobs if (@iblobs); return GeniResponse->Create(GENIRESPONSE_SUCCESS, $blob); } return GeniResponse->Create(GENIRESPONSE_UNSUPPORTED); } # # Discover resources on this component, returning a resource availablity spec # sub DiscoverResources($) { my ($argref) = @_; my $credential = $argref->{'credential'}; my $user_uuid = $ENV{'GENIUSER'}; $credential = GeniCredential->CreateFromSigned($credential); if (!defined($credential)) { return GeniResponse->Create(GENIRESPONSE_ERROR, undef, "Could not create GeniCredential object"); } # The credential owner/slice has to match what was provided. if ($user_uuid ne $credential->owner_uuid()) { return GeniResponse->Create(GENIRESPONSE_FORBIDDEN, undef, "Invalid credentials for operation"); } # # A sitevar controls whether external users can get any nodes. # my $allow_externalusers = 0; if (!TBGetSiteVar('protogeni/allow_externalusers', \$allow_externalusers)){ # Cannot get the value, say no. $allow_externalusers = 0; } if (!$allow_externalusers) { my $user = GeniUser->Lookup($user_uuid, 1); # No record means the user is remote. if (!defined($user) || !$user->IsLocal()) { return GeniResponse->Create(GENIRESPONSE_UNAVAILABLE, undef, "External users temporarily denied"); } } # # Use ptopgen in xml mode to spit back an xml file. # if (! open(AVAIL, "$PTOPGEN -x -g -r -p GeniSlices |")) { return GeniResponse->Create(GENIRESPONSE_ERROR, undef, "Could not start avail"); } my $xml = ""; while () { $xml .= $_; } close(AVAIL); return GeniResponse->Create(GENIRESPONSE_SUCCESS, $xml); } # # Respond to a GetTicket request. # sub GetTicket($) { my ($argref) = @_; my $rspec = $argref->{'rspec'}; my $impotent = $argref->{'impotent'}; my $cred = $argref->{'credential'}; my $vtopo = $argref->{'virtual_topology'}; my $owner_uuid = $ENV{'GENIUSER'}; my $response = undef; if (! defined($cred)) { return GeniResponse->MalformedArgsResponse(); } if (! (defined($rspec) && ($rspec =~ /^[-\w]+$/))) { GeniResponse->Create(GENIRESPONSE_BADARGS, undef, "Improper rspec"); } $rspec = XMLin($rspec, ForceArray => ["node", "link", "linkendpoints"]); $impotent = 0 if (!defined($impotent)); my $credential = GeniCredential->CreateFromSigned($cred); if (!defined($credential)) { return GeniResponse->Create(GENIRESPONSE_ERROR, undef, "Could not create GeniCredential object"); } my $slice_uuid = $credential->target_uuid(); my $user_uuid = $credential->owner_uuid(); # # Make sure the credential was issued to the caller. # if ($credential->owner_uuid() ne $ENV{'GENIUUID'}) { return GeniResponse->Create(GENIRESPONSE_ERROR, undef, "This is not your credential!"); } # # Create slice form the certificate. # my $slice = GeniSlice->Lookup($slice_uuid); if (!defined($slice)) { $slice = CreateSliceFromCertificate($credential); if (!defined($slice)) { print STDERR "Could not create $slice_uuid\n"; return GeniResponse->Create(GENIRESPONSE_ERROR, undef, "Could not create slice"); } } # # Ditto the user. # my $user = GeniUser->Lookup($user_uuid); if (!defined($user)) { $user = CreateUserFromCertificate($credential->owner_cert()); if (!defined($user)) { print STDERR "No user $user_uuid in the ClearingHouse\n"; return GeniResponse->Create(GENIRESPONSE_ERROR, undef, "Could not get user info from ClearingHouse"); } } # # A sitevar controls whether external users can get any nodes. # my $allow_externalusers = 0; if (!TBGetSiteVar('protogeni/allow_externalusers', \$allow_externalusers)){ # Cannot get the value, say no. $allow_externalusers = 0; } if (!$allow_externalusers && !$user->IsLocal()) { return GeniResponse->Create(GENIRESPONSE_UNAVAILABLE, undef, "External users temporarily denied"); } # # For now all tickets expire very quickly (minutes), but once the # ticket is redeemed, it will expire according to the rspec request. # if (exists($rspec->{'valid_until'})) { my $expires = $rspec->{'valid_until'}; if (! ($expires =~ /^[-\w:.\/]+/)) { return GeniResponse->Create(GENIRESPONSE_BADARGS, undef, "Illegal valid_until in rspec"); } # Convert to a localtime. my $when = timegm(strptime($expires)); if (!defined($when)) { return GeniResponse->Create(GENIRESPONSE_BADARGS, undef, "Could not parse valid_until"); } # # No more then 24 hours out ... Needs to be a sitevar? # my $diff = $when - time(); if ($diff < (60 * 15) || $diff > (3600 * 24)) { return GeniResponse->Create(GENIRESPONSE_BADARGS, undef, "valid_until out of range"); } } else { # Give it a reasonable default for later when the ticket is redeemed. $rspec->{'valid_until'} = POSIX::strftime("20%y-%m-%dT%H:%M:%S", gmtime(time() + (3600*1))); } # # # Lock the slice from further access. # if ($slice->Lock() != 0) { return GeniResponse->BusyResponse(); } # Shutdown slices get nothing. if ($slice->shutdown()) { $slice->UnLock(); return GeniResponse->Create(GENIRESPONSE_FORBIDDEN, undef, "Slice has been shutdown"); } # # For now, there can be only a single toplevel aggregate per slice. # The existence of an aggregate means the slice is active here. # my $aggregate = GeniAggregate->SliceAggregate($slice); if (defined($aggregate)) { $slice->UnLock(); return GeniResponse->Create(GENIRESPONSE_BADARGS, undef, "Already have an aggregate for slice"); } # # Say a ticket already exists in the DB? Lets throw that ticket # away and generate a new one. This is partly a debugging # mechanism. To really do this correctly, would want to merge in # the existing resources with the new rspec request. Do not # want to go there yet. # my $existing_ticket = GeniTicket->LookupForSlice($slice); if (defined($existing_ticket)) { print STDERR "Releasing existing ticket $existing_ticket\n"; if ($existing_ticket->Release() != 0) { print STDERR "Error releasing existing ticket $existing_ticket\n"; $slice->UnLock(); return GeniResponse->Create(GENIRESPONSE_ERROR); } } # # Firewall hack; just a flag in the rspec for now. # if (exists($rspec->{'needsfirewall'}) && $rspec->{'needsfirewall'}) { print STDERR "firewall: " . $rspec->{'needsfirewall'} . "\n"; if ($slice->SetFirewallFlag($rspec->{'needsfirewall'}) != 0) { $slice->UnLock(); return GeniResponse->Create(GENIRESPONSE_ERROR); } } my $experiment = GeniExperiment($slice); if (!defined($experiment)) { $slice->UnLock(); return GeniResponse->Create(GENIRESPONSE_ERROR, undef, "Internal Error"); } # # An rspec is a structure that requests specific nodes. If those # nodes are available, then reserve it. Otherwise the ticket # cannot be granted. # # XXX Simpleminded. # my %namemap = (); my %uuidmap = (); my @nodeids = (); my @dealloc; my $pid = $experiment->pid(); my $eid = $experiment->eid(); foreach my $ref (@{$rspec->{'node'}}) { my $resource_uuid = $ref->{'uuid'}; my $node_nickname = $ref->{'nickname'}; my $virtualization_type = $ref->{'virtualization_type'}; my $node; # # Mostly for debugging right now, allow a wildcard. # if ($resource_uuid eq "*") { $node = FindFreeNode($virtualization_type, @nodeids); if (!defined($node)) { $response = GeniResponse->Create(GENIRESPONSE_UNAVAILABLE, undef, "No free nodes for wildcard"); goto bad; } $resource_uuid = $node->uuid(); $ref->{'uuid'} = $node->uuid(); } else { $node = Node->Lookup($resource_uuid); if (!defined($node)) { $response = GeniResponse->Create(GENIRESPONSE_BADARGS, undef, "Bad resource $resource_uuid"); goto bad; } } # # Widearea nodes do not need to be allocated, but for now all # I allow is a plabdslice node. # if ($node->isremotenode()) { if (! $node->isplabphysnode()) { $response = GeniResponse->Create(GENIRESPONSE_BADARGS, undef, "Only plab widearea nodes"); goto bad; } next; } # # See if the node is already reserved. # my $reservation = $node->Reservation(); if (defined($reservation)) { $response = GeniResponse->Create(GENIRESPONSE_UNAVAILABLE, undef, "$resource_uuid ($node) not available"); goto bad; } push(@nodeids, $node->node_id()); $uuidmap{$resource_uuid} = $node; # For wildcarded nodes in links. $namemap{$node_nickname} = $node if (defined($node_nickname)); } # # A sitevar controls how many total nodes external users can allocate. # # XXX All this policy stuff is a whack job for the initial release. # my $max_externalnodes = 0; if (!TBGetSiteVar('protogeni/max_externalnodes', \$max_externalnodes)){ # Cannot get the value, say none. $max_externalnodes = 0; } if (scalar(@nodeids) > $max_externalnodes) { $slice->UnLock(); return GeniResponse->Create(GENIRESPONSE_UNAVAILABLE, undef, "Too many nodes; limited to $max_externalnodes"); } # Check current usage by dipping into the libadminctrl library. my $curusage = libadminctrl::LoadCurrent($experiment->creator(), $experiment->pid(), $experiment->gid()); if (!defined($curusage)) { $slice->UnLock(); print STDERR "Could not get current usage from adminctl library\n"; return GeniResponse->Create(GENIRESPONSE_UNAVAILABLE, undef, "Temporarily unavailable"); } if ($curusage->{"nodes"}->{'project'} + scalar(@nodeids) >= $max_externalnodes) { $slice->UnLock(); my $nodesleft = $max_externalnodes - $curusage->{"nodes"}->{'project'}; return GeniResponse->Create(GENIRESPONSE_UNAVAILABLE, undef, "Too many nodes; limited to $nodesleft"); } # Nalloc might fail if the node gets picked up by someone else. if (@nodeids && !$impotent) { system("$NALLOC $pid $eid @nodeids"); if (($? >> 8) < 0) { $response = GeniResponse->Create(GENIRESPONSE_ERROR, undef, "Allocation failure"); goto bad; } elsif (($? >> 8) > 0) { $response = GeniResponse->Create(GENIRESPONSE_UNAVAILABLE, undef, "Could not allocate node"); goto bad; } # In case the code below fails, before ticket is created. @dealloc = @nodeids; } # # Now deal with links for wildcarded nodes. We need to fill in the # node_uuid. # foreach my $linkname (keys(%{$rspec->{'link'}})) { my $linkref = $rspec->{'link'}->{$linkname}; foreach my $ref (@{$linkref->{'linkendpoints'}}) { my $node_uuid = $ref->{'node_uuid'}; my $node_nickname = $ref->{'node_nickname'}; my $iface_name = $ref->{'iface_name'}; my $node; if ($node_uuid eq "*" && !defined($node_nickname)) { $response = GeniResponse->Create(GENIRESPONSE_ERROR, undef, "Need nickname for wildcarded link"); goto bad; } # XXX No wildcarding for tunnels. if (exists($linkref->{'link_type'}) && $linkref->{'link_type'} eq "tunnel") { if ($node_uuid eq "*") { $response = GeniResponse->Create(GENIRESPONSE_ERROR, undef, "Tunnels cannot be wildcarded"); goto bad; } next; } # # First map the node if its wildcarded. # if ($node_uuid eq "*") { if (!exists($namemap{$node_nickname})) { $response = GeniResponse->Create(GENIRESPONSE_ERROR, undef, "Could not map wildcarded link"); goto bad; } $node = $namemap{$node_nickname}; $ref->{'node_uuid'} = $node->uuid(); } elsif (!exists($uuidmap{$node_uuid})) { $response = GeniResponse->Create(GENIRESPONSE_ERROR, undef, "Could not map link node"); goto bad; } else { $node = $uuidmap{$node_uuid}; } # # Now do wildcarded interfaces. # if ($iface_name eq "*") { my @interfaces; if ($node->AllInterfaces(\@interfaces) != 0) { $response = GeniResponse->Create(GENIRESPONSE_ERROR, undef, "Could not get interfaces for $node"); goto bad; } foreach my $interface (@interfaces) { next if (!defined($interface->switch_id())); next if ($interface->role() ne "expt"); $ref->{'iface_name'} = $interface->iface(); last; } } } } # # Create the ticket. # my $ticket = GeniTicket->Create($slice, $user, $rspec); if (!defined($ticket)) { $response = GeniResponse->Create(GENIRESPONSE_ERROR, undef, "Could not create GeniTicket object"); goto bad; } if ($ticket->Sign() != 0) { $response = GeniResponse->Create(GENIRESPONSE_ERROR, undef, "Could not sign Ticket"); goto bad; } $slice->UnLock(); return GeniResponse->Create(GENIRESPONSE_SUCCESS, $ticket->asString()); bad: # Release will free the nodes. if (defined($ticket)) { $ticket->Release(); } elsif (@dealloc) { system("export NORELOAD=1; $NFREE -x -q $pid $eid @dealloc"); } $slice->UnLock() if (defined($slice)); return $response; } # # Create a sliver. # sub RedeemTicket($) { my ($argref) = @_; my $ticket = $argref->{'ticket'}; my $impotent = $argref->{'impotent'}; my $keys = $argref->{'keys'}; my $extraargs = $argref->{'extraargs'}; $impotent = 0 if (!defined($impotent)); if (! (defined($ticket) && !TBcheck_dbslot($ticket, "default", "text", TBDB_CHECKDBSLOT_ERROR))) { return GeniResponse->Create(GENIRESPONSE_ERROR, undef, "ticket: ". TBFieldErrorString()); } $ticket = GeniTicket->CreateFromSignedTicket($ticket); if (!defined($ticket)) { return GeniResponse->Create(GENIRESPONSE_ERROR, undef, "Could not create GeniTicket object"); } # # Make sure the credential was issued to the caller. # if ($ticket->owner_uuid() ne $ENV{'GENIUUID'}) { return GeniResponse->Create(GENIRESPONSE_ERROR, undef, "This is not your credential!"); } my $slice = GeniSlice->Lookup($ticket->slice_uuid()); if (!defined($slice)) { return GeniResponse->Create(GENIRESPONSE_ERROR, undef, "No slice record for slice"); } if ($slice->Lock() != 0) { return GeniResponse->BusyResponse(); } # # Do not redeem an expired ticket, kill it now. # if ($ticket->Expired()) { $ticket->Release(); $slice->UnLock(); return GeniResponse->Create(GENIRESPONSE_EXPIRED, undef, "Ticket has expired"); } # Shutdown slices get nothing. if ($slice->shutdown()) { $slice->UnLock(); return GeniResponse->Create(GENIRESPONSE_FORBIDDEN, undef, "Slice has been shutdown"); } # # For now, ther can be only a single toplevel aggregate per slice. # my $aggregate = GeniAggregate->SliceAggregate($slice); if (defined($aggregate)) { $ticket->Release(); $slice->UnLock(); return GeniResponse->Create(GENIRESPONSE_BADARGS, undef, "Already have an aggregate for slice"); } my $response = ModifySliver(undef, $slice, $ticket, $ticket->rspec(), $impotent, $keys); $slice->UnLock(); return $response; } # # Update a sliver with a different resource set. # sub UpdateSliver($) { my ($argref) = @_; my $cred = $argref->{'credential'}; my $rspec = $argref->{'rspec'}; my $impotent = $argref->{'impotent'}; my $keys = $argref->{'keys'}; my $extraargs = $argref->{'extraargs'}; $impotent = 0 if (!defined($impotent)); if (!defined($cred)) { return GeniResponse->Create(GENIRESPONSE_BADARGS); } if (! (defined($rspec) && ($rspec =~ /^[-\w]+$/))) { GeniResponse->Create(GENIRESPONSE_BADARGS, undef, "Improper rspec"); } $rspec = XMLin($rspec, ForceArray => ["node", "link", "linkendpoints"]); my $credential = GeniCredential->CreateFromSigned($cred); if (!defined($credential)) { return GeniResponse->Create(GENIRESPONSE_ERROR, undef, "Could not create GeniCredential object"); } my $sliver_uuid = $credential->target_uuid(); my $user_uuid = $credential->owner_uuid(); # # Make sure the credential was issued to the caller. # if ($credential->owner_uuid() ne $ENV{'GENIUUID'}) { return GeniResponse->Create(GENIRESPONSE_ERROR, undef, "This is not your credential!"); } my $sliver = GeniSliver->Lookup($sliver_uuid); if (defined($sliver)) { return GeniResponse->Create(GENIRESPONSE_BADARGS, undef, "Only aggregates for now"); } my $aggregate = GeniAggregate->Lookup($sliver_uuid); if (!defined($aggregate)) { return GeniResponse->Create(GENIRESPONSE_BADARGS, undef, "No such aggregate $sliver_uuid"); } my $slice = GeniSlice->Lookup($aggregate->slice_uuid()); if (!defined($slice)) { return GeniResponse->Create(GENIRESPONSE_ERROR, undef, "No slice record for slice"); } if ($slice->Lock() != 0) { return GeniResponse->BusyResponse(); } # Shutdown slices get nothing. if ($slice->shutdown()) { $slice->UnLock(); return GeniResponse->Create(GENIRESPONSE_FORBIDDEN, undef, "Slice has been shutdown"); } my $response = ModifySliver($aggregate, $slice, $credential, $rspec, $impotent, $keys); $slice->UnLock(); return $response; } # # Utility function for above routines. # sub ModifySliver($$$$$$) { my ($object, $slice, $credential, $rspec, $impotent, $keys) = @_; my $owner_uuid = $credential->owner_uuid(); my $message = "Error creating sliver/aggregate"; my $aggregate; # # Create the user. # my $owner = GeniUser->Lookup($owner_uuid); if (!defined($owner)) { $owner = CreateUserFromCertificate($credential->owner_cert()); if (!defined($owner)) { print STDERR "No user $owner_uuid in the ClearingHouse\n"; return GeniResponse->Create(GENIRESPONSE_ERROR, undef, "No user record for $owner_uuid"); } } if (!$owner->IsLocal() && defined($keys)) { $owner->Modify(undef, undef, $keys); } my $experiment = GeniExperiment($slice); if (!defined($experiment)) { return GeniResponse->Create(GENIRESPONSE_ERROR, undef, "No local experiment for slice"); } print STDERR Dumper($rspec); # # Figure out what nodes to allocate or free. # my %nodelist = (); my %linklist = (); my %toalloc = (); my @allocated= (); my @tofree = (); my $pid = $experiment->pid(); my $eid = $experiment->eid(); my $needplabslice = 0; my $didfwsetup = 0; # # Find current nodes and record their uuids. # if (defined($object)) { if ($object->type() ne "Aggregate") { return GeniResponse->Create(GENIRESPONSE_UNSUPPORTED, undef, "Only node aggregates allowed"); } my @slivers; if ($object->SliverList(\@slivers) != 0) { return GeniResponse->Create(GENIRESPONSE_ERROR, undef); } foreach my $s (@slivers) { if (ref($s) eq "GeniSliver::Node") { $nodelist{$s->resource_uuid()} = $s; } elsif (ref($s) eq "GeniAggregate::Link" || ref($s) eq "GeniAggregate::Tunnel") { $linklist{$s->uuid()} = $s; } else { return GeniResponse->Create(GENIRESPONSE_UNSUPPORTED, undef, "Only nodes or links allowed"); } } } # # Figure out new expiration time; this is the time at which we can # idleswap the slice out. # if (exists($rspec->{'valid_until'})) { my $expires = $rspec->{'valid_until'}; if (! ($expires =~ /^[-\w:.\/]+/)) { return GeniResponse->Create(GENIRESPONSE_BADARGS, undef, "Illegal valid_until in rspec"); } # Convert to a localtime. my $when = timegm(strptime($expires)); if (!defined($when)) { return GeniResponse->Create(GENIRESPONSE_BADARGS, undef, "Could not parse valid_until"); } # # No more then 24 hours out ... Needs to be a sitevar? # my $diff = $when - time(); if ($diff < (60 * 15) || $diff > (3600 * 24)) { return GeniResponse->Create(GENIRESPONSE_BADARGS, undef, "valid_until out of range"); } if ($slice->SetExpiration($when) != 0) { return GeniResponse->Create(GENIRESPONSE_ERROR, undef, "Could not set expiration time"); } } # # Figure out what nodes need to be allocated. # foreach my $ref (@{$rspec->{'node'}}) { my $resource_uuid = $ref->{'uuid'}; my $node = Node->Lookup($resource_uuid); if (!defined($node)) { return GeniResponse->Create(GENIRESPONSE_BADARGS, undef, "Bad resource_uuid $resource_uuid"); } # # Widearea nodes do not need to be allocated, but for now all # I allow is a plabdslice node. # if ($node->isremotenode()) { if (! $node->isplabphysnode()) { return GeniResponse->Create(GENIRESPONSE_BADARGS, undef, "Only plab widearea nodes"); } $needplabslice = 1; next; } # # See if the node is already reserved. # my $reservation = $node->Reservation(); if (defined($reservation)) { # Reserved during previous operation on the sliver. next if ($reservation->SameExperiment($experiment)); return GeniResponse->Create(GENIRESPONSE_UNAVAILABLE, undef, "$resource_uuid ($node) is not available"); } # # Sanity check on the list of already allocated nodes. # foreach my $s (values(%nodelist)) { if ($resource_uuid eq $s->resource_uuid()) { print STDERR "$resource_uuid is not supposed to be allocated\n"; return GeniResponse->Create(GENIRESPONSE_ERROR, undef); } } $toalloc{$resource_uuid} = $node->node_id(); } # # What nodes need to be released? # foreach my $s (values(%nodelist)) { my $node_uuid = $s->resource_uuid(); my $node = Node->Lookup($node_uuid); my $needfree = 1; foreach my $ref (@{$rspec->{'node'}}) { my $resource_uuid = $ref->{'uuid'}; if ($node_uuid eq $resource_uuid) { $needfree = 0; last; } } if ($needfree) { # # Not yet. # my @dlist; if ($s->DependentSlivers(\@dlist) != 0) { return GeniResponse->Create(GENIRESPONSE_ERROR, undef, "Could not get DependentSlivers"); } if (@dlist) { return GeniResponse->Create(GENIRESPONSE_REFUSED, undef, "Must tear down dependent slivers first"); } push(@tofree, $s); } } # # Create an emulab nonlocal user for tmcd. # $owner->BindToSlice($slice) == 0 or return GeniResponse->Create(GENIRESPONSE_ERROR, undef, "Error binding user to slice"); # Bind the other users too. # XXX Need to figure out where these come from. my @userbindings = (); foreach my $otheruuid (@userbindings) { my $otheruser = GeniUser->Lookup($otheruuid); if (!defined($otheruser)) { $otheruser = CreateUserFromCertificate($otheruuid); if (!defined($otheruser)) { print STDERR "No user $otheruser, cannot bind to slice\n"; next; } } if ($otheruser->BindToSlice($slice) != 0) { print STDERR "Could not bind $otheruser to $slice\n"; } } # # We are actually an Aggregate, so return an aggregate of slivers, # even if there is just one node. This makes sliceupdate easier. # if (defined($object)) { $aggregate = $object; } else { # # Form the hrn from the slicename. # my $hrn = "${OURDOMAIN}." . $slice->slicename(); $aggregate = GeniAggregate->Create($slice, $owner, "Aggregate", $hrn, $slice->hrn()); if (!defined($aggregate)) { return GeniResponse->Create(GENIRESPONSE_ERROR, undef, "Could not create GeniAggregate object"); } } # Nalloc might fail if the node gets picked up by someone else. if (values(%toalloc) && !$impotent) { my @list = values(%toalloc); system("$NALLOC $pid $eid @list"); if ($?) { # Nothing to deallocate if this fails. %toalloc = undef; $message = "Allocation failure"; goto bad; } } # # We need to tear down links that are no longer in the rspec or # have changed. # foreach my $s (values(%linklist)) { if (! exists($rspec->{'link'}->{$s->hrn()})) { $s->UnProvision(); $s->Delete(); next; } my $delete = 0; my @interfaces = (); if ($s->SliverList(\@interfaces) != 0) { $message = "Failed to get sliverlist for $s"; goto bad; } foreach my $i (@interfaces) { my $node_uuid = $i->resource_uuid(); my $iface_name = $i->rspec()->{'iface_name'}; my $linkendpoints = $rspec->{'link'}->{$s->hrn()}->{'linkendpoints'}; } } # # Now for each resource (okay, node) in the ticket create a sliver and # add it to the aggregate. # my %slivers = (); my @plabnodes = (); foreach my $ref (@{$rspec->{'node'}}) { my $resource_uuid = $ref->{'uuid'}; # Already in the aggregate? next if (grep {$_ eq $resource_uuid} keys(%nodelist)); my $node = Node->Lookup($resource_uuid); if (!defined($node)) { $message = "Unknown resource_uuid in ticket: $resource_uuid"; goto bad; } my $sliver = GeniSliver::Node->Create($slice, $owner->uuid(), $resource_uuid, $ref); if (!defined($sliver)) { $message = "Could not create GeniSliver object for $resource_uuid"; goto bad; } $slivers{$resource_uuid} = $sliver; # # Remove this from %toalloc; if there is an error, the slivers are # deleted and the node released there. We only delete nodes that # have not turned into slivers yet. Ick. # delete($toalloc{$resource_uuid}); # Used below. push(@allocated, $node); # See below; setup all pnodes at once. if ($node->isremotenode()) { my $vnode = Node->Lookup($sliver->uuid()); if (!defined($vnode)) { print STDERR "Could not locate vnode $sliver\n"; goto bad; } push(@plabnodes, $vnode); } } # # Now do the links. For each link, we have to add a sliver for the # interfaces, and then combine those two interfaces into an aggregate, # and then that aggregate goes into the aggregate for toplevel sliver. # goto skiplinks if (!exists($rspec->{'link'})); foreach my $linkname (keys(%{$rspec->{'link'}})) { my @linkslivers = (); if (! ($linkname =~ /^[-\w]*$/)) { $message = "Bad name for link: $linkname"; goto bad; } my $linkref = $rspec->{'link'}->{$linkname}; # # XXX Tunnels are a total kludge right now ... # if (exists($linkref->{'link_type'}) && $linkref->{'link_type'} eq "tunnel") { my $node1ref = (@{$linkref->{'linkendpoints'}})[0]; my $node2ref = (@{$linkref->{'linkendpoints'}})[1]; my $node1sliver = $slivers{$node1ref->{'node_uuid'}} || $nodelist{$node1ref->{'node_uuid'}}; my $node2sliver = $slivers{$node2ref->{'node_uuid'}} || $nodelist{$node2ref->{'node_uuid'}}; my $tunnel = GeniAggregate::Tunnel->Create($slice, $owner, $node1sliver, $node2sliver, $linkref); if (!defined($tunnel)) { $message = "Could not create tunnel aggregate for $linkname"; goto bad; } $slivers{$tunnel->uuid()} = $tunnel; next; } my $linkaggregate = GeniAggregate::Link->Create($slice, $owner, $linkname); if (!defined($linkaggregate)) { $message = "Could not create link aggregate for $linkname"; goto bad; } $slivers{$linkaggregate->uuid()} = $linkaggregate; foreach my $ref (@{$rspec->{'link'}->{$linkname}->{'linkendpoints'}}) { my $node_uuid = $ref->{'node_uuid'}; my $iface_name = $ref->{'iface_name'}; my $nodesliver = $slivers{$node_uuid} || $nodelist{$node_uuid}; if (!defined($nodesliver)) { $message = "Link $linkname specifies a non-existent node"; goto bad; } my $nodeobject= Node->Lookup($node_uuid); if (!defined($nodeobject)) { $message = "Could not find node object for $node_uuid"; goto bad; } my $interface = Interface->LookupByIface($nodeobject, $iface_name); if (!defined($interface)) { $message = "No such interface $iface_name on node $nodeobject"; goto bad; } my $sliver = GeniSliver::Interface->Create($slice, $owner->uuid(), $interface->uuid(), $nodeobject, $ref); if (!defined($sliver)) { $message = "Could not create GeniSliver ". "$interface in $linkname"; goto bad; } if ($sliver->SetAggregate($linkaggregate) != 0) { $message = "Could not add link sliver $sliver to $aggregate"; goto bad; } } } skiplinks: # # Create a planetlab slice before provisioning (which creates nodes). # if ($needplabslice && !$impotent) { system("$PLABSLICE create $pid $eid"); if ($?) { $message = "Plab Slice creation failure"; goto bad; } } # # Now do the provisioning (note that we actually allocated the # node above when the ticket was granted). Then add the sliver to # the aggregate. # foreach my $sliver (values(%slivers)) { if (!$impotent && $sliver->Provision() != 0) { $message = "Could not provision $sliver"; goto bad; } if ($sliver->SetAggregate($aggregate) != 0) { $message = "Could not set aggregate for $sliver to $aggregate"; goto bad; } } # # We want to do this stuff only once, not for each node. # # Must have the topofile for node boot. Might need locking on this. if (system("$GENTOPOFILE $pid $eid")) { print STDERR "$GENTOPOFILE failed\n"; goto bad; } # The nodes will not boot locally unless there is a DNS record. if (system("$NAMEDSETUP")) { print STDERR "$NAMEDSETUP failed\n"; goto bad; } # Do firewall stuff. if ($slice->needsfirewall()) { my $experiment = $slice->GetExperiment(); my @node_ids = map { $_->node_id() } @allocated; if (@node_ids && doFWlans($experiment, FWADDNODES, \@node_ids) != 0) { print STDERR "FireWall setup failed\n"; goto bad; } $didfwsetup = 1; } # Set up plab nodes all at once. if ($needplabslice && @plabnodes && !$impotent) { my @node_ids = map { $_->node_id() } @plabnodes; system("$VNODESETUP -p -q -m $pid $eid @node_ids"); if ($?) { print STDERR "$VNODESETUP failed\n"; goto bad; } } # # The API states we return a credential to control the aggregate. # if (ref($credential) eq "GeniTicket") { my $ticket = $credential; $credential = $aggregate->NewCredential($owner); if (!defined($credential)) { $message = "Could not create credential"; goto bad; } # # The last step is to delete the ticket, since it is no longer needed. # and will cause less confusion if it is not in the DB. # if ($ticket->Delete() != 0) { print STDERR "Error deleting $ticket for $slice\n"; } return GeniResponse->Create(GENIRESPONSE_SUCCESS, $credential->asString()); } # # Free any slivers that were no longer wanted. # if (@tofree) { } return GeniResponse->Create(GENIRESPONSE_SUCCESS); bad: # Do firewall stuff. if ($slice->needsfirewall() && $didfwsetup) { my $experiment = $slice->GetExperiment(); my @node_ids = map { $_->node_id() } @allocated; if (@node_ids && doFWlans($experiment, FWDELNODES, \@node_ids) != 0) { print STDERR "FireWall cleanup failed\n"; } } foreach my $sliver (values(%slivers)) { $sliver->UnProvision() if (! $impotent); $sliver->Delete(); } if (values(%toalloc)) { my @list = values(%toalloc); system("export NORELOAD=1; $NFREE -x -q $pid $eid @list"); } $aggregate->Delete() if (defined($aggregate) && !defined($object)); return GeniResponse->Create(GENIRESPONSE_ERROR, undef, $message); } # # Release a ticket. # sub ReleaseTicket($) { my ($argref) = @_; my $ticket = $argref->{'ticket'}; if (! (defined($ticket) && !TBcheck_dbslot($ticket, "default", "text", TBDB_CHECKDBSLOT_ERROR))) { return GeniResponse->Create(GENIRESPONSE_ERROR, undef, "ticket: ". TBFieldErrorString()); } $ticket = GeniTicket->CreateFromSignedTicket($ticket); if (!defined($ticket)) { return GeniResponse->Create(GENIRESPONSE_ERROR, undef, "Could not create GeniTicket object"); } # # Make sure the credential was issued to the caller. # if ($ticket->owner_uuid() ne $ENV{'GENIUUID'}) { return GeniResponse->Create(GENIRESPONSE_ERROR, undef, "This is not your credential!"); } # # Lock the slice to avoid concurrent operation. # my $slice = GeniSlice->Lookup($ticket->slice_uuid()); if (!defined($slice)) { return GeniResponse->Create(GENIRESPONSE_ERROR, undef, "No slice record for slice"); } if ($slice->Lock() != 0) { return GeniResponse->BusyResponse(); } if ($ticket->Release() != 0) { print STDERR "Error releasing $ticket\n"; $slice->UnLock(); return GeniResponse->Create(GENIRESPONSE_ERROR); } $slice->UnLock(); return GeniResponse->Create(GENIRESPONSE_SUCCESS); } # # Start a sliver (not sure what this means yet, so reboot for now). # sub StartSliver($) { my ($argref) = @_; my $cred = $argref->{'credential'}; my $impotent = $argref->{'impotent'}; $impotent = 0 if (!defined($impotent)); if (!defined($cred)) { return GeniResponse->Create(GENIRESPONSE_BADARGS); } my $credential = GeniCredential->CreateFromSigned($cred); if (!defined($credential)) { return GeniResponse->Create(GENIRESPONSE_ERROR, undef, "Could not create GeniCredential object"); } my $sliver_uuid = $credential->target_uuid(); my $user_uuid = $credential->owner_uuid(); # # Make sure the credential was issued to the caller. # if ($credential->owner_uuid() ne $ENV{'GENIUUID'}) { return GeniResponse->Create(GENIRESPONSE_ERROR, undef, "This is not your credential!"); } my $sliver = GeniSliver->Lookup($sliver_uuid); if (!defined($sliver)) { # Might be an aggregate instead. $sliver = GeniAggregate->Lookup($sliver_uuid); if (!defined($sliver)) { return GeniResponse->Create(GENIRESPONSE_BADARGS, undef, "No such sliver/aggregate $sliver_uuid"); } } # # Lock the slice to avoid concurrent operation. # my $slice = GeniSlice->Lookup($sliver->slice_uuid()); if (!defined($slice)) { return GeniResponse->Create(GENIRESPONSE_ERROR, undef, "No slice record for slice"); } if ($slice->Lock() != 0) { return GeniResponse->BusyResponse(); } # Shutdown slices get nothing. if ($slice->shutdown()) { $slice->UnLock(); return GeniResponse->Create(GENIRESPONSE_FORBIDDEN, undef, "Slice has been shutdown"); } if (!$impotent && $sliver->Start() != 0) { $slice->UnLock(); return GeniResponse->Create(GENIRESPONSE_ERROR, undef, "Could not start sliver/aggregate"); } $slice->UnLock(); return GeniResponse->Create(GENIRESPONSE_SUCCESS); } # # Destroy a sliver/aggregate. # sub DeleteSliver($) { my ($argref) = @_; my $cred = $argref->{'credential'}; my $impotent = $argref->{'impotent'}; my $response; $impotent = 0 if (!defined($impotent)); if (!defined($cred)) { return GeniResponse->Create(GENIRESPONSE_BADARGS); } my $credential = GeniCredential->CreateFromSigned($cred); if (!defined($credential)) { return GeniResponse->Create(GENIRESPONSE_ERROR, undef, "Could not create GeniCredential object"); } my $sliver_uuid = $credential->target_uuid(); my $user_uuid = $credential->owner_uuid(); # # Make sure the credential was issued to the caller. # if ($credential->owner_uuid() ne $ENV{'GENIUUID'}) { return GeniResponse->Create(GENIRESPONSE_ERROR, undef, "This is not your credential!"); } # # For now, only allow top level aggregate to be deleted. # my $aggregate = GeniAggregate->Lookup($sliver_uuid); if (!defined($aggregate)) { my $sliver = GeniSliver->Lookup($sliver_uuid); if (defined($sliver)) { return GeniResponse->Create(GENIRESPONSE_BADARGS, undef, "Must supply toplevel sliver"); } else { return GeniResponse->Create(GENIRESPONSE_BADARGS, undef, "No such sliver"); } } elsif ($aggregate->type() ne "Aggregate") { return GeniResponse->Create(GENIRESPONSE_BADARGS, undef, "Must supply toplevel sliver"); } my $slice_uuid = $aggregate->slice_uuid(); my $slice = GeniSlice->Lookup($slice_uuid); if (!defined($slice)) { return GeniResponse->Create(GENIRESPONSE_ERROR, undef, "No slice record for slice"); } if ($slice->Lock() != 0) { return GeniResponse->BusyResponse(); } if (!$impotent) { # # A firewalled slice gets special treatment. # if ($slice->needsfirewall()) { my $experiment = $slice->GetExperiment(); if (undoFWNodes($experiment, 1) != 0) { print STDERR "FireWall cleanup failed\n"; $response = GeniResponse->Create(GENIRESPONSE_ERROR, undef, "Could not tear down firewall"); goto bad; } } if ($aggregate->UnProvision() != 0) { $response = GeniResponse->Create(GENIRESPONSE_ERROR, undef, "Could not unprovision sliver"); goto bad; } if ($aggregate->Delete() != 0) { $response = GeniResponse->Create(GENIRESPONSE_ERROR, undef, "Could not delete sliver"); goto bad; } } $slice->UnLock(); return GeniResponse->Create(GENIRESPONSE_SUCCESS); bad: return $response; } # # Remove a record, specifically a slice on this component. # sub DeleteSlice($) { my ($argref) = @_; my $credential = $argref->{'credential'}; if (! defined($credential)) { return GeniResponse->MalformedArgsResponse(); } $credential = GeniCredential->CreateFromSigned($credential); if (!defined($credential)) { return GeniResponse->Create(GENIRESPONSE_ERROR, undef, "Could not create GeniCredential object"); } my $slice_uuid = $credential->target_uuid(); # # Make sure the credential was issued to the caller. # if ($credential->owner_uuid() ne $ENV{'GENIUUID'}) { return GeniResponse->Create(GENIRESPONSE_ERROR, undef, "This is not your credential!"); } # # See if we have a record of this slice in the DB. If not, then we have # to go to the ClearingHouse to find its record, so that we can find out # who the SA for it is. # my $slice = GeniSlice->Lookup($slice_uuid); if (!defined($slice)) { return GeniResponse->Create(GENIRESPONSE_BADARGS, undef, "No such slice on this component: $slice_uuid"); } if ($slice->Lock() != 0) { return GeniResponse->BusyResponse(); } if (CleanupDeadSlice($slice) != 0) { $slice->UnLock(); return GeniResponse->Create(GENIRESPONSE_ERROR, undef, "Could not cleanup slice"); } return GeniResponse->Create(GENIRESPONSE_SUCCESS); } # # Split an aggregated sliver into its separate parts and return a list. # sub SplitSliver($) { my ($argref) = @_; my $cred = $argref->{'credential'}; my $impotent = $argref->{'impotent'}; $impotent = 0 if (!defined($impotent)); if (!defined($cred)) { return GeniResponse->Create(GENIRESPONSE_BADARGS); } my $credential = GeniCredential->CreateFromSigned($cred); if (!defined($credential)) { return GeniResponse->Create(GENIRESPONSE_ERROR, undef, "Could not create GeniCredential object"); } my $sliver_uuid = $credential->target_uuid(); my $user_uuid = $credential->owner_uuid(); # # Make sure the credential was issued to the caller. # if ($credential->owner_uuid() ne $ENV{'GENIUUID'}) { return GeniResponse->Create(GENIRESPONSE_ERROR, undef, "This is not your credential!"); } my $user = GeniUser->Lookup($user_uuid); if (!defined($user)) { $user = CreateUserFromCertificate($credential->owner_cert()); if (!defined($user)) { print STDERR "No user $user_uuid in the ClearingHouse\n"; return GeniResponse->Create(GENIRESPONSE_ERROR, undef, "No user record for $user_uuid"); } } my $aggregate = GeniAggregate->Lookup($sliver_uuid); if (!defined($aggregate)) { return GeniResponse->Create(GENIRESPONSE_BADARGS, undef, "No such aggregate $sliver_uuid"); } my $slice = GeniSlice->Lookup($aggregate->slice_uuid()); if (!defined($slice)) { return GeniResponse->Create(GENIRESPONSE_BADARGS, undef, "No such slice on this component"); } if ($slice->Lock() != 0) { return GeniResponse->BusyResponse(); } my @sliver_list = (); if ($aggregate->SliverList(\@sliver_list) != 0) { $slice->UnLock(); return GeniResponse->Create(GENIRESPONSE_ERROR, undef, "Could not get slivers for $aggregate"); } my @credentials = (); foreach my $sliver (@sliver_list) { my $credential = $sliver->NewCredential($user); if (!defined($credential)) { $slice->UnLock(); return GeniResponse->Create(GENIRESPONSE_ERROR, undef, "Could not create credential for $sliver"); } push(@credentials, $credential->asString()); } $slice->UnLock(); return GeniResponse->Create(GENIRESPONSE_SUCCESS, \@credentials); } # # Return the top level aggregate (sliver) for a slice. # sub GetSliver($) { my ($argref) = @_; my $cred = $argref->{'credential'}; if (!defined($cred)) { return GeniResponse->Create(GENIRESPONSE_BADARGS); } my $credential = GeniCredential->CreateFromSigned($cred); if (!defined($credential)) { return GeniResponse->Create(GENIRESPONSE_ERROR, undef, "Could not create GeniCredential object"); } my $slice_uuid = $credential->target_uuid(); my $user_uuid = $credential->owner_uuid(); # # Make sure the credential was issued to the caller. # if ($credential->owner_uuid() ne $ENV{'GENIUUID'}) { return GeniResponse->Create(GENIRESPONSE_ERROR, undef, "This is not your credential!"); } my $user = GeniUser->Lookup($user_uuid); if (!defined($user)) { $user = CreateUserFromCertificate($credential->owner_cert()); if (!defined($user)) { print STDERR "Could not create user from certificate\n"; return GeniResponse->Create(GENIRESPONSE_ERROR); } } my $slice = GeniSlice->Lookup($slice_uuid); if (!defined($slice)) { return GeniResponse->Create(GENIRESPONSE_ERROR, undef, "No slice record for slice"); } if ($slice->Lock() != 0) { return GeniResponse->BusyResponse(); } my $aggregate = GeniAggregate->SliceAggregate($slice); if (!defined($aggregate)) { $slice->UnLock(); return GeniResponse->Create(GENIRESPONSE_SEARCHFAILED, undef, "No slivers here for slice"); } my $new_credential = $aggregate->NewCredential($user); if (!defined($new_credential)) { $slice->UnLock(); return GeniResponse->Create(GENIRESPONSE_ERROR); } $slice->UnLock(); return GeniResponse->Create(GENIRESPONSE_SUCCESS, $new_credential->asString()); } # # Bind additional user to a slice, including keys. This is allowed because # the user has a slice credential, which came from the SA for the slice. # Note that this call can also be used to update your keys. # sub BindToSlice($) { my ($argref) = @_; my $cred = $argref->{'credential'}; my $keys = $argref->{'keys'}; if (!defined($cred)) { return GeniResponse->Create(GENIRESPONSE_BADARGS); } my $credential = GeniCredential->CreateFromSigned($cred); if (!defined($credential)) { return GeniResponse->Create(GENIRESPONSE_ERROR, undef, "Could not create GeniCredential object"); } my $slice_uuid = $credential->target_uuid(); my $user_uuid = $credential->owner_uuid(); # # Make sure the credential was issued to the caller. # if ($credential->owner_uuid() ne $ENV{'GENIUUID'}) { return GeniResponse->Create(GENIRESPONSE_ERROR, undef, "This is not your credential!"); } my $slice = GeniSlice->Lookup($slice_uuid); if (!defined($slice)) { return GeniResponse->Create(GENIRESPONSE_SEARCHFAILED, undef, "Slice does not exist here"); } # # Find or create the user. # my $user = GeniUser->Lookup($user_uuid); if (!defined($user)) { $user = CreateUserFromCertificate($credential->owner_cert()); if (!defined($user)) { print STDERR "Could not create user from certificate\n"; return GeniResponse->Create(GENIRESPONSE_ERROR, undef, "Could not create/find user"); } } if (!$user->IsLocal() && defined($keys)) { $user->Modify(undef, undef, $keys); } if ($slice->Lock() != 0) { return GeniResponse->BusyResponse(); } # Bind for future slivers. if ($slice->BindUser($user) != 0) { $slice->UnLock(); return GeniResponse->Create(GENIRESPONSE_ERROR, undef, "Error binding slice to user"); } # Bind for existing slivers. if ($user->BindToSlice($slice) != 0) { $slice->UnLock(); return GeniResponse->Create(GENIRESPONSE_ERROR, undef, "Error binding user to slice"); } $slice->UnLock(); return GeniResponse->Create(GENIRESPONSE_SUCCESS); } # # Shutdown a slice. This is brutal at present; kill it completely. # sub Shutdown($) { my ($argref) = @_; my $cred = $argref->{'credential'}; my $clear = $argref->{'clear'}; if (! (defined($cred))) { return GeniResponse->MalformedArgsResponse(); } $clear = (defined($clear) ? $clear : 0); my $credential = GeniCredential->CreateFromSigned($cred); if (!defined($credential)) { return GeniResponse->Create(GENIRESPONSE_ERROR, undef, "Could not create GeniCredential object"); } my $slice_uuid = $credential->target_uuid(); my $user_uuid = $credential->owner_uuid(); # # Make sure the credential was issued to the caller. # if ($credential->owner_uuid() ne $ENV{'GENIUUID'}) { return GeniResponse->Create(GENIRESPONSE_ERROR, undef, "This is not your credential!"); } # # Create the slice record, since we do not want a request to come # in later. # my $slice = GeniSlice->Lookup($slice_uuid); if (!defined($slice)) { $slice = CreateSliceFromCertificate($credential); if (!defined($slice)) { print STDERR "Could not create $slice_uuid\n"; return GeniResponse->Create(GENIRESPONSE_ERROR, undef, "Could not create slice"); } # No point in doing anything else ... $slice->SetShutdown(1); return GeniResponse->Create(GENIRESPONSE_SUCCESS); } # # Do not worry about locking when setting the shutdown time. # This can lead to race though, if a clear shutdown comes in first. # Seems unlikely though. # if (!$clear) { # Do not overwrite original shutdown time $slice->SetShutdown(1) if (!defined($slice->shutdown()) || $slice->shutdown() eq ""); } else { $slice->SetShutdown(0); } # Always make sure the slice is shutdown. if ($slice->shutdown()) { # The expire daemon is going to look for this, so it will get # taken care of shortly. if ($slice->Lock() != 0) { return GeniResponse->BusyResponse(); } if (CleanupDeadSlice($slice, 0) != 0) { SENDMAIL($TBOPS, "Failed to shutdown slice", "Failed to shutdown slice $slice\n"); print STDERR "Could not shutdown $slice!\n"; # Lets call this a non-error since the local admin person # is going to have to deal with it anyway. } $slice->UnLock(); } return GeniResponse->Create(GENIRESPONSE_SUCCESS); } # # Return a list of resources currently in use. # This is used by the clearinghouse to get a global sense of usage. # Currently, only the ClearingHouse will be allowed to make this call, # but eventually I think it should be opened up to any of federation # roots # sub ListUsage($) { my ($argref) = @_; my $cred = $argref->{'credential'}; if (! (defined($cred))) { return GeniResponse->MalformedArgsResponse(); } my $credential = GeniCredential->CreateFromSigned($cred); if (!defined($credential)) { return GeniResponse->Create(GENIRESPONSE_ERROR, undef, "Could not create GeniCredential object"); } # # Make sure the credential was issued to the caller. # if ($credential->owner_uuid() ne $ENV{'GENIUUID'}) { return GeniResponse->Create(GENIRESPONSE_ERROR, undef, "This is not your credential!"); } # # And that the target of the credential is this registry. # if ($credential->target_uuid() ne $ENV{'MYUUID'}) { return GeniResponse->Create(GENIRESPONSE_FORBIDDEN, undef, "This is not your authority!"); } # Just one of these, at Utah. my $GENICH_PEMFILE = "@prefix@/etc/genich.pem"; my $certificate = GeniCertificate->LoadFromFile($GENICH_PEMFILE); if (!defined($certificate)) { print STDERR "Could not load certificate from $GENICH_PEMFILE\n"; return GeniResponse->Create(GENIRESPONSE_ERROR); } # The caller has to match the clearinghouse. if ($credential->owner_uuid() ne $certificate->uuid()) { return GeniResponse->Create(GENIRESPONSE_ERROR, undef, "Only the clearinghouse can do this!"); } my @slices; if (GeniSlice->ListAll(\@slices) != 0) { return GeniResponse->Create(GENIRESPONSE_ERROR); } my @result = (); foreach my $slice (@slices) { # # Grab all the slivers for this slice, and then # look for just the nodes. # my @slivers = (); my @components = (); if (GeniSliver->SliceSlivers($slice, \@slivers) != 0) { print STDERR "Could not slice slivers for $slice\n"; return GeniResponse->Create(GENIRESPONSE_ERROR); } foreach my $sliver (@slivers) { next if ($sliver->resource_type() ne "Node"); my $node = {"sliver_gid" => $sliver->cert(), "sliver_hrn" => $sliver->hrn() }; my $component = GeniComponent->Lookup($sliver->resource_uuid()); if (defined($component)) { $node->{"component_gid"} = $component->cert(); $node->{"component_hrn"} = $component->hrn(); } else { print STDERR "No component in DB for resource ". $sliver->resource_uuid() . "\n"; } push(@components, $node); } next if (!@components); my $blob = {"slice_gid" => $slice->cert(), "slice_hrn" => $slice->hrn(), "slivers" => \@components }; push(@result, $blob); } return GeniResponse->Create(GENIRESPONSE_SUCCESS, \@result); } # # Slice Status # sub SliceStatus($) { my ($argref) = @_; my $cred = $argref->{'credential'}; my $mode = $argref->{'mode'}; $mode = "summary" if (!defined($mode)); if (! (defined($cred))) { return GeniResponse->MalformedArgsResponse(); } my $credential = GeniCredential->CreateFromSigned($cred); if (!defined($credential)) { return GeniResponse->Create(GENIRESPONSE_ERROR, undef, "Could not create GeniCredential object"); } my $slice_uuid = $credential->target_uuid(); my $user_uuid = $credential->owner_uuid(); # # Make sure the credential was issued to the caller. # if ($credential->owner_uuid() ne $ENV{'GENIUUID'}) { return GeniResponse->Create(GENIRESPONSE_ERROR, undef, "This is not your credential!"); } my $slice = GeniSlice->Lookup($slice_uuid); if (!defined($slice)) { return GeniResponse->Create(GENIRESPONSE_SEARCHFAILED, undef, "No such slice here"); } if ($slice->Lock() != 0) { return GeniResponse->BusyResponse(); } my $aggregate = GeniAggregate->SliceAggregate($slice); if (!defined($aggregate)) { $slice->UnLock(); return GeniResponse->Create(GENIRESPONSE_SEARCHFAILED, undef, "No slivers here for slice"); } # # Grab all the slivers for this slice, and then # look for just the nodes. # my $summary = "ready"; my %details = (); my @slivers = (); if (GeniSliver->SliceSlivers($slice, \@slivers) != 0) { print STDERR "Could not get slivers for $slice\n"; $slice->UnLock(); return GeniResponse->Create(GENIRESPONSE_ERROR); } foreach my $sliver (@slivers) { next if ($sliver->resource_type() ne "Node"); my $node_uuid = $sliver->resource_uuid(); my $node = Node->Lookup($node_uuid); if (!defined($node)) { $slice->UnLock(); print STDERR "Cannot find node by uuid $node_uuid\n"; return GeniResponse->Create(GENIRESPONSE_ERROR); } if ($node->IsUp()) { $details{$node_uuid} = "ready"; } else { $details{$node_uuid} = "notready"; $summary = "notready"; } } $slice->UnLock(); my $blob = {"status" => $summary, "details" => \%details}; return GeniResponse->Create(GENIRESPONSE_SUCCESS, $blob); } # # Sliver status. # sub SliverStatus($) { my ($argref) = @_; my $cred = $argref->{'credential'}; if (!defined($cred)) { return GeniResponse->Create(GENIRESPONSE_BADARGS); } my $credential = GeniCredential->CreateFromSigned($cred); if (!defined($credential)) { return GeniResponse->Create(GENIRESPONSE_ERROR, undef, "Could not create GeniCredential object"); } my $sliver_uuid = $credential->target_uuid(); my $user_uuid = $credential->owner_uuid(); # # Make sure the credential was issued to the caller. # if ($credential->owner_uuid() ne $ENV{'GENIUUID'}) { return GeniResponse->Create(GENIRESPONSE_ERROR, undef, "This is not your credential!"); } # # For now, only allow top level aggregate to be deleted. # my $aggregate = GeniAggregate->Lookup($sliver_uuid); if (!defined($aggregate)) { my $sliver = GeniSliver->Lookup($sliver_uuid); if (defined($sliver)) { return GeniResponse->Create(GENIRESPONSE_BADARGS, undef, "Must supply toplevel sliver"); } else { return GeniResponse->Create(GENIRESPONSE_BADARGS, undef, "No such sliver"); } } elsif ($aggregate->type() ne "Aggregate") { return GeniResponse->Create(GENIRESPONSE_BADARGS, undef, "Must supply toplevel sliver"); } my $slice_uuid = $aggregate->slice_uuid(); my $slice = GeniSlice->Lookup($slice_uuid); if (!defined($slice)) { return GeniResponse->Create(GENIRESPONSE_ERROR, undef, "No slice record for slice"); } if ($slice->Lock() != 0) { return GeniResponse->BusyResponse(); } # # Grab all the slivers for this slice, and then # look for just the nodes. # my $summary = "ready"; my %details = (); my @slivers = (); if ($aggregate->SliverList(\@slivers) != 0) { print STDERR "Could not get slivers for $aggregate\n"; $slice->UnLock(); return GeniResponse->Create(GENIRESPONSE_ERROR); } foreach my $sliver (@slivers) { next if ($sliver->isa("GeniAggregate")); next if ($sliver->resource_type() ne "Node"); my $node_uuid = $sliver->resource_uuid(); my $node = Node->Lookup($node_uuid); if (!defined($node)) { $slice->UnLock(); print STDERR "Cannot find node by uuid $node_uuid\n"; return GeniResponse->Create(GENIRESPONSE_ERROR); } if ($node->IsUp()) { $details{$node_uuid} = "ready"; } else { $details{$node_uuid} = "notready"; $summary = "notready"; } } $slice->UnLock(); my $blob = {"status" => $summary, "details" => \%details}; return GeniResponse->Create(GENIRESPONSE_SUCCESS, $blob); } # # Utility Routines. # # Create a slice from the a certificate (GID). # sub CreateSliceFromCertificate($) { my ($credential) = @_; my $certificate = $credential->target_cert(); my $owner_uuid = $credential->owner_uuid(); my $authority = GeniAuthority->LookupByPrefix($certificate->uuid()); if (!defined($authority)) { $authority = CreateAuthorityFromRegistry($certificate->uuid()); if (!defined($authority)) { print STDERR "Could not create new authority record\n"; return undef; } } # # The problem with HRNs is that people will tend to reuse them. # So check to see if we have a slice with the hrn, and if so # we need to check with the registry to see if its still active. # Destroy it locally if not active. # my $slice = GeniSlice->Lookup($certificate->hrn()); if (defined($slice)) { return $slice if ($slice->uuid() eq $certificate->uuid()); if ($slice->Lock() != 0) { print STDERR "Could not lock $slice\n"; return undef; } if (CleanupDeadSlice($slice) != 0) { print STDERR "Could not cleanup dead slice $slice\n"; $slice->UnLock(); return undef; } } $slice = GeniSlice->Create($certificate, $owner_uuid, $authority); return undef if (!defined($slice)); return $slice; } # # Create a user from a certificate. # sub CreateUserFromCertificate($) { my ($certificate) = @_; # # Check Emulab users table first. # my $user = User->LookupByUUID($certificate->uuid()); if (defined($user)) { my $geniuser = GeniUser->CreateFromLocal($user); if (!defined($geniuser)) { print STDERR "Could not create geniuser from $user\n"; return undef; } return $geniuser; } my $authority = GeniAuthority->LookupByPrefix($certificate->uuid()); if (!defined($authority)) { $authority = CreateAuthorityFromRegistry($certificate->uuid()); if (!defined($authority)) { print STDERR "Could not create new authority record\n"; return undef; } } return GeniUser->Create($certificate, $authority); } # # Create authority from the ClearingHouse, by looking up the info. # sub CreateAuthorityFromRegistry($) { my ($uuid) = @_; my ($prefix) = ($uuid =~ /^\w+\-\w+\-\w+\-\w+\-(\w+)$/); my $clearinghouse = GeniRegistry::ClearingHouse->Create(); return undef if (!defined($clearinghouse)); my $blob; return undef if ($clearinghouse->Resolve("P${prefix}", "SA", \$blob) != 0); my $certificate = GeniCertificate->LoadFromString($blob->{'gid'}); return undef if (!defined($certificate)); my $authority = GeniAuthority->Create($certificate, $blob->{'url'}, $blob->{'type'}); $certificate->Delete() if (!defined($authority)); return $authority; } # # Cleanup a dead slice, releasing all the stuff associated with it. # sub CleanupDeadSlice($;$) { my ($slice, $purge) = @_; # Default to full purge. $purge = 1 if (!defined($purge)); # print "Cleaning up dead slice $slice\n"; # # A firewalled slice gets special treatment. # if ($slice->needsfirewall()) { my $experiment = $slice->GetExperiment(); print "Calling undoFWNodes ...\n"; if (undoFWNodes($experiment) != 0) { print STDERR "FireWall cleanup failed\n"; return -1; } } # # Find any aggregates and tear them down. # my @aggregates; if (GeniAggregate->SliceAggregates($slice, \@aggregates) != 0) { print STDERR "Could not get dead aggregates for $slice.\n"; return -1; } # # Link aggregates first. # my @nonlinks = (); foreach my $aggregate (@aggregates) { if (! ($aggregate->type() eq "Link" || $aggregate->type() eq "Tunnel")) { push(@nonlinks, $aggregate); next; } if ($aggregate->UnProvision() != 0) { print STDERR "Could not UnProvision $aggregate\n"; return -1; } if ($aggregate->Delete() != 0) { print STDERR "Could not delete $aggregate\n"; return -1; } } foreach my $aggregate (@nonlinks) { if ($aggregate->UnProvision() != 0) { print STDERR "Could not UnProvision $aggregate\n"; return -1; } if ($aggregate->Delete() != 0) { print STDERR "Could not delete $aggregate\n"; return -1; } } # # Are there any slivers left after killing the aggregates? # my @slivers; if (GeniSliver->SliceSlivers($slice, \@slivers) != 0) { print STDERR "Could not get dead slivers for $slice.\n"; return -1; } foreach my $sliver (@slivers) { if ($sliver->UnProvision() != 0) { print STDERR "Could not UnProvision $sliver\n"; return -1; } if ($sliver->Delete() != 0) { print STDERR "Could not delete $sliver\n"; return -1; } } # # And lastly, any tickets that were not instantiated. # my @tickets; if (GeniTicket->SliceTickets($slice, \@tickets) != 0) { print STDERR "Could not get dead tickets for $slice.\n"; return -1; } foreach my $ticket (@tickets) { # print STDERR "Releasing $ticket\n"; if ($ticket->Release() != 0) { print STDERR "Could not delete $ticket\n"; return -1; } } return 0 if (!$purge); my $experiment = $slice->GetExperiment(); if (defined($experiment)) { $experiment->LockDown(0); my $pid = $experiment->pid(); my $eid = $experiment->eid(); system("$PLABSLICE destroy $pid $eid"); system("$ENDEXPT -q $pid,$eid"); return -1 if ($?); } if ($slice->Delete() != 0) { print STDERR "Could not delete $slice\n"; return -1; } return 0; } # # If the underlying experiment does not exist, need to create # a holding experiment. All these are going to go into the same # project for now. Generally, users for non-local slices do not # have local accounts or directories. # sub GeniExperiment($) { my ($slice) = @_; my $uuid = $slice->uuid(); my $needsfirewall = $slice->needsfirewall(); my $experiment = Experiment->Lookup($uuid); if (!defined($experiment)) { # # Form an eid for the experiment. # my $eid = "slice" . TBGetUniqueIndex('next_sliceid', 1); my $nsfile = ""; # # Need a way to can experiments. # if ($needsfirewall) { $nsfile = "/tmp/$$.ns"; open(NS, "> $nsfile") or return undef; print NS "source tb_compat.tcl\n"; print NS "set ns [new Simulator]\n"; print NS "tb-set-security-level Yellow\n"; print NS "\$ns run\n"; close(NS); } # Note the -h option; allows experiment with no NS file. system("$CREATEEXPT -q -i -k -w ". "-S 'Geni Slice Experiment -- DO NOT SWAP OR TERMINATE' ". "-E 'Geni Slice Experiment -- DO NOT SWAP OR TERMINATE' ". "-L 'Geni Slice Experiment -- DO NOT SWAP OR TERMINATE' ". "-h '$uuid' -p GeniSlices -e $eid $nsfile"); if ($?) { return undef; } $experiment = Experiment->Lookup($uuid); $experiment->Update({"geniflags" => 1}); } return $experiment; } # # # sub FindFreeNode($@) { # Already going to allocate these. my $vtype = shift(@_); my $type = "pc"; my @nodeids = @_; if (defined($vtype)) { # XXX Need to implement this. ; } my $query_result = DBQueryWarn("select uuid from geni_components"); return undef if (!$query_result || !$query_result->numrows); while (my ($uuid) = $query_result->fetchrow_array()) { my $node = Node->Lookup($uuid); next if (!defined($node)); next if ($node->isremotenode()); next if (grep {$_ eq $node->node_id()} @nodeids); # # See if the node is already reserved. # my $reservation = $node->Reservation(); return $node if (!defined($reservation)); } return undef; } # _Always_ make sure that this 1 is at the end of the file... 1;
|
__label__pos
| 0.998054 |
Convert PNG to PDF using Java
Convert PNG to PDF using Java
PNG and PDF are popular and the most widely used file formats at the current point in time. PNG is an image file format whereas PDF(Portable Document Format) offers reliable and efficient data representation. You need to convert the image file format to PDF in some scenarios. Therefore, in this blog post, we will learn how to convert PNG to PDF using Java PDF API. We will write the code snippet and the steps to perform this conversion in a Java application.
We will cover the following topics in this article:
Java PDF library
This Java PDF library is easy to install and offers documentation regarding installation. It is an enterprise-level API that offers robust conversion and manipulation features. However, you can download the JAR or install it using the following Maven configurations:
<repository>
<id>AsposeJavaAPI</id>
<name>Aspose Java API</name>
<url>https://repository.aspose.com/repo/</url>
</repository>
<dependency>
<groupId>com.aspose</groupId>
<artifactId>aspose-words</artifactId>
<version>21.11</version>
<type>pom</type>
</dependency>
Convert PNG to PDF using Java
We are going to use the classes and methods exposed by this Java PDF library. It lets you perform PNG to PDF conversion by writing a few lines of source code in Java.
You may follow the steps and the code snippet mentioned below:
1. Instantiate an instance of the Document class.
2. Create an object of DocumentBuilder class to make it simple to add content to the document.
3. Load the input image file by calling the createImageInputStream method and assign it to the object of ImageInputStream.
4. Invoke the getImageReaders method that returns an Iterator containing all currently registered ImageReaders and assigns it to the object of ImageReader class.
5. Call the setInput method that sets the input source to use to the given ImageInputStream.
6. Get the number of frames in the image by calling the getNumImages method.
7. Loop through all frames.
8. Select an active frame and assign it to the object of BufferedImage class.
9. Invoke the getPageSetup method to access the current page setup and assign it to the object of the PageSetup class.
10. Set the page height by calling the setPageWidth method.
11. Invoke the setPageHeight method to set the width of the page.
12. Insert the image into the document and position it at the top left corner of the page by calling the insertImage method.
13. Save the file as a PDF file format by calling the save method.
You can see the output in the image below:
PNG to PDF conversion
PNG to PDF conversion
Get a Free License
You can get a free temporary license to try the API beyond evaluation limitations.
Summing up
We can end this blog post here. We have demonstrated the implementation of the Java PDF library to convert PNG to PDF using Java programmatically. This library lets you build a PNG to PDF converter using a few lines of code. In addition, you may visit the documentation of this PNG to PDF conversion API. conholdate.com is continuously writing on new interesting topics. Therefore, please stay connected for the latest updates.
Ask a question
You can let us know about your questions or queries on our forum.
FAQs
How do you convert a PNG to a PDF?
You can use this library to convert PNG to PDF in Java programmatically. It offers comprehensive documentation regarding its usage.
How do I save a PNG as a PDF without losing quality?
Go through this section to learn how to save a PNG as a PDF file using a Java library. You can invoke the save method to save a PNG file as a PDF file.
See Also
|
__label__pos
| 0.814841 |
Improving Your Memory: The Most Useful Advice
Memory loss can be one of the first things to go when you start to age. There are, however, several ways to keep sharp with your memory the same or even better than before. This article will show you several simple tips and tricks on keeping or improving your memory.
Becoming a teacher to retain knowledge as a student is a fantastic way to improve upon your memory. For example: Giving your friends a pop quiz and/or attempting to teach them new material will help you to learn it better yourself. Try this tactic when you need to study and you'll be surprised at how much you remember.
Increase the dark leafy greens in your diet like spinach to help boost your memory power. They contain important B vitamins and folic acid, which have a huge job in taking care of the neurons in your brain. They also help keep oxygen flowing through your body, which is integral to healthy brain activity.
It is also very hard on a person's memory, although it's a well known fact that stress is hard on a person's body. Chronic stress is detrimental to brain cells as it destroys them as well as the hippocampus, which is the part of the brain that retrieves old memories as well as makes new ones. Practicing stress reducing techniques are vital in maintaining a good memory.
Retaining knowledge is only hard when you start to doubt yourself, so always be sure that you're as confident as possible when studying or attempting to learn anything. Doubt creeping in causes you to only recall the doubt. It certainly doesn't help you to remember, even though it doesn't necessarily make you forget.
If you constantly have trouble remembering certain things, find ways to eliminate the problem once and for all. If you can never remember where you placed your car keys, put a peg by your front door where you can hang your keys the minute you enter your house, for instance. Make a list of the items you most frequently forget and then figure out a simple way to remember each of the items on your list.
To help improve how quickly something is stored in your memory, take the time to bucket the information first. Act like an information architect and organize the information you are try to commit to memory based off of similarities. Once they are bucketed, attack them as a group. You will then find they are easier to memorize!
In order to help with improving your memory, take care of any chronic health conditions that you have. When you do not feel well, you can become depressed. A depressed state of mind adversely affects how your brain retains information because your brain will not be able to focus. So, taking care of your physical health is important in improving your memory.
Here is food for "thought! "? Consume food known to enhance brain functions. Omega-3 fatty fruits, acids and vegetables are known to provide the necessary nutrients for improved memory. Avoid eating fatty, heavy dishes limit the intake of saturated fat and consider spring water instead of wine or more info beer. Eat considerable amounts of whole grains to avoid the early onset of Dementia.
When you are struggling to absorb new information, try associating it with information that is already well-known. Tying this new information with something already learned forms a connection between the old and new ideas. This gives you a much better chance of recalling it later. Plus, relaxation exercises tend to speed up memorization processes.
Use mnemonic devices to help you remember things. Mnemonic devices are sets of clues that helps by associating things that are usually hard to remember with things that are easier to remember. An example is using an acronym, rhymes, visual images, or even associating a funny story to whatever you want to memorize.
A great tip that can help you improve your memory is to review information shortly after you've learned it. Doing this periodically will help you recall important things. What you don't want to do is cram. If you cram you won't retain as much information as you want.
A great tip that can help you improve your memory is to review information shortly after you've learned it. Doing this periodically will help you recall important things. What you don't want to do is cram. If you cram you won't retain as much information as you want.
Move around. Movement can help you remember things. If you are trying to learn something, repeat it to yourself while pacing or even while you are working out. Moving around can also be very helpful when you are trying to recall something you are having difficulty remembering. Full body movement will help your memory.
If you're struggling from memory loss is to consult with your doctor, a good tip. If your memory loss is only getting worse, you need to see your doctor right away so they can run some tests on you. You shouldn't feel embarrassed to ask for professional help.
Find someone to work with. Take turn explaining it to each other if you know someone who needs to remember the same information. When you hear someone explain it to you, you will be able to make sure you understood the same thing. When you explain something to someone else, you are rephrasing the content.
A great tip that can help you improve your memory is to review information shortly after you've learned it. Doing this periodically will help you recall important things. What you don't want to do is cram. If you cram you won't retain as much information as you want.
We remember funny things. So, if something amuses you or you think it is funny, you are more likely to remember it. Create an amusing or absurd image out of whatever it is you are trying to memorize and it will be more likely to stay in your head if you are trying to memorize something.
In conclusion, you want to avoid all of the hard to understand technical jargon and just get the plain facts in regards to how to improve your memory function. This article provided many different easy to digest tips and hopefully you will be able to apply them.
Leave a Reply
Your email address will not be published. Required fields are marked *
|
__label__pos
| 0.895421 |
Unit and Integration tests for AVS Device SDK
This page describes how to run unit and integration tests with the Alexa Voice Service (AVS) Device SDK.
Run unit tests
Unit tests for the AVS Device SDK use the Google Test framework. Use this command to run all unit tests:
make all test
Make sure that all tests pass before you begin integration testing.
Run unit tests with Sensory enabled
If the project was built with the Sensory wake word detector, the following files must be downloaded from GitHub and placed in <source dir>/KWD/inputs/SensoryModels for the integration tests to run properly:
Run integration tests
Integration tests make sure that your build can make a request and receive a response from AVS.
• All requests to AVS require auth credentials
• The integration tests for Alerts require your system to be in UTC
Important: Integration tests reference an AlexaClientSDKConfig.json file, which you must create. See the Create the AlexaClientSDKConfig.json file section (above), if you have not already done this.
To run the integration tests use this command:
make all integration
Network integration test
If your project is built on a GNU/Linux-based platform (Ubuntu, Debian, etc.), there is an optional integration test that tests the ACL for use on slow networks.
This cmake option is required when you build the SDK:
cmake <absolute-path-to-source> -DNETWORK_INTEGRATION_TESTS=ON -DNETWORK_INTERFACE=eth0
Note: The name of the network interface can be located with this command ifconfig -a. IMPORTANT: This test requires root permissions.
Run integration tests with Sensory enabled
If the project was built with the Sensory wake word detector, the following files must be downloaded from GitHub and placed in <source dir>/Integration/inputs/SensoryModels for the integration tests to run properly:
Issue reporting guide
Occasionally, you may encounter issues related to unit and integration tests provided with the SDK. To understand your issue and to pinpoint where the failure has occurred, please follow these instructions:
Integration tests
If you encounter issues with unit and integration tests, follow these instructions.
Integration tests rely on your platform's internet connection and the AVS availability. failures you might see during integration tests might be intermittent. The general approach for integration tests should be to isolate the test bench (rf Step 1 below) and repeat the test bench using the --gtest_repeat=n flag with at least 10 tries. If the failure is persistent, you can also filter the test (rf Step 3 below) and repeat with at least 10 tries. The main difference between the unit and integration tests is that integration tests are not included in the CTest command. Therefore, you should pass the correct parameters to the executable to run a single test bench. There are seven integration tests, the following commands are used to run these tests:
• ./Integration/test/AlexaAuthorizationDelegateTest /path/to/sdk/config/AlexaClientSDKConfig.json
• ./Integration/test/AlexaCommunicationsLibraryTest /path/to/sdk/config/AlexaClientSDKConfig.json /path/to/sdk/source/Integration/inputs
• ./Integration/test/AlexaDirectiveSequencerLibraryTest /path/to/sdk/config/AlexaClientSDKConfig.json /path/to/sdk/source/Integration/inputs
• ./Integration/test/AudioInputProcessorIntegrationTest /path/to/sdk/config/AlexaClientSDKConfig.json /path/to/sdk/source/Integration/inputs
• ./Integration/test/SpeechSynthesizerIntegrationTest /path/to/sdk/config/AlexaClientSDKConfig.json /path/to/sdk/source/Integration/inputs
• ./Integration/test/AlertsIntegrationTest /path/to/sdk/config/AlexaClientSDKConfig.json /path/to/sdk/source/Integration/inputs
• ./Integration/test/AudioPlayerIntegrationTest /path/to/sdk/config/AlexaClientSDKConfig.json /path/to/sdk/source/Integration/inputs
After you have used --gtest_filter, you can include that output to the issue report.
Unit tests
How to find which test is responsible
Using the build instructions, you may encounter failures during the make test step. Here we summarize what to do and how to re-run just the test that had failed:
1. Find the test bench and the individual tests that failed: When a test fails, CTest or GoogleTest will print the name of the test that has failed at the end of the test run, e.g. make test will print something like this if there's a failed test:
The following tests FAILED:
364 - MediaPlayerTest_test (Failed)
365 - MediaPlayerTest.testStartPlayWaitForEnd (Failed)
366 - MediaPlayerTest.testStartPlayForUrl (Failed)
In this example, we see that the main test bench that caused the test failure is MediaPlayerTest since that's the one that ends with _test and each individual test printed below it is prefixed by MediaPlayerTest.. Also, the two failed tests are MediaPlayerTest.testStartPlayWaitForEnd and MediaPlayerTest.testStartPlayForUrl.
2. Run the test bench: The tests rely on your platform's internet connection and the server's availability. Therefore, the failures you might see during these tests might be intermittent. Therefore, running the test bench on its own before reporting it will show the nature of the failure. Continuing with the same example, let's run MediaPlayerTest, located in MediaPlayer/test/ (you can find any failed test in the build tree by find . -name <test_name_here>, e.g. find . -name MediaPlayerTest). In this case, if you run:
ctest -R "^MediaPlayerTest_test$" -V
It prints a different output, which is followed by a block that lists the failed tests again, e.g.:
[==========] 16 tests from 1 test case ran. (***** ms total)
[ PASSED ] 14 tests.
[ FAILED ] 2 tests, listed below:
[ FAILED ] MediaPlayerTest.testStartPlayWaitForEnd
[ FAILED ] MediaPlayerTest.testStartPlayForUrl
In this example, we see that the same two tests have failed again.
3. Run only the failed tests and report: Now that it's clear which tests failed, you can run this test:
ctest -R "^MediaPlayerTest.testStartPlayWaitForEnd$|^MediaPlayerTest.testStartPlayForUrl$" -V
Here, notice that the tests are separated by |. Now the output is much smaller, and contains all the info needed for the run:
Note: Google Test filter = MediaPlayerTest.testStartPlayWaitForEnd:MediaPlayerTest.testStartPlayForUrl
[==========] Running 2 tests from 1 test case.
[----------] Global test environment set-up.
[----------] 2 tests from MediaPlayerTest
[ RUN ] MediaPlayerTest.testStartPlayWaitForEnd
2017-08-07 15:58:59.187 [ 1] E MediaPlayer:setupPipelineFailed:reason=createConverterElementFailed
2017-08-07 15:58:59.187 [ 1] E MediaPlayer:handleSetAttachmentReaderSourceFailed:reason=setupPipelineFailed
/path/to/SDK/source/MediaPlayer/test/MediaPlayerTest.cpp:398: Failure
Expected: (MediaPlayerStatus::FAILURE) != (m_mediaPlayer->setSource( std::unique_ptr<AttachmentReader>(new MockAttachmentReader(iterations, receiveSizes)))), actual: 4-byte object <02-00 00-00> vs 4-byte object <02-00 00-00>
2017-08-07 15:58:59.188 [ 2] E MediaPlayer:playFailed:reason=sourceNotSet
/path/to/SDK/source/MediaPlayer/test/MediaPlayerTest.cpp:413: Failure
Expected: (MediaPlayerStatus::FAILURE) != (m_mediaPlayer->play()), actual: 4-byte object <02-00 00-00> vs 4-byte object <02-00 00-00>
(MediaPlayerTest:970): GStreamer-CRITICAL **: gst_element_get_state: assertion 'GST_IS_ELEMENT (element)' failed
2017-08-07 15:58:59.188 [ 1] E MediaPlayer:doStopFailed:reason=gstElementGetStateFailed
(MediaPlayerTest:970): GStreamer-CRITICAL **: gst_object_unref: assertion 'object != NULL' failed
(MediaPlayerTest:970): GLib-CRITICAL **: g_source_remove: assertion 'tag > 0' failed
[ FAILED ] MediaPlayerTest.testStartPlayWaitForEnd (7 ms)
[ RUN ] MediaPlayerTest.testStartPlayForUrl
2017-08-07 15:58:59.188 [ 3] E MediaPlayer:setupPipelineFailed:reason=createConverterElementFailed
2017-08-07 15:58:59.188 [ 3] E MediaPlayer:handleSetSourceForUrlFailed:reason=setupPipelineFailed
2017-08-07 15:58:59.188 [ 2] E MediaPlayer:playFailed:reason=sourceNotSet
/path/to/SDK/source/MediaPlayer/test/MediaPlayerTest.cpp:427: Failure
Expected: (MediaPlayerStatus::FAILURE) != (m_mediaPlayer->play()), actual: 4-byte object <02-00 00-00> vs 4-byte object <02-00 00-00>
(MediaPlayerTest:970): GStreamer-CRITICAL **: gst_element_get_state: assertion 'GST_IS_ELEMENT (element)' failed
2017-08-07 15:58:59.188 [ 4] E MediaPlayer:doStopFailed:reason=gstElementGetStateFailed
(MediaPlayerTest:970): GStreamer-CRITICAL **: gst_object_unref: assertion 'object != NULL' failed
(MediaPlayerTest:970): GLib-CRITICAL **: Source ID 100 was not found when attempting to remove it
[ FAILED ] MediaPlayerTest.testStartPlayForUrl (0 ms)
[----------] 2 tests from MediaPlayerTest (7 ms total)
[----------] Global test environment tear-down
[==========] 2 tests from 1 test case ran. (7 ms total)
[ PASSED ] 0 tests.
[ FAILED ] 2 tests, listed below:
[ FAILED ] MediaPlayerTest.testStartPlayWaitForEnd
[ FAILED ] MediaPlayerTest.testStartPlayForUrl
2 FAILED TESTS
Before you report the failure, it's important that you observe how frequently these tests fail. You can have the tests repeat themselves by passing the --repeat-until-fail n flag where n is the number of tries. If you observe the failures intermittently, then please note that in your issue report after attaching the final printout. For example:
Note: If you have ACSDK_EMIT_SENSITIVE_LOGS flags enabled and your printout contains sensitive information like user name, client ID, or refresh token, please remove those from the logs before submitting an issue.
|
__label__pos
| 0.713122 |
firststep
The fact is, I am quite busy recently. But I don’t want to break the streak. So how about I write a quick one.
I have looked into bayesian statistics for few times in this blog. And I think most of you might know that the traditional frequentist statistical inference, for example, the P-value, is actually relying on P(X|H). Therefore, it is the conditional probability of having the data(X) as such or more extreme, when the null hypothesis(H) is true. Therefore, it is not correct to say thing like: because our p-value is very small, so our theory is true. The reason for this statement is wrong, is that p-value says nothing about how correct is your theory. It is all about the probability of observing such data, when the null is true.
Instead, what we usually want, is P(H|X), i.e. what is the probability of our hypothesis to be true, when we have the data as such. Such probability can be inferred by bayesian statistics.
A classical example in statistics is about flipping coin. For example, we flipped a coin for 20 times and observed 15 tails. Is this coin biased?
The traditional way of doing this, is to use the binomial test to calculate p-value. e.g.
binom.test(15, 20, p = 0.5, alternative = 'two.sided')
## 95%CI
## 0.5089541 0.9134285
By doing that we got a P-value of 0.0414. Using the traditional alpha < 0.05 criteria, we reject the null hypothesis. A correct conclusion from this binomial test is: when the null hypothesis is true, we have a probability of 0.0414 to have 15 tails or a more extreme version of the observation. Once again, it is P(X|H).
How about the P(H|X)? Well, it is actually not that difficult to compute that using R. To do bayesian statistics, we need three elements: prior, generative model and data.
Data is easy. Our “15 tails out of 20” is our data. Priors quantify our belief about the situation. For example, we don’t know exactly the probability of generating tails of our coin (Pt). It is equally likely to be from 0 to 1. The generative model is difficult to explain in word. I think it is easier for me to just do a simulation.
require(tidyverse)
n_samples <- 100000
prior_proportion_tails <- runif(n_samples, min = 0, max = 1)
n_tails <- rbinom(n = n_samples, size = 20, prob = prior_proportion_tails)
prior <- tibble(proportion_tails = prior_proportion_tails, n_tails)
posterior <- prior %>% filter(n_tails == 15)
par(mfrow = c(1,2))
hist(prior$proportion_tails)
hist(posterior$proportion_tails)
quantile(posterior$proportion_tails, c(0.025, 0.975))
What we are trying to do here, is to simulate the possible outcomes (no of tails) with our prior belief (the Pt can be 0 to 1). With our data, select the outcomes from the prior fit our data. And then we study the posterior probability distribution of Pt. As we can see, the distribution of Pt shifts from a uniform distribution to a (log)normal distribution with the mean around 0.75. The beauty of bayesian statistics is that, we can say something like: given our data, it is 95% chance that Pt is from 0.53 to 0.89. Rather than saying, as in the (tedious) interpretation of confident interval: Upon replication of this experiment for many times and calculate the 95% CI for each replication, 95% of the time the true Pt is in those CIs. That is the difference between P(H|X) and P(X|H).
It is actually possible to do the bayesian inference more elegantly with out that large amount of simulated values.
prior_proportion_tails <- seq(0, 1, by = 0.01)
n_tails <- seq(0, 20, by = 1)
pars <- expand.grid(proportion_tails = prior_proportion_tails,
n_tails = n_tails) %>% as_tibble
pars$prior <- dunif(pars$proportion_tails, min = 0, max = 1)
pars$likelihood <- dbinom(pars$n_tails,
size = 20, prob = pars$proportion_tails)
pars$probability <- pars$likelihood * pars$prior
pars$probability <- pars$probability / sum(pars$probability)
pars %>% filter(n_tails == 15) %>% mutate(probability = probability / sum(probability)) -> posterior
plot(y = posterior$probability, x = posterior$proportion_tails, type = 'l')
R is great as a tool to build this kind of bayesian intuition.
8 down, 44 to go.
|
__label__pos
| 0.968709 |
What is LED panel light? Is there any use?
The shape of LED panel lights is similar to ordinary panel lights, but the main difference is the light source. For ordinary panel lights, the light source is a fluorescent lamp, and the LED panel light source is an LED tube or LED lamp module or LED lamp beads. The following is a simple analysis of the role of LED panel lights.
1. LED panel lights belong to the category of lamps and lanterns, which have strong anti-vibration ability.
In the LED panel light, the LED light source is a high-hardness resin, not a light-emitting body such as tungsten glass, which is not easily damaged, so its vibration resistance is high and its environmental temperature adaptability is strong.
2. The LED panel light has strong control ability.
The LED panel light can be connected to an external controller for a variety of dynamic program control, and can adjust the color temperature and brightness.
led panel light
3. Low power consumption of LED panel lights.
At the same time, the lighting technology of LED panel lights is an energy-saving lighting technology. The product does not contain mercury in the production process, has less waste, and basically has no pollution; semiconductor lighting is recyclable and reproducible, and is sustainable for the social and economic development. It plays an important role.
4. The LED panel light is a very flexible technology in the initial stage of product design. LED is a point light source. The engineering designers of LED products can flexibly combine points, lines, and surfaces to design various light sources with different shapes and different particles according to customer needs. The design is very flexible.
5. The luminous intensity of the LED panel light is higher and more powerful.
The LED panel light adopts a reflective plate sealing design, and uses high-efficiency light guide plates and aluminum alloy materials. The luminous effect is uniform and the light intensity is higher.
|
__label__pos
| 0.994894 |
Telechargé par sahabandiaye
suites numériques
publicité
Séquence 1
Les suites numériques
Sommaire
1. Pré-requis
2. Le raisonnement par récurrence
3. Notions de limites
4. Synthèse
Dans cette séquence, il s’agit d’une part
d’approfondir la notion de suites numériques
permettant la modélisation d’un certain
nombre de phénomènes discrets et d’autre
part, à travers l’étude des limites de suites,
de préparer la présentation des limites de
fonctions.
Séquence 1 – MA02
1
© Cned - Académie en ligne
1 Pré-requis
A
Généralités sur les suites
1. Généralités
a) Définition et notations
Définition
On appelle suite numérique toute fonction numérique définie sur
sur l’ensemble des entiers supérieurs à un certain entier naturel n0 .
Notations
ou
La suite est notée respectivement (un )n ∈ ou (un )n ≥ n ou plus simplement (un ).
0
Le terme de rang n est noté un .
b) Vocabulaire
Définition
Soit (un ) une suite définie sur l’ensemble des entiers supérieurs à un certain entier naturel n0 .
On dit que :
z la suite (un ) est croissante si pour tout n ≥ n0 , un +1 ≥ un ;
z la suite (un ) est strictement croissante si pour tout n ≥ n0 , un +1 > un ;
z la suite (un ) est décroissante si pour tout n ≥ n0 , un +1 ≤ un ;
z la suite (un ) est strictement décroissante si pour tout n ≥ n0 , un +1 < un ;
z la suite (un ) est constante si pour tout n ≥ n0 , un +1 = un ;
z si une suite est croissante ou décroissante, on dit qu’elle est monotone.
Séquence 1 – MA02
3
© Cned - Académie en ligne
Définition
Soit (un ) une suite définie pour n ≥ n0 . On dit que :
z la suite (un ) est majorée s’il existe un réel M tel que pour tout n ≥ n0 , un ≤ M ;
zla suite (un ) est minorée s’il existe un réel m tel que pour tout n ≥ n0 , un ≥ m ;
z la suite (un ) est bornée si elle est à la fois majorée et minorée.
c) Propriétés
Propriété
Propriété
Soit (un ) une suite définie pour n ≥ n0 .
z Si (un ) est croissante alors pour
Soit (un ) une suite définie pour n ≥ n0
par un = f (un ) où f est une fonction
tout n ≥ p ≥ n0 on a un ≥ u p .
z Si (un ) est décroissante alors pour
tout n ≥ p ≥ n0 on a un ≤ u p .
définie sur n0 ; +∞ .
z Si f est croissante sur n0 ; +∞
alors (un ) est croissante.
z Si f est décroissante sur n0 ; +∞ alors
(un ) est décroissante.
La réciproque de ces résultats est fausse.
2. Suites arithmétiques
Définition Relation de récurrence
( )
La suite un
est dite arithmétique s’il existe r ∈ tel que pour
n ≥ n0
tout n ≥ n0 , un +1 = un + r .
Le réel r ainsi défini est appelé raison de la suite arithmétique (un ).
Propriété
Si
(un )n ≥n0
Expression de un
en fonction de n
est arithmétique de raison r
alors pour tout n ≥ n0 et pour tout p ≥ n0 ,
on a un = u p + (n − p ) × r .
4
© Cned - Académie en ligne
Séquence 1 – MA02
Propriété Variations
Une suite arithmétique de raison r
est strictement croissante si r > 0,
strictement décroissante si r < 0 et
constante si r = 0.
Propriété
Somme de termes
( )
Si un
est arithmétique alors pour tout p ≥ n0 et pour tout n ≥ p ,
n ≥ n0
n
∑ uk = u p + u p +1 + ... + un = (n − p + 1) ×
k =p
uP + un
2
= nombre de termes × moyenne
des termes extrêmes.
n
∑ k = 1+ 2 + ... + n =
En particulier :
k =1
n (n + 1)
.
2
3. Suites géométriques
Définition Relation de récurrence
( )
La suite un
est dite géométrique s’il existe q ∈ tel que pour
n ≥ n0
tout n ≥ n0 , un +1 = un × q .
Propriété
Expression de un en fonction
de n
(un )n ≥n0 est
Si
Propriété
La
suite
Variations
(q )
n
n ≥ n0
est
strictement
croissante
si q > 1 , strictement décroissante si 0 < q < 1 et
géométrique de
constante si q = 1 ou si q = 0. Lorsque q < 0, la suite
raison q ≠ 0 alors pour tout n ≥ n0
est alternée (elle n’est donc pas monotone).
et pour tout p ≥ n0 , on a
un = u p × q n − p .
Propriété
Somme de termes
( )
Si un
est géométrique de raison q ≠ 1 alors pour tout p ≥ n0 et pour tout n ≥ p ,
n ≥ n0
n
∑ uk = u p + u p +1 + ... + un = u p ×
k =p
1− q nombre de termes
1− q n − p +1
= premier teerme ×
1− q
1− q
n
En particulier, pour tout réel q ≠ 1 : ∑ q k = 1+ q + q 2 ... + q n =
k =1
1− q n +1
.
1− q
Séquence 1 – MA02
5
© Cned - Académie en ligne
4. Un exemple : étude d’une suite
arithmético-géométrique
On souhaite étudier la suite (un ) définie pour tout entier naturel n
par un +1 = 6 − 0 , 5un et u 0 = 1.
1. À l’aide de la calculatrice ou d’un tableur :
a) établir un tableau de valeurs de la suite (un ) ;
b) proposer une représentation graphique de (un ) ;
c) conjecturer les variations de (un ) , ainsi que son comportement pour de
grandes valeurs de n.
2. Soit (v n ) la suite définie sur par v n = un − 4.
a) Démontrer que la suite (v n ) est géométrique. En préciser le terme initial et la
raison.
b) Exprimer v n puis un en fonction de n.
c) Conclure quant aux variations de la suite un .
d) Écrire un algorithme permettant de déterminer la plus petite valeur de n pour
laquelle 4 − A < un < 4 + A où A est un réel quelconque.
( )
왘
Solution
1.
a) Avant de travailler sur la calculatrice ou sur un tableur, il est nécessaire
de savoir travailler « à la main ». Pour obtenir un tableau de valeur de la
suite (un ) , on détermine ses termes de proche en proche, à l’aide de la relation
de récurrence un +1 = 6 − 0 , 5un ainsi que du terme initial u 0 = 1 .
On obtient donc u 0 = 1 , u1 = 6 − 0 , 5 u 0 = 6 − 0 , 5 × 1 = 5, 5 ,
u2 = 6 − 0 , 5 u1 = 6 − 0 , 5 × 5, 5 = 3, 25 , etc.
À l’aide de la calculatrice TI82 Stats.fr (ou TI83, TI84), on procède de la façon
suivante :
On se place en mode Suit (ou mode SEQ).
On définit la suite par le menu f(x) (ou Y=) ainsi
que le montre l’écran ci contre. Il faut faire
attention en définissant les suites car sur les TI,
il y a un décalage des indices : on doit remplacer
n + 1 par n et donc n par n − 1.
On configure le tableau de valeurs par le menu
déftable (ou TBLSET) en choisissant une valeur
de départ égale à 0 (première valeur de l’indice)
et un pas de 1.
On obtient alors le tableau dans lequel on peut naviguer par le menu table.
6
© Cned - Académie en ligne
Séquence 1 – MA02
À l’aide de la calculatrice CASIO Graph 35+, on procède de la façon suivante.
On se place en mode RECUR, on définit la suite (2e écran ci-dessous), le
fonction SET (F5) permet de définir le terme initial et les termes dont on
cherche des valeurs approchées (3e écran), on revient à l’écran précédent
(EXIT) et la fonction TABLE (F6) nous donne le tableau de valeurs (4e écran).
À l’aide du tableur
d’OpenOffice, on entre le
terme initiale en B2 puis
on obtient les termes
successifs de la suite en
entrant en B3 la formule
= 6 − 0 , 5 ∗ B2 que l’on recopie vers le bas.
À l’aide du tableur de GeoGebra, on procède comme ci dessus en entrant le
terme initiale en B2 puis la formule = 6 − 0.5 ∗ B2 en B3.
Une fois que l’on dispose du tableau
de valeurs, on obtient rapidement
une représentation graphique de la
suite en sélectionnant la plage A2 :
B8 (par exemple) puis en choisissant
créer une liste de points après avoir
cliquer-droit. On obtient alors une
suite de points dont l’abscisse
représente n et l’ordonnée est un .
b) Nous venons de voir comment on pouvait représenter la suite (un ) à l’aide de
GeoGebra, en plaçant n en abscisse et un en ordonnée comme on le fait pour
représenter une fonction. Cette représentation peut aussi être obtenue à l’aide
du tableur d’OpenOffice ou de la calculatrice.
Nous allons voir une autre façon de représenter une suite (un ) dont le terme
général vérifie la relation de récurrence un +1 = f (un ) où f est une fonction.
La méthode est générale mais nous l’appliquerons dans le cas particulier de
notre exemple.
Pour tout n ∈N , un +1 = 6 − 0, 5 un ainsi un +1 = f (un ) où f est la fonction
affine définie par On trace la courbe Ꮿf représentant la fonction f ainsi que
la droite ∆ d’équation y = x .
Séquence 1 – MA02
7
© Cned - Académie en ligne
L’idée est alors de placer les termes successifs u 0 , u1, u 2 , ... de la suite sur l’axe
des abscisses.
P0
6
y=x
On commence par placer u 0 sur l’axe
u1
des abscisses.
On place alors le point P0 de Ꮿf
dont l’abscisse vaut u 0 .
4
Par construction, P0 a donc pour
ordonnée f (u 0 ) c’est-à-dire u1.
2
Il reste à « ramener » u1 sur l’axe des
abscisses. Pour ce faire, on détermine
le point de ∆ ayant pour ordonnée
u1. Par construction, ce point a donc
pour coordonnées (u1 ; u1 et le réel
u1 peut être placé en abscisse.
0
)
À partir de u1 en abscisse, on
recommence
le
procédé
en
déterminant le point P1 d’ordonnée
f (u1) c’est-à-dire u2 puis en
« ramenant » u 2 sur l’axe des
abscisses à l’aide de la droite ∆.
Ꮿf
0
6
u1
4
2
u0 2
P0
4
u1 6
y=x
P1
Ꮿf
0
On poursuit le procédé de la même
0 u0 2 u2 4 u3 u 6
1
façon obtenant ainsi les premiers
u4
termes de la suite (un ) sur l’axe des
abscisses.
On peut remarquer que, sous GeoGebra, on peut simplement obtenir en
abscisse les réels successifs u 0 , u1, u 2 , ... d’une suite définie par un +1 = f (un )
connaissant u 0 en créant un curseur n sur un intervalle allant de 0 à 20 (par
exemple) puis en entrant dans la barre de saisie (itération[f (x ),u0 ,n],0) et donc,
sur notre exemple (itération[6-0.5x,1,n],0). On active alors la trace du point créé
et il suffit de faire varier le curseur pour obtenir les termes successifs de la suite.
Par cette méthode, on peut observer rapidement le comportement de la suite ; en
revanche, on perd de vue l’aspect géométrique de la construction.
À l’aide de la calculatrice TI82 Stats.fr (ou
TI83, TI84), les données ayant été entrées
comme indiqué précédemment, puis dans le
menu Format on choisit pour cette méthode
de construction « Esc » (ou « Web »).
Après avoir déterminé la fenêtre graphique
(dans notre exemple, la fenêtre standard
convient), on obtient les tracés nécessaires en appuyant sur « graphe ». Pour
visualiser la construction, on se place en mode « trace » puis on utilise les flèches.
À l’aide de la calculatrice CASIO Graph 35+,
les données ayant été entrées comme indiqué
précédemment, on utilise la fonction WEB
(F4).
8
© Cned - Académie en ligne
Séquence 1 – MA02
Après avoir déterminé la fenêtre graphique par
SHIFT V-WIN (F3), on obtient les tracés
nécessaires en appuyant sur « EXE » plusieurs
fois.
c) À l’aide des tableaux de valeurs et représentations graphiques obtenus, il semble
que la suite (un ) ne soit pas monotone (elle semble être alternée autour d’une
certaine valeur). De plus, lorsque n devient grand, les termes de la suite (un )
semblent tendre vers une valeur limite voisine de 4 qui graphiquement, semble
correspondre à l’abscisse du point d’intersection des deux courbes tracées.
2. a) Soit n ∈N.
)
)
Par définition de (v n , on a v n +1 = un +1 − 4 or, par définition de (un , on a
un +1 = 6 − 0 , 5un donc v n +1 = (6 − 0 , 5 un ) − 4 = 2 − 0 , 5 un .
Puis, de v n = un − 4, on déduit un = v n + 4.
On obtient donc v n +1 = 2 − 0 , 5( v n +4) = 2 − 0 , 5 v n − 2 = −0 , 5 v n .
Finalement, pour tout n ∈N , v n +1 = −0 , 5 v n ce qui signifie que la suite (v n )
est géométrique de raison −0, 5.
Le terme initial de (v n ) vaut v 0 = u 0 − 4 = 1− 4 = −3.
b) La suite (v n ) est géométrique de raison −0 , 5 et de terme initial v 0 = −3
n
donc pour tout n ∈N , v n = −3 × ( −0, 5) puis, de un = v n + 4, on déduit que
pour tout n ∈ , un = 4 − 3 × ( −0, 5)n .
c) La suite (v n ) est géométrique de raison −0 , 5 (la raison est strictement
négative) donc elle est alternée et n’est pas monotone. En appliquant la
fonction affine décroissante x 4 + x successivement à tous les termes de
la suite, on s’aperçoit que les termes successifs de (un ) sont alternativement
inférieurs et supérieurs à 4. La suite (un ) n’est donc pas monotone. Les termes
successifs de (un ) sont alternativement inférieurs et supérieurs à 4.
d) Selon la conjecture effectuée précédemment, il semble que lorsque n devient
grand, les termes de la suite (un ) tendent vers une valeur limite voisine de 4
autrement dit, il semble que un puisse devenir aussi proche de 4 qu’on le
souhaite, pourvu que n soit suffisamment grand.
Ainsi, imaginons que l’on souhaite trouver la plus petite valeur
de n pour laquelle 3, 9 < un < 4 ,1 . On peut travailler à l’aide du
tableau de valeurs obtenue à la calculatrice ou sur tableur pour
constater, par balayage, que la condition semble vérifiée à partir
de n = 5 . On remarquera cependant qu’on ne peut pas affirmer
sans argument supplémentaire que tous les termes de la suite sont
situés entre 3,9 et 4,1 à partir du rang 5.
Si on souhaite trouver la plus petite valeur de n pour laquelle 3, 99 < un < 4 , 01,
la même méthode conduit à conclure à choisir une valeur minimale de n
égale à 9.
Séquence 1 – MA02
9
© Cned - Académie en ligne
La démarche que l’on vient de suivre est une démarche algorithmique. Nous
n’avons pas écrit l’algorithme à proprement parlé mais nous avons suivi un
procédé qui nous a conduit à déterminer la valeur de n répondant au problème.
En effet, en partant de n = 0 , nous avons observé la valeur de un , nous
l’avons comparée à 3,9 et à 4,1 et nous avons poursuivi tant que la condition
3, 9 < un < 4 ,1 n’était pas vérifiée, c’est-à-dire tant que un ≤ 3, 9 ou un ≥ 4 ,1 .
Dès que la condition était vérifiée, nous avons pu conclure.
Nous allons suivre cette démarche pour écrire un algorithme donnant la valeur
minimale de n pour laquelle on a 4 − A < un < 4 + A où A est un réel quelconque.
Lire A
N ←0
U ←1
Tant que U ≤ 4 − A ou U ≥ 4 + A faire
N ←N +1
U ← 6 − 0, 5 U
Fin du Tant que
Afficher N
on demande la valeur de A
on initialise l’indice de la suite à 0
U désignant les termes successifs de
la suite, on précise la valeur de u0
on entre dans la boucle « tant que »
on incrémente l’indice
on calcule le terme de la suite suivant
on sort de la boucle lorsque
4 − A <U < 4 + A
on affiche la valeur de N obtenue
lorsque 4 − A < U < 4 + A
On peut implémenter cet algorithme à l’aide du logiciel Algobox (ci-dessous) :
On peut implémenter cet algorithme à l’aide de la calculatrice (TI ou casio) :
10
© Cned - Académie en ligne
Séquence 1 – MA02
Il ne reste qu’à faire tourner ces programmes en vérifiant qu’ils fonctionnent
bien pour les résultats que l’on a obtenus à l’aide du tableur, c’est-à-dire
qu’ils renvoient respectivement n = 5 et n = 9 lorsque l’on choisit A = 0 ,1
ou A = 0 , 01 . On peut ici choisir n’importe quelle valeur de A aussi petite soit
elle et on peut constater qu’il faut choisir n de plus en plus grand pour que la
condition soit réalisée.
Remarques
t La suite (un ) proposée dans cette exemple a un terme général vérifiant
un +1 = aun + b. Cette suite n’est ni arithmétique (car a ≠ 1) et ni géométrique
(car b ≠ 0 ). Son terme général a cependant une forme remarquable puisqu’il
s’obtient en multipliant le précédent par un réel constant (aspect géométrique)
et en lui ajoutant un réel constant (aspect arithmétique). Pour cette raison, une
telle suite est dite arithmético-géométrique.
z La méthode utilisée ici pour étudier la suite (un ) est générale. On commence par
chercher l’unique solution α de l’équation x = ax+b. Puis on définit une suite
auxiliaire (v n ) par v n = un − α . On montre alors que (v n ) est géométrique de
raison a ce qui permet d’exprimer v n puis un en fonction de n.
5. Exercices
Exercice A
2un
.
Soit la suite (un ) définie par u 0 = 1 et pour tout entier n, un +1 =
2 + 3un
Calculer les termes u et u .
1
2
La suite (u ) est-elle arithmétique ? géométrique ?
n
2
On admet que, pour tout n, u n’est pas nul. On pose v = 1+
.
n
n
un
a) Calculer les trois premiers termes de (v n ) .
)
b) Déterminer la nature de (v n .
c) Exprimer v n en fonction de n. En déduire un en fonction de n.
왘
Solution
2
2×
2u1
2
5 = 1.
=
1. On a : u1 =
= et u 2 =
2 4
2 + 3u1
2 + 3u 0 5
2+ 3 ×
5
3
3
donc (un ) n’est pas arithmétique.
2. On a : u1 − u 0 = − et u 2 − u1 = −
5
20
u
u
2
5
Puis 1 = et 2 = donc (un ) n’est pas géométrique.
u0 5
u1 8
2u 0
2
2
2
= 3 , v 1 = 1+ = 6 et v 2 = 1+ = 9.
u0
u1
u2
2 + 4un
2
2
2
= 1+
=
=
+ 4 = v n + 3.
b) Soit n ∈N. On a : v n +1 = 1+
2un
un + 1
un
un
3. a) On a : v 0 = 1+
Ainsi, pour tout n ∈N , v n +1 = v n + 3.
2 + 3un
La suite (vn ) est donc arithmétique de terme initial vo = 3 et de raison 3.
Séquence 1 – MA02
11
© Cned - Académie en ligne
c) Pour tout n ∈N , v n = v 0 + nr donc pour tout n ∈N , v n = 3 + 3n. De plus,
2
(en remarquant que pour tout n ∈N , v n ≠ 1)
pour tout n ∈N , un =
vn − 1
2
donc pour tout n ∈N , un =
.
2 + 3n
Exercice B
u0 = 1
On définit une suite (un ) par
1
un +1 = un + 2n − 1 pour tout n ∈.
2
Calculer les premiers termes de la suite (un . Que peut-on conjecturer
concernant sa nature et son sens de variation ?
)
On pose v n = un − 4n + 10.
a) Montrer que (v n ) est une suite géométrique que l’on caractérisera.
b) En déduire l’expression de v n en fonction de n puis celle de un en fonction
de n.
n
c) On pose Sn = ∑ uk = u 0 + u1 + ... + un . Donner l’expression de Sn en
fonction de n. k = 0
왘
Solution
1
1
1
3
On a : u = 1 , u = u + 2 × 0 − 1 = − , u = u + 2 × 1− 1 = ,
0
1 2 0
2 2 2 1
4
1
27
1
107
u 3 = u2 + 2 × 2 − 1 = , u 4 = u 3 + 2 × 3 − 1 =
2
8
2
16
et, au vu de ces résultats, (un ) semble croissante à partir du rang 1, elle n’est
u
u
ni arithmétique (car u1 − u 0 ≠ u 2 − u1 ), ni géométrique (car 1 ≠ 2 ).
u 0 u1
a) Soit n ∈N.
1
1
On a : v n +1 = un +1 − 4(n + 1) + 10 = un + 2n − 1− 4n + 6 = un − 2n + 5
2
2
1
1
or un = v n + 4n − 10 d’où v n +1 = (v n + 4n − 10 ) − 2n + 5 = v n ainsi, pour
2
2
1
1
tout n ∈ , v n +1 = v n et (v n ) est une suite géométrique de raison q =
2
2
et de terme initial v 0 = u 0 − 4 × 0 + 10 = 11.
1
b) Pour tout n ∈N , v n = v 0 × q = 11
2
n
1
tout n ∈N , un = 11 + 4n − 10.
2
n
c) Pour tout n ∈N , Sn =
n +1
1
1−
n
2
or ∑ v k = 11
1
k =0
1−
2
12
© Cned - Académie en ligne
Séquence 1 – MA02
n
∑ uk =
k =0
n
n
or un = v n + 4n − 10 donc pour
∑ v k + 4k − 10 =
k =0
n
n
k =0
k =0
∑ vk + 4 ∑ k −
n +1 n
1
n (n + 1)
= 22 1− , ∑ k =
2
2
k =0
n
∑ 10
k =0
n
et
+
10
+ ... +
10 = 10(n + 1) ainsi, pour tout n ∈N,
∑ 10 = 10
k =0
n +1 termes
n +1
n +1
1
n (n + 1)
1
Sn = 22 1− + 4
− 10(n + 1) = 22 1− + 2n 2 − 8n − 10 .
2
2
2
Exercice C
La suite (un ) est une suite géométrique. Son premier terme vaut 5, une valeur
approchée au centième de son onzième terme est 1008 enfin sa raison est un
décimal négatif.
Que vaut la raison de la suite (un ) ?
왘
Solution
La suite (un ) est une suite géométrique de terme initial 5 donc, en notant q sa
raison, le onzième terme vaut 5 × q 10 .
On peut alors travailler par balayage à l’aide de la calculatrice ou d’un tableur.
Il apparaît alors qu’une raison égale à −1, 7 convient.
On peut remarquer que ça n’est pas la seule possibilité puisque, par exemple, une
raison de −1, 699995 convient tout autant.
Exercice D
On propose deux contrats d’embauche pour une durée déterminée d’un an.
Contrat 1 : un salaire au mois de janvier de 1100 euros puis une augmentation
de 37,5 euros par mois.
Contrat 2 : un salaire au mois de janvier de 1100 euros puis une augmentation
de t % par mois.
Déterminer le pourcentage à 0,01 près afin que les deux contrats soient
équivalents.
왘
Solution
On remarque que les contrats seront considérés comme équivalents si la somme
totale versée au terme des douze mois d’embauche est la même.
La suite des salaires obtenus selon le contrat 1 est une suite arithmétique de
terme initial 1100 et de raison 37,5 ainsi, le salaire du mois de décembre vaut
dans ce cas 1100 + 11× 37, 5 = 1512, 5 de sorte que la somme des douze premiers
1100 + 1512,5
=15675 euros.
salaires soit égale à 12
2
Séquence 1 – MA02
13
© Cned - Académie en ligne
La suite des salaires obtenus selon le contrat 2 est une suite géométrique de
terme initial 1100 et de raison 1+
t
ainsi la somme des douze premiers
100
12
t
1− 1+
12
100
110000
t
=−
−
+
salaires est égale à 1100
1
1
euros.
t 100
t
1− 1+
100
Pour que les deux contrats soient équivalents, on cherche donc une valeur de t
12
−110000
t
approchée au centième telle que
= 15675.
1− 1+
100
t
On travaille par balayage à l’aide de la calculatrice (voir exercice C pour la
démarche) ou d’un tableur en entrant les taux t dans la colonne A et le montant
total dans la colonne B.
Il apparaît dès lors qu’un taux d’accroissement mensuel d’environ 3,07 % pour le
contrat 2 permet d’obtenir deux contrats équivalents.
14
© Cned - Académie en ligne
Séquence 1 – MA02
2
A
Le raisonnement
par récurrence
Objectifs du chapitre
On présente dans ce chapitre, un nouvel outil de démonstration : le raisonnement
par récurrence. Ce type de démonstration s’avère efficace pour résoudre beaucoup
d’exercices sur les suites. On retrouve aussi ces raisonnements par récurrence dans
tous les domaines des mathématiques (pour les spécialités maths de terminale S,
par exemple, un certain nombre d’exercices d’arithmétiques nécessitent ce type
de démonstration).
B
L’idée
1. Deux exemples très concrets
a) Imaginons que l’on dispose d’un certain nombre de
dominos placés les uns à la suite des autres. Pour les
faire tomber, il faut que deux conditions soient réunies :
il faut faire tomber un domino et il faut que la chute d’un
domino entraine la chute du suivant. Lorsque ces deux
conditions sont réunies, on admet naturellement que
tous les dominos placés derrière le premier domino
renversé vont tomber.
b) Imaginons que l’on dispose d’une échelle. Si on sait monter sur un barreau de
l’échelle et si on sait passer d’un barreau quelconque à son suivant, on admet
naturellement que l’on peut atteindre n’importe quel barreau situé au delà du
premier barreau sur lequel on est monté.
C’est cette idée que nous allons formaliser.
2. Un exemple moins concret
Reprenons la suite (un ) proposée dans l’exemple chapitre 1. 4) à savoir (un )
définie pour tout entier naturel n par un +1 = 6 − 0 , 5un et u 0 = 1. À la fin de
l’exemple, nous avons montré que le plus petit entier n pour lequel 3, 9 < un < 4 ,1
était n = 5. En revanche, on ne sait pas si la condition 3, 9 < un < 4 ,1 est vérifiée
pour tout n ≥ 5.
Séquence 1 – MA02
15
© Cned - Académie en ligne
131
On peut bien sûr calculer les termes suivants pour obtenir u 5 =
≈ 4 , 094 ,
32
253
515
u6 =
≈ 3, 953 ou encore u 7 =
≈ 4 , 023 et constater que la proposition
64
128
« 3, 9 < un < 4 ,1 » est vraie pour n = 6, et n = 7 mais est-elle vraie pour tout
n ≥ 5 ? Comment le démontrer puisque l’on ne peut pas faire une infinité de
vérifications ?
La proposition « 3, 9 < un < 4 ,1 » est vraie au rang n = 5. Autrement dit, le
raisonnement a été initialisé, on sait renverser un domino ou encore on sait
monter sur l’un des barreaux de l’échelle.
Supposons désormais que la proposition « 3, 9 < un < 4 ,1 » est vraie au rang
n = k autrement dit, supposons que 3, 9 < uk < 4 ,1 .
On a alors −0 , 5 × 4 ,1 < −0 , 5 uk < −0 , 5 × 3, 9 puis
6 − 0 , 5 × 4 ,1 < 6 − 0 , 5 uk < 6 − 0 , 5 × 3, 9 ce qui donne 3, 95 < uk +1 < 4 , 05
3, 95 ; 4,05 ⊂ 3, 9 ; 4,1 donc 3, 9 < uk +1 < 4 ,1 et la proposition
« 3, 9 < un < 4 ,1 » est vraie au rang n = k + 1. On vient de démontrer que le fait
or
que la proposition soit vraie au rang n = k entraine le fait qu’elle le soit au rang
n = k + 1. Autrement dit, la proposition est héréditaire, on sait que la chute d’un
domino entraine la chute du suivant ou encore on sait passer d’un barreau de
l’échelle au suivant.
Les deux conditions (initialisation et hérédité) sont réunies, on peut donc conclure
que pour tout n ≥ 5, on a 3, 9 < un < 4 ,1 .
C
L’axiome
Soit une proposition ᏼ n dépendant d’un entier naturel n.
Pour démontrer que ᏼ n est vraie pour tout entier n ≥ n0 , il suffit de
montrer que :
(1) la proposition est vraie au rang n0 ;
(2) pour un entier k quelconque k ≥ n0 , ᏼ k vraie entraîne ᏼ k +1 vraie.
(
)
Ainsi, pour démontrer par récurrence qu’une proposition liée à un entier
naturel n est vraie pour tout n ≥ n0 , on procède en trois étapes.
Initialisation :
Hérédité :
On vérifie la proposition au rang initial n0 .
On suppose que la proposition est vraie pour un rang quelconque k (k ≥ n0 ) et
on démontre que, sous cette hypothèse, elle est vraie au rang suivant k + 1.
On dit alors que la proposition est héréditaire. L’hypothèse « ᏼ k vraie » est
appelée hypothèse de récurrence.
16
© Cned - Académie en ligne
Séquence 1 – MA02
Conclusion :
왘
Exemple 1
L’axiome ci-dessus permet de conclure que la proposition est alors vraie pour
tout n ≥ n0 .
Démontrer une propriété donnée
Soit (un ) la suite définie pour tout entier naturel n par u 0 = 2 et
pour tout n ≥ 0, un +1 = 2un − 3.
Démontrer que pour tout n ≥ 0, un = 3 − 2n .
Solution
On veut démontrer par récurrence que la proposition « un = 3 − 2n » est vraie
pour tout n ≥ 0.
Initialisation :
Au rang n = 0, la proposition s’écrit u 0 = 3 − 20 = 3 − 1 = 2 or, par définition
de un , on a u 0 = 2 ainsi la proposition est vraie au rang n = 0.
Hérédité :
On suppose que la proposition « un = 3 − 2n » est vraie pour un certain
rang n = k autrement dit, on suppose que pour un entier k positif, uk = 3 − 2k .
왘
( )
Comme
uk +1 = 2 uk − 3 , l’hypothèse
de
récurrence
permet
d’écrire
que uk +1 = 2 ( 3 − 2 ) − 3 puis uk +1 = 6 − 2 × 2 − 3 ou encore uk +1 = 3 − 2k +1
et la proposition « un = 3 − 2n » est vraie au rang n = k + 1. La proposition est
k
k
donc héréditaire.
Initialisation :
왘
Exemple 2
La proposition « un = 3 − 2n » est vraie pour n = 0 et elle est héréditaire donc
pour tout n ≥ 0, un = 3 − 2n .
Conjecturer une propriété puis la démontrer
Soit (un ) la suite définie pour tout entier naturel n par u 0 = 1 et pour
tout n ≥ 0, un +1 = 10un − 9n − 8.
En calculant les premiers termes de la suite, conjecturer l’expression de un en
fonction de n puis démontrer le résultat.
왘
Solution
On a : u 0 = 1, u1 = 10u 0 − 9 × 0 − 8 = 10 × 1− 0 − 8 = 2,
u2 = 10u1 − 9 × 1− 8 = 10 × 2 − 9 − 8 = 3,
u 3 = 10u2 − 9 × 2 − 8 = 10 × 3 − 18 − 8 = 4 , etc.
Il semble donc que pour tout n ≥ 0, un = n + 1.
La proposition est vraie au rang n = 0 (et elle a même été vérifiée aux rangs
n = 1, n = 2 et n = 3 ).
Supposons que pour k ≥ 0, on ait uk = k + 1 et, sous cette hypothèse, montrons
que uk +1 = k + 1+ 1 à savoir uk +1 = k + 2.
Comme uk +1 = 10 uk − 9k − 8 = 10 (k + 1) − 9k − 8 = 10k + 10 − 9k − 8 = k + 2 , on
a prouvé l’hérédité.
Finalement, pour tout n ≥ 0, on a un = n + 1.
Séquence 1 – MA02
17
© Cned - Académie en ligne
왘
Exemple 3
L’importance de l’initialisation
Pour n ≥ 0, on note ᏼ n la proposition « 10n + 1 est un multiple de 9 ».
1. Démontrer que la proposition ᏼ n est héréditaire.
2. La proposition ᏼ n est-elle vraie pour tout n ≥ 0 ? À partir d’un certain rang ?
왘
Solution
1. On suppose que pour k un entier naturel positif, 10k + 1 est un multiple de 9
et, sous cette hypothèse, on montre que 10k +1 + 1 est un multiple de 9.
Dire que 10k + 1 est un multiple de 9 signifie que 10k + 1 = 9N où N est un
entier relatif ou encore 10k = 9N − 1 avec N ∈Z.
Sous cette hypothèse, on a :
10k +1 + 1 = 10 × 10k + 1 = 10 × (9N − 1)+1 = 90 N − 10 + 1 = 90 N − 9
donc 10k +1 + 1 = 9 (10N − 1) = 9N' avec N' = 10N − 1∈ donc 10k + 1 est
bien un multiple de 9 et la proposition est héréditaire.
2. Pour n = 0, la proposition s’écrit « 100 + 1 est un multiple de 9 » autrement
dit « 2 est un multiple de 9 » ce qui est évidemment faux. La proposition ᏼ n
n’est donc pas vraie pour tout n ≥ 0. Etant héréditaire, elle peut être vraie à
partir d’un certain rang dès qu’elle est vraie pour un certain rang ; encore
faut-il le trouver…
On teste pour n = 1, n = 2 ou n = 3 en s’interrogeant donc sur la divisibilité
de 11, 101 ou 1001 par 9. Il apparaît que la proposition ᏼ n n’est pas
vraie pour n = 1, n = 2 ou n = 3 . Plutôt que de poursuivre les vérifications
successives, on remarque qu’un nombre est divisible par 9 lorsque la somme
de ses chiffres dans son écriture en base 10 est un multiple de 9 or la somme
des chiffres d’un nombre de la forme 10n + 1 vaut 2 quel que soit l’entier
n. Par suite, l’entier 10n + 1 n’est jamais un multiple de 9 et la proposition
« 10n + 1 est un multiple de 9 » est fausse pour tout n ≥ 0.
On retiendra donc de cet exemple qu’une proposition peut être héréditaire
tout en étant toujours fausse ; c’est le cas d’un ensemble de dominos disposés
suffisamment proches les uns des autres qui ne tombent pas si on n’en fait
tomber aucun.
왘
Exemple 4
Remarque
L’importance de l’hérédité
On considère la suite (un ) définie sur par u 0 = 100 et pour
u
tout n ≥ 0, un +1 = un + E n où E est la fonction partie entière.
100
1. Établir une conjecture concernant une expression simple de un en fonction
de n.
2. Cette relation est-elle vraie pour tout n ≥ 0 ?
Concernant la fonction partie entière
La fonction partie entière est une fonction définie sur qui à tout réel x associe
le plus grand entier relatif inférieur ou égal à x. On note E(x ) la partie entière
d’un réel x.
18
© Cned - Académie en ligne
Séquence 1 – MA02
Autrement dit, pour tout n ∈ , on aura E(x ) = n pour tout x tel que n ≤ x < n + 1.
On a par exemple : E(5,7) = 5, E
( 2 ) = 1, E(10) = 10 ou E(–0,2) = –1.
Sur TI, on obtient la partie entière d’un réel x, en choisissant le menu MATH puis
NUM et en sélectionnant partEnt (ou int sur les calculatrices en anglais).
Attention à ne pas confondre avec la fonction ent (ou iPart sur les calculatrices en
anglais) qui permet d’obtenir la troncature à l’entier d’un réel.
Sur Casio, la partie entière d’un réel x s’obtient par le menu NUM (cliquer sur
OPTN) en choisissant intg.
Sur tableur, la fonction permettant d’obtenir la partie entière d’un réel est la
fonction ENT.
왘
Solution
1. On a : u 0 = 100,
u
100
u1 = u0 + E 0 = 100 + E
= 100 + E(1) = 100 + 1 = 101,
100
100
u
101
u2 = u1 + E 1 = 101+ E
= 101+ E(1, 01) = 101+ 1 = 102,
100
100
puis, de la même façon, on peut poursuivre pour obtenir u 4 = 104 , u 5 = 105
ou encore u 6 = 106.
Il semble donc que pour n ≥ 0, un = 100 + n. Cette relation est-elle vraie pour
tout n ≥ 0 ?
2. Si on envisage que la proposition puisse être fausse, un contre-exemple
suffirait à le démontrer. On peut donc poursuivre les vérifications en s’aidant
éventuellement d’un tableur jusqu’à ce que l’on trouve un rang pour lequel la
proposition n’est pas vraie.
La proposition « un = 100 + n » étant vraie au rang n = 0 (ainsi qu’aux rangs
1, 2, 3, 4, 5 ou 6 comme on l’a vérifié), elle sera vraie pour tout n ≥ 0 si elle
est héréditaire.
On peut donc envisager de démontrer que pour k ≥ 0, entraine
uk +1 = 100 + k + 1. Supposons que pour k ≥ 0, uk = 100 + k
u
u
alors uk +1 = uk + E k = 100 + k + E k .
100
100
u
On pourra en déduire que uk +1 = 100 + k + 1 si on a E k = 1
100
uk
< 2 ou encore 100 ≤ uk < 200,
ce qui signifie que 1 ≤
100
soit 100 ≤ 100 + k < 200 ou encore 0 ≤ k < 100. Ceci démontre que la
proposition est héréditaire pour tout 0 ≤ k < 100 autrement dit, pour tout
0 ≤ uk < 100, entraîne uk +1 = 100 + k + 1. Ce raisonnement conduit à affirmer
que u100 = 200.
Séquence 1 – MA02
19
© Cned - Académie en ligne
Au rang suivant, on a :
u
200
u101 = u100 + E 100 = 200 + E
= 200 + E(2) = 200 + 2 = 202 ≠ 201.
100
100
Ce qui permet d’affirmer que la relation conjecturée n’est pas vraie pour tout n.
On remarquera qu’obtenir ce résultat par vérification (à l’aide d’un tableur par
exemple) est un raisonnement valable.
On retiendra qu’une proposition peut être vraie jusqu’à un certain rang,
héréditaire jusqu’à un certain rang mais pas pour tous les rangs. C’est le cas
d’un ensemble de dominos disposés suffisamment proches les uns des autres au
départ puis trop espacés par la suite. On renverse le premier domino, les suivants
tombent successivement jusqu’à ce que l’espace entre deux dominos soit trop
important et que le procédé s’arrête.
왘
Exemple 5
Une méthode pour démontrer qu’une suite est bornée
Soit (un ) la suite définie sur par : u 0 = 10 et un +1 = un + 6 pour tout n ≥ 0.
Démontrer que pour tout n ≥ 0, 3 ≤ un ≤ 10.
왘
Solution
Tout d’abord, u 0 = 10 donc 3 ≤ u 0 ≤ 10 et la proposition « 3 ≤ un ≤ 10 » est
vraie au rang n = 0.
Puis, supposons que pour un entier k ≥ 0, on ait 3 ≤ uk ≤ 10 alors 9 ≤ uk + 6 ≤ 16
puis 3 ≤ uk + 6 ≤ 4 car x x est croissante sur [0 , +∞[ ainsi 3 ≤ uk +1 ≤ 4
ce qui implique 0 ≤ uk +1 ≤ 10. La proposition est donc héréditaire.
Finalement, pour tout n ≥ 0, 3 ≤ un ≤ 10.
왘
Exemple 6
Une méthode pour étudier les variations d’une suite
Soit (un ) la suite définie sur par : u 0 = 10 et un +1 = un + 6 pour tout n ≥ 0.
Démontrer que la suite (un ) est décroissante.
왘
Solution
Initialisation :
Hérédité :
Pour démontrer que la suite (un ) est décroissante, on peut raisonner par
récurrence en démontrant que, pour tout n ∈N , la proposition un +1 ≤ un
est vraie.
On a u 0 = 10 et u1 = 16 = 4 donc u1 ≤ u 0 et la proposition
est vraie pour n = 0 .
soit k un entier naturel quelconque tel que uk +1 ≤ uk . Alors uk +1 + 6 ≤ uk + 6
puis uk +1 + 6 ≤ uk + 6 ou encore uk + 2 ≤ uk +1 . Ainsi, la proposition
un + 1 ≤ un
Conclusion :
Remarques
20
© Cned - Académie en ligne
un + 1 ≤ un
est héréditaire.
Pour tout n ∈N , la proposition
décroissante.
un + 1 ≤ un
est vraie. La suite (un ) est donc
t On peut regrouper les questions des exemples 5 et 6 en une seule question, à
savoir : démontrer que pour tout n ∈N , 3 ≤ un +1 ≤ un ≤ 10. On montre alors à
l’aide d’une seule démonstration par récurrence que la suite (un ) est une suite
bornée et décroissante.
Séquence 1 – MA02
( )
t Pour étudier les variations de un , on peut étudier le signe de un +1 − un (mais
un + 6 − un2
c’est plus long ! ) : pour tout n ≥ 0, o n a un +1 − un = un + 6 − un =
un + 6 + un
En admettant le résultat démontré à l’exemple 5 ci-dessus, on sait que pour
tout n ≥ 0, un ≥ 3.
Le dénominateur est alors strictement positif comme somme de deux nombres
strictement positifs donc un +1 − un est du signe du numérateur.
Le trinôme − x 2 + x + 6 a pour discriminant ∆ = 12 − 4 × ( − 1) × 6 = 25 = 52
et pour racines −2 et 3 de sorte que − x 2 + x + 6 est du signe de − x 2
sur −∞ ; –2 ∪ 3 ; +∞ . D’une part pour tout n ≥ 0, un ≥ 3 et d’autre part
pour tout x ≥ 3, –x 2 + x − 6 ≤ 0 donc pour tout n ∈N , − un2 + un + 6 ≤ 0.
Finalement, pour tout n ∈N , un +1 − un ≤ 0 et (un ) est décroissante.
D
Exercice 1
Exercices d’apprentissage
Soient
(en )n ≥1 et (cn )n ≥1
n
n
les suites définies par en = ∑ k = 1+ 2 + ... + n
k =1
et c n = ∑ k = 1 + 2 + ... + n .
3
3
3
3
k =1
Calculer les premiers termes des suites ( e ) et ( c ). Quelle relation semble
n
n
lier en et c n ?
n 2 (n + 1)2
Démontrer par récurrence que pour tout n ≥ 1, on a c =
puis
n
4
conclure.
Exercice 2
u
Soit la suite (un ) définie sur par u 0 = 1 et pour tout n, un +1 = n .
1+ un
Exprimer un en fonction de n.
Exercice 3
Démontrez que, pour tout entier naturel n, l’entier 32n − 2n est un multiple de 7.
Exercice 4
La suite (un ) est la suite définie par u 0 = 1 et un +1 = 2 + un pour tout entier
naturel n.
Démontrer par récurrence que pour tout entier naturel n, 0 ≤ un ≤ 2.
Exercice 5
u +1
La suite (un ) est définie par u 0 = 1 et un +1 = n
pour tout entier naturel n.
un + 3
( )
Représenter graphiquement la suite u . En dresser un tableau de valeurs
n
puis conjecturer son sens de variations.
Séquence 1 – MA02
21
© Cned - Académie en ligne
a) Démontrer que la fonction f : x x +1
est croissante sur [0 ; 1].
x +3
b) Démontrer par récurrence que (un ) est une suite décroissante à valeurs
dans l’intervalle [0 ; 1].
Exercice 6
Préambule
Pour tout entier n ≥ 1, on note n ! et on lit « factorielle de n », le nombre définit
par : n ! = n × (n − 1) × .... × 3 × 2 × 1.
Ainsi on a 1! = 1, 2!=2 × 1=2, 3!=3 × 2 × 1=6, 4!=4 × 3 × 2 × 1=24, etc.
On peut enfin remarquer que, pour tout n ≥ 1, (n +1)!=(n +1) × n !.
Démontrer par récurrence que, pour tout entier naturel n ≥ 1, on a : n !≥ 2n −1 .
Démontrer qu’à partir d’un certain rang, on a : n !≥ 2n .
22
© Cned - Académie en ligne
Séquence 1 – MA02
3 Notions de limites
A
Objectifs du chapitre
On présente dans ce chapitre, les notions de limites, les définitions qu’il faudra
connaître et savoir utiliser pour démontrer certains résultats ainsi que les
théorèmes dont il faudra, sauf mention contraire, connaitre les démonstrations
et qu’il faudra savoir utiliser (par, exemple, pour déterminer une limite).
B
Activité 1
Pour débuter
On considère la suite (un ) définie sur
par u0 = 10 et pour tout entier n,
un +1 = un2 − 3un + 3 .
a) Représenter la suite (un ) de deux façons : l’une pour laquelle on placera un
en ordonnée et n en abscisse, l’autre pour laquelle les termes successifs de la
suite seront placés en abscisse (voir le point 4 du chapitre 1 de cette séquence).
Au vu de ces représentations graphiques, quelle conjecture peut-on émettre
quant au comportement de un pour de grandes valeurs de n ?
b) Établir un tableau de valeurs de un .
Quelle semble être la limite de la suite (un ) lorsque n devient grand ?
c) Le nombre un − 1 permet ici de mesurer la distance entre un et sa limite 1. Il
semble que l’on puisse rendre ce nombre aussi petit qu’on le souhaite pourvu
que n soit suffisamment grand.
C’est ce que l’on va constater sur quelques exemples. A l’aide du tableau
de valeur précédent, déterminer un rang au delà duquel un − 1 < 10−2
puis un − 1 < 10−5 et enfin un − 1 < 10−8.
Séquence 1 – MA02
23
© Cned - Académie en ligne
Activité 2
Une activité autour de suites de référence.
a) Compléter le tabealu de valeurs ci-dessous.
n
100
1000
106
1010
1
n
1
n
1
n2
1
n3
1 1 1 1
b) Quelle semble être la limite des suites
,
,
et
?
n n n 2 n 3
1
1
≤ 10−2 puis 0 ≤
≤ 10−18 et
c) Déterminer un rang N au delà duquel 0 ≤
n
n
1
enfin 0 ≤
≤ 10−30.
n
d) Faire de même avec les trois autres suites.
Activité 3
Une autre activité autour de suites de référence.
a) Compléter le tableau de valeurs ci-dessous.
n
100
1000
106
1010
n
n2
n3
b) Quelle semble être la limite des suites
( n ) , (n2 ) et (n 3 ) ?
c) Déterminer un rang N au delà duquel
enfin n > 1030.
d) Faire de même avec les deux autres suites.
24
© Cned - Académie en ligne
Séquence 1 – MA02
n > 103 puis
n > 1010 et
Activité 4
Le flocon de Von Koch
Pour obtenir le flocon de Von Koch (figure du milieu), on procède de la façon
suivante.
À l’étape initiale (étape 0), on considère un triangle équilatéral (figure de gauche)
de côté 10 cm (par exemple). La figure initiale a donc 3 côtés de longueur
10 cm pour un périmètre total de 30 cm et une aire de 25 3 cm2 (à savoir environ
43, 3 cm2 ) .
À l’étape 1, on partage chacun des côtés de la figure précédente en 3 et, sur le
segment central, on construit un triangle équilatéral. La figure obtenue après une
10
étape comporte donc 12 côtés de longueur
cm (à savoir environ 3,3 cm) pour
3
100 3
un périmètre total de 40 cm et une aire de
(à savoir environ 57, 7 cm2 ).
3
On poursuit ainsi la construction du flocon en partageant chacun des côtés
de la figure obtenue à l’étape précédente en 3 et en construisant un triangle
équilatéral sur le segment central.
On nomme respectivement C n , Ln , Pn et An le nombre de côtés, la longueur de
chaque côtés, le périmètre et l’aire du flocon après n étapes.
10
Ainsi C 0 = 3, C1 = 12, L0 = 10, L1 = , etc.
3
a) Intuitivement que peut-on penser du comportement de chacune des quatre
suites C n , Ln , Pn et An pour de grandes valeurs de n (variations,
limites éventuelles) ?
( ) ( ) ( ) ( )
b) À l’aide d’un tableur, créer et organiser une feuille de calculs permettant
d’obtenir C n , Ln , Pn et An en fonction de l’étape n. Confirmer ou
infirmer les conjectures faites à la question précédente.
( ) ( ) ( ) ( )
c) En supposant que le triangle de départ ait des côtés de longueur 10 cm. Le
périmètre du flocon peut-il dépasser un kilomètre ? Si oui, après combien
d’étapes et quelle serait la valeur correspondante de l’aire du flocon ?
Séquence 1 – MA02
25
© Cned - Académie en ligne
C
Cours
1. Suites convergentes
a) Définitions et premières propriétés
Définition 1
On dit qu’une suite (un ) admet pour limite un réel lorsque tout intervalle
ouvert contenant contient tous les termes de la suite à partir d’un certain
rang.
On note alors lim un = .
n →+∞
Lorsqu’une suite (un ) admet une limite finie, on dit qu’elle est convergente
(ou qu’elle converge).
Dans le cas contraire, on dit qu’elle est divergente.
On remarque que montrer que tout intervalle ouvert contenant contient tous les
termes de la suite à partir d’un certain rang, revient à montrer que tout intervalle
ouvert centré en contient tous les termes de la suite à partir d’un certain rang.
En pratique, on considèrera donc fréquemment comme intervalles contenant ,
des intervalles de la forme − α ; + α où α est un réel strictement positif.
Remarque
Interprétation graphique
De la définition, on obtient que pour tout α aussi petit que l’on veut, il existe un
rang au delà duquel un appartient à ] − α ; + α[.
6
P1
α = 0,1
P3
y=4+α
4
y=4–α
(
P5
P4
P9
P7
P6
P8
P2
P0
i
0
0
26
© Cned - Académie en ligne
)
Le graphique ci-contre illustre la
convergence vers = 4 de la suite
(un ) définie pour tout entier naturel n
par
un +1 = 6 − 0 , 5un et u0 = 1 (à
rapprocher du Chapitre 1, 4).
2
j
En nommant Pn les points de coordonnées
n ; un , la convergence de (un ) signifie
donc pour tout α aussi petit que l’on veut,
il existe un rang au delà duquel Pn entre
dans une bande limitée par les droites
d’équations y = − α et y = + α pour
ne plus jamais en ressortir.
2
Séquence 1 – MA02
4
6
8
왘
Exemple 7
En utilisant la définition de la convergence d’une suite, démontrer que :
1
=0;
a) lim
n →+∞ n 2
n −1
admet pour limite 1.
b) La suite un définie pour tout n ∈ par un =
n +2
( )
Remarque
왘
Solution
En général, on ne revient pas à la définition de la notion de limites pour
déterminer les limites des suites proposées mais on utilise les propriétés sur
les limites usuelles, les règles opératoires sur les limites ainsi que les différents
théorèmes qui seront vus dans la suite de cette partie.
1
tend vers 0 lorsque n tend
n2
vers +∞, c’est-à-dire lorsque n devient aussi grand que l’on veut. Intuitivement,
a) On souhaite démontrer que le nombre
le résultat semble naturel.
1
Par ailleurs, une représentation graphique de la suite de terme général
n2
permet de visualiser le résultat.
1
n2
P1
1
j
P2
i
0
0
1
2
P3
P4
P5
P6
3
4
5
6
n
Pour prouver le résultat à l’aide de la définition, on est amené à démontrer que
tout intervalle ouvert contenant 0 contient tous les termes de la suite à partir
d’un certain rang.
L’intervalle −r ; r où r est un réel strictement positif est un intervalle ouvert
contenant 0.
Puis :
1
n
2
∈ −r ; r ⇔ −r <
−r <
1
n
Ainsi, on a :
2
<r ⇔0<
1
n2
1
n
2
1
n2
< r or n > 0 donc
< r ⇔ n2 > r ⇔ n > r .
∈ −r ; r dès que n > r .
En posant N l’entier qui suit
tout n ≥ N ,
1
n2
r , on a donc démontré que pour
∈ −r ; r . D’où le résultat.
Séquence 1 – MA02
27
© Cned - Académie en ligne
Remarque
On peut adapter la démarche ci-dessus pour montrer que :
1
lim
1
1
= 0, lim
= 0 ou plus généralement
n →+∞ n
n →+∞ n 3
= 0, lim
n →+∞ n
1
lim
n →+∞ n k
= 0 où k ∈N∗.
b) Comme on peut le voir ci-contre, une illustration graphique ou à l’aide d’un
tableur permet d’avoir une idée du comportement de la suite un .
( )
Pour démontrer la convergence de (un ) vers 1, on montre que tout intervalle
ouvert centré en 1 contient tous les termes de la suite à partir d’un certain
rang.
2
Un
1
j
i
0
0
P2
P1
1
2
P3
P4
P5
3
4
5 n
P0
L’intervalle 1− r ; 1+ r où r est un réel strictement positif est un intervalle
ouvert contenant 1.
n −1
n −1
Puis : un ∈]1− r ; 1+ r [ ⇔ 1− r <
< 1+ r ⇔ −r <
− 1< r
n +2
n +2
−3
−3
−3
et
⇔ −r <
< r ⇔ −r <
<r
n +2
n +2 n +2
n +2> 0
Or,
et
et
r >0
donc
−3
3
3
< r ⇔ n + 2 > − ⇔ n > −2 − .
n +2
r
r
−r <
−3
3
3
⇔ n + 2 > ⇔ n > −2 +
n +2
r
r
3
3
3
et −2 + étant clairement −2 + on note
r
r
r
3
N l’entier qui suit −2 + pour obtenir que pour tout n ≥ N , un ∈ ] 1− r ; 1+ r [
r
d’où la convergence de (un ) vers 1.
Le plus grand des deux nombres −2 −
Remarque
On peut noter au passage que pour montrer la convergence de (un ) vers 1, on a
prouvé la convergence vers 0 de la suite de terme général un − 1.
왘
28
© Cned - Académie en ligne
Exemple 8
En utilisant la définition de la convergence d’une suite, montrer que toute suite
convergente est bornée.
Séquence 1 – MA02
왘
Solution
Soit (un ) une suite définie pour tout entier naturel, convergente vers un réel
. Ainsi, pour un réel r quelconque, on sait trouver un entier N tel que pour
tout n ≥ N , ᐉ − r < un < ᐉ + r donc (un ) est bornée à partir du rang N.
En notant m le plus petit des nombres u 0 ,u1,...,uN −1, − r et M le plus grand
des nombres u 0 ,u1,...,uN −1, + r on obtient que pour tout n ≥ N , m ≤ un ≤ M
ce qui signifie que (un ) est bornée.
Remarque
On peut ici raisonner en choisissant une valeur particulière pour r,
par exemple r = 1.
Limites de suites usuelles
Propriété 1
z lim
1
n →+∞ n
1
1
1
= 0, lim
= 0, lim
= 0 et plus
n →+∞ n
n →+∞ n 2
n → +∞ n 3
= 0, lim
généralement lim
1
n →+∞ n k
= 0 où k ∈N∗.
z Toute suite constante de terme général égal à est convergente vers .
Propriété 2
Unicité de la limite
Si une suite converge alors sa limite est unique.
Démonstration
Raisonnons
par
l’absurde.
Pour
commencer, supposons qu’une suite
(un ) converge et qu’elle admette
deux limites distinctes et ′.
Nécessairement, l’une est strictement inférieure à l’autre, par exemple < ′.
On peut donc trouver un intervalle ouvert I contenant et un intervalle ouvert J
contenant ′ qui ne se chevauchent pas.
La suite (un ) étant convergente vers , tous les termes de la suite sont dans
l’intervalle I à partir d’un certain rang N et, (un ) étant convergente vers ′ , tous
les termes de la suite sont dans l’intervalle J à partir d’un certain rang N ′ . Donc,
pour tout n à la fois supérieur à N et N ′ , le terme un se trouve à la fois dans
l’intervalle I et dans l’intervalle J, ce qui est impossible. L’hypothèse que nous
avions émise au départ est donc absurde et (un ) ne peut donc pas converger
vers deux limites distinctes.
Séquence 1 – MA02
29
© Cned - Académie en ligne
b) Opérations sur les limites
Propriété 3
Opération sur les limites
Soient ( un ) et ( vn ) deux suites convergentes de limites respectives et ′ .
On admet les résultats suivants :
z la suite de terme général un + v n est convergente et a pour limite + ' ;
z la suite de terme général un × v n est convergente et a pour limite × ' ;
z la suite de terme général k × un où k est un réel est convergente et a
pour limite k × ;
z si v n ne s’annule pas à partir d’un certain rang et si ' ≠ 0 alors la suite
u
de terme général n est convergente et a pour limite
.
vn
'
왘
Exemple 9
Déterminer la limite des suites de termes généraux :
an =
왘
Solution
3n 2 + n − 1
n2
, bn =
n2 − 4
, cn =
n 2 + 2n
3n 2 − n + 1
n 3 + 2n
et d n =
1
n− n
.
Dans chaque cas, on amené à transformer l’expression de la suite de façon à
utiliser les règles opératoire-ci-dessus.
z Pour n > 0, an =
3n 2 + n − 1
1
1
1 1
= 0 et lim
=0
or lim
= 3+ −
n n2
n →+∞ n
n →+∞ n 2
n2
donc, par somme, lim an = 3.
n →+∞
z Pour n > 0, bn =
n2 − 4
2
=
(n − 2)(n + 2) n − 2
2
1
=
= 1−
or lim
= 0 donc,
n (n + 2)
n
n
n →+∞ n
n + 2n
2
par produit lim
= 0 puis, par somme lim bn = 1.
n →+∞ n
n →+∞
On remarque que l’on peut proposer une autre transformation de bn pour
obtenir le résultat.
4
4
n 2 (1− ) 1−
2
2
n −4
n = n 2 or lim 4 = 0
En effet, pour n > 0 , bn =
=
2
n →+∞n 2
n 2 + 2n n2 (1+ 2 )
1+
n
n
2
2
4
donc lim 1− = 1 et lim
= 0 donc lim 1+ = 1 ce qui
n →+∞ n 2
n →+∞ n
n →+∞ n
conduit, par quotient, à lim bn = 1.
n →+∞
30
© Cned - Académie en ligne
Séquence 1 – MA02
Cette deuxième transformation est fréquemment utilisée lorsque le terme
général de la suite est une expression rationnelle en n ainsi qu’on peut le
constater dans l’exemple suivant.
On observera que, dans ce cas, on transforme l’expression de départ en
factorisant numérateur et dénominateur par leur monôme de plus haut degré
en n.
1 1
1 1
n 2(3 − + )
3− +
2
n n
n n2
3n − n + 1
1
=
= ×
.
z Pour n > 0, c n =
2
2
n
3
n 3 + 2n
n (1+ )
1+
n2
n2
1
1
1 1
D‘une part
lim
= 0 et lim
= 0 donc
lim 3 − + = 3
n n2
n →+∞ n
n →+∞ n 2
n →+∞
2
et lim
=0
n →+∞ n 2
1 1
3− +
n n2
2
donc lim 1+ = 1 ainsi par quotient lim
= 3.
2
n →+∞ n 2
n →+∞
1+
n2
1
D’autre part lim
= 0 et par produit, on obtient lim c n = 0.
n →+∞ n
n →+∞
2
z Bien que le terme d n ne soit pas rationnelle en n, on peut adopter une
démarche analogue à celle utilisée précédemment.
Pour n > 2, d n =
1
n− n
=
1
n (1−
1
n
=
)
1
×
n
1
1−
1
.
n
1
= 0 donc lim 1−
= 1 puis par quotient
n →+∞ n
n →+∞
n
D’une part lim
1
1
= 1.
lim
1
n →+∞
1−
n
1
= 0, et par produit, on obtient lim d n = 0.
n →+∞ n
n →+∞
D’autre part lim
c) Théorèmes de comparaison et d’encadrement
Propriété 4
Compatibilité avec l’ordre
Soient ( un ) et ( vn ) deux suites convergentes de limites respectives et
′.
Si, à partir d’un certain rang, on a un < v n (ou bien un ≤ v n ) alors ≤ ′.
Séquence 1 – MA02
31
© Cned - Académie en ligne
ᐉ'
Démonstration
Supposons que > ′.
ᐉ
J contient les termes I contient les termes
de (vn) pour n ≥ N
de (un) pour n ≥ N
On peut donc trouver un intervalle ouvert I contenant et un intervalle ouvert J
contenant ′ qui ne se chevauchent pas.
La suite (un ) converge vers donc il existe un rang N1 à partir duquel I contient
tous les termes de un .
( )
( )
De même, il existe un rang N2 à partir duquel J contient tous les termes de v n .
En notant N le plus grand des entiers N1 et N2 , pour tout n ≥ N , I contient
les nombres un alors que J contient les nombres v n (voir illustration) et
donc un > v n ce qui est incompatible avec l’hypothèse de la propriété.
Donc ≤ ′.
Conséquence
Si (un )n ≥ n est une suite croissante et convergente vers alors, pour
0
tout n ≥ n0 , un ≤ .
Démonstration
Soit n ≥ n0 .
Pour tout p ≥ n , on a u p ≥ un car la suite (un ) est croissante, or la convergence
de la suite vers se traduit par lim u p = . De plus, un ne dépendant pas de p,
p →+∞
on a lim un = un . Ainsi, par passage à la limite en p dans l’inégalité ci-dessus,
p →+∞
on obtient ≥ un . Finalement, pour tout n ≥ n0 , un ≤ .
Remarque
De façon analogue, on a :
Si (un )n ≥ n est une suite décroissante et convergente vers alors, pour
0
tout n ≥ n0 , un ≥ .
Théorème 1
On admet le résultat suivant appelé « théorème des gendarmes ».
32
© Cned - Académie en ligne
( )
On considère trois suites (un ) , (v n ) et w n .
Si (un ) et (w n ) sont convergentes vers un même réel et si, à partir d’un
certain rang, un ≤ v n ≤ w n alors (v n ) est elle aussi convergente vers .
Séquence 1 – MA02
왘
Exemple 10
왘
Solution
Déterminer la limite des suites de terme général : an =
( − 1)n
2
et bn =
sinn − 2n
.
n +1
n
z Pour tout n ∈N , −1 ≤ ( −1) ≤ 1 or, pour n > 0, n > 0 donc pour n > 0,
2
n
−
1
n2
≤ an ≤
D’une part,
1
n2
.
1
1
lim − = 0 et d’autre part, lim
= 0 donc par le
n →+∞ n 2
n →+∞ n 2
théorème des gendarmes lim an = 0.
n →+∞
z Pour tout n ∈N , −1 ≤ sin n ≤ 1 donc −1− 2n ≤ sin n − 2n ≤ 1− 2n or n + 1 > 0
−1− 2n
1− 2n
.
≤ bn ≤
n +1
n +1
1
1
n ( − − 2) − − 2
1
−1− 2n
n
lim − − 2 = −2
or
D’une part,
=
= n
1
1
n +1
n →+∞ n
n (1+ )
1+
n
n
1
−1− 2n
et lim 1+ = 1 donc par quotient lim
= −2.
n →+∞ n + 1
n →+∞ n
donc
1− 2n
= −2.
n →+∞ n + 1
Ainsi, par le théorème des gendarmes lim bn = −2.
D’autre part, on montre de façon analogue que lim
n →+∞
왘
Exemple 11
( )
On considère la suite un définie pour tout n ≥ 1, par :
n
un =
1
∑ n+
k =0
k
=
1
n+ 0
+
1
+
1
n+ 1 n+ 2
+ ... +
1
n+ n
.
a) En remarquant que les n + 1 termes constituant la somme un sont tous compris
entre
1
et
1
n +1
n +1
, démontrer que pour tout n ≥ 1,
≤ un ≤
.
n
n
n+ n
n+ n
b) En déduire que la suite (un ) est convergente et préciser sa limite.
왘
Solution
a) Pour n ≥ 1 et pour 0 ≤ k ≤ n , on a 0 ≤ k ≤ n puis n ≤ n + k ≤ n + n et,
1
1
1
≤
≤
donc chacun des n + 1 termes de la
par inversion
n+ n n+ k n
1
1
somme constituant un est supérieur à
d’où un ≥ (n + 1) ×
n+ n
n+ n
1
1
et inférieur à d’où un ≤ (n + 1) × .
n
n
n +1
n +1
Finalement pour tout n ≥ 1,
≤ un ≤
.
n
n+ n
Séquence 1 – MA02
33
© Cned - Académie en ligne
1
1
n
(1+ )
1+
n +1
n =
n or lim 1 = 0
b) D’une part
=
n →+∞ n
n + n n (1+ 1 ) 1+ 1
n
n
1
1
donc lim 1+ = 1 et lim
=0
n →+∞ n
n →+∞ n
n +1
1
= 1.
= 1 puis par quotient lim
donc lim 1+
n
+
n
n
→+∞
n →+∞
n
D’autre part
n + 1
n +1
1
= 1+ donc lim
= 1.
n
n
n →+∞ n
Par le théorème des gendarmes, on en déduit la convergence de (un ) vers 1.
2. Suites divergentes ayant pour limite +∞
ou –∞
a) Définitions et premières propriétés
Définition 2
On dit qu’une suite (un) admet pour limite +∞ si tout intervalle de la forme
A ; + ∞ où A est un réel, contient tous les termes de la suite à partir d’un
certain rang. On note alors lim un = +∞.
n →+∞
De façon analogue, on dit qu’une suite (un) admet pour limite −∞ si tout
intervalle de la forme −∞; A où A est un réel, contient tous les termes de
la suite à partir d’un certain rang. On note alors lim un = −∞.
n →+∞
Dans un cas comme dans l’autre, on dit que la suite est divergente.
왘
Exemple 12
a) En utilisant la définition, démontrer que : lim n 2 = +∞.
n →+∞
101− n 2
b) La suite un définie pour tout n ∈ par un =
.
2n + 1
tÀ l’aide d’un tableur, conjecturer l’éventuelle limite de la suite un .
( )
( )
tMontrer que l’on peut trouver un rang au-delà duquel un ≤ −100.
t En utilisant la définition, démontrer que lim un = −∞.
n →+∞
34
© Cned - Académie en ligne
Séquence 1 – MA02
Remarque
En général, on ne revient pas à la définition de la notion de limites pour
déterminer les limites des suites proposées mais on utilise les propriétés sur
les limites usuelles, les règles opératoires sur les limites ainsi que les différents
théorèmes qui seront vus dans la suite de cette partie.
Solution
a) Par définition, on est amené à déterminer un rang N tel que pour
tout n ≥ N , n 2 ≥ A où A est un réel quelconque (aussi grand qu’on le veut ce
qui permet de se restreindre au cas où A ≥ 0).
왘
Alors, n étant positif, n 2 ≥ A ⇔ n ≥ A et, en choisissant N l’entier qui
suit
A
on obtient que si n ≥ N alors n 2 ≥ A ce qui signifie que
lim n 2 = +∞.
n →+∞
b) À l’aide d’un tableur ou de la calculatrice, il semble que la suite (un ) tende
vers −∞.
120
80
40
50
0
100
150
–40
–80
–120
Pour n ∈N , un ≤ −100 ⇔
101− n 2
≤ −100 ⇔ 101− n 2 ≤ −100(2n + 1)
2n + 1
⇔ n 2 − 200n − 201 ≥ 0.
Le trinôme x 2 − 200 x − 201 a pour discriminant ∆ = 40804 = 2022 et donc pour
racines −1 et 201.
De plus, x 2 − 200 x − 201 est positif à l’extérieur de ses racines et n ≥ 0 donc
pour tout n ≥ 201, un ≤ −100.
Pour n ∈N , un ≤ A ⇔
101− n 2
≤ A ⇔ 101− n 2 ≤ A(2n + 1)
2n + 1
⇔ n 2 + 2An − 101+ A ≥ 0.
Séquence 1 – MA02
35
© Cned - Académie en ligne
Le trinôme x 2 + 2Ax − 101+ A a pour discriminant ∆ = 4 A 2 − 4 A + 404.
Le trinôme 4 A 2 − 4 A + 404 a lui même un discriminant strictement négatif
(–6448<0) donc il ne s’annule pas de sorte que pour tout A ∈R , ∆ > 0.
Ainsi, x 2 + 2Ax − 101− A a pour racines
− A − A 2 − A + 101 et − A + A 2 − A + 101 .
En remarquant que − A − A 2 − A + 101 ≤ − A + A 2 − A + 101 et sachant
que x 2 + 2Ax − 101− A est positif à l’extérieur de ses racines, on a
x 2 + 2Ax − 101− A ≥ 0 pour x ≥ − A + A 2 − A + 101 . On peut enfin remarquer
que dès que A ≤ 0 , − A + A 2 − A + 101 ≥ 0 comme somme de deux nombres
positifs.
Finalement, en notant N l’entier qui suit − A + A 2 − A + 101 , on a pour
tout n ≥ N , un ≤ A donc lim un = −∞.
n →+∞
Limites de suites usuelles
Propriété 5
On a : lim
n →+∞
n = +∞ , lim n = +∞ , lim n 2 = +∞ , lim n 3 = +∞
n →+∞
n →+∞
n → +∞
et plus généralement lim n k = +∞ où k ∈N∗.
n →+∞
b) Opérations sur les limites
On admet les propriétés intuitives suivantes.
Propriété 6
Somme
Soient (un) et (vn) deux suites dont les rôles peuvent être inversés.
La limite de la somme un + v n
lim v n
n →+∞
lim un
n →+∞
+h
+h
+h
–h
ᐉ
36
© Cned - Académie en ligne
Séquence 1 – MA02
–h
–h
+h
–h
Remarque
Une case coloriée signifie qu’on est en présence de « formes indéterminées »,
c’est-à-dire que la propriété ne permet pas de conclure puisque le résultat dépend
de la situation dans laquelle on se trouve.
Pour illustrer la situation, considérons les exemples suivants.
Prenons un = 3n et v n = −n.
Il est clair que
(
lim un = +∞ et que lim v n = −∞ or un + v n = 2n de sorte
n →+∞
n →+∞
)
que lim un + v n = +∞.
n →+∞
Prenons maintenant un = 2n et v n = −3n .
Comme précédemment lim un = +∞ et lim v n = −∞ mais un + v n = −n et
n →+∞
n →+∞
)
(
on obtient lim un + v n = −∞.
n →+∞
Enfin, prenons un = n + 2 et v n = −n + 1 . Encore une fois lim un = +∞
n →+∞
(
)
et lim v n = −∞ avec un + v n = 3 et cette fois-ci lim un + v n = 3.
n →+∞
n →+∞
On constate que la conclusion dépend du cas dans lequel on se trouve.
Propriété 7
Produit
Soient (un ) et (v n ) deux suites dont les rôles peuvent être inversés.
La limite du produit un × v n
lim v n
n →+∞
+h
–h
+h
+h
–h
–h
–h
+h
ᐉ (ᐉ>0)
+h
–h
ᐉ (ᐉ<0)
–h
+h
lim un
n →+∞
0
Remarques
d
l
fi qu’on
’ est en présence de
d
z Comme précédemment,
une case coloriée
signifie
« formes indéterminées », c’est-à-dire que la propriété ne permet pas de
conclure puisque le résultat dépend de la situation dans laquelle on se trouve.
Pour illustrer la situation, considérons les exemples suivants.
Séquence 1 – MA02
37
© Cned - Académie en ligne
un =
1
et v n = n. On a
lim un = 0 et
lim v n = +∞
n →+∞
n →+∞
n2
1
or un × v n = de sorte que lim (un × v n = 0.
n
n →+∞
1
et v n = n 3 . Comme précédemment lim un = 0
Prenons maintenant un =
2
n →+∞
n
et lim v n = +∞ mais un × v n = n et on obtient lim (un × v n = +∞.
Prenons
)
n →+∞
)
n →+∞
un =
1
et v n = n 2 . Encore une fois
lim un = 0
n →+∞
n
et lim v n = +∞ mais un × v n = 1 et on obtient lim (un × v n = 1.
n →+∞
n →+∞
Enfin, prenons
2
)
On constate que la conclusion dépend du cas dans lequel on se trouve.
z Lorsque l’une des suites converge vers un réel et que l’autre diverge en
ayant pour limite +∞ ou −∞, on sait que le produit tend vers l’infini mais il
est nécessaire d’argumenter en précisant le signe de pour pouvoir conclure.
lim un = 2 et
Par exemple, si
(
)
n →+∞
lim v n = −∞ alors on en déduit
n →+∞
lim un × v n = −∞ alors que si lim un = −2 et
n →+∞
en déduit que lim (un × v n ) = +∞ .
que
n →+∞
n →+∞
Propriété 8
Inversion
Soient (un ) une suite.
38
© Cned - Académie en ligne
Séquence 1 – MA02
lim v n
n →+∞
1
lim
n →+∞ v n
+h
0
–h
0
(≠0)
1
0+
+h
0−
−∞
lim v n = −∞ ,
n →+∞
on
Remarques
Lorsqu’une suite (v n ) ne s’annulant pas à partir d’un certain rang, tend vers 0 et
garde un signe constant au voisinage de l’infini (c’est-à-dire à partir d’un certain
rang), son inverse tend vers l’infini et la connaissance du signe de v n pour n au
voisinage de +∞ permet de conclure.
1
Par exemple, pour v n = , on a lim v n = 0 or, pour n > 0 , v n > 0 donc on en
n
n →+∞
1
1
déduit que lim = +∞ (ce qui est aisément vérifiable car
= n ).
vn
n →+∞ v n
1
, on a lim v n = 0 or, pour n > 1, v n < 0 donc on
Alors que pour v n =
1− n
n →+∞
1
en déduit que lim = −∞ (ce que l’on peut obtenir en remarquant
n →+∞ v n
1
= 1− n ).
que
vn
Pour préciser qu’une suite tend vers 0 en étant strictement positive pour n au
voisinage de +∞, on peut noter lim v n = 0+ ce qui signifie que lim v n = 0
n →+∞
n →+∞
avec v n > 0 pour n suffisamment grand.
De façon analogue, pour préciser qu’une suite tend vers 0 en étant strictement
négative pour n au voisinage de +∞, on peut noter lim v n = 0− ce qui signifie
n →+∞
que lim v n = 0 avec v n < 0 pour n suffisamment grand.
n →+∞
Quotient
Propriété 9
Soient (un ) et (v n ) deux suites.
u
La limite du quotient n
vn
lim v n
n →+∞
+∞
−∞
0+
0−
' ( ' ≠ 0 )
+∞
+∞
−∞
+∞ ou −∞
−∞
0
−∞
+∞
0
0
(>0 )
0
0
+∞
−∞
+∞ ou −∞
0
'
(<0 )
0
0
−∞
+∞
lim un
n →+∞
'
Séquence 1 – MA02
39
© Cned - Académie en ligne
Remarques
u
1
Puisque n = un × , on notera que :
vn
vn
z les différentes formes indéterminées observées ici découlent des cas
d’indétermination constatées dans le cas des limites par produit et par
inversion ;
z comme précédemment, on peut parfois conclure à une limite infinie mais le
choix entre +∞ ou −∞ résulte de l’étude du signe des suites pour de grandes
valeurs de n.
왘
Exemple 13
Déterminer la limite des suites de terme général :
2
3
an = 3n + n + 5, bn = 8n − n , c n =
왘
Solution
3n 2 − n
1− n
n −n
, d n = n − n et en =
.
2n + 1
2
z On a : lim n 2 = +∞ donc lim 3n 2 = +∞ puis lim n = +∞ donc
n →+∞
n →+∞
)
n →+∞
lim (n + 5 = +∞ ainsi, par somme : lim an = +∞.
n →+∞
n →+∞
z Le raisonnement ci-dessus conduit à une indétermination, il est donc nécessaire
de transformer l’expression de bn .
(
)
d’autre
part
Par exemple, pour n ∈ : bn = 8n − n 3 = n 8 − n 2 .
D’une
part
( )
lim n = +∞
n →+∞
lim −n 2 = +∞ puis
n →+∞
et,
lim n 2 = +∞
n →+∞
donc
8 − n 2 ) = −∞ .
(
n →+∞
lim
Finalement, par produit : lim bn = −∞.
n →+∞
8
On remarque que la transformation bn = 8n − n 3 = n 3 − 1 pour n > 0
n2
permettait aussi de conclure.
On remarque que, dans ce cas, la transformation d’écriture effectuée sur bn
est une factorisation par le monôme de plus haut degré, démarche que l’on a
déjà rencontrée précédemment.
z Dans cet exemple, on peut montrer que le numérateur tend vers +∞ alors que le
dénominateur tend vers −∞ ce qui est un cas d’indétermination. On transforme
alors c n en factorisant numérateur et dénominateur par le monôme de plus
1
1
n 2(3 − ) 3 −
3n 2 − n
n =
n .
haut degré. Pour n >0, c n =
=
2
1
1
1− n
n 2 ( − 1)
−1
n2
n2
1
1
1
= 0 donc lim 3 − = 3 et, d’autre part lim
=0
n
n →+∞ n
n →+∞
n →+∞ n 2
1
donc lim − 1 = −1.
n →+∞ n 2
D’une part lim
40
© Cned - Académie en ligne
Séquence 1 – MA02
Par quotient, on a donc lim c n = −3. La suite (c n ) est donc convergente.
n →+∞
z Pour n ∈N , d n = n − n
or
lim
n →+∞
n = +∞ et
lim n = +∞ donc les
n →+∞
opérations sur les limites ne permettent pas de conclure, nous sommes face à
un cas d’indétermination et il est nécessaire de transformer l’expression de d n
pour lever cette indétermination. On remarque que n tend plus vite vers +∞
que n tend vers +∞ . Ainsi, l’idée est d’adopter la démarche rencontrée cidessus en factorisant d n par le terme dominant, c’est-à-dire celui qui tend le
plus vite vers +∞ .
1
n > 0 , dn = n − n = n
− 1
or
lim n = + ∞
Alors,
pour
n
n →+∞
1
et lim
− 1 = −1 donc par produit lim d n = −∞.
n →+∞ n
n →+∞
On remarque que c’est une transformation possible de d n car on pouvait
(
)
aussi écrire que pour n ∈N , d n = n − n = n 1− n or
(
)
et lim 1− n = −∞ donc par produit lim d n = −∞.
n →+∞
n →+∞
lim
n →+∞
n = +∞
1
1
− 1
n
−1
n
n −n
n
=
=
.
z Pour n > 0, en =
1
2n + 1
1
2+
n 2+
n
n
1
1
On montre que lim
− 1 = −1 et que lim 2 + = 2 donc par
n
n →+∞ n
n →+∞
1
quotient, la suite (en ) est convergente et admet pour limite – .
2
Point méthode
Pour lever des indéterminations lors du calcul de limites en +∞,on est fréquemment amené à factoriser l’expression de départ par le terme dominant.
En particulier :
z lorsque un est une expression polynomiale en n, c’est-à-dire lorsque
un = ap × n p + ap −1 × n p −1 + ... + a1 × n + a0
où les coefficients ai sont des réels, on pensera lorsque c’est nécessaire, à
factoriser un par le monôme de plus haut degré à savoir par ap × n p ou par n p ;
z lorsque un est une expression rationnelle en n, c’est-à-dire lorsque un est
le quotient de deux expressions polynomiale en n, on pensera lorsque c’est
nécessaire à factoriser le numérateur et le dénominateur par leur monôme de
plus haut degré.
Séquence 1 – MA02
41
© Cned - Académie en ligne
c) Théorèmes de comparaison
Comparaison à l’infini
Propriété 10
Les suites (un ) et (v n ) sont telles qu’à partir d’un certain rang, un ≤ v n .
z Si lim un = +∞ alors lim v n = +∞.
n →+∞
n →+∞
z Si lim v n = −∞ alors lim un = −∞.
n →+∞
n →+∞
Démonstration
z À partir d’un certain rang, un ≤ v n or lim un = +∞ donc, étant donné un
n →+∞
réel A quelconque, on peut trouver un rang N au delà duquel un > A et
un ≤ v n . Par suite, pour tout n ≥ N , v n > A. On en déduit que lim v n = +∞.
n →+∞
z Le deuxième point peut se démontrer de façon analogue ou bien on peut se
ramener à utiliser ce que l’on vient de démontrer. En effet, on remarque qu’à
( )
( )
n →+∞
partir d’un certain rang −v n ≤ −un or lim v n = −∞ donc lim −v n = +∞
n →+∞
n →+∞
et le point démontré précédemment permet d’affirmer que lim −un = +∞
ou encore lim un = −∞.
n →+∞
왘
Exemple 14
Déterminer la limite des suites de terme général :
an = n 2 + ( − 1)n et bn = 2cos n − n 3 .
왘
Solution
)
( )
n
z Pour n ∈N , − 1 ≤ ( −1 ≤ 1 donc n 2 − 1 ≤ an ≤ n 2 + 1 or lim n 2 − 1 = +∞
donc, par comparaison à l’infini, lim an = +∞.
n →+∞
n →+∞
(
)
z Pour n ∈N , − 2 ≤ 2cos n ≤ 2 donc −2 − n 3 ≤ bn ≤ 2 − n 3 or lim 2 − n 3 = −∞
n →+∞
donc, par comparaison à l’infini, lim bn = −∞.
n →+∞
42
© Cned - Académie en ligne
Séquence 1 – MA02
3. Exemples de suites divergentes n’ayant
pas de limite
Il y deux types de suites divergentes, celles qui ont pour limite ±∞ ainsi qu’on a
pu le voir dans le paragraphe 2 et celles qui n’ont pas de limite.
왘
Exemple 15
Montrer que la suite de terme général un = ( − 1)n est une suite divergente,
n’admettant pas de limite.
Solution
Pour tout n ∈N , − 1 ≤ un ≤ 1 donc (un ) est bornée et ne peut donc avoir de
limite infinie.
왘
Supposons désormais que la suite (un ) admette pour limite un certain réel
1
1
autrement
. Alors, il existe un rang N au delà duquel − < un < +
2
2
1
1
dit, pour tout n ≥ N : − < ( − 1)n − < . Cette double inégalité conduit
2
2
3
1
1
3
à − < < − lorsque n est impair et à < < lorsque n est pair d’où une
2
2
2
2
contradiction. L’hypothèse émise au départ est donc fausse et la suite (un ) n’a
pas de limite.
왘
Exemple
Sans démonstration et en se contentant de conjectures à l’aide de représentations
graphiques, on peut remarquer que :
z la suite de terme général un = sinn est divergente et n’a pas de limite ;
z la suite de terme général v n = n cos n est divergente et n’a pas de limite ;
z la suite (w n ) définie par la relation de récurrence w n +1 = 1− w n2 pour
1
tout n ∈ et w 0 = est divergente et n’a pas de limite.
2
Séquence 1 – MA02
43
© Cned - Académie en ligne
4. Cas des suites géométriques
Propriété 11
Soit q un réel.
z Si q > 1 alors la suite de terme général q n est divergente et
on a lim q n = +∞.
n →+∞
z Si −1 < q < 1 alors la suite de terme général q n est convergente et
on a lim q n = 0.
n →+∞
z Si q ≤ −1 alors la suite de terme général q n est divergente et n’a pas de
limite.
Propriété préliminaire
Inégalité de Bernoulli
Pour tout réel x positif et pour tout entier naturel n, on a : (1+ x
)n ≥ 1+ nx .
Démonstration de l’inégalité de Bernoulli
Soit x un réel positif, démontrons par récurrence que la proposition
(1+ x )n ≥ 1+ nx est vraie pour tout n ∈.
Initialisation : on a (1+ x )0 = 1 et 1+ 0 × x = 1 donc la proposition est vraie au
rang initial n = 0.
Hérédité : soit k ∈ tel que (1+ x ) ≥ 1+ kx . Comme x ≥ 0, on a 1+ x ≥ 0
k
donc, en multipliant chaque membre de l’inégalité constituant l’hypothèse de
récurrence, on a : (1+ x )k +1 ≥ (1+ kx )(1+ x ) or (1+ kx )(1+ x ) = 1+ (k + 1)x + kx 2 .
Comme kx 2 ≥ 0 , on a (1+ kx )(1+ x ) ≥ 1+ (k + 1)x d’où (1+ x
La proposition est donc héréditaire.
)k +1 ≥ 1+ (k + 1)x .
Conclusion : pour tout réel x positif et pour tout entier naturel n, on a :
(1+ x )n ≥ 1+ nx .
44
© Cned - Académie en ligne
Séquence 1 – MA02
Point historique
Nous venons de démontrer l’inégalité de Bernoulli que Jacques Bernoulli
(Bâle, 1654-1705) démontra en 1689. Cependant, on peut noter que l’on
rencontre ce résultat dès 1670 chez Isaac Barrow (Londres, 1630-1677).
Jacques Bernoulli est le premier d’une lignée de mathématiciens suisses.
Il s’est intéressé à différentes branches des mathématiques dont, par
exemple, celle des probabilités. Dans ce domaine on lui doit, par exemple,
une démonstration rigoureuse de la loi faible des grands nombres pour le
jeu de pile ou face dont découlent les notions d’épreuve de Bernoulli et de
loi de Bernoulli abordées en première.
Démonstration des propriétés concernant les limites de suites
géométriques
z Soit q > 1.
En posant x = q − 1, on a x > 0 et, par l’inégalité de Bernoulli :
q n = (1+ x ) ≥ 1+ nx .
n
)
Comme x > 0, lim (1+ nx = +∞ puis, par comparaison, on en déduit que
n →+∞
lim q n = +∞.
n →+∞
z Soit −1 < q < 1.
Le résultat est évident lorsque q = 0. Plaçons nous dans le cas où −1 < q < 1
1
et q ≠ 0. Alors on a
> 1 et, par le résultat précédent, on obtient
q
1
n
lim
= +∞ puis, par inversion lim q = 0 d’où lim q n = 0.
n
n →+∞ q
n →+∞
n →+∞
z Soit q ≤ −1.
On a −q ≥ 1 donc la suite de terme général ( − q )n est divergente et admet
pour limite +∞ ce qui signifie que, pour tout réel A que l’on peut choisir positif
et aussi grand que l’on veut, il existe un rang N au delà duquel ( − q )n > A .
Lorsque n est pair, ( − q )n = q n donc, pour tout entier n pair supérieur à N,
on a q n > A alors que lorsque n est impair, ( − q )n = −q n donc, pour tout
entier n impair supérieur à N, on a −q n > A ou encore q n < − A . La suite de
terme général q n n’est donc ni majorée, ni minorée, elle ne peut donc pas être
convergente. Il apparaît plus précisément qu’elle n’a pas de limite.
Séquence 1 – MA02
45
© Cned - Académie en ligne
300
A = 200
250
200
y=A
150
100
50
0
0
2
4
6
8
10
12
14
16
18
20
22
–50
–100
–150
–200
y = –A
–250
–300
왘
Exemple 16
Déterminer les limites éventuelles des suites de terme général :
an = 1− 5 , bn = ( 2 + n )
n
왘
Solution
n
n
k
1
et c n = ∑ .
3
k =0
z On a lim 5n = +∞ car 5 > 1 donc lim an = −∞.
n →+∞
n →+∞
z Pour tout n ≥ 0, 2+n ≥ 2 donc (2 + n )n ≥ 2n or lim 2n = +∞ car 2 > 1 donc,
par comparaison lim bn = −∞.
n →+∞
n →+∞
z Le réel c n
est la somme des n + 1 premiers termes d’une suite
géométrique de raison
n +1
1
et de terme initial 1. Donc, pour tout n ∈N ,
3
1
1−
n +1
n +1
1
1
3
3
1
=0
cn = 1×
= × 1− or −1 < < 1 donc lim
3
n →+∞ 3
1
2 3
1−
3
n +1
1
= 1 et par produit, on en déduit que lim c = 3 .
puis lim 1−
n 2
n →+∞ 3
n →+∞
46
© Cned - Académie en ligne
Séquence 1 – MA02
5. Cas des suites monotones
Propriété 13
z Si une suite (un ) est croissante et non majorée alors lim un = +∞.
n →+∞
z Si une suite (un ) est décroissante et non minorée alors lim un = −∞.
n →+∞
Démonstration
z Dire que (un ) n’est pas majorée signifie que, pour tout réel A, on peut trouver
un rang N tel que uN > A or la suite (un ) est croissante donc pour tout
n ≥ N , un ≥ uN et, par suite, pour tout n ≥ N , un > A ce qui prouve que
lim un = +∞.
n →+∞
z Le deuxième point peut être démontré en utilisant un raisonnement analogue
ou bien en appliquant le résultat prouvé ci-dessus à la suite de terme général
Théorème 2
−un .
Remarque
Convergence monotone
z Si une suite est croissante et majorée alors elle est convergente.
z Si une suite est décroissante et minorée alors elle est convergente.
z On admet ce théorème.
z Ce théorème permet de prouver la convergence d’une suite mais n’en donne
pas la limite.
왘
Exemple 17
Soit (un ) la suite définie sur
par : u0 = 10 et un +1 = un + 6 pour tout n ≥ 0.
Dans les exemples 5 et 6 du chapitre 2 (Le raisonnement par récurrence),
nous avons montré que (un ) est une suite décroissante et que, pour
tout n ≥ 0, 3 ≤ un ≤ 10. La suite (un ) est ainsi une suite décroissante et minorée
par 3 donc (un ) est convergente d’après le théorème de la convergence
monotone.
Séquence 1 – MA02
47
© Cned - Académie en ligne
Par ailleurs, on sait que pour tout n ≥ 0, 3 ≤ un ≤ 10 donc en notant la limite
de la suite (un ) , on peut en déduire par passage à la limite que 3 ≤ ≤ 10.
À ce stade de l’étude, on dispose donc de la convergence de la suite (un ) ainsi que
d’un encadrement de la limite mais on n’a aucune information supplémentaire
quant à sa valeur.
C
Exercice 7
Exercices d’apprentissage
Déterminer la limite éventuelle des suites de terme général :
an = 3n 2 − n +
1
1− 3n 2
; bn = (1− 3n )(n 2 + n − 2) ; c n =
;
n
(n + 1)(n − 2)
n
1
1 1
1
1
d n = 1+ + + ... +
; en = − + 3 ; fn =
;
7 72
2
7n
n + 5n
g n = 2n + 2n + 2 − 2n + 3 ; hn = 3n − 7n .
Exercice 8
Déterminer la limite de la suite (u ) définie par u =
n
n
n n − 1000
pour n ≥ 1.
n
a) Soit A un réel. Justifier l’existence d’un rang N au delà duquel u ≥ A.
n
b) Montrer que (un ) est croissante.
c) Écrire un algorithme donnant le plus petit rang N à partir duquel tous les
termes de la suite (un ) appartiennent à l’intervalle A ; + ∞ où A est un
réel quelconque.
Exercice 9
Déterminer la limite des suites définies par leur terme général :
2
n
an = 2n − ( − 1) ; bn = sin
Exercice 10
Pour n ≥ 2, on définit (un ) par un = 3 +
Montrer que, pour tout n ≥ 2,
( )
En déduire la limite de un .
48
© Cned - Académie en ligne
( )
n
3
n + cos n
n − n ; c n = sin n ; d n =
.
3 − 2n
4
3
Séquence 1 – MA02
n
n + ( − 1)n
.
n
n
≤ un − 3 ≤
.
n +1
n −1
Exercice 10
Étudier la convergence de la suite (un ) définie sur
un =
par
1
1
1
+
+ ... + .
n +1 n + 2
2n
Indication :
On pourra montrer que (un ) est croissante et majorée.
Séquence 1 – MA02
49
© Cned - Académie en ligne
4 Synthèse
A
Synthèse de la séquence
Le principe de récurrence
Soit une proposition n dépendant d’un entier naturel n.
Pour démontrer que n est vraie pour tout entier n ≥ n0 , il suffit de
montrer que :
La proposition est vraie au rang n ;
0
(
)
pour un entier k quelconque k ≥ n , vraie entraîne 0
k
k +1 vraie.
Définition
On dit qu’une suite (un ) admet pour limite un réel lorsque tout intervalle
ouvert contenant contient tous les termes de la suite à partir d’un certain
rang.
On note alors lim un = .
n →+∞
Lorsqu’une suite (un ) admet une limite finie, on dit qu’elle est convergente
(ou qu’elle converge).
Dans le cas contraire, on dit qu’elle est divergente.
Propriété
z lim
1
n →+∞ n
Limites de suites convergentes usuelles
1
1
1
= 0, lim
= 0, lim
=0
n →+∞ n
n →+∞ n 2
n → +∞ n 3
= 0, lim
et plus généralement lim
1
n →+∞ n k
= 0 où k ∈N∗.
z Toute suite constante de terme général égal à est convergente vers .
Séquence 1 – MA02
51
© Cned - Académie en ligne
Propriété
Unicité de la limite d’une suite convergente
Si une suite converge alors sa limite est unique.
Propriété
Opération sur les limites de suites convergentes
Soient ( un ) et ( vn ) deux suites convergentes de limites respectives et ′ .
On admet les résultats suivants :
z la suite de terme général un + v n est convergente et a pour limite + ' ;
z la suite de terme général un × v n est convergente et a pour limite × ' ;
z la suite de terme général k × un où k est un réel est convergente et a
pour limite k × ;
zsi v n ne s’annule pas à partir d’un certain rang et si ' ≠ 0 alors la suite
u
de terme général n est convergente et a pour limite
.
vn
'
Propriété
Compatilité avec l’ordre
Soient (un) et (vn) sont deux suites convergentes de limites respectives et ′ .
Si, à partir d’un certain rang, on a un < v n (ou bien un ≤ v n ) alors ≤ ′.
왘Conséquence
Si (un )n ≥ n est une suite croissante et convergente vers alors, pour
0
Théorème
tout n ≥ n0 , un ≤ .
52
© Cned - Académie en ligne
Théorème des gendarmes
)
( )
On considère trois suites (un , et w n .
Si (un ) et (w n ) sont convergentes vers un même réel et si, à partir d’un
certain rang, un ≤ v n ≤ w n alors (v n ) est elle aussi convergente vers .
Séquence 1 – MA02
Définition
Suites divergentes de limite infinie
On dit qu’une suite (un) admet pour limite +∞ si tout intervalle de la forme
A ; + ∞ où A est un réel, contient tous les termes de la suite à partir d’un
certain rang. On note alors lim un = +∞.
n →+∞
De façon analogue, on dit qu’une suite (un) admet pour limite −∞ si tout
intervalle de la forme −∞; A où A est un réel, contient tous les termes de
la suite à partir d’un certain rang. On note alors lim un = −∞.
n →+∞
Dans un cas comme dans l’autre, on dit que la suite est divergente.
Propriété
Limites de suites divergentes usuelles
On a : lim
n = +∞ , lim n = +∞ , lim n 2 = +∞ , lim n 3 = +∞
n →+∞
n →+∞
n → +∞
n →+∞
et plus généralement lim n k = +∞ où k ∈N∗.
n →+∞
Propriétés
Limite d’une somme
som
La limite de la somme un + v n
lim v n
n →+∞
lim un
+∞
–∞
n →+∞
+∞
–∞
+∞
+∞
–∞
–∞
Limite d’un produit
La limite du produit un × v n
lim v n
lim un
n →+∞
n →+∞
+∞
–∞
0
( > 0)
( < 0)
+∞
–∞
+∞
–∞
–∞
+∞
+∞
–∞
–∞
+∞
Séquence 1 – MA02
53
© Cned - Académie en ligne
Inversion
lim v n
n →+∞
1
lim
n →+∞ v n
+∞
0
–∞
0
(≠0)
1
0+
+∞
0−
–∞
Limite d’un quotient
u
La limite du quotient n
vn
lim v n
n →+∞
+∞
–∞
0+
0−
' ( ' ≠ 0 )
+∞
+∞
–∞
+∞ ou –∞
–∞
–∞
+∞
+∞ ou –∞
lim un
n →+∞
0
( > 0)
( < 0)
Propriété
0
0
0
0
0
+∞
–∞
–∞
+∞
'
Comparaison en + h
Les suites (un ) et (v n ) sont telles qu’à partir d’un certain rang, un ≤ v n .
z Si lim un = +∞ alors lim v n = +∞.
n →+∞
n →+∞
z Si lim v n = −∞ alors lim un = −∞.
n →+∞
n →+∞
54
© Cned - Académie en ligne
Séquence 1 – MA02
Propriété
Cas de suites géométriques
Soit q un réel.
z Si q > 1 alors la suite de terme général q n est divergente et on a
lim q n = +∞.
n →+∞
z Si −1 < q < 1 alors la suite de terme général q n est convergente et on a
lim q n = 0.
n →+∞
z Si q ≤ −1 alors la suite de terme général q n est divergente et n’a pas de
limite.
Propriété
Cas de suites monotones divergentes
z Si une suite (un ) est croissante et non majorée alors lim un = +∞.
n →+∞
Théorème
z Si une suite (un ) est décroissante et non minorée alors lim un = −∞.
n →+∞
B
Exercice I
Convergence monotone
z Si une suite est croissante et majorée alors elle est convergente.
z Si une suite est décroissante et minorée alors elle est convergente.
Exercices de synthèse
9
Soit (un ) la suite définie par u 0 = −3 et un +1 =
6−u
pour n ≥ 0.
n
9
Démontrer que la fonction f définie sur −∞ ; 6 par f (x ) =
est
6− x
strictement croissante sur −∞ ; 6 .
a) Démontrer que, pour tout n ∈ , on a u < 3 et que la suite (u ) est
n
n
croissante.
b) Que peut-on en déduire quant à la convergence de la suite (un ) ?
Séquence 1 – MA02
55
© Cned - Académie en ligne
1
Soit (v ) la suite définie par v =
n
n u − 3 pour n ≥ 0.
n
a) Montrer que (v n ) est une suite arithmétique dont on précisera la raison et
le premier terme.
b) Déterminer la limite de la suite (v n ) puis, après avoir exprimer un en
fonction de v n , conclure quant à la limite de un .
( )
Exercice II
On définit la suite (un ) par son premier terme u 0 ≠ −2 et la relation de
u +6
récurrence un +1 = n
.
un + 2
Montrer qu’il existe deux valeurs de u tels que la suite (u ) soit constante.
0
n
On notera a et b (avec a > b ) ces deux valeurs.
x +6
.
x +2
a) Étudier la fonction f, tracer sa courbe représentative ainsi que la droite
d’équation y = x sur l’intervalle [0 ; 5] et construire les quatre premiers
termes de la suite (un ) en choisissant u 0 = 0.
b) Que peut-on conjecturer dans ce cas quant au comportement de la suite (un ?
c) À l’aide du logiciel Geogebra ou d’un tableur, conjecturer le comportement de
la suite (un selon la valeur du terme initial u 0 ≠ 2.
Soit f la fonction définie par f (x ) =
)
)
Montrer que si u est différent b alors, pour tout n ∈N , il en est de même
0
pour un .
u −a
On choisit u ≠ b et, pour n ∈N , on pose v = n
0
n u −b .
n
Exprimer v n +1 en fonction de v n . En déduire l’expression de v n en fonction
de n, celle de un en fonction de n puis la limite de un quand n tend vers +∞.
Exercice III
Soit f la fonction définie sur
variation de f sur
R.
par f ( x ) = 1,6x − 1,6x 2 . Etudier le sens de
On considère la suite (u ) définie par u = 0 ,1 et u
n
0
n +1 = 1, 6un (1− un ) pour
tout n ∈N.
Dans le plan rapporté à un repère orthonormal, on dispose de la représentation
graphique de la courbe d’équation y = f ( x ).
Construire en abscisse les cinq premiers termes de la suite (un ) en laissant
apparents les traits de construction.
Quelles conjectures peut-on formuler concernant les variations et l’éventuelle
convergence de la suite (un ) ?
56
© Cned - Académie en ligne
Séquence 1 – MA02
0,4
0,3
0,2
0,1
0
0
0,1
0,2
0,3
0,4
0,5
0,6
0,7
0,8
0,9
1
3
8
b) Que peut-on en déduire concernant la convergence de la suite (un ) ?
a) Démontrer que pour tout n ∈N , on a 0 ≤ un ≤ un +1 ≤ .
a) Montrer que pour tout n ∈N , on a
que
3
3
− un +1 ≤ 0, 84 − un .
8
8
5
3
3
− un +1 = 1, 6 − un − un puis
8
8
8
b) Montrer par récurrence que pour tout n ∈N , on a
( )
3
− u ≤ 0, 84n .
8 n
c) Déterminer la limite de la suite un .
Exercice IV
Répondre par VRAI ou FAUX aux affirmations suivantes en justifiant les réponses.
Toute suite décroissante est majorée.
Toute suite décroissante et minorée par 0 a pour limite 0.
Toute suite croissante et majorée est bornée.
Toute suite qui admet pour limite +∞ n’est pas majorée.
Si (u ) et (v ) sont des suites convergentes telles que pour tout
n
n
n ∈N , un < v n alors
lim un < lim v n .
n →+∞
n →+∞
Exercice V
Dans chacun des cas suivants, déterminer lorsque c’est possible et en justifiant,
une suite (un ) non constante dont tous les termes sont strictement positifs, qui
converge vers la valeur 2012 et qui vérifie la condition indiquée.
On a : u = f (n ) où f est une fonction homographique.
n
Séquence 1 – MA02
57
© Cned - Académie en ligne
La suite (u ) est géométrique.
n
La suite (u ) est la suite des sommes des n premiers termes d’une suite
n
géométrique.
La suite (u ) est arithmétique.
n
Exercice VI
On se propose de calculer l’aire sous la courbe représentant la fonction carré sur
l’intervalle [0 ; 1], c’est-à-dire l’aire du domaine limité par la représentation
graphique de la fonction carrée, l’axe des abscisses ainsi que les droites
d’équations x = 0 et x = 1.
1
y = x2
0
0 1/n 2/n 3/n 4/n 5/n 6/n
(n)–2 (n)–1
n
n
1
Pour cela, on partage l’intervalle [0 ; 1]
1
en n intervalles de longueur
(où n
n
est un entier supérieur à 1) sur lesquels
on construit n rectangles situés sous la
courbe et n rectangles contenant .
On note un l’aire totale des rectangles
situés sous la courbe et v n l’aire
totale des rectangles contenant le
domaine . On obtient ainsi deux
suites (un ) et (v n ) encadrant l’aire A
cherchée.
Ainsi, pour tout n ≥ 1, on a : un ≤ A ≤ v n .
Illustrer la situation à l’aide du logiciel Geogebra afin de conjecturer le résultat.
Indications pour le faire
Représenter la fonction f définie sur [0 ; 1] par f ( x ) = x 2 , créer un curseur
n prenant des valeurs entières puis définir les suites (un ) et (v n ) en tapant
respectivement dans la barre de saisie u_n=sommeinférieure [f,0,1,n] et
v_n=sommesupérieure[f,0,1,n]. Il suffit alors de choisir différentes valeurs
pour n pour observer le comportement des les suites (un ) et v n .
( )
a) Vérifier que, pour n ≥ 1, u =
n
n
2 et v = 1
k2 .
k
∑
∑
n
n 3 k =1
n 3 k =1
1 n
n
b) Démontrer par récurrence que, pour tout n ≥ 1,
∑ k2 =
k =1
n (n + 1)(2n + 1)
6
et en déduire l’expression de un et de v n en fonction de n.
c) Calculer la limite de chacune de ces suites et en déduire l’aire A cherchée
en unités d’aire.
58
© Cned - Académie en ligne
Séquence 1 – MA02
Exercice VII
On considère la suite (un ) définie pour tout entier naturel non nul par :
n
k
n
1
2
un = ∑
=
+
+ ... +
.
2
nk
+
n
+
n
+
1
1
2
1
n
+
1
k =1
Calculer u , u et u .
1 2
3
a) Soit n ≥ 1. Montrer que, pour tout entier k
tel que 1≤ k ≤ n , on a
k
1
1
≤
≤ .
n + 1 nk + 1 n
Indications
On pourra remarquer que pour tout entier k tel que 1≤ k ≤ n , on a
1
k
=
.
1
nk + 1
n+
k
n
b) En déduire que, pour tout n entier strictement positif, on a
≤ u ≤ 1.
n +1 n
c) Étudier alors la convergence de la suite un .
( )
a) Pourquoi peut-on affirmer qu’il existe un entier p strictement positif tel que,
pour tout entier n ≥ p , on a un − 1 < 10−2 ?
À l’aide de la double inégalité obtenue à la question b), déterminer une
condition suffisante sur p pour que un − 1 < 10−2 soit vérifiée pour tout
entier n ≥ p.
b) Écrire et implémenter sous Algobox ou sur la calculatrice un algorithme
permettant de calculer u p où p est l’entier obtenu à la question 3.a.
Donner une valeur approchée près du réel u p .
c) Écrire et implémenter sous Algobox ou sur la calculatrice un algorithme
permettant de déterminer le plus petit entier p strictement positif tel que,
pour tout entier n ≥ p , on a un − 1 < 10−2 et d’afficher la valeur de u p
correspondante. Donner les valeurs de p et de u p obtenues dans ce cas.
d) Comment expliquer les valeurs différentes que l’on obtient aux questions
3.a et 3.c ?
Exercice VIII
L’objectif est de comparer la vitesse à laquelle les suites ( n ! ) et ( n n ) tendent
vers +∞.
n!
Soit la suite (u ) définie pour n ≥ 1 par u =
.
n
n
nn
Calculer les valeurs de un pour des valeurs de n égales à 1, 2, 3, 10 et 100.
Que peut-on conjecturer ?
Séquence 1 – MA02
59
© Cned - Académie en ligne
On rappelle l’inégalité de Bernoulli : pour tout réel x positif et pour tout entier
n
naturel n, on a : (1+ x
)
≥ 1+ nx .
Montrer que pour tout n ≥ 1, on a
un
1
≥ 2. En déduire que un ≤
.
un + 1
2n −1
Déterminer la limite de (u ) puis conclure quant aux vitesses de convergence
n
n
des les suites ( n ! ) et (n ).
n
Exercice IX
Soit (un ) la suite définie pour n ≥ 1 par un = ∑
1
k =1 k
.
( )
L’objectif est de déterminer la limite de la suite un
laquelle un tend vers cette limite.
ainsi que la vitesse à
a) Écrire un algorithme donnant directement le terme de rang N dès que l’on
dispose de la valeur de N.
b) Implémenter cet algorithme sur Algobox ou sur une calculatrice, le tester en
choisissant quelques valeurs de N et conjecturer le comportement de un
pour de grandes valeurs de n.
a) Montrer que pour tout k ≥ 1,
1
≤ k + 1− k ≤
1
.
2 k +1
2 k
b) En sommant les inégalités précédentes, démontrer que pour tout n ≥ 1,
2 n − 2 ≤ un (1) et que un ≤ 2 n + 1 (2).
( )
a) Déterminer la limite de u .
n
b) On dit que v n est équivalent à un lorsque (v n ) et (un ) convergent (ou
divergent vers −∞ ou +∞) à la même vitesse, c’est-à-dire lorsque
u
lim n = 1.
n →+∞ v n
Déterminer un équivalent de un sous la forme v n = f (n ) où f est une
fonction simple.
Exercice X
Introduction historique à l’exercice.
Le but de cet exercice est de présenter un algorithme donnant une valeur
approchée de la racine carrée d’un nombre.
L’extraction de racines carrées a toujours été d’un grand intérêt au cours de
l’histoire des mathématiques. C’est ainsi qu’au fil des siècles, on rencontre
diverses méthodes, géométriques ou arithmétiques.
Parmi celles-ci, l’algorithme de Héron dont il sera question dans l’exercice occupe
une place de choix.
Héron d’Alexandrie (fin du 1er siècle après J.-C.) était un mathématicien dont
on ne sait que peu de choses. C’est seulement en 1896 qu’on découvre à
Constantinople le livre I de ses Métriques, dans lequel on trouve, entre autre, un
exposé de sa méthode de recherche de racines carrées. Sans qu’il soit précisé la
60
© Cned - Académie en ligne
Séquence 1 – MA02
démarche qui l’a conduit à un tel résultat, Héron calcule des valeurs approchées
de racines carrées comme convergence d’une suite de nombres obtenus par
itérations successives d’une formule.
Afin de présenter ce travail, raisonnons selon un point de vue géométrique.
Pour construire un carré ayant même aire qu’un rectangle d’aire donnée A, on
peut construire un rectangle de même aire dont l’un des côtés est la moyenne
arithmétique des côtés du précédent puis recommencer le procédé plusieurs fois.
La suite des longueurs des côtés des rectangles successifs convergera vers A .
Traduisons cette méthode dans le cadre numérique.
On note un la longueur d’un des côtés du rectangle à la n-ième étape de
l’algorithme.
À l’étape initiale, on considère donc un rectangle d’aire A strictement positive et
dont un côté mesure un nombre u 0 quelconque.
La longueur du rectangle à la (n+1)-ième doit donc être la moyenne arithmétique
A
des côtés du rectangle obtenu à la n-ième étape or ces côtés sont un et
de
un
A
1
sorte que l’on ait un +1 = un + .
un
2
L’algorithme de Héron consistera à utiliser la suite (un ) définie sur
A
1
un +1 = un + et de terme initial u0 quelconque et positif.
un
2
par
On choisira pour cet exercice u 0 = E( A ) + 1 où la fonction E est la fonction
« partie entière ».
1
A
Soit f la fonction définie sur 0 ; + ∞ par f ( x ) = x + . On note f
2
x
sa courbe représentative dans le plan rapporté à un repère orthonormal
O ; i , j . Pour les représentations graphiques, on prendra 5 cm comme unité
(
)
et on travaillera avec A = 2.
a) Étudier les variations de f.
b) Représenter graphiquement f ainsi que la droite d’équation y = x
sur 0 ; + ∞ .
On considère donc la suite (u ) défini sur
n
un + 1 = f un .
( )
par u0 = E( A ) + 1 et
a) Sur le graphique précédent, représenter les premiers termes de la suite
(un ) et conjecturer le comportement asymptotique de un .
( )
b) Démontrer par récurrence que pour k ∈N , A ≤ un +1 ≤ un ≤ u0 .
( )
c) En déduire la convergence de la suite un .
a) Démontrer que, pour tout n ∈N , u
n +1 − A ≤
(
)
1
u − A .
2 n
Séquence 1 – MA02
61
© Cned - Académie en ligne
b) En déduire par récurrence que, pour tout n ∈N , un − A ≤
1
n
(u0 − A ).
2
c) Conclure quant à la limite de la suite un .
Dans le cas où A = 2 , déterminer à l’aide de la calculatrice et de l’inégalité
obtenue au 3.b une condition suffisante sur n pour que un − 2 ≤ 10−10.
( )
Déterminer le plus petit entier n au-delà duquel un − 2 ≤ 10−10. Expliquer
la différence entre les résultats obtenus. Que pensez-vous de la vitesse de
convergence de la suite (un ) vers sa limite ?
Écrire l’algorithme de Héron donnant une approximation de
A avec une
erreur strictement inférieure à un réel p donné.
Exercice XI
Quelle est la limite de la suite (un ) définie pour tout entier n supérieur à 1 par :
u1 = 0 , 57 , u2 = 0 , 5757 , … , un = 0 , 57
...57 ?
2n chiffres
62
© Cned - Académie en ligne
Séquence 1 – MA02
Téléchargement
Explore flashcards
|
__label__pos
| 0.818865 |
What About Genetics?
There is always a "Nature/Nuture" debate in most psychological fields, and fear and anxiety are no exception. Here we'll wade into what science says about the genetics of these emotions.
Anxiety and a high arousal threshold for fear are certainly difficult conditions to live with. It can be tempting to chock your anxious feelings up to genetics—"My father was anxious, so I'm anxious too. It's just how I am"—but this breed of thinking hurts you in two major ways.
Anxiety and a high arousal threshold for fear are certainly difficult conditions to live with. It can be tempting to chock your anxious feelings up to genetics—"My father was anxious, so I'm anxious too. It's just how I am"—but this breed of thinking hurts you in two major ways.
First, it erects a mental block to truly understanding your condition. Saying "This is how I am" puts an inevitable spin on the anxiety you're feeling and your patterns of behavior. Believing in the obdurate, unchanging nature of who you are is what psychologists call a "fixed mindset." If you truly feel that your anxiety is integral to who you are as a person, you will be less inclined to think that you can work to change how you approach your anxiety. You may resign yourself to "suffer through it" or "just live with it." Anxiety is always negotiable.
Second, anxiety is an emotional reaction to imagined challenge or danger, where anxiety disorders or chronic anxiety can take many forms. Thinking of anxiety as some monolithic thing that controls your life is not just psychologically taxing, it actually does not align with research into the heredity/genetics of anxiety.
Let's take a look at what science has to say about the nature/nurture debate surrounding anxiety.
Is Anxiety Genetic?
The short answer is "No." As stated, anxiety is not a single measureable trait, but an umbrella term for many kinds of disorders.
A distinction should be made here. Is the fear response (the "fight, flight, or freeze" cycle) genetic? Yes. Our bodies have inherited this physiological response over millennia of evolution. Every human being is coded to react to threats, real or imagined, in the same neurobiological manner.
But can you inherit Generalized Anxiety Disorder (GAD), Obsessive-Compulsive Disorder (OCD), or an above-average anxious disposition? Not directly. To understand this, we need first to understand what genetic predispositions are and how they differ from simply "receiving" a genetic disorder from your parents.
An Anxious Predisposition
The distinction and relationship between what is "genetic" and what is "predisposed" is essential, here. Consider a truly heritable genetic trait—attached or unattached earlobes. The expression of this trait is entirely contingent on which specific genes you inherit from your parents and which ultimately are activated (phoenotypically expressed) in your genetic code.
A predisposition is more the chance, the probabilty, that other genetic/heretiable traits you have may make you more likely to experience certain conditions later in life. The complex weave of other genetic traits you have, and the interplay of your environment on those traits, leads to a higher risk for developing certain conditions. Anxiety disorders by and large fall into this category—in other words, there is not a dominant "anxiety gene" that turns on or off in people who develop anxiety disorders.
Currently, scientists are in the process of identifying certain genetic markers that may make people more prone (predisposed) to acquire anxiety disorders. Thus far it appears that panic-related disorders, agoraphobic tendencies (fear of public spaces), and a small group of specific phobias are most closely linked to identifiable genetic configurations. It also appears that perhaps 30% - 40% of a person's predisposition toward developing anxiety disorders can be explained through genetic predispositions, the other 60% left to environmental risk factors.
The Role of Environment
Speaking of, what are "environmental risk factors?"
You've likely heard the term "Nature vs. Nurture." This refers to the notion that certain health- and psychology-related conditions may be more the product of nature—your genetics—or of nurture—the environment and experiences that have shaped you. These debates can become maze-like and complex, and many positive and negative characteristics of personality and behavior are a combination of these two concepts.
Where anxiety is concerned, there are many environmental risk factors that can work together to evoke, or trigger, a person's predisposition toward stress or anxiety conditions. In a sense, think of these risk factors as events that, if present and persistent in a person's life and throughout their development, increase the risk that those complex predispositions activate and make susceptibility to anxiety disorders more likely. It's not a one-to-one relationship the way completely hereditary traits are, but a game of odds and circumstances.
Here is a short list of environmental risk factors that have been scientifically shown to increase the odds of a person predisposed to anxiety developing a disorder:
• Stress – Long-term and emotionally scarring stress, especially. Your reactions, thoughts, and behaviors when under duress and their subsequent reinforcement.
• UpbringingStudies show that children who develop panic disorder before age 20 are more likely to have parents who have the condition or another related anxiety disorders. By no means an "anxiety sentence," evidence still suggests that anxiety disorders are more common in people whose parents also suffer from them.
• Trauma, Abuse, & Neglect – Early experiences with trauma, foul parenting, or lack of strong, healthy social support increase the predispositional expression of anxiety. People raised in low-income households and who lack healthy lifestyles are also more vulnerable.
• Other Anxiety DisordersPanic attacks, depression, PTSD, and insomnia are all debilitating and stressful anxious conditions. If you suffer from any one of them, you are more likely to develop other anxiety disorders.
Full reference:
(Jul 3, 2015). What About Genetics?. Retrieved Jan 24, 2020 from Explorable.com: https://explorable.com/e/what-about-genetics
You Are Allowed To Copy The Text
The text in this article is licensed under the Creative Commons-License Attribution 4.0 International (CC BY 4.0).
This means you're free to copy, share and adapt any parts (or all) of the text in the article, as long as you give appropriate credit and provide a link/reference to this page.
That is it. You don't need our permission to copy the article; just include a link/reference back to this page. You can use it freely (with some kind of link), and we're also okay with people reprinting in publications like books, blogs, newsletters, course-material, papers, wikipedia and presentations (with clear attribution).
|
__label__pos
| 0.639461 |
Resources Contact Us Home
Browse by: INVENTOR PATENT HOLDER PATENT NUMBER DATE
Bandgap-referenced thermal sensor
7724068 Bandgap-referenced thermal sensor
Patent Drawings:
Inventor: Smith, et al.
Date Issued: May 25, 2010
Application: 12/327,699
Filed: December 3, 2008
Inventors: Smith; Paul AD (Glasgow, GB)
Wilson; Paul (West Lothian, GB)
Assignee: Micrel, Incorporated (San Jose, CA)
Primary Examiner: Donovan; Lincoln
Assistant Examiner: Hiltunen; Thomas J
Attorney Or Agent: Bever, Hoffman & Harms, LLPBever; Patrick T.
U.S. Class: 327/513; 327/539
Field Of Search: 327/512; 327/513; 327/539
International Class: G05F 1/10
U.S Patent Documents:
Foreign Patent Documents:
Other References: de Rooij et al.: "Development of a 1MHz MOSFET Gate-Driver for Integrated Converters", 2002 IEEE, pp. 2622-2629. cited by other.
Gray et al.: "Analysis and Design of Analog Integrated Circuits", 1977, 1984 John Wiley & Sons, 27 pages. cited by other.
Abstract: A thermal sensor for an integrated circuit including a bandgap reference circuit. The thermal sensor includes a comparator that compares a temperature dependent voltage generated by the bandgap reference circuit to a temperature independent voltage, where both temperatures are referenced to the bandgap reference voltage generated by the bandgap reference circuit. The thermal sensor generates a digital output control signal based on a predetermined relationship between the temperature dependent voltage and the temperature independent reference voltage. When used as a thermal shutdown circuit, the comparator generates a thermal shut-down signal when the dependent temperature voltage decreases (or increases) with rising system temperature to equal to the temperature independent reference voltage. The comparator is implemented using an operational amplifier that is connected to existing circuitry associated with the bandgap reference circuit.
Claim: The invention claimed is:
1. An integrated circuit including: a bandgap reference circuit for generating a bandgap reference voltage and a temperature dependent voltage that varies in proportionto an ambient temperature of said integrated circuit and is referenced to said bandgap reference voltage; means for generating a temperature independent voltage that is independent of said ambient temperature of said integrated circuit and is referencedto said bandgap reference voltage, and a thermal sensor including means for comparing said temperature independent voltage and said temperature dependent voltage, and for generating a control signal based on a predetermined relationship between saidtemperature dependent voltage and said temperature independent reference voltage, wherein said thermal sensor comprises a thermal shutdown circuit including means for generating a thermal shutdown signal when said temperature dependent voltage is equalto said temperature independent voltage, wherein said thermal shutdown circuit comprises a first operational amplifier including an inverting input terminal connected to receive said temperature dependent voltage, and a non-inverting input terminalconnected to receive said temperature independent voltage, and wherein said bandgap reference circuit comprises: a second operational amplifier having an output terminal, an inverting input terminal, and a non-inverting input terminal; a first resistorand a first diode connected in series between the output terminal of the second operational amplifier and ground, wherein the non-inverting input terminal of the second operational amplifier is connected to a first node disposed between said firstresistor and said first diode; and a second resistor, a third resistor, a fourth resistor, and a second diode connected in series between the output terminal of the second operational amplifier and ground, wherein the inverting input terminal of thesecond operational amplifier is connected to a second node disposed between said second and third resistors, wherein the inverting input terminal of the first operational amplifier is connected to a third node disposed between said third and fourthresistors.
2. The integrated circuit according to claim 1, wherein said means for generating a temperature independent voltage comprises a voltage divider connected between said bandgap reference voltage and ground.
3. The integrated circuit according to claim 1, wherein said means for generating said temperature independent voltage comprises a voltage divider including a fifth resistor and a sixth resistor connected between the output terminal of thesecond operational amplifier and ground, and wherein the non-inverting input terminal of the first operational amplifier is connected to a fourth node disposed between said fifth and sixth resistors.
4. An integrated circuit including: a bandgap reference circuit for generating a bandgap reference voltage and a temperature dependent voltage that is referenced to said bandgap reference voltage and is proportional to an ambient temperature ofsaid integrated circuit; and a thermal shutdown circuit including means for comparing a temperature independent voltage that is referenced to said bandgap reference voltage and is independent of said ambient temperature of said integrated circuit withsaid temperature dependent voltage, and for generating a thermal shutdown signal when the temperature dependent voltage is equal to the temperature independent voltage, wherein said thermal shutdown circuit comprises a first operational amplifierincluding an inverting input terminal connected to receive said temperature dependent voltage, and a non-inverting input terminal connected to receive said temperature independent voltage, and wherein said bandgap reference circuit comprises: a secondoperational amplifier having an output terminal, a non-inverting input terminal, and a non-inverting input terminal; a first resistor and a first diode connected in series between the output terminal of the second operational amplifier and ground,wherein the non-inverting input terminal of the second operational amplifier is connected to a first node disposed between said first resistor and said first diode; and a second resistor, a third resistor, a fourth resistor, and a second diode connectedin series between the output terminal of the second operational amplifier and ground, wherein the inverting input terminal of the second operational amplifier is connected to a second node disposed between said second and third resistors, wherein theinverting input terminal of the first operational amplifier is connected to a third node disposed between said third and fourth resistors.
5. The integrated circuit according to claim 4, further comprising a voltage divider including a fifth resistor and a sixth resistor connected between the output terminal of the second operational amplifier and ground, and wherein thenon-inverting input terminal of the first operational amplifier is connected to a fourth node disposed between said fifth and sixth resistors.
6. An integrated circuit comprising: a thermal sensor comprising a first operational amplifier; a bandgap reference circuit including a second operational amplifier having an output terminal, an inverting input terminal, and a non-invertinginput terminal, a first resistor and a first diode connected in series between the output terminal of the second operational amplifier and ground, wherein a the non-inverting input terminal of the second operational amplifier is connected to a first nodedisposed between said first resistor and said first diode, and a second resistor, a third resistor, a fourth resistor, and a second diode connected in series between the output terminal of the second operational amplifier and ground, wherein theinverting input terminal of the second operational amplifier is connected to a second node disposed between said second and third resistors; and a voltage divider including a fifth resistor and a sixth resistor connected between the output terminal ofthe second operational amplifier and ground, wherein a first input terminal of the first operational amplifier is connected to a third node disposed between said third and fourth resistors, and wherein a second input terminal of the first operationalamplifier is connected to a fourth node disposed between said fifth and sixth resistors.
Description: FIELD OF THE INVENTION
This invention relates to integrated circuits, and more particularly to integrated circuits that include both bandgap reference circuits and thermal sensor circuits (e.g., thermal shutdown circuits).
BACKGROUND OF THE INVENTION
FIG. 4 is a simplified circuit diagram showing an integrated circuit 50 including a conventional bandgap reference circuit 51 for generating a bandgap reference voltage V.sub.bg, a conventional thermal shutdown circuit 52 for generating a thermalshutdown control signal TSD, and a generalized functional circuit (e.g., a Power Management IC circuit) 53 that utilizes bandgap reference voltage V.sub.bg during normal operation and is shutdown by thermal shutdown control signal TSD when an operatingtemperature of IC 50 equals or exceeds a predetermined maximum operating temperature.
Referring to the left side of FIG. 4, bandgap reference circuit 51 includes an operational amplifier (op amp) C1 that generates bandgap reference voltage V.sub.bg at its output terminal. The non-inverting (+) input terminal of bandgap referencecircuit 51 is connected between a resistor R1 and a diode Q1, which are connected in series between bandgap reference voltage V.sub.bg and ground. The inverting (-) input terminal of bandgap reference circuit 51 is connected between resistors R2 and R3,which are connected in series with a diode Q2 between bandgap reference voltage V.sub.bg and ground. Those skilled in the art recognize that bandgap reference circuit 51 represents only one of several possible circuit arrangements capable of generatingthe desired bandgap reference voltage V.sub.bg. The particular circuit structure of bandgap reference circuit 51 is disclosed in Chapter 4, Appendix A4.3 of "Analysis and Design of Analog Integrated Circuits 2.sup.ND Edition", Paul R. Gray and Robert G.Meyer (copyright 1977 by Wiley & Sons, Inc.).
In general, bandgap reference circuits function as temperature independent voltage reference circuits to provide a bandgap reference voltage V.sub.bg at a voltage level typically around 1.25 V, which is close to the theoretical 1.22 eV bandgap ofsilicon at 0.degree. K. In the example shown in FIG. 4, when power is supplied to IC 50, bandgap reference circuit 51 operates as follows. Assuming a stable operating point exists, then the differential input voltage of op amp C1 must be zero, andresistors R1 and R2 have equal voltages across them. Thus, the two currents I.sub.1 and I.sub.2 must have a ratio determined by the ratio of resistors R1 to R2. These two currents are the collector currents of the two diodes Q1 and Q2 (e.g.,diode-connected transistors), assuming base currents are negligible. Thus, the difference between their base-emitter voltages can be represented by Equation 1:
.DELTA..times..times..times..times..times..times..times..times..times..tim- es..times..times..times..times..times..times..times..times..times. ##EQU00001## where V.sub.T is the threshold voltage across resistor R3, and I.sub.S1 and I.sub.S2represent the saturation currents of diodes Q1 and Q2, respectively. The same current that flows through resistor R3 also flows through resistor R2, so the voltage across resistor R2 is represented by Equation 2:
.times..times..times..times..times..times..DELTA..times..times..times..tim- es..times..times..times..times..times..times..times..times..times..times..- times..times..times..times. ##EQU00002## Note that Eq. 2 implies that the currents I.sub.1and I.sub.2 are both proportional to temperature if the resistors have zero temperature coefficient. The output voltage of op amp C1 (i.e., bandgap reference voltage V.sub.bg) is thus represented by Equation 3:
.times..times..times..times..times..times..times..times..times..times..tim- es..times..times..times..times. ##EQU00003## Eq. 3 implies that bandgap reference voltage V.sub.bg is substantially independent of temperature, with the constant K setby the ratios of R2/R1, R2/R3 and I.sub.S2/I.sub.S1.
Referring again to FIG. 4, due to process variations and component mismatches typically encountered during the production of integrated circuits, bandgap reference circuit 51 is typically designed in a way that allows "trimming" of resistors R1,R2 and R3 at the end of the fabrication process in order to produce the desired bandgap reference voltage V.sub.bg. This trimming process typically involves providing several resistors connected in series, and a mechanism (e.g., programmable elements)that can be used to bypass some of the resistors in order to supply accurate voltages to op amp C1. An exemplary trimmable resistor circuit is shown in FIG. 5, where resistors R21 to R24 are connected in series, with each node N21 to N23 betweenadjacent resistors connected to op amp C1 by way of programmable elements (e.g., fuses, anti-fuses or pass gates) P1 to P3. In this example, resistor R2 (see FIG. 4) is trimmed by selectively turning on zero or more of programmable elements P1 to P3. For example, the resistance of resistor R2 is minimized by closing programmable element P1 such that op amp C1 is coupled to bandgap reference voltage V.sub.bg by way of node N21, whereby the total resistance of resistor R2 is equal to the resistance ofresistor R21. Conversely, resistor R2 is maximized by leaving open all programmable elements P11 to P13 such that op amp C1 is coupled to bandgap reference voltage V.sub.bg by way of node N24, whereby the total resistance of resistor R2 is equal to thesum of the resistances of resistors R21+R22+R23+R24.
Referring again to FIG. 4, one further common practice associated with the production of ICs including bandgap reference circuits is to provide a series of resistors R.sub.A to R.sub.D that are connected to bandgap reference voltage V.sub.bg, andprovide temperature independent reference voltage V.sub.REF1 to V.sub.REF3, which are tapped from node N.sub.AB, N.sub.BC and N.sub.CD, respectively. Reference voltages between V.sub.bg and GND are easily generated for various PMIC functions.
Referring again to FIG. 4, thermal shutdown circuit 52 includes a thermal sensor 55 whose voltage is compared by an op amp 57 to a supplied reference voltage V.sub.REF, whereby thermal shutdown control signal TSD when the sensor voltageV.sub.SENSOR is equal to the reference voltage. Such thermal shutdown circuits are described, for example, in "Development of a 1 MHz MOSFET gate-driver for integrated converters", M. A. de Rooij, J. T. Strydom and J. D. van Wyk, P. Beamer (IEEEpublication 0-7803-7420-7/02 (2002)), in which the disclosed thermal sensor uses is a thermistor whose output signal is dedicated to the thermal shutdown of a functional circuit.
A problem associated with including thermal shutdown circuit 52 is that thermistor 55 and its associated circuitry are additional to any other thermally sensitive circuitry present on an IC having a bandgap reference circuit, and therefore takeup a significant amount of valuable silicon area, consume a significant amount of power, and typically require a separate trimming operation (i.e., in addition to the trimming operation mentioned above with reference to bandgap reference circuit 51).
What is needed is a thermal shutdown circuit that minimizes silicon area and power consumption, and simplifies the trimming operations associated with its host IC.
SUMMARY OF THE INVENTION
The present invention is directed to a thermal sensor that compares a temperature dependent voltage to a temperature independent voltage, both temperatures being referenced to a bandgap reference voltage, and generates a digital output controlsignal based on a predetermined relationship between the temperature dependent voltage and the temperature independent reference voltage. For example, the thermal sensor may serve as a thermal shutdown circuit that generates a thermal shut-down signalwhen the dependent temperature voltage is equal to the temperature independent reference voltage.
In accordance with an aspect of the invention, the temperature dependent and temperature independent voltages utilized by the thermal shutdown circuit are tapped from existing bandgap reference circuitry, thereby providing an accurate thermalsensor output signal simply by adding a circuit that operably compares two selected voltages. The conventional bandgap reference circuits provided on most integrated circuits (ICs) typically include circuit structures (e.g., series-connectedresistors/diodes) that that produce temperature dependent voltages having diverging temperature coefficients, and these temperature dependent voltages are combined by the bandgap reference circuit to provide the substantially temperature independentbandgap reference voltage. In addition, these conventional bandgap reference circuits include mechanisms (e.g., trimmable resistors, discussed above) that allow accurate adjustment (trimming) of the bandgap reference voltage to the desired voltagelevel. Further, each such IC typically includes one or more voltage dividers referenced to the bandgap reference voltage that provide reliable temperature independent reference voltages utilized by the functional circuitry of the IC. The presentinvention takes advantage of this existing bandgap reference circuitry simply by adding a selected comparator (e.g., an op amp) and providing metal lines that connect to selected nodes at which selected temperature dependent and temperature independentvoltages are already generated. The present invention thereby facilitates minimizing the amount of space and power utilized by a thermal sensor added to an IC having a bandgap reference circuit, particularly when compared to conventional thermalshutdown approaches that utilize a dedicated thermistor and associated bias circuitry.
Another advantage of the present invention is that, in trimming the bandgap voltage, the temperature dependent and temperature independent voltages utilized by the thermal sensor are also trimmed "for free". That is, the present inventioneliminates the separate trim operations for the bandgap reference circuit and the thermal sensor that are required by conventional approaches, thereby further reducing manufacturing costs by automatically trimming of the thermal sensor when the bandgapreference is trimmed (i.e., the bandgap reference circuit and the thermal sensor are trimmed simultaneously).
BRIEF DESCRIPTION OF THE DRAWINGS
These and other features, aspects and advantages of the present invention will become better understood with regard to the following description, appended claims, and accompanying drawings, where:
FIG. 1 is a simplified circuit diagram showing a integrated circuit including a thermal shutdown circuit according to a generalized embodiment of the present invention;
FIG. 2 is simplified circuit diagram showing an integrated circuit including a thermal shutdown circuit according to a specific embodiment of the present invention;
FIG. 3 is a diagram depicting operating voltages associated with the thermal shutdown circuit of FIG. 2;
FIG. 4 is a circuit diagram illustrating a conventional bandgap reference circuit; and
FIG. 5 is a simplified diagram illustrating a trimmable resistor circuit utilized by conventional bandgap reference circuits.
DETAILED DESCRIPTION OF THE DRAWINGS
The present invention relates to an improvement in integrated circuits incorporating bandgap reference voltages and thermal shutdown functionality. The following description is presented to enable one of ordinary skill in the art to make and usethe invention as provided in the context of a particular application and its requirements. The terms "coupled" and "connected", which are utilized herein, are defined as follows. The term "connected" is used to describe a direct connection between twocircuit elements, for example, by way of a metal line formed in accordance with normal integrated circuit fabrication techniques. In contrast, the term "coupled" is used to describe either a direct connection or an indirect connection between twocircuit elements. For example, two coupled elements may be directly connected by way of a metal line, or indirectly connected by way of an intervening circuit element (e.g., a capacitor, resistor, inductor, or by way of the source/drain terminals of atransistor). Various modifications to the preferred embodiment will be apparent to those with skill in the art, and the general principles defined herein may be applied to other embodiments. Therefore, the present invention is not intended to belimited to the particular embodiments shown and described, but is to be accorded the widest scope consistent with the principles and novel features herein disclosed.
FIG. 1 is a simplified circuit diagram showing an IC 100 including a generalized bandgap reference circuit 110 and a functional circuit 120 that are similar to those found in conventional ICs. Bandgap reference circuit 110, which is intended torepresent any of several well-know architectures, includes voltage sources S1 and S2 that respectively generate a bandgap reference voltage V.sub.bg and a temperature dependent voltage V.sub.A according to known techniques, where temperature dependentvoltage V.sub.A is referenced to bandgap reference voltage V.sub.bg, and is proportional to absolute temperature (PTAT). As used herein, the phrase "referenced to bandgap reference voltage V.sub.bg" is intended to mean that bandgap reference voltageV.sub.bg serves as a supply voltage from which the referenced voltage (e.g., temperature dependent voltage V.sub.A) is derived. Referring to the right side of FIG. 1, in addition to application specific circuitry (not shown) designed to perform apredetermined function (e.g., to perform the functions of a Power Management IC), functional circuit 120 includes series-connected resistors R.sub.5 and R.sub.6 that are connected between bandgap reference voltage V.sub.bg and ground. As described abovewith reference to FIG. 4, such series-connected resistors (voltage dividers) are typically included on integrated circuits having bandgap circuitry to provide temperature independent reference voltages that are less than bandgap reference voltageV.sub.bg.
In accordance with the present invention, IC 100 also includes a thermal sensor 130 including a comparator 135 that is operably connected to compare temperature dependent voltage V.sub.A with a selected temperature independent voltage V.sub.B,and to generates a digital output control signal CS (e.g., a thermal shut-down signal) whose voltage/current level is determined by a selected relationship between temperature dependent voltage V.sub.A and temperature independent voltage V.sub.B. Forexample, source S1 and resistors R.sub.5 and R.sub.6 may be selected such that temperature dependent voltage V.sub.A and temperature independent voltage V.sub.B when both voltages are equal when die temperature of IC 100 has reached or exceeded a safeoperating point. Alternatively, the voltage level of control signal CS may increase or decrease in response to ambient temperature, thereby facilitating data that may be used for thermal analysis of IC 100.
As set forth above, in accordance with an aspect of the invention, temperature dependent voltage V.sub.A and temperature independent voltage V.sub.B utilized by thermal sensor 130 are tapped from existing bandgap reference circuitry. That is,temperature dependent voltage V.sub.A is generated by bandgap reference circuit 110 in order to generate bandgap reference voltage V.sub.bg in a manner similar to that described above with reference to FIG. 4. Similarly, temperature independent voltageV.sub.B is generated by series-connected resistors R.sub.5 and R.sub.6, which are typically provided in functional circuit 120 as a voltage divider for providing temperature independent reference signals to the application specific circuitry (not shown)of functional circuit 120. For example, referring to FIG. 4, resistors R.sub.5 and R.sub.6 may be implemented by tapping node N.sub.AB, whereby resistor R.sub.5 has the effective resistance of resistor R.sub.A, and resistor R.sub.6 has the effectiveresistance of resistors R.sub.B+R.sub.C+R.sub.D. Alternatively, resistors R.sub.5 and R.sub.6 may be implemented by tapping node N.sub.BC, whereby resistor R.sub.5 has the effective resistance of resistors R.sub.A+R.sub.B, and resistor R.sub.6 has theeffective resistance of resistors R.sub.C+R.sub.D. The value of control signal CS is dependent on how the voltages V.sub.A and V.sub.B are selected, but crucially they must remain referenced to bandgap reference voltage V.sub.bg so that they are trimmedcorrectly, as described below. As such, thermal sensor 130 provides an accurate thermal reading simply by adding comparator 135 to an existing bandgap design, and connecting the input terminals of comparator 135 to carefully selected nodes that arereferenced to bandgap reference voltage V.sub.bg by way of metal lines metal lines added to the existing metallization process that extend between input terminals of comparator 135 and nodes on which temperature dependent voltage V.sub.A and temperatureindependent voltage V.sub.B are generated. Because the present invention only requires the addition of comparator circuit 135 (and associated connections), the present invention is implemented using a smaller amount of costly silicon area and exhibitslower power consumption in comparison to conventional approaches that utilize a dedicated thermistor and associated bias circuitry.
According to another aspect of the present invention, because both temperature dependent voltage V.sub.A and temperature independent voltage V.sub.B are referenced to bandgap reference voltage V.sub.BE, the act of trimming bandgap referencevoltage V.sub.BE (e.g., as described above with reference to FIGS. 4 and 5), both temperature dependent voltage V.sub.A and temperature independent voltage V.sub.B are also trimmed "for free". That is, the trimming operation performed to trim bandgapreference voltage V.sub.BE also serves to trim thermal sensor 130. As such, the present invention eliminates the separate trim operation required in conventional approaches, thereby reducing manufacturing costs.
FIG. 2 is a simplified circuit diagram showing an IC 100A according to an exemplary specific embodiment of the present invention. IC 100A includes bandgap reference circuit 110A, which is substantially identical to conventional bandgap referencecircuit 50 (described above with reference to FIGS. 4 and 5), a functional circuit 120 including resistors R5 and R6 (both described above), and a thermal shutdown circuit (sensor) 130A.
Bandgap reference circuit 110A and functional circuit 120 are arranged and operate substantially in the manner described above with reference to FIG. 4. Bandgap reference circuit 110A includes an op amp (comparator) C.sub.1 that generatesbandgap reference voltage V.sub.bg at its output terminal, a resistor R.sub.2 connected in series with a diode Q1 between bandgap reference voltage V.sub.bg and ground, and resistors R.sub.1, R.sub.3 and R.sub.4 that are connected in series with a diodeQ2 between bandgap reference voltage V.sub.bg and ground. The non-inverting (+) terminal of op amp C.sub.1 is connected to a node between resistor R.sub.2 and diode Q1, and the inverting (-) terminal of op amp C.sub.1 is connected to a node betweenresistors R.sub.1 and R.sub.3. Similar to the arrangement described above with reference to FIGS. 4 and 5, bandgap reference circuit 110A is trimmed by adjusting the resistance of one or more of resistors R.sub.1 to R.sub.4 until bandgap referencevoltage V.sub.bg achieves a desired voltage level. Similar to the generalized embodiment (described above with reference to FIG. 1), functional circuit 120 includes series-connected resistors R.sub.5 and R.sub.6 that are connected between bandgapreference voltage V.sub.bg and ground.
In accordance with the present invention, thermal shutdown circuit (sensor) 130A includes an op amp (comparator) 135A having a non-inverting (+) terminal connected to receive a temperature dependent voltage V.sub.A, and a inverting (-) terminalconnected to receive a temperature independent voltage V.sub.B. In the present embodiment, temperature dependent voltage V.sub.A is generated by tapping node N.sub.34 between resistors R.sub.3 and R.sub.4 of bandgap reference circuit 110A (e.g.,corresponding to node N21 between resistor R21 and R22 of resistor R2; see FIG. 5). As such, temperature dependent voltage V.sub.A is referenced to bandgap reference voltage V.sub.bg, and is proportional to absolute temperature V.sub.PTAT (specifically,V.sub.PTAT equals V.sub.bg-V.sub.A). Similarly, temperature independent voltage V.sub.B is tapped from the node between resistors R.sub.5 and R.sub.6 of functional circuit 120. As such, temperature independent voltage V.sub.B is also referenced tobandgap reference voltage V.sub.bg. As depicted in FIG. 3, with this arrangement, op amp 135A generates a thermal shutdown signal TSD at its output terminal when temperature dependent voltage V.sub.A decreases to the point at which it equals temperatureindependent voltage V.sub.B. That is, as when IC 100A reaches a predetermined unsafe operating temperature, temperature dependent voltage V.sub.A equals temperature independent voltage V.sub.B, causing op amp 135A to transmit thermal shutdown signal TSDto functional circuit 120. As indicated in FIG. 3, predetermined unsafe operating temperature T.sub.TRIP (i.e., the temperature at which digital thermal shutdown signal TSD is tripped) is determined by selecting appropriate values for resistancesR.sub.3, R.sub.4, R.sub.5 and R.sub.6, bandgap reference voltage V.sub.bg, bias current I.sub.1 and I.sub.2 and diode ratio Q2:Q1. That is, the temperature T.sub.TRIP at which op amp 135A asserts thermal shut-down signal TSD is dependent on how thevoltages V.sub.A and V.sub.B are selected, but crucially they must remain referenced to bandgap reference voltage V.sub.bg so that they are trimmed correctly.
According to an embodiment of the present invention, thermal trip temperature T.sub.TRIP is calculated as follows:
.DELTA..times..times..DELTA..times..times..times..times..times..function.- .times..times..times..times..times..times..times..DELTA..times..times..tim- es..times..times..DELTA..times..times..times..times..times..times..times..-function..times..times..times..times..times..times..times..times..times..t- imes..times..times..times..times..times..times..times..times..times..times- ..DELTA..times..times..times..times..times..times..times..times..times..ti-mes..times..times..times..times..times..times..times..times..times..times.- .times..times..times..times..times..times..times..times..times..times..tim- es..times..times..times..times..times..times..times. ##EQU00004## The resistor, diode and currentratios are well matched, and q and k are constants so the trip temperature is only dependent on V.sub.bg variation. Trimming V.sub.bg allows this variable to be well maintained to within an arbitrary percentage range, resulting in a trip temperaturewith approximately the same percentage range, regardless of process variation.
Example values are inserted into Equation 9 (above) as follows:
R.sub.1=96.4 k
R.sub.2=224.9 k
R.sub.3=32.1 k
R.sub.4=417.7 k
.times..times. ##EQU00005##
N=8
T.sub.TRIP=420K=147.degree. C.
As set forth above, thermal shutdown circuit 130A provides an accurate thermal trip point simply by adding comparator 135A to an existing bandgap design, and connecting the input terminals of op amp 135A to carefully selected nodes that arereferenced to bandgap reference voltage V.sub.bg. That is, the present invention may be incorporated into existing integrated circuits having bandgap reference circuits by adding op amp 135A and providing metal lines between nodes on which temperaturedependent voltage V.sub.A and temperature independent voltage V.sub.B are generated. Because the present invention only requires the addition of an op amp (or other comparator circuit) and associated connections, the present invention is implementedusing a smaller amount of costly silicon area and exhibits lower power consumption in comparison to conventional thermal shutdown approaches that utilize a dedicated thermistor and associated bias circuitry.
Although the present invention has been described with respect to certain specific embodiments, it will be clear to those skilled in the art that the inventive features of the present invention are applicable to other embodiments as well, all ofwhich are intended to fall within the scope of the present invention.
* * * * *
Recently Added Patents
Algorithm for color corrected analog dimming in multi-color LED system
Triazolylphenyl sulfonamides as serine/threonine kinase inhibitors
Touch-sensitive device and communication device
Image generation device with optimized dose control
Method and device for accessing the documentation of an aircraft according to alarms generated therein
Rotation angle detecting device
System and method for monitoring network activity
Randomly Featured Patents
Chew toy for dogs
Method and apparatus providing a circuit edit structure through the back side of an integrated circuit die
Method and system for tuning write strategy parameters utilizing data-to-clock edge deviations
Vehicle braking system
Flooring member
Crack sealing apparatus with heated hose through
Planarization using plasma oxidized amorphous silicon
Inspecting apparatus of mounting state of component or printing state of cream solder in mounting line of electronic component
Method for producing coal gas
Matching of resistor sensitivities to process-induced variations in resistor widths
|
__label__pos
| 0.870608 |
BODY BROKEN
What malfunctions in the body that causes diabetes. Covers autoimmune - thymus damage - natural killer cells
INTRODUCTION
Why diabetes is more serious than other illnesses - discussion & summary of upcoming chapters.
THE NUMBERS
Compares diabetes rates today with rates years ago. Trends and disturbing predictions for tomorrow.
HEALTH PROBLEMS
Diabetes = 12 year loss of life - increased rates of blindness - heart disease - cancer - kidney loss.
CAUSES OF DIABETES
Study after study links diabetes to chemicals in home products - pesticides - cosmetics - food additives & more!
REMISSION
People experiencing true remission - defines honeymoon - suprising facts on beta-cell regeneration.
OBESITY LINK
Research finding same chemicals causing diabetes cause obesity. Discusses obesogens - how & why
REVERSING DIABETES
Time to take conclusions of scientists and put into real-time practice. Are doctors resisting?
REVIEW: This chapter focuses on the body systems that have been found to malfunction or weaken which then allows diabetes to appear earlier rather than later. Topics discussed include:
1. Malfunction to the thymus gland (which typically filters autoimmun cells)
2. Malfunction of natural killer cells (that destroy autoimmune cells and calm autoimmunity)
3. Malfunction of scavenging abiliity of free-radicals which leads to faster damage to the interior of cells (especially the mitochondria).
4. Beta-cell damage happens faster than other cells because of weaker antioxidant protection
IF YOU ONLY KNEW:
A QUICK REVIEW OF WHAT GOES WRONG IN TYPE-1 DIABETES
Diabetes type-1 and type-2 don't just happen overnight, your body has been grooming your for the disease over the past 10-20 years, but unfortunately, you didn't know it. In this chapter you'll read how critical defense systems within the body fail one after the other including the ability of the thymus to filter autoimmune cells - the ability of natural killer cells to remove autoimmune cells and calm current autoimmune reactions - and also the ability of your anti-oxidant systems (such as glutathione) to prevent damage to cells from free-radicals. When these three defenders are gone - autoimmune disesease such as diabetes come in like a lion.
Many scientists have openly stated, and logically so, that the first step in curing diabetes is to find out how to stop the malfunctioning immune system cells from attacking healthy body cells. No matter how many pancreas transplants are done in the operating room, if the autoimmune process isn't stopped, the transplanted pancreas will be destroyed as well. However, if we can find a way to restore quality function to the thymus and natural killer cells, the progression of diabetes would stop and possibly reverse (if beta-cells can regenerate in larger numbers than being destroyed). In summary, it is important to remember the one direct and two indirect causes of diabetes.
1. Autoimmunity (Immune System Attacks Pancreas)
2. Improperly Working Thymus (Inability to Filter Autoimmune Cells)
3. Malfunctioning Natural Killer Cells (Inability of the immune system to attack and "calm" autoimmune cells)
Understanding 1st Step in Autoimmunity - the hapten connection
It is now well documented that a weakened or defective thymus gland loses its ability to filter (remove) autoimmune cells from the blood, thereby resulting in more autoimmune cells remaining inside the body and increased damage to healthy tissue. All of this increases the likelihood of diabetes and other autoimmune diseases. Natural killer cells can take up a bit of the slack by removing autoimmune cells directly or by producing compounds such as interferon which can "calm" any other significant hyperactive autoimmune processes. However, natural killer cells themselves have been found to lose their ability to function properly after exposure to a number of petroleum chemicals, including pesticides. The question still remains, however - What happens first that causes immune system cells to become "ignorant" and begin attacking healthy tissue?
Haptens Form when Chemicals Attach to Proteins:
In this 2015 study, scientists at the Immunosciences Lab in Los Angeles have for the first time provided evidence on what appears to be happening within the body to start of the autoimmune process. This was all done by documenting immune system responses to 11 common chemicals and comparing this with immune responses to a mold called aflatoxin. Aflatoxin can produce toxic compounds and is found in small amounts in foods such as grains and peanuts. Once aflatoxin enters the body, it has been shown to bind onto proteins in the blood (such as albumin) which then attaches to healthy tissue. Immune system antibodies are then formed to attack this newly formed aflatoxin/protein combination, but unfortunately, also kills the healthy cell with it.
Which Chemicals Form Haptens?
A number of chemicals used in modern society are now being found to attach to proteins. When a chemical does connect to a protein, it forms a highly immune reactive compound called a "hapten." Since aflatoxin can form a hapten, scientists wondered if this could also occur with 11 other chemicals commonly used in consumer products. To explore this theory, scientists took blood samples from 400 healthy donors and exposed each sample to aflatoxin and then to 11 different chemicals. This included the chemical known as BPA (used in making plastic bottles and food can liners), the pesticide permethrin (used in indoor pest control - mosquito control and agriculture), a common flame retardant chemical used in computer circuit boards and also a benzene type chemical commonly found in car exhaust, gasoline and food coloring and many other consumer products.
Reduce Hapten Exposure Should Reduce Autoimmunity
Scientists then measured specific antibodies that were formed after exposure to these chemical/protein combinations and compared it to the level of antibodies formed after exposure to aflatoxin. The logic here being that if the chemicals caused the formation of similar levels of antibodies as did aflatoxin, then we could expect similar harmful autoimmune responses from the chemicals. After exposure to aflatoxin, blood samples showed an average 7% increase for both IgG and IgM antibodies. Interestingly, some of the 11 chemicals caused similar or greater immune responses. For example, the water bottle and canned food chemical BPA resulted in an average increase of 13% antibodies for IgG and IgM. The benzene ring chemical (as in gasoline and vehicle exhaust) resulted in an average 11% increase in antibodies. The flame retardant chemical used in computers resulted in an average increase of 15% for IgG and IgM antibodies. The pyrethroid pesticide permethrin had one of the largest increases averaging about 19% for both IgG and IgM antibodies. As can be seen here, the levels of antibodies against the chemicals increased which supports the idea that common chemicals may be a significant contribution to the increasing rates of autoimmunity (and potentially diabetes). In conlusion the researchers stated,
Currently, the pathological significance of these antibodies in human blood is still unclear, and this protein adduct formation could be one of the mechanisms by which environmental chemicals induce autoimmune reactivity in a significant percentage of the population.
Journal of Applied Toxicology
Vol. 35(4): 383-397,
April 2015
Immunosciences Lab, Inc.
Los Angeles, CA, USA
Dept. of Clinical Sciences
Bastyr University California
Dept. of Mathematics
Boise State University, USA
3 Autoantibodies as Primary Cause of Type-1 Diabetes
Autoantibodies are antibodies in the blood that have malfunctioned for some reason. Normally, antibodies attack foreign invaders such as bacteria or viruses. However, in type-1 diabetes, B lymphoctye white blood cells malfunction and produce antibodies against healthy insulin producting beta-cells of the pancreas. When autoantibodies attach to the beta cell, they act like magnets and attract other immune system white blood cells which then destroy the beta cell. This increased destruction of beta-cells continues for years until about 80% of beta-cells are destroyed, thereby resuting in diabetes (NOTE: New studies suggest that this is much less and closer to 50% at diagnosis.) The three primary autoantibodies identified that destroy beta-cells in the pancreas include:
GADA
Glutamic Acid Decarboxylase Autoantibody
The GADA antibody attacks the GAD65 enzyme in beta-cells in the pancreas. GAD65 produces GABA which is involved in regulating insulin output.
IA-2
Islet Antigen-2 Autoantibody
IA-2 is a major target for islet cell autoantibodies. The protein is found in up to 80% of children and adolescents with T1 diabetes.
IAA
Insulin AutoAntibodies
IAA's are autoantibodies that target insulin itself. They were present in 18% of 112 newly diagnosed type-1 diabetics prior to beginning insulin treatment. See 2nd journal listing in SCIENCE.
Quote from researchers in the study: "... the current tests for autoantibodies to these three autoantigens are highly predictive of type-1 diabetes.
DIABETES
Vol. 54 (suppl 2.S52), Dec. 2005
Dr. Catherine Pihoker
Dept. of Pediatrics & Medicine
University of Washington
Seattle, Washington
SCIENCE
Insulin Antibodies
Dr. JP Palmer et. al
Vol. 222(4630): 1337-1339, Dec. 1983
1 of 5 Siblings of Diabetic Child have Autoantibodies
Having 2 Antibodies = 90% Chance of Future Diabetes
If your brother or sister has type-1 diabetes - you have about a 20% chance of having autoantibodies as well - that's one of the conclusions of this study conducted by the Diabetes Research Center in Finland. Since typically all children who develop type-1 have autoantibodies attacking their pancreas - having an accurate way to measure and predict future diabetes in siblings would be extremely helpful to doctors and families. Like a window to the future, this is now being accomplished by identification of different types of autoantibodies in childrens' blood. As discussed previously, type-1 diabetes occurs when the immune system malfunctions and mistakenly destroys beta-cells through different processes including making antibodies against the pancreas. In this study, researchers wanted to investigate if autoantibodies against the pancreas were higher in brothers and sisters of diabetic children, and therefore, help in predicting future diabetes. To answer this - 180 non-diabetic siblings of diabetic children were tested for four different autoantibodies. Children were all under age 6 at the time of testing. Antibodies tested included islet cell antibodies (ICA), glutamate decarboxylase antibodies (GADA), insulin autoantibodies (IAA), and antibodies called islet antigen-2 (IA-2A). After adding up the numbers, they found that nearly 20%of all siblings had one or more autoantibodies against their pancreas beta-cells. Breaking this down to individual antibodies, they found that 12% of the 180 children had islet cell antibodies - 7% had insulin antibodies - 8% had GADA antibodies, and about 8% were positive for the IA-2A antibodies. The next important thing to find out was how many different types of antibodies a child had, as having more than one antibody type greatly increases the risk of sooner appearance of diabetes. So, when looking further into the numbers - they found that 16 of the 180 children (about 9%) had one detectable antibody - 5 (about 3%) had 2 antibodies and another 12 children (7%) had 3 or more antibodies. These cooperative 180 children were then followed over the years until they reached age 10 to see how many developed diabetes. Results showed that 15 of the 180 children (18.3%) developed clinical type-1 diabetes sometime before age of 10. What's noteworthy about this, the ones who developed diabetes were the ones who typically had more than one of these renegade antibodies. For example, of the 15 children who developed diabetes, 13 were in the group that had 2 or more antibodies. Looking at this in another way - of the 17 children who tested positive for 2 or more autoantibodies - 15 of them (nearly 90%) developed diabetes before age 10. In other words, if your child had 2 or more pancreas autoantibodies, they had a 90% chance of developing diabetes within 5-7 years. Whether this percentage holds true for larger groups of children remains to be seen, but a number of studies are underway to find this out conclusively. One thing that can be taken from all of this is that autoantibodies play a significant part in taking the pancreas beta-cells out of action, but it also exposes a fascinating silver lining; If we can identify situations in our environment that cause autoantibodies to form, and we remove these "situations," we potentially set up the scenario where we can delay or prevent the onset of diabetes. For example, if we remove environmental situations known to increase autoantibodies, the patient's antibody count will decrease, thereby allowing for improved regeneration of beta- cells in the pancreas. In conclusion, the researchers stated,
These observations suggest that disease-associated autoantibodies can well be used as surrogate markers of clinical type-1 diabetes in primary prevention trials targeting young subjects with increased genetic disease susceptibility.
Journal of Clinical Endocrinology & Metabolism
Vol. 85(3): 1126-32
Department of Pediatrics
Diabetes Research Center
Medical School University of Tampere
Finland
Body's Autoimmune Filter Weakened by Pyrethroid Pesticide
You may not make the evening news, but your thymus gland is arguably the most important part of your body for preventing all autoimmune diseases - including diabetes. While originally thought to be important only in childhood and adolescence, the thymus has now been shown to play a crucial role in adults as well. Located in the central upper chest, your thymus functions as a "maturing and growth area" for many important immune system cells that attack viruses and cancer - but this is just the beginning, more recently, the thymus has been found to act as a "filter" - with the ability to remove millions of autoimmune cells from the body. Like a policeman giving a sobriety test to a drunk driver, your thymus literally tests immune system cells for their ability to identify self and non-self. If immune cells are smart and can recognize the difference between good cells (self) and bad (nonself such as viruses) - they are allowed back into the bloodstream highway. If the immune system cell fails the test, such as identifying healthy body cells as invaders, they are sent to the electric chair. This critical role clearly shows that any environmental circumstance that can damage or weaken the thymus police could potentially lead to out of control autoimmune cells running rampant in our bloodstream - resulting in severe negative health consequences (such as type-1 diabetes).
In this study, researchers at the Dept. of Environmental Toxicology at University of California wanted to find out if the common pyrethroid pesticide deltamethrin could damage the thymus in live animals. Deltamethrin is popular among pest control operators in the U.S. and is used in home pest control, agriculture and golf-courses. Animals were given a single injection of the pesticide at doses ranging from a low of 6 mg/kg to 50 mg/kg. The thymus was then removed from the animals after 24 hours and examined. Even at the lowest dose at 6 mg/kg - resulted in the thymus losing 22% of its weight after 24 hours with increased reductions in weight as dosages increased. The researchers then performed another test to see how time affected the thymus after pesticide exposure. After exposing animals to 25 mg/kg of deltamethrin for 24 hours, the thymus weight was reduced by about 41%. During the next two weeks, the thymus continued to shrink in size daily reaching a maximum 50% reduction in weight after 2 weeks. For a bit of good news - the thymus also demonstrated the ability to regenerate as it steadily regained about 1/3 of its weight after 35 days at which point the study was ended. In conclusion, the researchers said the reduction of weight to the thymus was due to the thymus cells being destroyed by the pesticide through a process known as apoptosis. While the thymus was in a steady pace of increasing weight when the study ended at 35 days, it is not known how much more the thymus would have regenerated after 2 months, 3 months, etc. This study further increases encouragement for potential reversal of diabetes as the organ that protects us from type-1 diabetes does show signficant potential to improve function, but only when circumstances shown to cause damage are removed.
Biochemical Pharmacology
Abstract - Full Text PDF
Vol 51: 447-454, 1996
Dept. of Environmental Toxicology
Intitute of Toxicology and Env Health
Center for Environmental Health Sciences
University of Califiornia
Davis, CA, USA
Autoimmunity Starts Here Damage to the Thymus Gland
Like deltamethrin, permethrin is also a pyrethroid pesticide commonly used in mosquito control - agriculture - and indoor and garden pest control. It is also used as a topical skin treatment for preventing insect and mosquito bites. In the second study listed at right, researchers applied a single topical dose of the pesticide permethrin to the shaved skins of 5 week old mice in gradually increasing doses. As found with deltamethrin in the study above, permethrin also showed the ability to decrease the number of thymus cells - with 52% destruction of the thymus from 15 microl of the permethrin and 80% thymic destruction from 25 microl of permethrin. This major destruction to the thymus occurred after just a single permethrin skin application. In a real life situation - children often receive permethrin applications many times a week and in some cases daily.
International Journal of Toxicology
Vol. 19(6), 383-389, Nov 2000 Food Chemical Toxicology
Vol. 40(12): 1863-73, Dec 2002
This Part of Beta Cell Involved in Insulin Release - GAD65 & GABA
As mentioned above, GAD65 is an enzyme in beta-cells that produces the compound known as GABA. Increased levels of GABA then result in increased insulin secretion by beta-cells.
QUOTE FROM STUDY AUTHORS: ... autocrine GABA, via activation of GABAARs, depolarizes the pancreatic β-cells and enhances insulin secretion. On the other hand, insulin down-regulates GABA-GABAAR signaling presenting a feedback mechanism for fine-tuning β-cell secretion.
Public Library of Science
October 21, 2011
Dr. Paul Bansal, et al.
Departments of Physiology & Medicine
University of Toronto, Canada
Drugs Future
Vol. 36(11):847, November, 2011
Acceleration of Type-1 Diabetes if IA-2 Autoantibodies Present
IA-2 is a beta-cell damaging antibody known as the insulinoma-associated protein-2. The function of the protein remains unclear but appears to be involved in enhancing insulin secretion. The frequency of IA-2 is similar in the USA and Europe and ranges between 60-80% in newly diagnosed type-1 diabetic patients. Children positive for IA-2 autoantibodies have accelerated progression of type-1 Diabetes.
Autoantibody Levels Lower After 12 Years
Scientists at Lund University in Sweden wanted to determine if there was a relationship between beta cell function and levels of autoantibodies in diabetic patients at diagnosis and then 12 years after diagnosis. The study was conducted with 107 adult diabeteic patients between the ages of 21 and 73. Results showed complete beta-cell failure (as measured by C-peptide testing) occurred only in patients who had islet antibodies at diagnosis. This included 77% of patients with multiple antibodies (16 of 21) and 80% of those with GADA antibodies (4 of 5). Interestingly, while most GADA positive patients still remained GADA positive after 12 years, patients with two or three antibodies at diagnosis had significantly lower levels of antibodies after 12 years. In keeping with this, the percentage of patients positive for all 3 islet autoantibodies decreased from 37% of patients at diagnosis to only 15% after 12 years. Among patients with two or three islet antibodies at diagnosis, complete beta-cell failure (undetectable fasting P-C-peptide) was present in 74% of patients (20 of 27) after 5 years
DIABETES - FULL TEXT
Vol. 51(6): 1754-62, June 2002
Department of Endocrinology
Lund University
Malmo University Hospital
Malmo, Sweden
Test Determines Insulin in Blood - Identifies Type-1 or 2 Diabetes
Also Measures if Diabetes is Worsening or Improving
It has typically been reported that 80-90% of all beta-cells in the pancreas are damaged at the time of type-1 diabetes diagnosis. However, this number has been challenged with new autopsy studies published in 2017 found this number is actually closer to 50-60% in type 1 diabetes for adults but . Whether it is 90% or 50%, the remaining beta-cells still have the ability to produce some insulin. Insulin output can be measured in patients through a blood test known as C-peptide. When beta-cels are in the process of making insulin, C-peptide is produced as a by-product. Therefore, the amount of C-peptide in the blood can be used to accurately determine the amount of insulin being made by beta-cells. The C-peptide test can also be used to help determine if the patient has type-1 or type-2 diabetes as patients with higher C-peptide would be more likely to have type-2 diabetes. Patients with type-1 diabetes can also be given the C-peptide test yearly to determine if their beta-cells have stopped producing insulin or have improved insulin production (via regeneration of pancreas or reduction of autoantibodies). Rather than measure direct insulin in the blood, it is preferable to measure C-peptide as it does not get metabolized by the liver (which does occur with insulin) Depending on the measurement criteria, normal reference ranges for C-peptide are 0.8 - 3.1 ng/ml or 0.26-1.03 nmol/L.
WebMD
C-Peptide Blood Test
Type 2 Diabetes Being Redefined as Autoimmune Disease
While type-1 diabetes is an autoimmune disease in which the immune system mistakenly destroys the pancreas, type-2 diabetes has long been considered only a metabolic disorder - having nothing to do with autoimmunity. However, evidence now shows this is no longer the case. In new research from Stanford University School of Medicine, type-2 diabetes is also being shown to be an autoimmune disorder. In one part of the study, lead author Dr. Shawn Winer, found that immune system T-cells and B-cells begin attacking healthy tissue in mice when their fat cells grow too quickly. When the scientists used mice that lacked these B-cells, the obese mice did not develop insulin resistance. The scientists then carried this research to humans. Here they studied 32 age and weight matched overweight people who differed only in their sensitivity to insulin. When comparing the two people in each group of same weight (one with insulin resistance and the other without) the researchers stated, "We were able to show that people with insulin resistance make antibodies to a select group of their own proteins. In contrast, equally overweight people who are not insulin-resistant do not express these antibodies. Dr. Winer, then went on to state,
It's highly suggestive that your body targets its own proteins as part of the develoment of insulin resistance. It really links the concept of insulin resistance with autoimmunity.
Stanford Medicine
April 17 2011
Edgar Engleman
Defective Natural Killer Cells in Children with Type 1 Diabetes
Since children with higher levels autoimmune antibodies are the ones who get diabetes, the next question is - why do only some children have this problem and not others? To answer this question, scientists at Jilin University in China investigated the quality and numbers of natural killer cells in children with diabetes. For a quick review - natural killer cells are your body's first line of defense against viruses and cancer cells, which is why it makes sense that people with lower numbers of natural killer cells have higher rates of cancer and virus infections. These powerful microscopic cells make up only a small percentage of your immune system's total white blood cells. What is interesting in relation to diabetes, these powerful little inventions have also been found to have a superb talent for fiding and destroying autoimmune cells. This means that someone with properly working natural killer cells is able to have a lower amount of auto-antibodies since the natural killer cells are working for the team. This certainly brings up the theory that children who get diabetes may have a problem with their natural killer cells.
To see if this in fact was a problem, doctors at the Department of Endocrinology at Weihai Municipal Hospital in China tested 30 children and adolescents with type-1 diabetes and compared their natural killer cell numbers to 27 healthy children without diabetes. Results showed that newly diagnosed diabetic children had a significantly lower percentage of natural killer cells. Along with this, the natural killer cells the children did have were secreting less of an important compound known as interferon. In conclusion, the scientists stated,
Our data indicate that decreased number and impaired function of NK cells may have a role in the pathogenesis (cause) of Type-1 Diabetes Mellitus.
Clinical Experimental Pharmacology Physiology
Vol. 44(2), 180-190, Feb 2017
Dept of Central Laboratory
Jilin University, Changchun, China
Immune System's Natural Killer Cells Critical for Protecting You from Diabetes
Mice were were exposed to the chemotherapy drug cyclophosimide which is known to cause diabetes in test animals. It was found that some mice quickly developed diabetes and others showed no signs of diabetes. When looking at specifics in their immune systems, it was found that mice that stayed healthy (and did not develop diabetes) had higher numbers of natural killer cells and their natural killer cells also produced higher levels of interleukin-4 (IL-4). Interleukin-4 is one of the ways in which white blood cells communicate to other white blood cells. As lower numbers of natural killer cells are suspected of increasing diabetes, this raises the question as to whether any environmental factors appeared which could potentially lower the number and/or quality of natural killer cells.
Journal of Experimental Medicine
Vol. 188(10), 1831-1839, Nov 1998
Department of Molecular Biology
Princeton University, New Jersey
Autoimmunity Improves via Natural Killer T Cells
Natural killer T cells are slightly different than the more common natural killer cells. Natural killer T cells are less common than natural killer cells and comprise only about 0.1% of all blood T cells. They have the unique ability to produce large amounts of cytokines which has the ability to communicate with other immune cells and also suppress immune system response. Think about the importance of this. These unique natural killer T cells have the able to suppress (or lower) immune system response. So, if someone has an overactive immune system resulting in autoimmunity against beta-cells (or any organ in the body), it is certainly nice to have natural killer T cells around to quiet the masses.
In studies of patients and mice with a variety of autoimmune diseseases, the number and functions of natural killer T cells is reduced. In experiments with mice, it was found that a deficiency of natural killer T cells worsens autoimmune conditions (such as diabetes). Therefore, one would expect that someone who has a lower number of natural killer T cells would have less ability to "calm down" autoimmune reactions within the body, and consequently, receive a higher rate of tissue damage from autoimmune reactions within the body.
Current Molecular Medicine
Vol. 9(1): 4-14
Dept. of Microbiology & Immunology
Vanderbilt Univ. School of Medicine
Nashville, TN USA
Rapid Progression of Type-1 Diabetes Occurs
if patients have low numbers of some types of natural killer cells
Although the immune system's lymphocyte T cells play a key role in beta-cell destruction in the pancreas, researchers were finding other immune system cells were malfunctioning and contributing in the all out assault on the pancreas. Normally, cells called regulatory T cells (Tregs) and invariant natural killer T cells (iNKT for short) have the job of maintaining what is called "periperhal tolerance." This simply means their job is to insure everyone on the immune system team plays by the rules and and tolerates normal body cells. So, basically, the Tregs and iNKTs make sure everyone is friendly. However, in patients with type-1 diabetes, it was found their Tregs and iNKT's were lower in number and performing abnormally. In fact, when researchers artificially increased the number of iNKT cells in animal studies, the animals showed a decrease in type-1 diabetes. When mice had high levels of iNKT cells, diabetes wasn't a problem. In fact, researchers were able to pinpoint what was wrong with these previously normal functioning cells. Apparently, crowd control goes south with the cells no longer can produce enough of two compounds known as interleukin-13 and interleukin-14 - We'll call them IL-13 and IL-14 for short. Excuse this next analogy, but IL-13 is like mace that allows iNKT cells to calm down any other cells in the area that are thinking about attacking teh beta-cells in the pancreas. Although the authors in this study state there is no therapy to revent type-1 diabetes, they do state that if we can determine the origin (cause) of iNKT cell alteration, it would represent a new path to intervene before type-1 diabetes and the information provided in this book is attempting to do just that.
DIABETES (American Diabetes Assoc).
Vol. 65(8): 2121-2123, August 2016
These Immune Cells Both Destroy and Protect the Pancreas
This study reviewed the research on how the immune system damages the pancreas.
While we hear much about autoantibodies, here are two key points from this article.
1. T Regulatory Cells (called Tregs) prevent diabetes (animals deficient have accelerated diabetes onset).
2. Patients with diabetes have impaired function of natural killer cells.
Nature Reviews Immunology
Vol. 10: 501, July 20, 2010
Immune cell crosstalk in T1D
Macrophage Malfunction:
Another Autoimmune Step to Diabetes Type-1
intro Macrophages are a type of white blood cell in the immune system. In conclusion, the scientists stated, Along with cells called dendritic cells, macrophages are number 1 among cells that present signals (antigens) to other cells to mount an attack. Researchers in this study found an interesting observation among mice genetically prone toward diabetes type-1. When mice were exposed to a compound known to cause diabetes, the islets in their pancreas (islets hold insulin producing beta-cells) became flooded with macrophages and other immune system cells in a process known as insuliltis (see picture). They also found that by reducing macrophages (through exposure to silica), there was a dramatic decrease in function and numbers of T lymphocytes and natural killer cells - resulting in prevention of the pancreas beta-cell destruction. The authors quoted other studies showing that natural killer cells and helper and cytotoxic T lymphocytes are actively involved in the destruction of islet cells (paragraph 3, Pg.585).
On the basis of our earlier studies and this study, we conclude that the prevention of insulitis and diabetes in STDPBB rats (rats treated with silica) is due to a decrease in macrophage-dependent T lymphocytes, including helper/inducer and cytotoxic/suppressor, and NK cell cytotoxicity.
DIABETES
Vol. 39(5): 590-596, May 1990
Julian McFarlane Diabetes Research Ctr
University of Calgary
Alberta, Canada
Journal of Experimental Medicine
Vol. 189(2): 347, January 1999
Julian McFarlane Diabetes Research Ctr
University of Calgary
Alberta, Canada
How Natural Killer Cells & Thymus Gland Prevent Diabetes & other AutoImmune Disorders
As described in the research above, islet cells in the pancreas are flooded with macrophages prior to development of diabetes and subsequent destruction of beta-cells. It has also been found that patients with diabetes and those with other autoimmune disorders are highly predisposed to the development of macrophage activation syndrome (MAS).
Below are the main points about this syndrome:
1. Macrophage activation syndrome is caused by hyperactivation of the macrophage immune response as a consequence of impaired natural killer cell function. In a population of patients with autoimmune disorders, type-1 diabetic patients are extremely predisposed to this syndrome. Pg. 472, par1)
2. Environmental factors are necessary to trigger the development of autoimmune disorders. Under normal conditions, the thymus prevents the complete development of autoimmune lymphocytes due to the mechanism of central tolerance. Nonetheless, small pools of autoreactive cells escape from the selection to peripheral circulation. As a back-up, there are also peripheral mechanisms (peripheral self-tolerance) aimed at destroying autoreactive lymphocytes. If central or peripheral tolerance mechanisms fail, immune reaction to self antigens can initiate autoimmunity [see study].
3. Natural killer cells have the ability to destroy lymphocyte cells attacking the pancreas. They do this by attaching onto the autoimmune T cell - and then releasing granules containing perforin and granzymes B into the T cell. This results in very fast destruction of the autoimmune T cell.
4. To quote the authors directly (pg471, par1), "Impaired action of perforin, disturbed degranulation process or defects in Fas/FasL-dependent apoptosis pathway may lead to the loss of natural killer cells function and to development of autoimmune disease.
Central European J Immunology
View Online - Download PDF
Vol. 40(4): 470-476, Jan 2015
Medical University of Warsaw
Poland
Excellent Review of Natural Killer Cells in AutoImmune Disorders
In another report, scientists conducted an extensive review of research investigating the role played by natural killer cells in protecting us from diabetes and other autoimmune disorders. Below are direct quotes from their report:
1. Cytokine activated human NK (natural killer) cells can directly kill both activated macrophages and T Cells.
2. Impaired NK cell function is frequently seen in patients with autoimmune disorders.
3. Over the last 30 years, many studies have reported decreased NK cell numbers or impairment of NK cell cytotoxicity in the peripheral blood of patients with autoimmune diseases such as multiple sclerosis (MS), rheumatoid arthritis (RA), systemic lupus erythematosus (SLE), Sjögren's syndrome, and type I diabetes mellitus (T1DM)
4. ...more recent studies have also clearly identified an association between bona fide NK cell deficits in the peripheral blood with many autoimmune disorders [55] including autoimmune thyroid disease [5657] and psoriasis [58] as well as a number of pediatric rheumatologic diseases including juvenile dermatomyositis [59] and systemic-onset juvenile idiopathic arthritis (JIA) [60].
5. ...these reports raise the possibility that autoimmunity may be associated with NK cell numeric or functional deficiencies.
6. ...several studies have demonstrated accumulation of NK cells in affected tissues of autoimmune patients. For example, infiltrating NK cells have been found to accrue in the pancreatic islet of T1DM patients [64], the hair follicle of patients with alopecia areata [65], and the muscle of children with juvenile dermatomyositis [6667]
7. Interestingly, CD56 bright NK cells, in particular, accumulate in the skin lesions of psoriatic patients [68] and the synovium of RA patients [6970]. These observations support the hypothesis that decreased NK cells in the peripheral blood of patients with autoimmune disorders may reflect the trafficking of NK cells to affected tissues.
8. Furthermore, studies in T1DM have demonstrated modestly decreased NK cell numbers in the peripheral blood of patients with recent-onset T1DM but not in patients with long-standing T1DM [72]. Interestingly, NK cells were identified around the islet cells of a subset of patients with recent-onset T1DM [64] but not in postmortem pancreatic samples from T1DM patients with long-standing disease [73]. Murine models of T1DM have also demonstrated localization of NK cells near islets as well as a temporal correlation in NK cell infiltrates during the development of diabetes, with a greater influx of NK cells during the prediabetic stage compared with late diabetes [747576].
9. ...chronic NK cell lymphocytosis (increased numbers of immature NK cells) is associated with autoimmune syndromes, including vasculitis, arthritis, and peripheral neuropathy [828384]. This disorder provides evidence that the dysregulation of NK cell homeostasis in the context of decreased NK cell cytotoxicity may contribute to the onset of autoimmunity.
10. Natural Killer (NK) cell activation is regulated through several disinct mechanisms to prevent inappropriate responses. First, they express inhibitory recptors that recognize widely expressed ligands. Second, the up-regulaton of host ligands for activating receptors is regulated to prevent inadvertent damage to normal health tissue. Finally, full NK cell responsiveness requires "licensing" through inhibitory receptors, which prevents the unrestrained activation of NK cells that do not express appropriate self-MHC class I-reactive inhibitory receptors. For people without a degree in immunology, this simply means that natural killer cells possess several ways to prevent them from attacking healthy tissue.
Arthritis Research & Therapy
Vol. 15: 216, July 2013
Drs. L Fogel, W Yokoyoma, A French
Division of Pediatric Rheumatology
Washington University
Natural Killer Cells Destroy Macrophages Linked to Starting Type-1 Diabetes
While the thymus gland works as the body's initial filter for removing autoimmune cells, there appears to be a "back-up" system ready to go in case the first defense goes on the blilnk. In this study, researchers demonstrated that human macrophages have the ability to activate natural killer cell proliferation and "prime" natural killer cells to kill target cells. On the flip side, they also found that natural killer cells also have the ability to directly kill autoimmune related macrophages. In conclusion the researchers stated,
These data suggest a new function for NK (natural killer) cell cytoxicity in eliminating overstimulated macrophages. This is important as overstimulated macrophages can be one of the first steps in pushing someone toward type-1 diabetes.
BLOOD
Vol. 109(9): 3776-85, May 2007
Division of Cell & Molecular Biology
Imperial College London, UK
While the section above described how defects in natural killer cell function can cause autoimmune disorders such as diabetes, this next section will investigate studies showing damage to natural killer cells from chemicals in the environment.
Natural Killer Cells Damaged by Mosquito Control Pesticide Naled Links to Diabetes and Autoimmune Disorders
Natural killer (NK) cells are critical for preventing viruses from host infection as well as preventing cancer. Loss of function or numbers of these cells increases rates of high viral prevalence and more aggressive cancers. NK cells have also been found to play a large role in preventing autoimmune disorders by attacking T cells showing autoimmunity toward the pancreas. Therefore, any situation that damages natural killer cell number or function has the potential for accelerating the onset of autoimmune disorders such as diabetes. In this study, scientists investigated if the pesticide dichlorvos (a breakdown product of Naled/Dibrom) and the common agricultural pesticide lorsban (chlorpyrifos) were able to damage natural killer cells. Natural killer cells were treated with both dichlorvos and chlorpyrifos at levels from 0 to 100 parts per million for 1 to 72 hours. Results showed that both pesticides caused destruction of natural killer cells through a process known as apoptosis in a time and dose-dependent manner. Chlorpyrifos showed a faster response than dichlorvos at higher doses; whereas, dichlorvos showed a slower, but stronger apoptosis-inducing ability at lower doses.
TOXICOLOGY
Vol. 239(1-2):) 89-95, July 2007
Dept. of Hygiene & Public Health
Nippon Medical School,
1-1-5 Sendagi, Tokyo, Japan
Pesticides Weaken Ability of Natural Killer Cells to Destroy Cancer
Same Pesticides found in Indoor Air of Homes built before 1989
Alhtough this study is done with cancer and not diabetes, it is important to include here because it shows how natural killer (NK) cells can be damaged by pesticides and NK cells also play a critical role in protecting us from autoimmune diseases including diabetes.
NK cells play a central role in your immune defense against tumor development and viral infections. Thus, any agent that interferes with the ability of NK cells to lyse (kill) their targets could increase the risk of tumor incidence and/or viral infections [author quote from Abstract]
In this study, scientists tested 11 different pesticides to see if they were able to weaken the ability of natural killer cells to destroy cancer cells in a laboratory setting. The compounds were tested in both purified NK cells as well as a cell preparation that contained lymphoctye T cells) and NK lymphocytes (referred to as T/NK cells). Lymphocytes were exposed to the compounds for periods of time ranging from 1 hour to 6 days.
Results showed that exposure of highly purified NK cells to 5 micrograms per cubic meter of different pesticides for 24 hours greatly weakened their ability to remove and destroy cancer cells. Below is a breakdown of specific pesticides and their reduction in cancer killing capacity of the NK cells.
alpha-chlordane 88% reduction in NK killing ability
gamma-chlordane 92% reduction in NK killing ability,
DDT 61% reduction in NK killing ability
Heptachlor 64% reduction in NK killing ability
Oxychlordane 69% reduction in NK killing ability
Pentachlorophenol (PCP) 76% reduction in NK killing ability
The loss of cancer killing ability with alpha-and gamma-chlordane remained essentially constant for 6 days, while that seen with DDT, oxychordane and PCP increased with longer exposures. PCP was the most effective of the compounds tested at decreasing NK function. Of the compounds that caused decreased cancer killing when tested in purified NK cells, PCP and oxychordane also decreased the cancer killing ability of T/NK cell preparation. In conclusion, the researachers stated,
The results provide evidence of relative toxic potential for the 11 compounds and their immunomodulatory effects on other mononuclear cells (such as T-cells, B-cells, and monocytes) as well as NK lymphocyte function.
Department of Chemistry
Tennessee State University
Nashville 37209, USA.
CHEM-TOX NOTE: Of signficant concern, the pesticides chlordane and heptachlor are still routinely found in indoor air of homes built before the compound was banned in 1989. Also, homes built before 1980 have been found to have significantly high levels of chlordane and heptachlor as the pesticide was frequently used inside homes in monthly pest control operations.
Human Experimental Toxicology
Vol 23(10): 463-471, October 2004
Dept. of Chemistry
Tennessee State University
Nashville, TN, USA
Flame Retardant Severely Weakens Immune Natural Killer Cells
Journal of Immunotoxicology
Vol. 6(4), Oct 5, 2009
Triphenyltin Pesticide Causes Severe Damage to Natural Killer Cells
Triphenyltin is a fungicide used in paints on the bottom of boats and as a pesticide in agriculture. In this study, scientists exposed freshly isolated white blood cell lymphocytes to triphynyltin compounds at levels of 750nM for 1 hour in a test tube. This resulted in a 63% decrease in natural killer cell cytoxic function. This means natural killer cells destroyed 63% less cancer or virus infected cells. Scientists then wanted to see if time would restore their ability. To test this, after exposure to the 750nM triphenyltin, they put the natural killer cells into a clean environment free of triphenyltin. After 6 days - results showed they had weakened even further and had a 91% reduction in cytotoxic ability.
CHEM-TOX COMMENT: Although not related specifically to diabetes, this study is included because of the critical importance being found of natural killer cells and their ability to eliminate autoimmune cells. Also, this study shows that while an initial test may not show immune system effects from a chemical, it is important to continue testing through a significant time period as effects can show up days following exposure.
Environmental Research
Vol. 92(3): 213-2120, August 2003
Dept. of Chemistry
Tennessee State University, USA
Back to top
|
__label__pos
| 0.65764 |
THERAPEUTIC INTERVENTIONS
Multi-fetal Pregnancy Reduction
Triplet pregnancy and higher-order pregnancies carry a high-risk of premature births, miscarriages, stillbirths and neonatal deaths. Medical or surgical interventions have not shown to be of much help in reducing the above-mentioned problems. The current standard treatment to improve the outcome of such pregnancies is to ‘reduce’ the pregnancy to a twin pregnancy. However, reduction may not be acceptable to some parents. At FETOSCAN, a detailed sensitive and scientifically accurate counselling is first given and the parents values and preferences are taken into account. Accordingly, a management plan is charted out. When the fetuses have their own placenta each, then this reduction is done at 12 weeks using a simple technique; when the fetuses share a single placenta, then reduction is performed at 16 weeks using radiofrequency ablation technique (RFA). The procedure related loss rate after fetal reduction is about 2% when done in the first trimester and is about 10% when done in the second trimester (RFA). Typically, the patient preparation, duration, and post procedure precautions are the same as that of amnio / CVS.
Direct Fetal Blood Transfusion
Also known as Intrauterine transfusion (IUT), the procedure is a lifesaving intervention when the fetus is affected with severe anaemia. The most common situation where direct fetal blood transfusion is done is when the mother is Rh negative and the fetus is Rh positive. In about 1-2% of such pregnancies, the mother will produce antibodies (attacking proteins) that will go into the blood of the fetus and cause destruction of the red blood cells of the fetus. This makes the fetus anaemic and when it becomes severe, the anaemia can be lethal for the fetus. Correction of anaemia through direct fetal transfusion is the treatment of choice. Depending on the stage of pregnancy at which the fetus becomes anaemic, two to four transfusions may be required during the pregnancy. Typically, the decision to do the procedure is taken after analysing various factors including what happened in a previous pregnancy, the blood flow velocity in the fetal brain vessel, and the stage of pregnancy. The procedure is done on an outpatient basis. The total duration of the procedure is around 1 hour, followed by another 1 hour of observation under bed rest.
Tumour embolization
Chorioangiomas are benign tumours of the placenta that do not pose significant threat to the pregnancy in the vast majority of the cases. However, when they are relatively large (>5cm), they may affect the pregnancy in two ways: they act as bypass channels for blood circulation causing excess workload on the fetal heart leading to heart failure; they act as trap to entrap fetal red blood cells causing fetal anaemia Depending on the type of problem caused by the tumour, we offer two types of therapy: if anaemia is significant, direct fetal blood transfusion; if heart failure is present without severe anaemia, we offer tumour embolization. In tumour embolization, a special glue is injected into the main vessel that ‘feeds’ the tumour thereby occluding the blood supply. This is also done on an outpatient basis using a fine needle. Typically, the procedure takes about half an hour followed by one hour of observation.
Shunts
When fluid collects inside the fetal thorax, it is referred to as pleural effusion or hydrothorax. This fluid collection may increase in quantity within the fetal chest causing pressure effect on the heart and the main blood vessels leading to heart failure and ultimately fetal death. In such situations, insertion of a shunt tube that drains the fluid from within the chest to the outside of the fetus (i.e., into the amniotic sac) relieves the pressure and protects the baby from dying due to heart failure. Fetuses presenting with pleural effusion undergo detailed evaluation to ascertain the cause of effusion and the parents are counselled at length over the pros and cons of different treatment options. Fetal Shunt insertion is also done on an outpatient basis. Typically, the duration of the procedure is about 1 hour, followed by another hour of observation.
|
__label__pos
| 0.975034 |
Inici 8-12 years What is a vaccine?
What is a vaccine?
by escoles_admin
germenbo_cA vaccine is a preparation that causes your body to produce antibodies which will make you immune to a disease.
Antibodies? Immune? Maybe you don’t know what these words mean. Well, it’s easy. An antibody is a defensive substance created by the body when it comes across cells from a different body, and to be immune means to be free of something, to succeed in not letting it affect you.
To be vaccinated means “to take precautions” against a disease; in other words, to prepare our body so that it can stand up to infectious disease and overcome the viruses and bacteria that cause it.
Vaccines are made from germs that can cause the disease, and their job is to get our body’s natural defences working to protect us against the infection.
It’s as if you were training your body to always be on the alert against a particular disease.
Why do we have to be vaccinated?
Young babies and small children are more delicate than grown-ups and can fall ill more easily. That’s why they need to be vaccinated. Generally, by the time they are two years old, they’ve already been vaccinated against a number of diseases.
Being vaccinated has individual and social benefits, in other words it’s good for you, and it’s also good for everyone else around you and near you.
Origin of vaccines
On 14th May 1796, an English doctor called Edward Jenner was the first to inoculate (which means to introduce into the body by means of a syringe) a vaccine against smallpox. The patient was an eight-year-old boy called James Phipps..
The doctor took some infectious fluid from the wound of a milkmaid who had caught cowpox when milking a cow.
Two weeks later, he again inoculated James with some pus he had taken from a smallpox patient. The boy never showed any signs of smallpox infection, and this proved that inoculating the germ – or, in other words, vaccinating – provokes a defence reaction by the body.
Jenner Jenner did not have an easy time: many doctors thought his idea was no good, but they were later silenced by his results.
Of course, vaccines have changed over the years. Their side-effects have been mitigated and their doses reduced, but the basic idea behind them has not changed a bit.
Jenner vaccinated the poor people in his town, Berkeley, and the surrounding district, free of charge. Many of those he vaccinated had been staunch opponents of vaccination, but the local vicar advised everyone to go and see the doctor because he was fed up with holding funerals for people who, if only they’d been vaccinated, would not have died of smallpox.
Nowadays, this vaccine is regarded as just another discovery, but you should know that in those days, some 15,000 people a year were dying of smallpox in France; in Germany over 70,000 people were affected, and in Russia, smallpox killed 2 million people in just one year.
Diseases we need to be vaccinated against
The most important children’s diseases that can be avoided through vaccination are:
Poliomyelitis
The polio virus causes severe muscular problems which can lead to muscle paralysis (the muscles stop working). Many polio sufferers used to end up in a wheelchair, or even die. Nowadays, extensive vaccination is responsible for preventing the few instances of this disease from spreading.
Diphtheria
A disease characterised by the formation of plaques in the throat which make it difficult to swallow and breathe. It often causes heart and nerve problems. About 10% of those affected die, 20% in the case of children or elderly people. In some parts of the world, like Eastern Europe, there are still cases of diphtheria owing to insufficient vaccination.
Whooping cough
A disease affecting the respiratory tract, characterised by causing so much coughing that it is difficult to eat, drink or even breathe. The frequent vomiting leads to weight loss. In children the disease can also lead to pneumonia and brain disorders. Without vaccination, this disease would be a lot more prevalent.
Tetanus
A disease caused by a bacterium that enters the body via cuts and wounds and attacks the nervous system. It causes a very high fever and very painful muscle spasms. It is often a serious disease. The mortality rate for tetanus can reach over 50%. It’s a good idea to be vaccinated because the tetanus bacterium spreads easily in earth and dust.
Measles
This is a highly contagious disease. Its symptoms are: coughing, high fever, watery eyes, sneezing and a rash of small red spots all over the body. Between the 1950s and 60s, almost everyone had measles at some time or another. Over 20% were hospitalised, and 7% suffered complications such as pneumonia, diarrhoea or ear infections. Less frequently, there were also a few cases of encephalitis and death. As measles is highly contagious, without vaccination it would spread very rapidly.
Meningitis
This disease causes severe inflammation of the meninges, that is, the membranes sheathing the brain and the nerves.
Meningitis used to affect a large number of children and could have important sequelae such as encephalitis, paralysis and neuronal disorders. An effective vaccine was not available until recently. Now, however, the vaccine gives a great deal of protection, which is why it is now included in the vaccination calendar.
Hepatitis
An infectious disease causing inflammation of the liver and lesions that increasingly impair its functioning. People with hepatitis B are at high risk of the infection becoming chronic and eventually causing cirrhosis and cancer of the liver. Vaccination is recommended and, at present, evidence suggests that the number of cases of this disease have diminished a great deal.
Rubella (German measles)
The rubella virus causes a rash of small red spots on the skin and palate. If a pregnant woman gets rubella during the first three months of her pregnancy, the baby may develop congenital rubella syndrome, involving heart lesions, cataracts, mental retardation and deafness. Now, however, thanks to extensive vaccination, there are hardly any cases of congenital rubella syndrome.
Parotitis(mumps)
In this disease the parotid gland, the largest salivary gland in the body, located near the jaw, becomes inflamed and swollen. Before vaccination, this disease frequently caused deafness in children. It wasn’t usually a very serious disease but in some cases it could lead to nerve and brain problems, ending in paralysis. It also increased the possibility of miscarriage during the first three months of pregnancy. As it is a highly contagious disease, without vaccination it would very easily spread among those not vaccinated.
Another vaccine that is also used frequently for elderly people or people with respiratory problems, is the flu vaccine.
Other vaccines are necessary when you’re travelling to countries affected by endemic diseases that are not prevalent in Europe.
When you’re going to be vaccinated
When you’re going to be vaccinated, think of it as something that will prevent you from getting ill. Yes, the needle-jab might hurt a bit, but it’s only a second of pain, for a lifetime of health.
Did you know that there are lots of children in the world who cannot be vaccinated? Maybe you cut yourself one day and were told you had to have an anti-tet jab. Don’t worry, there’s no need to be scared!!
Other effects
Vaccination began over a century ago, and in many countries it has been almost obligatory for 60 years.
Some vaccines have side-effects.
Vaccines are safe, but sometimes they can be a bit painful at the jab site, or cause a mild fever or an allergic reaction.
However, these side-effects are always better than having the actual disease.
Some people think that vaccines are not necessary. They’re wrong. It’s very difficult for someone never to come into contact with any disease and, if they haven’t been vaccinated, they can get infected..
How many types of vaccine are there?
Research has made it possible to create combined vaccines, meaning that a single vaccine will vaccinate you against several different diseases
The advantage is that only one jab is needed.
vacunestipus
Anecdotes
In 1918, a flu epidemic – which was christened “Spanish flu“- caused the death of over 50 million people worldwide. Now, with the vaccine, this can be avoided.
Present day
At present, lots of scientists are trying to find a vaccine against diseases such as aids and malaria, which affect millions of people throughout the world and are endemic in many places in Africa.
Author: M. Pilar Gascón. Pharmacist.
Relacionados
Aquesta web utilitza cookies per obtenir dades estadístiques de la navegació dels seus usuaris. Si continues navegant considerem que acceptes el seu ús. Acceptar Llegir més
|
__label__pos
| 0.685354 |
The difference between Ceramic Heating Band and Mica Heating Band
- Oct 13, 2020-
The difference between Ceramic Heating Band and Mica Heating Band
Some customers asked us that what is the difference between Ceramic Heating Band and Mica Heating Band, today, we are going to discuss about the main difference between these two band heater:
Firstly, an overview of the Ceramic Heating Band and Mica Heating Band
1. The Ceramic Heating Band is not made by the general mica wire bending method, but by the ceramic wire threading method, so the power of the product is 0.5 to 1.5 times higher than the ordinary one.
2. The Mica Heating Band is made of high-quality nickel-chromium alloy heating wire as the heating element, and natural mica is used as the edge layer assembly. The outer layer is made of high-quality stainless steel as the conductive heating layer. Machined rings, plates, and various special-shaped products.
BAND HEATER - 副本
Secondly, the difference between the advantages and disadvantages
1. The Ceramic Heating Band has winding properties, bends into an arc, and is heated on the surface in a flat covering form or a circular covering. The ceramic heating ring has good edge performance and can meet the requirements for high-temperature heating. It has a high working temperature and fast heating. The heating is uniform and accurate. The ceramic heating ring has a long service life, is easy to install, and the possibility of damage is small. Even if the internal heating material is damaged, the outside can still be reused, and our products can be automatically controlled.
2. Performance advantages of Mica Heating Band: Reasonable structure, beautiful appearance, stable performance, uniform heating, fast heat dissipation, long service life, good edge performance, high-pressure resistance, etc.
Third, different materials
1. The external material of the Ceramic Band is made of ceramics. The heating element is made of round wire pottery, which is wound into the shape of spring and penetrated into the ceramic bar. The ceramic bar is a high-frequency ceramic with fast heat transfer, hard and not fragile, high-temperature non-deformation and not easy to aging, etc. Features.
2. The Mica Band uses stainless steel and mica as raw materials. It is not limited by the size of the specification. It can be used for small-size heating for nozzles and for heating on plastic machine barrels.
Fourth, the high temperature of heating is different:
The heating temperature of the Ceramic Heating Band can reach 700 degrees, about 800 degrees.
The high temperature of the Mica Heating Band can reach about 200 degrees.
|
__label__pos
| 0.975269 |
Eating Two Larger Meals a Day (Breakfast and Lunch) Is More Effective Than Six Smaller Meals in a Reduced-Energy Regimen for Patients With Type 2 Diabetes: A Randomised Crossover Study
Study Questions:
Are two meals per day (breakfast and lunch) better for body weight, hepatic fat content, insulin resistance, and beta cell function compared to six meals per day?
Methods:
This was a randomized, open, crossover study, which included 54 patients (ages 30-70 years) with type 2 diabetes. All were treated with oral hypoglycemic agents, had body mass index (BMI) between 27-50 kg/m2, and glycated hemoglobin 6-11.8% (42-105 mmol/mol). Subjects were randomized to 12 weeks of either six meals per day (breakfast, lunch, dinner, and three snacks) or two meals per day (breakfast and lunch). Composition of the diets followed Association for the Study of Diabetes guidelines, with the same caloric restriction of 500 kcal/day, based on each subject’s resting energy expenditure. The diets derived 50-55% of total energy from carbohydrates, 20-25% from protein, and <30% from fat, with 30-40 g/day of fiber. All meals were provided to half of each group, while the other half prepared their own meals. The primary outcomes included BMI, hepatic fat content (measured with proton magnetic resonance spectroscopy), insulin resistance, and beta cell function.
Results:
The intention-to-treat analysis included all participants (n = 54). Body weight decreased in both regimens (p < 0.001), but was more pronounced in the two meals/day group (−2.3 kg; 95% confidence interval [CI] −2.7 to −2.0 kg for six-meals/day group vs. −3.7 kg; 95% CI, −4.1 to −3.4 kg for two meals/day group; p < 0.001). Hepatic fat content decreased in response to both regimens (p < 0.001), more for two meals/day group (−0.03%; 95% CI, −0.033% to −0.027% for six-meals/day group vs. −0.04%; 95% CI, −0.041% to −0.035% for two meals/day group; p = 0.009). Fasting plasma glucose and C-peptide levels decreased in both regimens (p < 0.001), more for two meals/day group (p = 0.004 and p = 0.04, respectively). Fasting plasma glucagon decreased with the two meals/day regimen (p < 0.001), whereas it increased (p = 0.04) for six-meals/day regimen (p < 0.001). Oral glucose insulin sensitivity increased in both regimens (p < 0.01), more for two meals/day group (p = 0.01). No adverse events were observed for either regimen.
Conclusions:
The investigators concluded that eating only breakfast and lunch reduced body weight, hepatic fat content, fasting plasma glucose, C-peptide, and glucagon, and increased oral glucose insulin sensitivity more than the same caloric restriction split into six meals. These results suggest that, for type 2 diabetic patients on a hypoenergetic diet, eating larger breakfasts and lunches may be more beneficial than six smaller meals during the day.
Perspective:
These data suggest that the number of meals per day has clinical impact on diabetic control. Further research in a larger cohort, including research on the mechanisms for such a difference, is warranted.
Keywords: Meals, Hemoglobin A, Glycosylated, Eating, Diabetes Mellitus, Type 2, Breakfast, Lunch
< Back to Listings
|
__label__pos
| 0.874046 |
@inproceedings{NEURIPS2018_84b64e53, author = {Somani, Raghav and Gupta, Chirag and Jain, Prateek and Netrapalli, Praneeth}, booktitle = {Advances in Neural Information Processing Systems}, editor = {S. Bengio and H. Wallach and H. Larochelle and K. Grauman and N. Cesa-Bianchi and R. Garnett}, pages = {}, publisher = {Curran Associates, Inc.}, title = {Support Recovery for Orthogonal Matching Pursuit: Upper and Lower bounds}, url = {https://proceedings.neurips.cc/paper/2018/file/84b64e537f08e81b8dea8cce972a28b2-Paper.pdf}, volume = {31}, year = {2018} }
|
__label__pos
| 0.995166 |
Aktör yapısına dayalı paralel programlama ortamının tasarımı ve gerçeklenmesi
thumbnail.default.alt
Tarih
1992
Yazarlar
Kandemir, Mahmut Taylan
Süreli Yayın başlığı
Süreli Yayın ISSN
Cilt Başlığı
Yayınevi
Fen Bilimleri Enstitüsü
Özet
Çok görevlilik çalışmakta olan bir işlevden bir diğerinin ortasına ikisinin de durumlarını bozmadan geçmektir. Burada amaç aynı anda birden fazla olayın denetlenmesidir. Görev bıraktırmalı sistemlerde, görev düzenleyici o anda yapılan iş ne olursa olsun onu keserek başka bir görevi çalıştırabilir. Düzenleyici, elindeki görevlerin ne zaman ve hangi sırayla çalıştırılacağına da karar verir. Bu çalışmada asenkron mesaj aktarımına dayalı, dinamik görev oluşturmaya uygun bir dil olan ACT++'a ilişkin ilkeller C++ nesneye yönelik programlama dili kullanılarak gerçekleştirilmiştir.
Concurrent programming makes it possible to use a computer where many things need attention at the same time which may be people at terminals or temperatures in an industrial plant. A concurrent program specifies two or more sequential programs that may be executed concurrently as parallel processes. A concurrent program can be executed either by allowing processes to share one or more processors or by running each process on its own processor. The first approach is referred to as multiprogramming. The second one is referred to as multiprocessing if the processors share a common memory or as distributed processing if the processors are connected by a communications network. Hybrid approaches also exist -for example, processors in a distributed system are often multiprogrammed. Object oriented programming (OOP) on the other hand is a method of programming that seeks to mimic the way we form models of the world. To cope with the complexities of life, we have evolved a wonderful capacity to generalize, classify, and generate abstractions. Almost every noun in our vocabulary represents a class of objects sharing some set of attributes or behavioral traits. From the world of individual dogs, we distill an* abstract class called 'dog'. This allows us to develop and process ideas about canines without being distracted by the details concerning any particular dog. The OOP extensions in C++ exploit this natural tendency we have to classify and abstract things. Three main properties characterize an OOP language : Encapsulation : Combining a data structure with the functions (actions or methods) dedicated to manipulating the data. Encapsulation is achieved by means of new structuring and data- typing mechanism called 'class'. -vi- Inheritance : Building new, derived classes that inherit the data and functions from one or more previously- def ined base classes, while possibly redefining or adding new data and actions. This produces a hierarchy of classes. Polymorphisms : Giving an action one name or symbol that is shared up and down a class hierarchy, with each class in the hierarchy implementing the action in a way appropriate to itself. In object-oriented concurrent programming (OOCP), a problem is modeled as a set of cooperating objects and solved by these objects communicating with each other. This programming provides us with a higher level and more unified abstraction of objects and processes. By modelling a problem as a set of cooperating objects, we can obtain higher descriptivity and understandability. In OOCP objects are defined in terms of two main properties : 1. An object is the unit not only of protection but also of execution. 2. An object has its own computing facility. According to the first property, an object is a new module which encapsulates processes and the data which is accessed only by those processes. Last item indicates that an object can proceed with the computation by itself. From this, someone can say that object-oriented concurrent computing is a model by which all problems are described in terms of communicating objects. Embedded systems programming presents some interesting challenges. A typical application might involve juggling a variety of sampling, processing, control, and communication functions simultaneously on a very small system. Such applications are inherently parallel and are best implemented by small tasks working together. In preemptive multitasking, an interrupt timer periodically executes an executive program. The executive determines if the current task has been running too long, and if so forces a context switch to the next scheduled task. If the task still has time, it updates a counter and returns from interrupt. Because an interrupt can occur and force a context switch at any point in the program, the system must save and restore the processor's entire state. Resource sharing between tasks requires routines to lock and unlock common data structures. Further, operating system calls must be re-entrant (which Ms-Dos is not). Cooperative multitasking, on the other hand, has no executive overhead and does not rely on interrupts. Instead, when a task is ready to give up control, calls a routine (pause) which switches context to the next task. -vii- Because the point of switch is always the same, only the stack pointer and a few registers are saved and stored. This makes the context switch simple and potentially very fast. This sort of tasking greatly simplifies resource sharing since other tasks cannot sneak in during updating of common structures. System calls can be performed in any operating system because a context switch cannot occur unexpectedly during the call. But that is not a real multitasking. In implementing ACT++, preemptive method has been adopted. Critical regions, monitors, and path expressions are one outgrowth of semaphores; they all provide structured ways to control access to shared variables. A different outgrowth is 'message passing' which can be viewed as extending semaphores to convey data as well as to implement synchronization. When message passing is used for communication and synchronization processes send and receive messages instead of reading and writing shared variables. Communication is accomplished because a process, upon receiving a message, obtains values from some sender process. Synchronization is accomplished because a message can be received only after it has been sent, which constrains the order in which these two events can occur. A message is sent by executing: SEND expression. list TO destination. designator; The message contains the values of the expressions in 'expression. list' at the time send is executed. The 'destination. designator' gives the programmer to control over where the message goes, and hence over which statements can receive it. A message is received by executing : RECEIVE variable.list FROM source. designator; where 'variable.list' is a list of variables. The 'source.designator gives the programmer control over where the message came from, and hence over which statements could have send it. Receipt of a message causes, first, assignment of the values in the message to the variables in the 'variable list' and, second, subsequent destruction of the message. Designing message-passing primitives involves making choices about the form and semantics of these general commands. Taken together, the destination and source designators define a communications channel. Various schemes have been proposed for naming channels. Then simplest channel- naming scheme -viii- is for process names to serve as source and destination designators. That sort of naming is called 'direct naming'. Direct naming is easy to implement and to use. It makes it possible for a process to control the times at which it receives messages from each other processes. But one of the very important paradigms for process interaction is the client/server relationship. Some server processes render a service to some client processes. A client can request that a service be performed by sending a message to one of these servers. A server repeatedly receives a request for service from a client, performs that service, and (if necessary) returns a completion message to that client. Unfortunately, direct naming is not always well-suited for client/server interaction. Ideally, the receive in a server should allow receipt of a message from any client. If there is only one client, then direct naming will work well; the difficulties arise if there is more than one client because, at the very least, a receive would be required for each. Similarly, if there is more than one server (and all servers are identical), then the send in a client should produce a message that can be received by any server. Again, this cannot be accomplished easily by direct naming. A more sophisticated scheme for defining communications channels is based on the use of 'global names', sometimes called 'mail-boxes'. A mailbox can appear as the destination designator in any process 'send statements and as the source designator in any process 'receive statements. Thus messages sent to a given mail-box can be received by any process that executes a receive naming that mail box. As easily seen, this scheme is particularly well-suited for programming client/server interactions. A special case of mail- boxes, in which a mail-box name can appear as the source designator in receive statements in one process only, does not suffer any implementation difficulty. Such mail-boxes are often called as 'ports'. ACT++ is a concurrent OOP language being developed as a part of a research project on concurrent real time systems. The Actor model is a concurrent computation model in which computation is achieved by actors communicating via message passing. The model consists of five basic elements : actors, mail queues, messages, behaviors, and acquaintances. An actor is a self-contained active object. Interaction among actors can occur only through message passing. Each actor is associated with a unique mail queue, whose address serves as the IX- identifier of the actor. The messages send to actor are buffered by its mail queue. Messages buffered in a mail queue are read one at a time in a strict FIFO order. The behavior of an actor determines how the actor reacts to a request specified in the message processed. A behavior is defined by a code body called the behavior script. The script contains method definitions, and acquaintances. Acquaintances are the names of other actors *to which an actor can send messages. A behavior script corresponds to a class definition in other OOP languages while acquaintances correspond to instance variables. In processing a message, an actor can do three things: make new actors, send messages to actors, and specify a replacement behavior. Actors are dynamically produced at run-time as needed during the course of computation. A new actor is produced by the 'New' operation. The send operation is the primitive used for asynchronous message passing. A message consists of the address of the target actor, the name of the method to be invoked, and parameters for the method invocation. The last primitive operation is the specification of a replacement behavior. The 'become' operation is used for that. This operation requires a behavior script name and a list of acquaintances. The operation produces a thread. The newly produced thread is the current behavior of the actor. The replacement behavior determines how to handle the next unprocessed message. Since a thread can specify a replacement only once in its life, there is at most one behavior waiting for a message at any time. Concurrency in ACT++ comes from two sources: making a new actor and specification of a replacement behavior. The former results in inter - object concurrency, while the latter yields intra-object concurrency. Two kinds of objects are distinguished in ACT++, namely active objects and passive objects. An active objects proceeds concurrently with other objects. An active object, processing its own thread of control, is an actor. All objects that are not actors are passive objects. The invocation of a method of a passive object is performed using the thread of the requesting -x- object. Each object is an instance of some class. A class defines the properties of its instance objects. A class can inherit from another existing class by declaring itself as a subclass of existing class. A subclass can redefine, restrict, or extends the definition of its superclass. Active objects are instances of classes which are direct or indirect subclasses of a special class called ACTOR. Passive objects are instances of classes which are not subclasses of ACTOR. The language supports the primitive operations of the Agha's actor kernel language : New, Send and Become. Invoking methods of a passive object has the semantics of a function call. Invoking a method of an actor on the other hand, is via asynchronous message passing. Two types of messages are distinguished in ACT++, namely, request messages and reply messages. A request message is used for invoking a method while a reply message is used for delivery of the result of a method invocation. Two types of mail boxes are available to support these two different kinds of messages : 'MBox' and 'CBox'. A request message is used for sending a request to another actor. Request messages are buffered in the mail queue (MBox) of the receiving actor. An actor can refer to its own MBox using the pseudo variable 'self. Each behavior of actor can process only one request message in the MBox. If the sender of a request wants to receive the result of the method invocation, it may provide a CBox name in the request message. The 'reply' operation is used to transmit a reply message containing the result. The name of a CBox specified in a request message is called the reply destination. Technically, ACT++ is a language design which supports both class inheritance and the actor model of concurrency. As an expedient implementation strategy, C++ is used as the base language, extending it with the concurrency abstraction of the actor model. In ACT++, actors represent active objects. All non-actor objects are passive. A passive object represents a C++ object, which is local to a single active object. A shared object must be actor. Like passive objects, an actor class can inherit properties from- an existing actor class by defining itself to be a subclass of it. ACT++ distributes concurrency control into each method. The New operation for making a new actor MBox is a function which takes the name of an actor class as an argument. The operation is implemented as a conventional function without being a member of any class. The become operation is a friend member of ACTOR. The operation is overloaded to allow an actor to specify self as the replacement behavior. The send operation is implemented as a method of the class (struct) MBox. The -xi- syntax for sending a message is written as a series of stream like output operations (<<). For example, the following statement sends to an MBox called myMBox a message consisting of aMethod, replyDestination, ant two method invocation parameters, namely, firstinteger and second integer: myMBox << aMethod << replyDestination << firsinteger << second integer; An actor can read a request message from its MBox using the operation >> on the pseudo. variable self. Since the method name argument of a request message is used by the mail queue for selecting the method to invoke, the method name is not read by the >> operation. The >> operation is only used to read the values for the parameters of the method. Each method of a behaviour script contains with a >> statement. For example, contiuning the example above, the definition of a method aMethod of an actor myMBox uses the following for reading the message from the MBox: self >> first integer Arg >> second in tegerArg; The class CBox supports the 'reply' method for transmitting a reply message. The following statement sends a reply message containing 53 to the replyDestination. reply (53); Two other methods are provided by a CBox : In and receive. The method In() is used to check whether or not the reply has arrived in a CBox. The receive operation denoted by '»' reads a reply from a CBox. The use of these methods are illustrated in the following: if (myCBoxl.InO) then myCBoxl >> result else myCBox2 >> result; If myCBoxl has not yet received a reply, then myCBox2 is read, in which case the actor executing the statement may be blocked depending on the presence of a reply message in rayCBox2..
Açıklama
Tez (Yüksek Lisans) -- İstanbul Teknik Üniversitesi, Fen Bilimleri Enstitüsü, 1992
Anahtar kelimeler
Bilgisayar Mühendisliği Bilimleri-Bilgisayar ve Kontrol, Paralel programlama, Tasarım, Computer Engineering and Computer Science and Control, Parallel programs, Design
Alıntı
|
__label__pos
| 0.934266 |
remote.it Community Forum
Reducing data usage
I’m investigating reducing the data usage of our device. Using wireshark/tcpdump I have been able to establish that remote.it is ‘pinging’ over UDP quite frequently (presumably to maintain a valid connected/disconnected state on the remote.it servers).
Are there any settings to reduce the frequency of these, or any other ways to reduce the amount of data remote.it is consuming?
what kind of bandwidth are you seeing? You have seen this right?
From what we see this is much less than most keepalive’s we have seen.
There are ways you can reduce this, but likely the biggest data usage is when you have a proxy connected, where the bandwidth goes up quite a bit.
have you tried Desktop for connections? This might help a lot.
Let me know how many services your device has and what your seeing for bandwidth.
Thanks, I hadn’t seen that post. That looks fairly similar to what I’m seeing. We have a device that registers as bulk and ssh. Our tcpdump calculations with extrapolation came out at ~20Mb a month, definitely higher than your measurement, but not far off. Also worth mentioning we are using a cellular modem.
What do you mean by ‘Desktop for connections’?
Update:
Sorry, are you saying that using the Remote.it Desktop App (https://docs.remote.it/guides/using-the-desktop-app) will improve bandwidth requirements when we want to connect over ssh? This won’t affect the baseline 20Mb/month keepalive though, obviously.
Yes I think most bandwidth people consume is when they have a connection, as the keepalive for an established connection is much higher than the heartbeat to the servers.
So you might have a proxy running for a while after its use, which eats up much more bandwidth.
You can add settings in the provisioning file to reduce the server bandwidth, but you would have to calculate the max time your NAT/firewall tables stay open and set it as aggressive as you think you can without loosing reach-ability .
the connectd -nat
may tell you how aggressive you can go, I’ll see if those instructions are available and see if they are not already online to post a guide.
|
__label__pos
| 0.911664 |
[Previous][Contents] [Marketing Needed -- Can You Help?]
Copyright © 1996-2005 jsd
Previous Up Next
19 The Laws of Motion
There is no gravity.
The earth sucks.
— Physicist’s bumper sticker
This chapter pulls together some basic physics ideas that are used in several places in the book.
We will pay special attention to rotary motion, since it is less familiar to most people than ordinary straight-line motion. Gyroscopes, in particular, behave very differently from ordinary non-spinning objects. It is amazing how strong the gyroscopic effects can be.
19.1 Straight-Line Motion
Let’s start by reviewing the physical laws that govern straight-line motion.
19.1.1 First Law
The first law of motion states: “A body at rest will remain at rest, and a body in motion will remain in motion, namely uniform straight-line motion, unless it is subjected to an outside force”. Although that may not sound like a very deep idea, it is one of the most revolutionary statements in the history of science. Before Galileo’s time, people omitted frictional forces from their calculations. They considered friction “natural” and ubiquitous, not requiring explanation; if an object continued in steady motion, the force required to overcome friction was the only thing that required explanation. Galileo dramatically changed the viewpoint. Absence of friction is now considered the “natural” state, and frictional forces must be explained and accounted for just like any others.
The first law applies in the absence of outside forces. Any situation involving outside forces is covered by the second law, as we now discuss.
This is often called Newton’s first law of motion, which is quite unfair to Galileo. Newton was the first to set this law at the top of a numbered list, but he did not originate the law itself.
19.1.2 Second Law
The second law of motion says that if there is any change in the velocity of an object, the force (Fu) is proportional to the mass (m) of the object, and proportional to the acceleration vector (a). In symbols,
Fu = m a (19.1)
The acceleration vector is defined to be the rate-of-change of velocity. See below for more about accelerations. Here Fu is the force exerted upon the object by its surroundings, not vice versa.
The following restatement of the second law is often useful: since momentum is defined to be mass times velocity, and since the mass is not supposed to be changing, we conclude that the force is equal to the rate-of-change of the momentum. To put it the other way, change in momentum is force times time.
19.1.3 Third Law
The third law of motion expresses the idea that momentum can neither be created nor destroyed. It can flow from one region to an adjoining region, but the total momentum does not change in the process. This is called conservation of momentum. As a corollary, it implies that the total momentum of the world cannot change. An application of this principle appears in section 19.2. Conservation of momentum is one of the most fundamental principles of physics, on a par with the conservation of energy discussed in chapter 1.
In simple situations, the third law implies that if object A exerts a force on object B, then object B exerts an equal and opposite1 force on object A.2 (In complicated situations, keeping track of equal-and-opposite forces may be impractical or impossible, in which case you must rely on the vastly more fundamental notion of conservation of momentum.)
Note the contrast:
The third law implies that if we add the force exerted by object A on object B plus the force exerted by object B on object A, the two forces add to zero. These are two forces acting on two different objects. They always balance. Equilibrium means that if we add up all the forces exerted on object A by its surroundings, it all adds up to zero. These forces all act on the same object. They balance in equilibrium and not otherwise.
There is also a law of conservation of angular momentum. This is so closely related to conservation of ordinary linear momentum that some people incorporate it into the third law of motion. Other people leave it as a separate, unnumbered law of motion. We will discuss this starting in section 19.3.
19.1.4 Two Notions of Acceleration
The quantity a = F/m that appears in equation 19.1 was carefully named the acceleration vector. Care was required, because there is another, conflicting notion of acceleration:
Alas, everyone uses both of these conflicting notions, usually calling both of them “the” acceleration. It is sometimes a struggle to figure out which meaning is intended. One thing is clear, though: the quantity a = F/m that appears in the second law of motion is a vector, namely the rate-of-change of velocity.
Do not confuse velocity with speed. Velocity is a vector, with magnitude and direction. Speed is the magnitude of the velocity vector. Speed is not a vector.
Suppose you are in a steady turn, and your copilot asks whether you are accelerating. It’s ambiguous. You are not speeding up, so no, there is no scalar acceleration. However, the direction of the velocity vector is changing, so yes, there is a very significant vector acceleration, directed sideways toward the inside of the turn.
If you wish, you can think of the scalar acceleration as one component of the vector acceleration, namely the projection in the forward direction.
Try to avoid using ambiguous terms such as “the” acceleration. Suggestion: often it helps to say “speeding up” rather than talking about scalar acceleration.
19.1.5 Force is Not Motion
As simple as these laws are, they are widely misunderstood. For example, there is a widespread misconception that an airplane in a steady climb requires increased upward force and a steady descent requires reduced upward force.3 Remember, lift is a force, and any unbalanced force would cause an acceleration, not steady flight.
In unaccelerated flight (including steady climbs and steady descents), the upward forces (mainly lift) must balance the downward forces (mainly gravity). If the airplane had an unbalanced upward force, it would not climb at a steady rate — it would accelerate upwards with an ever-increasing vertical speed.
Of course, during the transition from level flight to a steady climb an unbalanced vertical force must be applied momentarily, but the force is rather small. A climb rate of 500 fpm corresponds to a vertical velocity component of only 5 knots, so there is not much momentum in the vertical direction. The kinetic energy of ordinary (non-aerobatic) vertical motion is negligible.
In any case, once a steady climb is established, all the forces are in balance.
19.2 Momentum in the Air
We know from the third law of motion that if object A exerts a force on object B, then object B exerts an equal and opposite force on object A, as discussed in section 19.1.
There are many such force-pairs in a typical flight situation, as shown in figure 19.1 and figure 19.2.
momentum-budget-straight
Figure 19.1: Force and Momentum in Straight Flight
momentum-budget-arc
Figure 19.2: Force and Momentum in Curved Flight
In each of these numbered force-pairs, the “a” part always balances the “b” part exactly, in accordance with the third law of motion, whether or not the system is in equilibrium. In fact, figure 19.2 shows a non-equilibrium situation: the weight (1b) exceeds the lift (2a), so there is an unbalanced downward force, and the airplane is following a downward-curving flight path.
Note: In reality, these forces are all nearly aligned, all acting along nearly the same vertical line. (In the figure, they are artificialy spread out horizontally to improve readability.) Also, for simplicity, we are neglecting the effect of gravity on the air mass itself.
The arrows representing forces are color-coded according to which item they act upon: Blue arrows act upon the wing; brown arrows act upon the ground; green arrows act upon the light-green air parcel, et cetera.
For simplicity, we choose to analyze this from the viewpoint of an unaccelerated bystander. This means there will be no centrifugal field associated with the curved flight path in figure 19.2.
Let us now return to the scenario of unaccelerated flight, as shown by figure 19.1. In this scenario, the airplane weighs less than the airplane in figure 19.2, while all the other forces remain the same. The weight (1b) now equals the lift (2a), as it should for unaccelerated flight.
Since force is just momentum per unit time, the same process can be described by a big “closed circuit” of momentum flow. The earth transfers downward momentum to the airplane (by gravity). The airplane transfers downward momentum to the air (by pressure near the wings). The momentum is then transferred from air parcel to air parcel to air parcel. Finally the momentum is transferred back to the earth (by pressure at the surface), completing the cycle. In steady flight, there is no net accumulation of momentum anywhere.
You need to look at figure 3.29 to really understand the momentum budget. Looking only at figure 3.2 doesn’t suffice, because that figure isn’t large enough to show everything that is going on. You might be tempted to make the following erroneous argument:
To solve this paradox, remember that figure 3.2 shows only the flow associated with the bound vortex that runs along the wing, and does not show the flow associated with the trailing vortices. Therefore it is only valid relatively close to the wing and relatively far from the wingtips.
Look at that figure and choose a point somewhere about half a chord ahead of the wing. You will see that the air has some upward momentum at that point. All points above and below that point within the frame of the figure also have upward momentum. However, it turns out that if you go up or down from that point more than a wingspan or so, you will find that all the air has downward momentum. This downward flow is associated with the trailing vortices. Near the wing the bound vortex dominates, but if you go higher or lower the trailing vortices dominate. If you are wondering how this is possible, consider the following contrast. It helps to think carefully about what we mean by “vortex”:
A vortex line or vortex core is just a line, with zero thickness. The core of the trailing vortex extends behind the wing only. The flow pattern of the vortex extends throughout all space. The speed of flow falls off only gradually as a function of distance from the vortex core. The trailing vortex flow pattern affects the air ahead of the wing.
If you know the location and strength of the core, you can determine the entire flow pattern ... but the core and the flow are two different concepts.
If you add up all the momentum in an entire column of air, for any vertical column ahead of the wing, you will find that the total vertical momentum is zero. The total momentum associated with the trailing vortices exactly cancels the total momentum associated with the bound vortex.
If you consider points directly ahead of the wing (not above or below), a slightly different sort of cancellation occurs. The flow associated with the trailing vortices is never enough to actually reverse the flow associated with the bound vortex; there is always some upwash directly ahead of the wing, no matter how far ahead. However, the contribution associated with the trailing vortices greatly reduces the magnitude, so the upwash pretty soon becomes negligible. Therefore, to a reasonable approximation, we can speak of “undisturbed” air ahead of the airplane.
Behind the wing there is no cancellation of any kind; the downwash of the wing is only reinforced by the downward flow associated with the trailing vortices. There is plenty of downward momentum in any air column behind the wing.
This gives us a simple picture of the airplane’s interaction with the air: There is downward momentum in any air column that passes through the vortex loop (such as the loop shown in figure 3.29). There is no such momentum in any air column that is ahead of the wing, outboard of the trailing vortices, or aft of the starting vortex.
So now we can understand the momentum balance:
1. As the airplane flies along minute by minute, it imparts more and more downward momentum to the air, by enlarging the region of downward-moving air behind it.
2. The air imparts downward momentum to the earth.
3. The gravitational interaction between earth and airplane completes the circuit.
19.3 Sitting in a Rotating Frame
If we measure motion relative to a rotating observer, we cannot directly apply the laws of motion in the simple form that Newton published in the late 1600s. In this section and the next, we will use what we know about non-rotating reference frames to deduce the correct laws for rotating frames.
Suppose Moe is riding on a turntable; that is, a large, flat, smooth, horizontal rotating disk, as shown in figure 19.3. Moe has painted an X, Y grid on the turntable, so he can easily measure positions, velocities, and accelerations relative to the rotating coordinate system. His friend Joe is nearby, observing Moe’s adventures and measuring things relative to a nonrotating coordinate system.
turntable
Figure 19.3: Rotating and Non-Rotating Coordinate Systems
We will assume that friction between the puck and the turntable is negligible.
The two observers analyze the same situation in different ways:
Moe immediately observes that the first law of motion, it its simplest form, does not apply in rotating reference frames. In Joe’s nonrotating frame, the simple laws do apply.
Relative to the turntable, an unconstrained hockey puck initially at rest (anywhere except right at the center) does not remain at rest; it accelerates outwards. This is called centrifugal acceleration. In a nonrotating frame, there is no such thing as centrifugal acceleration. The puck moves in a straight line, maintaining its initial velocity, as shown in figure 19.4.
To oppose the centrifugal acceleration, Moe holds the puck in place with a rubber band, which runs horizontally from the puck to an attachment point on the turntable. By measuring how much the rubber band stretches, Moe can determine the magnitude of the force. Joe can observe the same rubber band. Moe and Joe agree about the magnitude and direction of the force.
Moe says the puck is not moving relative to his reference frame. The rubber band compensates for the centrifugal force. Joe says that the puck’s momentum is constantly changing due to the rotation. The rubber band provides the necessary force.
There are additional contributions to the acceleration if the rate of rotation and/or direction of rotation are unsteady. For simplicity, we will consider only cases where the rotation is steady enough that these terms can be ignored.
The centrifugal acceleration varies from place to place, so we call it a field. Section 19.5.1 discusses the close analogy between the centrifugal field and the familiar gravitational field.
The centrifugal field exists in a rotating reference frame
and not otherwise.
It must be emphasized that what matters is the motion of the reference frame, not the motion of the airplane. You are free to choose whatever reference frame you like, but others are free to choose differently. Pilots usually find it convenient to choose a reference frame comoving with the aircraft, in which case there will be a centrifugal field during turns. Meanwhile, however, an engineer standing on the ground might find it convenient to analyze the exact same maneuver using a non-rotating reference frame, in which case there will be no centrifugal field.
The centrifugal field comes from
the rotation of the reference frame
not the rotation of any particular object(s).
19.4 Moving in a Rotating Frame
We now consider what happens to an object that is moving relative to a rotating reference frame.
Suppose Moe has another hockey puck, which he attaches by means of a rubber band to a tiny tractor. He drives the tractor in some arbitrary way. We watch as the puck passes various marks (A, B, etc.) on the turntable.
Moe sees the puck move from mark A to mark B. The marks obviously are not moving relative to his reference frame. Joe agrees that the puck moves from mark A to mark B, but he must account for the fact that the marks themselves are moving.
So let’s see what happens when Joe analyzes the compound motion, including both the motion of the marks and the motion of the puck relative to the marks.
So far, we have identified four or five contributions (which we will soon collapse to three):
Description Scaling Properties
1. Suppose the puck is accelerating relative to Moe’s rotating frame (not just moving, but accelerating). Joe sees this and counts it as one contribution to the acceleration. This “F=ma” contribution is completely unsurprising. Both observers agree on how much force is required for this part of the acceleration. It is independent of position, independent of velocity, and independent of the frame’s rotation rate.
2. From Joe’s point of view, mark A is not only moving; its velocity is changing. Changing this component of the puck’s velocity requires a force. From Moe’s point of view, this is the force needed to oppose centrifugal acceleration, as discussed previously. This “centrifugal” contribution depends on position, but is independent of the velocity that Moe measures relative to his rotating reference frame. It is also independent of any acceleration created by Moe’s tractor. It is proportional to the square of the frame’s rotation rate.
3. The velocity of mark B is different from the velocity of mark A. As the puck is towed along the path from point A to point B, the rubber band must provide a force in order to change the velocity so the puck can “keep up with the Joneses”. This contribution is independent of position. It is proportional to the velocity that Moe measures, and is always perpendicular to that velocity. It is also proportional to the first power of the frame’s rotation rate.
4. The velocity of the puck relative to the marks is also a velocity, and it must also rotate as the system rotates. This change in velocity also requires a force. Just like contribution #3, this contribution is independent of position, proportional to the velocity relative to the rotating frame, perpendicular to that velocity, and proportional to the first power of the frame’s rotation rate.
5. We continue to assume that the frame’s rotation rate is not changing, and its plane of rotation is not changing. Otherwise there would be additional contributions to the equations of motion in the rotating frame.
Contribution #3 is numerically equal to contribution #4. The total effect is just twice what you would get from either contribution separately. We lump these two contributions together and call them the Coriolis effect.4
The Coriolis effect can be described as an acceleration (proportional to the object’s velocity), and equivalently it can be described as a force (proportional to the object’s momentum).
Let’s consider a reference frame attached to an eastward-rotating rotating planet, such as the earth. Near the north pole, the Coriolis acceleration is always toward your right, if you are facing forward along the direction of motion. Northward motion produces a Coriolis acceleration to the east; a very real westward force is necessary to oppose it if you want to follow a straight line painted on the earth. Eastward motion produces a Coriolis acceleration to the south; a very real northward force is necessary to oppose it.
The Coriolis argument only applies to motion in the plane of rotation. Momentum in the other direction (parallel to the axis of rotation) is unaffected. In all cases the Coriolis acceleration lies in the plane of rotation and perpendicular to the motion.
Near the equator, we have to be careful, because the plane of rotation is not horizontal. In this region, eastward motion produces a Coriolis acceleration in the upward direction, while westward motion produces a Coriolis acceleration in the downward direction. In this region, north/south motions are perpendicular to the plane of rotation and produce no Coriolis effects.
To reiterate: The Coriolis effect and the centrifugal field are two separate contributions to the story. The Coriolis effect applies only to objects that are moving relative to the rotating reference frame. The centrifugal field affects all objects in the rotating frame, whether they are moving or not.
The Corilois effect exists when there is motion
in the plane of rotation of the reference frame
and not otherwise.
* Magnitude of the Effect
Suppose you are in an airplane, flying straight ahead at 120 knots along the shortest path between two points on the earth’s surface. Because of the rotation of the earth, the airplane will be subject to a Coriolis acceleration of about 0.001G. This is too small to be noticeable.
Now suppose you and a friend are standing 60 feet apart, playing catch in the back of a cargo airplane while it is performing a standard-rate turn (three degrees per second). If your friend throws you the ball at 60 mph, it will be subject to a horizontal Coriolis acceleration of more than a quarter G. That means the ball will be deflected sideways about 2½ feet before it gets to you — which is enough to be quite noticeable. In normal flying, though, we don’t often throw things far enough to produce large Coriolis effects.
The wind, moving relative to the rotating earth, is subject to a Coriolis acceleration that is small but steady; the cumulative effect is tremendously important, as discussed in section 20.1.
19.5 Centrifuges with and without Gravity
19.5.1 The Centrifugal Field is as Real as Gravity
An airplane in a turn, especially a steep turn, behaves like a centrifuge. There are profound analogies between centrifugal and gravitational fields:
The gravitational field at any given point is an acceleration. It acts on objects, producing a force in proportion to the object’s mass. The centrifugal field at any given point is also an acceleration. It, too, acts on objects, producing a force in proportion to the object’s mass.
Strictly speaking, neither gravity nor centrifugity is a “force” field. Each is really an acceleration field. There is often a force involved, but it is always a force per unit mass, which is properly called an acceleration.
Einstein’s principle of equivalence states that at any given point, the gravitational field is indistinguishable from an acceleration of the reference frame.5 Relative to a freely-falling reference frame, such as a freely-orbiting space station, everything is weightless.
My laboratory is not a free-falling inertial frame. It is being shoved skyward as the earth pushes on its foundations. If you measure things relative to the laboratory walls, you will observe gravitational accelerations. Similarly, the cabin of a centrifuge is clearly not an inertial frame. If you measure things relative to the cabin, you will observe centrifugal accelerations.
From a modern-physics point of view, both local gravity and local centrifugity emerge as consequences of working in an accelerated frame. There is nothing wrong with doing so, provided the work is done carefully. Accounting for centrifugal effects is not much trickier than accounting for gravitational effects. When people think this can’t be done, it is just because they don’t know how to do it. To paraphrase Harry Emerson Fosdick:
Person saying it can’t be done
is liable to be interrupted by persons doing it.
For a ground-bound observer analyzing the flight of an airplane, it may be convenient to use a reference frame where gravity exists and centrifugity does not. However, the pilot and passengers usually find it convenient to use a frame that includes both gravity and centrifugity.
The centrifugal field is not crude or informal or magical. (The problem with magic is that it can explain false things just as easily as true things.) Like the gravitational field, it is a precise way of accounting for what happens when you work in a non-freely-falling reference frame.
19.5.2 Centrifuge
To get a better understanding of the balance of forces in a turning and/or slipping airplane, consider the centrifuge shown in figure 19.4. For the moment we will neglect the effects of gravity; imagine this centrifuge is operating in the weightless environment of a space station. We are riding inside the centrifuge cabin, which is shown in red. We have a supply of green tennis balls. At point A (the southernmost point of our path) we drop a tennis ball, whereupon it flies off as a free particle. Our centrifuge continues to follow its circular path.
centri-newt
Figure 19.4: An Object Departing a Centrifuge
Case 1a: Consider the point of view of a bystander (not riding in the centrifuge). The dropped tennis ball moves in a straight line, according to the first law of motion. Contrary to a common misconception, the bystander does not see the ball fly radially away from the center of the centrifuge. It just continues with the purely eastward velocity it had at point A, moving tangentially.
Case 1b: Consider our point of view as we ride in the centrifuge. At point A, the tennis ball has no velocity relative to us. For the first instant, it moves along with us, but then gradually it starts moving away. We do see the ball accelerate away in the purely radial direction. The tennis ball — like everything else in or near the centrifuge — seems to be subjected to a centrifugal acceleration field.
Einstein’s principle of equivalence guarantees that our viewpoint and the bystander’s viewpoint are equally valid. The bystander says that the centrifuge cabin and its occupants accelerate away from the freely moving tennis ball, while we say that the tennis ball accelerates away from us under the influence of the centrifugal field.
There is one pitfall that must be avoided: you can’t freely mix the two viewpoints. It would be a complete fallacy for the bystander to say “The folks in the cabin told me the tennis ball accelerated outward; therefore it must move to the south starting from point A”. In fact, the free-flying ball does not accelerate relative to the bystander. It will not wind up even one millimeter south of point A. It will indeed wind up south of our centrifuge cabin, but only because we have peeled off to the north.
Case 2a: Consider from the bystander’s point of view what happens to a ball that has not been released, but is just sitting on a seat in the centrifuge. The bystander sees the ball subjected to an unbalanced force, causing it to move in a non-straight path relative to the earth.
Case 2b: Consider the seated ball from the centrifuge-riders’ point of view. The force on the ball exerted by the seat is just enough to cancel the force due to centrifugal acceleration, so the forces are in balance and the ball does not move.
When analyzing unsteady motion, or when trying to calculate the motion of the centrifuge itself, it is often simpler to analyze everything from the bystander’s point of view, in which the centrifugal field will not appear. On the other hand, in a steady turn, is often easy and natural to use the centrifuge-riders’ point of view; in which all objects will be subject to centrifugal accelerations.
19.5.3 Centrifuge and Gravity
Now that we understand the basic idea, let’s see what happens when our centrifuge operates in the normal gravitational field of the earth. This is shown in figure 19.5. When the tennis ball departs the centrifuge, it once again travels in a purely easterly direction, but this time it also accelerates downward under the influence of gravity.
centri-eins
Figure 19.5: An Object Departing a Centrifuge, with Gravity
Once again, from inside the cabin we observe that the tennis ball initially accelerates away in the direction exactly away from the pivot of the centrifuge. This is no coincidence; it is because the only difference between our motion and the free-particle motion comes from the force in the cable that attaches us to the pivot.
Remember, the equivalence principle says that at each point in space, a gravitational field is indistinguishable from an accelerated reference frame. Therefore we need not know or care whether the tennis ball initially moves away from us because we are being accelerated, or because there is a gravitating planet in the vicinity, or both.
(The previous two paragraphs apply only to the initial acceleration of the dropped ball. As soon as it picks up an appreciable velocity relative to us, we need to account for Coriolis acceleration as well as gravitational and centrifugal acceleration.)
19.6 Centrifugal Effects in a Turning Airplane
Let’s examine the forces felt by the pilot in a turning airplane. We start with a coordinated turn, as shown in figure 19.6.
coord-plane-ball
Figure 19.6: Airplane in a Coordinated Turn
slip-plane-ball
Figure 19.7: Airplane in a Nonturning Slip
boat-plane-ball
Figure 19.8: Airplane in a Boat Turn
In figures such as this, whenever I am analysing things using the pilot’s point of view, the figure will include a rectangular “frame” with a little stick figure (the observer) standing in it. It is important to carefully specify what frame is being used, because even simple questions like “which way is down” can have answers that depend on which observer you ask. In particular, I define L-down (Lab-frame down) to mean the downward direction as observed some nearby terrestrial laboratory frame. In contrast, I define A-down (aircraft down) to be the downward direction in the reference frame attached to the aircraft. When the aircraft is turning, the two directions are not the same.
Using your inner ear, the seat of your pants, and/or the inclinometer ball, you can tell which way is A-down. Using the natural horizon and/or the artificial horizon, you can tell which way is L-down.
In figure 19.6, assume the airplane’s mass is one ton. Real gravity exerts a force of one ton, straight down toward the center of the earth. The airplane is an a 45 bank, so there is one ton of centrifugal force, sideways, parallel to the earth’s horizon. All in all, the wings are producing 1.41 tons of lift, angled as shown in the figure.
The lower part of figure 19.6 analyzes the forces on the inclinometer ball. Real gravity exerts a downward force on the ball, and centrifugity exerts a sideways force. The tubular race that contains the ball exerts a force perpendicular to the wall of the race (whereas the ball is free to roll in the direction along the race). The race-force balances the other forces when the ball is in the middle, confirming that this is a coordinated turn.
Next, we consider the forces on the airplane in an ordinary nonturning slip, as shown in figure 19.7. The right rudder pedal is depressed, and the port wing has been lowered just enough that the horizontal component of lift cancels the horizontal force due to the crossflow over the fuselage. The airplane is not turning. Everybody agrees there is no centrifugal field.
As a third example, we consider what happens if you make a boat turn, as shown in figure 19.8. (For more about boat turns in general, see section 8.11.) Because the airplane is turning, it and everything in it will be subjected to a centrifugal acceleration (according to the viewpoint of the centrifuge riders).
The lower part of figure 19.8 shows how the inclinometer ball responds to a boat turn. Gravity still exerts a force on the ball, straight down. Centrifugity exerts a force sideways toward the outside of the turn. The ball is subject to a force of constraint, perpendicular to the walls of the race. (It is free to roll in the other direction.) The only place in the race where this constraint is in a direction to balance the other forces is shown in the figure. The ball has been “centrifuged” toward the outside of the turn. This is a quantitative indication that the A-down direction is not perpendicular to the wings, and some force other than wing-lift is acting on the plane.
19.7 Angles and Rotations
19.7.1 Axes and Planes of Rotation: Yaw, Pitch, and Roll
Any rotation can be described by specifying the plane of rotation and the amount of rotation in that plane. (Note that in this chapter, the word “airplane” is always spelled out, using eight letters. In contrast, the word “plane” will be reserved to refer to the thin, flat abstraction you learned about in geometry class.)
rotations
Figure 19.9: Rotations: Yaw, Pitch and Roll
Three particularly simple planes of rotation are yaw, pitch, and roll, as shown in figure 19.9. If you want a really precise definition of these three planes, proceed as follows: First: The airplane has a left-right mirror symmetry, and it is natural to choose the plane of symmetry as the plane of pitch-wise rotations. Secondly: Within the symmetry plane, we somewhat-arbitrarily choose a reference vector, attached to the airplane, that corresponds to zero pitch angle. It is conventional to choose this so that level cruising flight corresponds to zero pitch. The exact choice is unimportant. The roll-wise plane is perpendicular to this vector. Thirdly: The yaw-wise plane is perpendicular to the other two planes.
Any plane of rotation – not just the three planes shown in figure 19.9 – can be quantified in terms of bivectors, as discussed in section 19.8.
Older books often speak in terms of the axis of rotation, as defined in figure 19.10. In the end, it comes to the same thing: for example, yaw-wise rotation is synonymous with a rotation about the Z axis.
We prefer to speak in terms of the plane of rotation. This is more modern, more sophisticated, and more in accord with the way things look when you’re in the cockpit: For example, in normal flight, when the airplane yaws, it is easy to picture the nose moving left or right in a horizontal plane. This is easier than thinking about the Z axis.
axes
Figure 19.10: Axes: X, Y and Z
Beware that older books give peculiar names to some of the axes. They refer to the Y axis as the lateral axis and the X axis as the longitudinal axis, which are sensible enough, but then they refer to Y-axis stability as longitudinal stability and X-axis stability as lateral stability — which seems completely reversed and causes needless confusion. Reference 17 calls the Z axis the normal axis, since it is normal (i.e. perpendicular) to the other axes — but that isn’t very helpful since every one of the axes is normal to each of the others. Other references call the Z axis the vertical axis, but that is very confusing since if the bank attitude or pitch attitude is not level, the Z axis will not be vertical. The situation is summarized in the following table.
This BookOlder Terminology
yaw bivector vertical axis
XY plane Z axis
yaw-wise stability directional stability
pitch bivector lateral axis
ZX plane Y axis
pitch-wise stability longitudinal stability
roll bivector longitudinal axis
YZ plane X axis
roll-wise stability lateral stability
19.7.2 Attitude: Heading, Pitch, Bank
The term attitude describes the orientation of the airplane relative to the earth. Attitude is specified in terms of three angles: heading, pitch, and bank. (These are sometimes called the Euler angles.)
Oddly enough, it turns out that heading, pitch attitude, and bank angle are not always equivalent to rotations around the yaw, pitch, and roll axes, although they are intimately related. The relationship can be established by following a simple recipe, as we now discuss.
To construct a specified attitude, imagine that the airplane starts in level flight attitude with the X axis pointed due north; then:
For reasons discussed in section 19.7.4, it is important to perform these rotations in the order specified: yaw, then pitch, then roll.
We have just seen how, given a set of angles, we can put the airplane into a specified attitude. We now consider the reverse question: given an airplane in some attitude, how do we determine the angles that describe that attitude?
Answer: just figure out what it would take to return the airplane to level northbound attitude. The rotations must be undone in the reverse of the standard order:
If you do not follow the recipes given above, all bets are off, as you can see from the following example: Suppose you start out in level flight, and then roll 90 degrees. This is sometimes called the knife-edge attitude. Then:
See section 19.7.4 and section 19.7.5 for more about this.
19.7.3 Angle Terminology
The following table summarizes the various nouns and verbs that apply to angles and motions in the three principal directions:
XY planeZX planeYZ plane
Motionit yawsit pitchesit rolls
Anglethe headingthe pitch attitudethe bank attitude
Here are a few more fine points of angle-related terminology:
* Other Angles
To define the angle of attack of the fuselage, take the direction of flight (or its reciprocal, the relative wind) and project it onto the XZ plane. The angle of attack is the angle between this projection and the X axis or some other convenient reference.
To define the slip angle, take the direction of flight (or the relative wind) and project it onto the XY plane. The slip angle is the angle between this projection and the X axis. It can be most easily perceived with the help of a slip string, as discussed in section 11.3.
Some aerodynamics texts use the term sideslip angle, which is synonymous with slip angle. Don’t forget the somewhat-subtle distinction, as discussed in section 11.5.1:
The sideslip angle is exactly the same thing as the slip angle. The sideslip maneuver is different from the forward slip maneuver.
19.7.4 Yaw Does Not Commute with Pitch
It is a fundamental fact of geometry that the result of a sequence of rotations depends on the order in which the rotations are performed.
Note that for a sequence of ordinary non-rotational movements, the ordering does not matter. That is, suppose I have two small objects that start out at the same place on a flat surface. I move one object move two feet north, and then three feet west. I move the other object the same distances in the other order: three feet west and then two feet north. Assuming there are no obstructions, both objects will arrive at the same destination. The ordering of the movements does not matter.
However, angles don’t play by the same rules as distances. For instance, there are ways of changing the yaw angle (i.e., the heading) by 37 degrees (or any other amount) without ever yawing the airplane. That is, starting from straight and level flight:
If the aircraft (and its occupants) can tolerate heavy G loads, such maneuvers are perfectly fine ways to make tight turns at high airspeed.
In non-aerobatic flight, a less-extreme statement applies: a rotation in a purely horizontal plane is not a pure yaw when the aircraft is not in a level attitude. For instance, suppose you are in level flight, steadily turning to the left. This is, of course, a turn in a purely horizontal plane. Further suppose that you have a nose-up pitch attitude, while still maintaining a level flight path, as could happen during slow flight. This means that the plane of yaw-wise rotations is is not exactly horizontal. You could, in principle, perform the required heading change by pitching down to level pitch attitude, performing a pure yaw, and then pitching back up, but since rotations are not commutative this is not equivalent to maintaining your pitch attitude and performing a pure yaw. Performing the required change of heading without pitching down requires mostly pure leftward yaw, but involves some rightward roll-wise rotation also.
The analysis in the previous paragraph is 100% accurate, but completely irrelevant when you are piloting the airplane.6 Arguing about whether the heading change is a pure yaw or a yaw plus roll is almost like arguing about whether a glass of water is half full or half empty — the physics is the same. In this case the physics is simple: the inside (left) wing follows a horizontal circular path, while the outside (right) wing follows a slightly longer horizontal path around a larger circle.
It is easy to see why that is so: The turn requires a rotation in a horizontal plane. Such a rotation moves the wingtips (and everything else) in purely horizontal directions. As long as the airplane’s center-of-mass motion is also horizontal, the rotation can only change the speeds, not the angles, of the airflow.
Now, things get more interesting when the direction of flight is not horizontal. Therefore let us consider a new example in which you are climbing while turning. That means your flight path is inclined above the horizontal. As before, you are turning to the left at a steady rate.
In any halfway-reasonable situation, the direction of flight will very nearly lie in the plane of yaw-wise rotations. Having it not exactly in the plane is just a distraction from the present topic, so I hereby define a new plane of “yaw-like” rotations which is defined by the direction of flight and the good old Y axis (the wingtip-to-wingtip direction). The pitch-wise rotations remain the same, and we define a new plane of “roll-like” rotations perpendicular to the other two. We assume zero slip angle for simplicity.
As the airplane flies from point to point along its curving path, its heading must change. This is a rotatation in a purely horizontal plane. In climbing flight, the yaw-like direction is not exactly horizontal, so the turn is not pure yaw. The turn moves the inside wingtip horizontally backwards, relative to where it would be if there were no heading change. In contrast, a pure yaw-like rotation would have moved the wing back and down. Therefore we need not just leftward yaw-like rotation but also some rightward roll-like rotation to keep the wingtip moving along the actual flight path.
This roll-like motion means that (other things being equal) the inside wingtip would fly at a lower angle of attack during a climbing turn. Less lift would be produced. You need to deflect the ailerons to the outside to compensate.
Note that I said less lift “would be” produced, not “is” produced. That’s because I’m assuming you have compensated with the ailerons, so that both wings are producing the same amount of lift, as they should. Remember that this is a steady turn, so no force is required to maintain the steady roll rate. (Remember, according to the laws of motion, an unbalanced force would create an acceleration in the roll-wise direction, which is not what is happening here.) There are widespread misconceptions about this. Because of the roll-like motion, the air will arrive at the two wings from two different directions. You deflect the ailerons, not in order to create a wing-versus-wing difference in the magnitude of lift, but rather to avoid creating such a difference.
The best you can do is to keep the magnitude of the lift the same. The direction of the lift will be twisted, as discussed in section 8.9.5; see in particular figure 8.7. You will need to deflect the rudder to overcome the resulting yawing moment. This will be in the usual direction: right rudder in proportion to right aileron deflection, and left rudder in proportion to left aileron deflection.
In a climbing turn, the differential relative wind combines with the differential wingtip velocity to create a large overbanking tendency. In an ordinary descending turn, the relative wind effect tends to oppose the velocity effect. In a spin, the differential relative wind is a key ingredient, as discussed in section 18.6.1, including figure 18.6. Also, section 9.7 analyzes climbing and descending turns in slightly different words and gives a numerical example.
19.7.5 Yaw Does Not Commute with Bank
As stated above, a rotation in a purely horizontal plane is not a pure yaw when the aircraft is not in a level attitude. In the previous section we considered the consequences of a non-level pitch attitude, but the same logic applies to a non-level bank attitude. The latter case is in some sense more significant, since although not all turns involve a non-level pitch attitude, they almost always involve a bank.
You could perform the required rotation by rolling to a level attitude, performing a pure yaw, and then rolling back to the banked attitude. This is not equivalent to performing a pure yaw while maintaining constant bank. For modest bank angles, the constant-bank maneuver is mostly pure yaw, but involves some rotation in the pitch-wise direction as well. Because of this pitch-wise rotation, the relative wind hits the wing and the tail at slightly different angles. You will need to pull back on the yoke slightly to compensate. This pull is in addition to whatever pull you might use for controlling airspeed during the turn. You can see that the two phenomena are definitely distinct, by the following argument: suppose that you maintain constant angle of attack during the turn, so that the required load factor is produced by increased airspeed not increased angle of attack. You would still need to pull back a little bit, to overcome the noncommutativity.
19.8 Torque and Moment
Just as the first law of motion says that to start an object moving byou have to apply a force, there is a corresponding law that says to start an object turning you need to apply a torque.
You may have heard of the word “torque” in conjunction with left-turning tendency on takeoff, and you may have heard of the word “moment” in conjunction with weight & balance problems. When pilots talk about moment, they usually mean a particular type of moment that is equal to a torque. In other contexts, there exist other types of moments that are not equal to torque; examples include moment of inertia and dipole moment. We don’t need to discuss such things in detail, but you should be aware that they exist. In the present context, you can more-or-less assume that moment means torque. In particular,
A familiar example: fuel and cargo cause a pitching moment, depending on how far forward or aft they are loaded. By the same token, they will cause a rolling moment if they are loaded asymmetrically left or right.
Another familiar example: gyroscopic effects are known for causing yaw-wise torques. By the same token, they can cause pitch-wise torques as well.
Torque is not the same as force. Of the two, force is the more familiar concept. In introductory physics courses, they focus attention on zero-sized pointlike particles, in which case there is only one place where the force can be applied, and you don’t need to worry about torque.
To apply a torque, you need a force and a lever-arm. The amount of torque is defined by the following formula:
torque = arm ∧ force (19.2)
where the arm (also called lever arm) is a vector representing the separation between the pivot-point7
and the point where the force is applied. In this formula, we are multiplying vectors using the geometric wedge product, denoted “∧”.8 The wedge product of two vectors is called a bivector, and is represented by an area, namely the area of the parallelogram spanned by the two vectors, as shown in figure 19.11. All five bivectors in the figure are equivalent, as you can confirm by counting squares.
bivector-equiv
Figure 19.11: Torque: Equivalent Bivectors
A vector (such as force) has geometric extent in one dimension. The drawing of a vector has a certain length. This is in contrast to scalars, which have no geometric extent. They are zero-dimensional, and are drawn as points with no size. A bivector (such as torque) has geometric extent in two dimensions. The drawing of a bivector has a certain area. In particular, the torque in figure 19.13 is represented by an area in the plane of the paper.
A vector points in a definite direction. It is drawn with an arrowhead on one end. A bivector has a definite direction of circulation. It is drawn with arrowheads on its edges.
When constructing a bivector from two vectors, such as A ∧ F, you determine the direction of circulation by going in the A direction then going in the F direction, not vice versa. In particular, F ∧ A = − A ∧ F, which tells us the two bivectors are equal-and-opposite.
When the force and the lever-arm are perpendicular, the magnitude of the torque is equal to the magnitude of the force times the length of the lever-arm, which makes things simple. If the two vectors are not perpendicular, pick one of them. Then keep the component of that vector perpendicular to the other vector, throwing away the non-perpendicular component. What remains is two perpendicular vectors, and you can just multiply their magnitudes.
Torque is measured not in pounds but in footpounds (that is, feet times pounds); the corresponding metric unit is newtonmeters. 9
Figure 19.12 shows a situation where all the forces and torques are in balance. On the right side of the bar, a group of three springs is exerting a force of 30 pounds. On the left side of the bar, there is a group of two springs (exerting a force of 20 pounds) and a single spring (exerting a force of 10 pounds). Since the total leftward force equals the total rightward force, the forces are in balance.
torque-balance
Figure 19.12: Forces and Torques in Balance
To show that the torques are in balance requires a separate check. Let’s choose the point marked “x” as our pivot point. The rightward force produces no torque, because it is attached right at the pivot point — it has a zero-length lever arm. The group of two springs produces a counterclockwise torque, and the single spring produces a clockwise torque of the same magnitude, because even though it has half as much force it has twice the lever arm. The torques cancel. The system is in equilibrium.
torque-unbalance
Figure 19.13: Forces in Balance but Torques NOT in Balance
Figure 19.13 shows a different situation. The forces are in balance (20 pounds to the right, 20 pounds total to the left) but the torques are not in balance. One of the left-pulling springs has twice the lever arm, producing a net clockwise torque. If you tried to set up a system like this, the bar would immediately start turning clockwise. The system is out of equilibrium.
19.9 Angular Momentum
The notion of angular momentum is the key to really understanding rotating objects.
Angular momentum is related to ordinary straight-line momentum in the same way that torque is related to ordinary straight-line force. Here is a summary of the correspondences:
Straight-line concept
Angular concept
Force Torque (equals force times lever arm)
Momentum Angular momentum (equals ordinary momentum times lever arm)
The ordinary momentum of a system won’t change unless a force is applied. The angular momentum of a system won’t change unless a torque is applied.
Force equals momentum per unit time. Torque equals angular momentum per unit time.
When I give lectures, I illustrate conservation of angular momentum using a demo you can easily set up for yourself. As illustrated in figure 19.14, tie some kite string to a small bean-bag and swing it in a circle. When you pull on the free end of the string (reducing the radius of the circle) the bean-bag speeds up. When you let out the string (increasing the radius of the circle) the bean-bag slows down.10
angular-pull
Figure 19.14: Conservation of Angular Momentum
In typical textbooks, conservation of angular momentum is exemplified by spinning ice skaters, but I find it easier to travel with a bean-bag (rather than an ice skater) in my luggage.
In the demonstration, there are some minor torques due to friction than will eventually slow down the bean-bag whether or not you shorten or lengthen the string, but if you perform the experiment quickly enough the torques can be neglected, and the angular momentum of the system is more or less constant. Therefore, if you decrease the lever arm by a factor of N, the straight-line momentum must increase by a factor of N (since their product cannot change).11
Since the tangential velocity increases by a factor of N, and the radius decreases by a factor of N, the rate of turn (degrees per second) increases by a factor of N squared.
The energy of the system also increases by a factor of N squared. You can feel that you added energy to the system when you pull on the string, pulling against tension.
So far we have analyzed the situation from the point of view of a bystander in a non-rotating reference frame. You can reach the same conclusion by analyzing the situation in the rotating reference frame, as would apply to an ant riding on the bean-bag. The ant would say that as the string is pulled in, the bean-bag accelerates sideways because of the Coriolis effect, as discussed in section 19.4.
Conservation of angular momentum applies to airplanes as well as bean-bags. For instance, consider an airplane in a flat spin, as discussed in section 18.6.4. In order to recover from the spin, you need to push the nose down. This means whatever mass is in the nose and tail will move closer to the axis of rotation. The angular momentum of the airplane doesn’t change (in the short run), so the rotation will speed up (in the short run). More rotation may seem like the opposite of what you wanted, but remember you are trying to get rid of angular momentum, not just angular rate. You should persevere and force the nose down. Then the aerodynamic forces (or, rather, torques) will carry angular momentum out of the system and the rotation will decrease.
Angular momentum is a bivector, like torque (section 19.8). It lies more-or-less12 in the plane of rotation.
19.10 Gyroscopes
19.10.1 Precession
For any normal object (such as a book) if you apply a force in a given direction, it will respond with motion in that direction. People are so accustomed to this behavior that they lose sight of the fact that force and motion are not exactly the same thing, and they don’t always go together.
In particular, for a gyroscope, if you apply a torque in one direction it will respond with motion in a different direction. When I give my “See How It Flies” lectures, I carry around a bicycle wheel with handles, as shown in figure 19.15. The indicated direction of spin corresponds to a normal American engine and propeller, if the nose of the airplane is toward the left side of the diagram.
wheel
Figure 19.15: Bicycle Wheel with Handles
To demonstrate the remarkable behavior of a gyroscope, I stand behind the “propeller” (on the right side of the diagram) and support its weight by lifting the rear handle only. The force of gravity acts on the center of the system, so there is a pure nose-down / tail-up pitching moment. If this were a normal, non-spinning object, it would respond by pitching in the obvious way, but the gyroscope actually responds with a pure yawing motion. I have to turn around and around to my left to stay behind the wheel.
It is really quite amazing that the wheel does not pitch down. Even though I am applying a pitch-wise torque, the wheel doesn’t pitch down; it just yaws around and around.
gyro-precession
Figure 19.16: Gyroscopic Precession
This phenomenon, where a gyro responds to a torque in one direction with a motion in another direction, is called gyroscopic precession.
For a gyroscope, a torque in the pitch-wise direction produces a motion in the yaw-wise direction. If you try to raise the tail of a real airplane using flippers alone, it will yaw to the left because of precession.
This effect is particularly noticeable early in the takeoff roll in a taildragger, when you raise the tail to keep the airplane on the ground while you build up speed. If the airplane were an ordinary non-spinning object, you could raise the tail just by pushing on the yoke. However, note that airflow over the flippers does not actually dictate the motion of the airplane; it just produces a torque in the pitch-wise direction. When you combine this torque to the angular momentum of the engine, the result is pronounced precession to the left. You need to apply right rudder to compensate.
Another place where this is noticeable is during power-on stall demonstrations. You need a downward pitch-wise torque to make the non-rotating parts of the airplane pitch down. However, this same pitch-wise torque, when added to the angular momentum of the engine, causes yaw-wise precession to the left. You need right rudder to compensate.
To get a gyroscope to actually move in the pitch-wise direction, you need to apply a torque in the yaw-wise direction — using the rudder.
Of course, an airplane has some ordinary non-rotating mass in addition to its gyroscopic properties. In order to lift this ordinary mass you need to use the flippers. Therefore, the tail-raising maneuver requires both flippers and rudder — flippers to change the pitch of the ordinary mass, and rudder to change the pitch of the gyroscope.
19.10.2 Precession: Which Way and How Much
Let’s try to understand what causes precession, so we can predict which way the airplane will precess, and how much. Consider what happens when a torque is applied for a certain small time interval (one second or so). This will contribute some angular momentum to the system. Remember: torque is angular momentum per unit time. Then we just add this contribution to the initial angular momentum, and the result is the final angular momentum.
Angular momentum is a bivector. Figure 19.17 shows the bivectors involved in the precession, and figure 19.18 is an exploded view showing how to add bivectors. We add bivectors edge-to-edge, in analogy to the way we add ordinary vectors tip-to-tail. In this example, edge b adds tip-to-tail to edge x to form the top edge of the sum. Similarly, edge z adds tip-to-tail to edge d to form the bottom edge of the sum. Edge c cancels13 edge w since they are equal and opposite. Edges a and y survive unchanged to become the vertical edges of the sum.
angular-precession
Figure 19.17: Angular Momentum Explains Precession
bivector-expl
Figure 19.18: Addition of Bivectors – Exploded View
We see that the new angular momentum differs from the old angular momentum by a yaw to the left. That’s the correct answer.
During subsequent time intervals, the torque will be a new direction because the whole system has rotated. The successive changes will cause the system (wheel, axle, and everything attached to it) to keep turning in the horizontal plane, yawing to the left.
Beware: This gyroscope law might seem roughly similar to the Coriolis effect (force in one direction, motion in a perpendicular direction) but they do not represent the same physics. The Coriolis law only applies to objects that are moving relative to a rotating observer. In contrast, the gyroscope law applies to a stationary observer, and a wheel precesses even though no part of the wheel is moving relative to other parts.
Gyroscopic effects only occur when the there is a change in the orientation of the gyro’s plane of rotation. You can take a gyro and transport it north/south, east/west, or up/down, without causing any precession, as long as the gyro’s plane of rotation remains parallel to the original plane of rotation. You can even roll an airplane without seeing gyroscopic effects due to engine rotation, since the roll leaves the engine’s plane of rotation undisturbed.
You can figure it out by adding the bivectors. Right rudder deflection will cause a pitch-wise precession in the nose-down / tail-up direction. Pushing on the yoke causes a yaw-wise precession to the left.
If you have a lightweight airframe and a heavy, rapidly spinning propeller, watch out: the flippers will cause yawing motion and the rudder will cause pitching motion.
If you want to make a gyro change orientation quickly, it will take more torque than doing it slowly.
19.10.3 Inertial Platform
We now consider what happens when a gyro is not subjected to any large torques.
Suppose we support a gyroscope on gimbals. The gimbals support its weight but do not transmit any torques to it, even if the airplane to which the gimbals are mounted is turning. We call this a free gyro since it is free to not turn when the airplane turns.
Even though the gyro is small, it has a huge amount of angular momentum, because it is spinning so rapidly. Any small torque applied to the gyro (because of inevitable imperfections in the gimbals) will, over time, change the angular momentum — but over reasonably short times the change is negligible compared to the total.
In such a situation, the gyro will tend to maintain fixed orientation in space. We say that the gyro is an inertial platform with respect to rotations.14 Other books say the gyro exhibits rigidity in space but that expression seems a bit odd to me.
19.11 Gyroscopic Instruments
We now discuss the principles of operation of the three main gyroscopic instruments: artificial horizon (attitude indicator), directional gyro (heading indicator), and rate of turn gyro (turn needle or turn coordinator).
19.11.1 Heading Indicator
The directional gyro is a free gyro. It establishes an inertial platform.
The gyro spins in some vertical plane; that is, its angular momentum vector points in some arbitrary horizontal direction. A system of gears measures the angle that the angular momentum vector makes in the XY plane15 and displays it to the pilot. The trick is to measure the angle and support the gyro while minimizing the accidental torques on it. Imperfections in the mechanism cause the gyro to precess; therefore, every so often the heading indication must be corrected, typically by reference to a magnetic compass.
19.11.2 Artificial Horizon
The artificial horizon (also known as the attitude indicator) is another free gyro. This gyro’s plane of rotation is horizontal; that is, its angular momentum vector is vertical. A mechanical linkage measures the angle that this vector makes in the YZ (bank) and XZ (pitch) planes, and displays it to the pilot.
It is instructive to compare the horizon gyro (which tells you which way is “down”) with the inclinometer ball or a plumb-bob on a string (which has a different notion of which way is “down”). The distinction is that the plumb-bob tells you which way is A-down, while the gyro is designed to tell you which way is L-down (toward the center of the earth). Whenever the airplane is being accelerated (e.g. during the takeoff roll or during a turn), the two directions are quite different. As seen in figure 19.19, during a turn the A-down vector gets centrifuged to the outside of the turn; the L-down vector always points to the center of the earth.
a-l-down
Figure 19.19: A-Down versus L-down During a Turn
As you can see in figure 19.19,
To a first approximation, the horizon gyro works just by remembering which way is L-down. However, no gyro can remember anything forever, so the instrument contains an “erecting mechanism” that makes continual small adjustments. You would like it to align the gyro axis with L-down — but the mechanism doesn’t know which way is L-down! It knows which way is A-down (the same way the plumb-bob does), but according to Einstein’s principle of equivalence, it cannot possibly know what components of A-down are due to gravity and what components are due to acceleration. The erecting mechanism does, in fact, continually nudge the gyro axis toward A-down, but the result is a good approximation to L-down, for the following reason: if you average the A-down vectors over an entire turn, they average out to L-down.
If you average the discrepancies over an entire turn, they cancel. This is why a gyro is vastly more valuable than a plumb-bob: The gyro can perform long-term averaging, whereas a plumb-bob can’t.
Technical note: Even in the ordinary terrestrial lab frame, you need to account for a small amount of centrifugal field, because the earth itself is rotating. That means that the conventional notion of “down” does not point toward the center of the earth. At temperate latitudes, it’s off by about a tenth of a degree. This is not immediately noticeable, for several reasons:
On the other hand, the earth’s rotation is certainly noticeable if you look closely enough: (a) You can easily see that the earth rotates relative to the stars. (b) Centrifugal forces cause the earth to be ellipsoidal rather than spherical, and you can notice this if you have a good-enough map: A degree of latitude is about 1% longer at the pole than at the equator. (c) Consider the directional gyro in an aircraft. A simple gyroscope will drift relative to the earth – or, rather, the earth will drift relative to the gyro – even if the aircraft is sitting on the taxiway, with the brakes set. This is most obvious at the north pole, where the earth rotates 15 per hour, while the simple gyro does not.
A real directional gyro instrument is not so simple. For one thing, it is only sensitive to rotation in the aicraft’s XY plane, which is normally horizontal. Therefore, at the equator it doesn’t respond to the earth’s rotation at all. More generally, the effect is proportional to the sine of the latitude. Secondly, the instrument has a so-called latitude nut that can be adjusted to cancel the rotation of the earth, for some chosen latitude. However, if you fly somewhere else, the cancellation will be imperfect.
* Artificial Horizon Errors
Let’s look again at figure 19.19. If you only make half a turn, the discrepancies don’t average to zero, and the attitude indicator will be slightly inaccurate for a while. Analogous errors occur during takeoff, because the gyro’s estimate of “down” gets dragged backwards by the acceleration, so the artificial horizon will be a little bit below the true forward horizon for a while thereafter. The averaging time for a typical instrument is about five minutes.
Sometimes you find an old, worn-out instrument in which the gyro isn’t spinning as fast as it should. As a result, its memory gets shorter, and the systematic errors become larger.
19.11.3 Rate-of-Turn Gyro
There are two slightly different types of rate-of-turn gyro: (a) the rate-of-turn needle, and (b) the turn coordinator.
In both cases, the gyro is not free; it is a rate gyro. That is, its plane of rotation is more-or-less firmly attached to the airplane. It does not have gimbals. It is forced to change orientation when the airplane yaws.16 The instrument measures how much torque is required to re-orient the gyro.
Sometimes the rate-of-turn needle is built to spin in the pitch-wise (ZX) plane, in which case the airplane’s yawing motion requires a torque in the roll-wise (YZ) direction. Other models spin in the roll-wise (YZ) plane, in which case yaw requires a torque in the pitch-wise (ZX) direction. In principle, the spin and the torque could be in any pair of planes perpendicular each other and perpendicular to the yaw-wise (XY) plane.17
The required torque is proportional to (a) the rate of change of orientation, and (b) the angular momentum of the gyro. Therefore an accurate rate-of-turn gyro must spin at exactly the right speed, not too fast or too slow. (This is in contrast to the directional gyro and the artificial horizon gyro, which just have to spin “fast enough”.)
Many rate gyros incorporate a sneaky trick. They spin around the pitch-wise (ZX) plane, with the top of the gyro spinning toward the rear. They also use a spring that is weak enough to allow the gyro to precess a little in the roll-wise (YZ) direction. In a turn to the left, precession will tilt the gyro a little to the right. That means that during a turn, the gyro’s tilt compensates for the airplane’s bank, leaving the gyro somewhat more aligned with the earth’s vertical axis. The goal, apparently, is to create an instrument that more nearly indicates heading change (relative to the earth’s vertical axis) rather than simply rotation in the airplane’s yaw-wise (XY) plane, which is not exactly horizontal during the turn. Since the relationship between bank angle and rate of turn depends on airspeed, load factor, et cetera, this trick can’t possibly achieve the goal except under special conditions.
The turn coordinator is very similar to the rate-of-turn needle. It displays a miniature airplane instead of a needle. The key operational difference is that it is slightly sensitive to rate of roll as well as rate of heading change. To create such an instrument, all you have to do is take a rate-of-turn instrument, tilt the mechanism nose-up by 20 or 30 degrees, and change the display.
The advantage of a turn coordinator is that it helps you anticipate what actions you need to take. That is, if the airplane has its wings level but is rolling to the right, it will probably be turning to the right pretty soon, so you might want to apply some aileron deflection. The disadvantage has to do with turbulence. Choppy air oftentimes causes the airplane to roll continually left and right. The roll rate can be significant, even if the bank angle never gets very large. The chop has relatively little effect on the heading. In such conditions a plain old rate-of-turn needle gives a more stable indication than a turn coordinator does.
It is rather unfortunate that the display on a turn coordinator is a miniature airplane that banks left and right. This leads some people to assume, incorrectly, that the instrument indicates bank angle, which it most definitely does not, as you can demonstrate by performing a boat turn (section 8.11).
19.12 Some Fine Points about Energy and Conservation
The main discussion of energy is in chapter 1 and chapter 7. This section clarifies a few fine points, for the benefit of experts.
19.12.1 Vernacular «Energy»
Beware that the physics notion of energy differs from the vernacular notion of «energy».
Physics Energy Vernacular «Energy»
The physics energy is simple, well-defined, and well-behaved. When the Department of Energy talks about «energy», they are referring to some vernacular notion of «available» energy or «useful» energy. This is super-important, but very hard to define.
In this book, when we use the word energy (except within scare quotes) we are talking about the physics energy. Questions of «usefulness» belong more to economics or philosophy than to physics, and the answers tend to be highly subjective and context-dependent.
The physics energy cannot be created or destroyed. There are no sources. There are no sinks. The laws of nature guarantee it. The DoE is always looking for new sources of «energy». Obviously they’re not talking about the physics energy.
It must be emphasized that the vernacular notion of «energy» is not wrong; it’s just different from the physics energy. You should not try to unlearn the vernacular notion, but you must learn the physics notion also. This is confusing, but there’s no alternative. It has nothing to do with physics; it’s just how the language works. Words have multiple meanings. For example, a lap in the swimming pool is quantitatively, qualitatively, and conceptually different from a lap on the race track. Context matters. In physics context, you have to use the physics definition.
19.12.2 Vernacular «Conservation»
Beware that the physics notion of conservation differs from the vernacular notion of «conservation».
Physics Conservation Vernacular «Conservation»
Physics conservation (such as conservation of energy or conservation of electric charge) means that something can flow from place to place, but can never be created or destroyed. Vernacular «conservation» (such as «conservation» of endangered wildlife) means to protect something from waste or loss.
Combining this with section 19.12.1, we see that when the DoE asks you to «Conserve Energy» they are using neither the physics notion of energy nor the physics notion of conservation. If you’re not careful, you can suffer from two profound misconceptions in a single two-word phrase.
19.12.3 Energy versus Entropy
Loosely speaking, we sometimes say that energy is “dissipated” during an irreversible process. That’s not entirely wrong, but if you’re not careful it can be misleading. The fact is, in all cases, dissipation and irreversibility can be understood in terms of entropy and not otherwise.
Energy and entropy are two different things. Energy is governed by the first law of thermodynamics (i.e. conservation of energy), while entropy is governed by the second law of thermodynamics. Energy is not defined in terms of entropy, nor vice versa.
In particular, you should avoid any notion of «degraded» energy. In a steam engine, there are three things to keep track of: energy, water, and entropy. Dissipation does not «degrade» the energy any more than it «degrades» the water. Dissipation leaves you with the same energy, the same water, and extra newly-created entropy.
Dissipation and irreversibility can be understood
in terms of entropy and not otherwise.
The details of what entropy is and how it behaves are beyond the scope of this book. Qualitative, intuitive notions of irreversibilty are adequate for present purposes.
1
The expression “equal and opposite” refers to vectors that are equal in magnitude and opposite in direction.
2
In the olden days, this was expressed in terms of an “action” and an “equal and opposite reaction”, but the meaning of those words has drifted over the centuries. Momentum is the modern term.
3
Troublemakers sometimes point out that lift actually is slightly reduced in a steady descent, since part of the weight is being supported by drag. To this I retort: (a) this is an obscure technicality, based on details of the definitions of the four forces (as given in section 4.1); (b) the magnitude of the reduction is negligible in ordinary flying, (c) the lift is reduced for climbs as well as descents — so this technicality certainly does not explain the motion, and (d) when we consider the total upward force, there is no reduction.
4
It is easy to find hand-waving explanations of the Coriolis effect that overlook one or the other of the two contributions, and are therefore off by a factor of two. Beware.
5
If you consider multiple widely-separated points, you can distinguish gravity versus centrifugity versus straight-line acceleration by checking for nonuniformities in the fields. However, an airplane is so small compared to the planet, and so small compared to its turning radius, that these nonuniformities do not provide a very practical way of telling one field from another.
6
It might be relevant if you are designing an airplane or a flight simulator.
7
The pivot-point is also known as the datum. Force is measured in pounds or newtons; torque is measured in inch·pounds or newton·meters.
In some cases you already know the forces are in balance and you are just trying to figure out whether the torques are in balance. In such a case, it doesn’t matter what point in the airplane you choose as the pivot-point, provided you measure all lever arms from the same point.
8
Some other books try to calculate the torque using a “cross product” but the wedge product is much nicer. The wedge product is in some sense complimentary to the dot product used in section 4.5.
9
Sometimes you see these written as hyphenated words (foot-pounds or newton-meters) in which case the hyphen should not be mistaken for a minus sign. A foot-pound is a foot times a pound, not a foot minus a pound.
10
It is best to feed the string through a small smooth tube, rather than just your bare hand. You might use a poultry baster, or the axial hole in a spool of thread.
11
The bean-bag acquires the necessary straight-line momentum, and energy, via the string. It cannot acquire angular momentum from the string, since that would require a lever arm perpendicular to the force. Since the string can only exert a force parallel to itself, the lever arm is zero, so the torque is zero.
12
For an object rotating around an axis of symmetry, the angular momentum lies exactly in the plane of rotation; for odd off-axis rotations this might not be true.
13
As we have just discussed, it is OK join c to w. Alternatively, you could join a to y and get the same answer. In contrast, it would not make sense to join c to y, for the following reasons: Edge y is not opposite to c, so this pair would not drop out of the sum. Also, this would make us unable to add z to d tip-to-tail; they woud be tail-to-tail. Similarly, it would make us unable to add x to b tip-to-tail; they would be tip-to-tip.
14
An even fancier inertial platform would keep a position (not just orientation) independent of straight-line accelerations.
15
See figure 19.10 for the definition of the X, Y, and Z directions.
16
The instrument is not directly sensitive to any change in the direction the airplane is going, just to changes in the direction it is pointing.
17
The X, Y, and Z directions are defined in figure 19.10.
Previous Up Next
[Previous][Contents] [Marketing Needed -- Can You Help?]
Copyright © 1996-2005 jsd
|
__label__pos
| 0.905366 |
2022-2023 Undergraduate Catalog
Feb 27, 2024
2022-2023 Undergraduate Catalog [ARCHIVED CATALOG]
CAIS 0339 - Operating Systems
Credits: 3
Provides the student with an understanding of modern operating systems and the context within which the operating system functions. Topics to be examined include process management (processes and threads, process concepts, asynchronous concurrent processes and concurrent programming); processor management (traffic controller and allocation strategies); storage management (relocation, segmentation, paging, real and virtual storage, and allocation strategies); auxiliary storage management (device characteristics and management techniques) and file management (operations, protection, and allocation). Tradeoffs and decisions involved in operating system design are considered.
Prerequisites: CAIS 0230 , CAIS 0236 , and CAIS 0305 .
|
__label__pos
| 0.96853 |
Article Text
PDF
Cross-sectional analysis of the prevalence and predictors of statin utilisation in Ireland with a focus on primary prevention of cardiovascular disease
1. Paula Byrne1,
2. John Cullinan1,
3. Catríona Murphy2,3,
4. Susan M Smith4
1. 1 National University of Ireland Galway, Galway, Ireland
2. 2 Dublin City University, Dublin, Ireland
3. 3 The Irish Longitudinal Study on Ageing (TILDA), Dublin, Ireland
4. 4 Royal College of Surgeons in Ireland, Dublin, Ireland
1. Correspondence to Paula Byrne; pbyrne82{at}gmail.com
Abstract
Objective To describe the prevalence of statin utilisation by people aged over 50 years in Ireland and the factors associated with the likelihood of using a statin, focusing particularly on those using statins for primary prevention of cardiovascular disease (CVD).
Methods This is a cross-sectional analysis of cardiovascular risk and sociodemographic factors associated with statin utilisation from wave 1 of The Irish Longitudinal Study on Ageing. A hierarchy of indications for statin utilisation, consisting of eight mutually exclusive levels of CVD-related diagnoses, was created. Participants were assigned one level of indication. The prevalence of statin utilisation was calculated. The likelihood that an individual was using a statin was estimated using a multivariable logistic regression model, controlling for cardiovascular risk and sociodemographic factors.
Results In this nationally representative sample (n=5618) of community-dwelling participants aged 50 years and over, 1715 (30.5%) were taking statins. Of these, 65.0% (57.3% of men and 72.7% of women) were doing so for the primary prevention of CVD. Thus, almost two-thirds of those taking statins did so for primary prevention and there was a notable difference between women and men in this regard. We also found that statin utilisation was highest among those with a prior history of CVD and was significantly associated with age (compared with the base category 50–64 years; 65–74 years OR 1.38 (95% CI 1.16 to 1.65); 75+ OR 1.33 (95% CI 1.04 to 1.69)), living with a spouse or partner (compared with the base category living alone; OR 1.35 (95% CI 1.10 to 1.65)), polypharmacy (OR 1.74 (95% CI 1.39 to 2.19)) and frequency of general practitioner visits (compared with the base category 0 visits per year; 1–2 visits OR 2.46 (95% CI 1.80 to 3.35); 3–4 visits OR 3.24 (95% CI 2.34 to 4.47); 5–6 visits OR 2.98 (95% CI 2.08 to 4.26); 7+ visits OR 2.51 (95% CI 1.73 to 3.63)), even after controlling for clinical need. There was no association between using statins and gender, education, income, social class, health insurance status, location or Systematic Coronary Risk Evaluation (SCORE) risk in the multivariable analysis.
Conclusion Statin utilisation among those with no history of CVD accounted for almost two-thirds of all statin use, in part reflecting the high proportion of the population with no history of CVD, although utilisation rates were highest among those with a history of CVD.
• cardiology
• preventive medicine
• primary care
• public health
• therapeutics
This is an Open Access article distributed in accordance with the Creative Commons Attribution Non Commercial (CC BY-NC 4.0) license, which permits others to distribute, remix, adapt, build upon this work non-commercially, and license their derivative works on different terms, provided the original work is properly cited and the use is non-commercial. See: http://creativecommons.org/licenses/by-nc/4.0/
Statistics from Altmetric.com
Strengths and limitations of this study
• Large, nationally representative sample of community dwelling adults with self-reported verified drug utilisation.
• Good agreement between self-reported prescription medication use and pharmacy dispensing records for this cohort has been reported.
• Breakdown of utilisation according to a hierarchy of diagnoses enabled analysis of primary/secondary prevention use.
• Self-reported doctor diagnoses and recall of general practitioner visits may be subject to recall bias.
• Some diagnostic criteria, previous SCORE results and discontinuation of statins could not be ascertained.
Introduction
Background
The last 30 years have seen a large increase in the utilisation of statins hydroxy-methylglutaryl ((HMG)-coenzyme A reductase inhibitors) for the primary and secondary prevention of cardiovascular disease (CVD).1–4 In Ireland, the number of statin patient treatment days per 1000 inhabitants increased between 2000 and 2003 by 192%, the highest recorded increase in a study of nine European countries.1 By 2014, over €50 million was spent annually in Ireland on these medicines in State-funded purchases alone.5 While the ageing population in high-income countries has been cited as a driver of increased utilisation of statins, Wallach Kildemoes et al found that increasing treatment intensity, rather than population ageing, was almost exclusively responsible for this rise.6
Statins may be prescribed for those with known CVD (secondary prevention), diabetes and familial hypercholesterolaemia (primary prevention), as well as for those considered ‘at risk’ of CVD but who have not yet had an event (primary prevention). The clinical guidelines relevant to the cohort in this study were those of the European Society of Cardiology 2007,7 which recommended that those with established CVD and diabetes be considered as the highest risk group. All others were to be assessed using the SCORE risk assessment tool.8 If a person was found to be above a 5% risk threshold (over 10 years) using this method, or if they had established CVD or diabetes, the total cholesterol (TC) level recommended was 4.5 mmol/L and/or a low-density lipoprotein (LDL) level of 2.5 mmol/L.
There is some evidence that statins are underused in certain sections of the population9–12 and that statins are not targeted at those most likely to benefit.13 14 However, increases in statin prescribing may be linked to changing clinical guidelines, which have been identified as drivers of a process of medicalisation as they generally widen the definition of disease.15 Updates of guidelines have included changes to thresholds of blood cholesterol levels and to risk categorisation, which lead to recommendations for statin therapy to expanded numbers of people. In particular, the use of statins in people without previous CVD (primary prevention) has been the subject of controversy.16 17 Some authors criticise the extrapolation of clinical guidelines to subgroups, such as women or the elderly,18 and those with diabetes,19 where the evidence of a favourable risk-benefit ratio may not be conclusive. Although some studies have analysed statin use by broad diagnostic groupings,4 14 20 analysis by diagnostic indication,6 as well as by ‘at-risk’ categorisation, could increase knowledge of drug utilisation patterns. This, in turn, could help explain the drivers of increased utilisation and the extent to which statins are used in patients with lower CVD risk, where the benefits may be limited or where the harms of statins may outweigh those benefits, particularly in primary prevention of CVD.17 21 22
Wallach Kildemoes et al 6 constructed a hierarchy of indications for which statins were prescribed (see online supplementary appendix 1, table A1). This hierarchy was based on european guidelines on the prevention of CVD,23 the most recent of which, at the time of data collection, were published in 2007. This consisted of eight mutually exclusive levels of markers of CVD-related diagnoses and diabetes. The indication for a person with several of the listed medical conditions was considered to be that which placed them highest on the hierarchy. For example, if a person had both a previous myocardial infarction (MI) and hypertension, they were stratified into the MI category, that being the higher-level indication.
Supplementary file 1
Objective
The aim of this study was to describe the prevalence of statin utilisation by indication, age and gender, in community-dwelling adults in Ireland aged 50 years and older in the period 2009–2011, with a focus on primary prevention of CVD. This included an examination of those factors, in particular CVD-related diagnoses based on a hierarchy of indications, which are associated with increased statin utilisation. A secondary analysis was undertaken to examine statin utilisation based on the risk of developing CVD, as measured by the SCORE risk assessment tool.
Methods
Design
The study used cross-sectional data from wave 1 (2009–2011) of The Irish Longitudinal Study on Ageing (TILDA). TILDA collects data on a nationally representative sample of community living adults aged 50 years and older in Ireland.24 This allowed us to examine self-reported drug utilisation rather than prescribing data, which may be a more accurate way of assessing drug use. Ethical approval for the TILDA study was received from the Trinity College Research Ethics Committee and all participants provided written informed consent. As our study comprised secondary analysis of TILDA data, which is anonymised, further participant consent or ethical approval was not required.
Participants and setting
Participants were selected using RAMSAM, a system for drawing a random sample from the Irish geodirectory.25 Participants took part in a face-to-face computer-aided personal interview (CAPI) in their home, followed by a health assessment either in their home or at a designated health centre. Figure 1 shows the flow chart of participants included in our analysis. Of the 8175 individuals within TILDA aged over 50 years, 5634 undertook a health assessment. Since diagnosis of familial hypercholesterolaemia was not clear from our data, we removed 16 individuals whose LDL levels were >6 mmol/L from the sample. This gave a final sample of 5618 individuals.
Figure 1
Flow chart of the number of participants included in the analysis. LDL, low-density lipoprotein. Source: Analysis of The Irish Longitudinal Study on Ageing (TILDA) wave 1 data.
Variables
A full description of the variables used is presented in online supplementary appendix 2, table A2.1.
Statin use
Current medication use was recorded directly from respondents and was cross-checked by the interviewer who examined medication labels, which the participant showed them. Good agreement between self-reported prescription medication use and pharmacy dispensing records for this cohort has been reported.26
Sociodemographic variables
Sociodemographic data were collected by TILDA including age, gender and living arrangement. Six categories of both socioeconomic status and income levels were described. Educational status was described as ‘primary or none’, ‘secondary’ or ‘third level or higher’. Participants were described as living either in Dublin city or environs, in another urban area or in a rural area.
Healthcare variables
Medical insurance status was described as ‘no cover’, ‘medical insurance’ for those with private medical insurance or ‘medical card’ for those whose medical costs were covered by the State. We recoded the number of GP visits into five categories—none, 1–2, 3–4, 5–6 and 7 or more. Polypharmacy was recorded in the data as receiving five or more medications (excluding supplements) simultaneously. For the purpose of our analysis, we did not include statins as one of the five medications.
Indication
The indication for statin usage was determined during the CAPI. Participants were asked: "Has a doctor ever told you that you have any of the following conditions?" The conditions listed included: high blood pressure or hypertension; angina; a heart attack; congestive heart failure; diabetes or high blood sugar; a stroke; ministroke or transient ischaemic attack; high cholesterol; a heart murmur or any other heart trouble. An indication hierarchy was used as described by Wallach Kildemoes et al and participants were assigned to the highest level of indication. The categories included in the hierarchy were MI, ischaemic heart disease (IHD), stroke, potential artherosclerotic conditions (PAC), diabetes, hypertension, high cholesterol and none of these conditions (no diagnosis).
Analysis
The prevalence of statin utilisation was calculated overall and for each age, gender and indication. A multivariable logistic regression model of whether an individual was taking a statin or not was estimated, controlling for cardiovascular indication and sociodemographic factors. This provides, for each covariate, the odds of statin use for one category of the covariate relative to another category, adjusting for all other covariates in the model. In particular, we estimated a stepwise (backward selection) model and applied a 10% significance level for removal. This means that we removed the variable with the greatest P value, one at a time, until all remaining variables had a P value <10% threshold. The choice of variables included in the initial model was influenced by the data available in TILDA, as well as previous research, some of which had found significant associations between statin use and educational status,27 gender,14 20 27 age,4 28 socioeconomic status,10 20 28 number of GP visits,10 polypharmacy29 30 and indication.10 14 Other research found non-significant associations between statin use and marital status.27 Survey weights supplied by TILDA were applied to reduce non-response bias. The derivation of these weights is described in online supplementary appendix 2. The characteristics used for calibration were age, sex and education, sourced from the Quarterly National Household Survey 2010 compiled by the Irish Central Statistics Office.31 Maximum missing data were <1%.
Supplementary file 2
The SCORE tool was used to assess 10-year risk of a fatal CVD event in participants without established CVD or diabetes aged 50–64 years, stratified as either above or below a 5% risk threshold.8 A multivariable logistic regression model was also used to examine how statin utilisation related to SCORE risk, controlling for cardiovascular indication, healthcare utilisation and sociodemographic factors.
The statistical software Stata/MP V.13.1 was used to conduct the analyses.
Results
The characteristics of the sample are described in table 1.
Table 1
Sample descriptive statistics (n=5618)
Prevalence according to age and gender
Table 2 shows descriptive analyses for prevalence by indication and age. Within this sample of 5618 people, 30.5% were currently taking statins. Online supplementary appendix 2, tables A2.2, A2.3 show corresponding data for females and males, respectively, showing that higher proportions of men (32.5%) than women (28.8%) take statins (the 95% CIs for these groups do not overlap). Table 2 also shows the prevalence of statin use in each age category for our sample. Statin utilisation increased monotonically with age; 22.6% of those aged 50–64 years, 41.1% of those aged 65–74 years and 45.6% for those aged 75 years or more. The increased use of statins with increasing age was observed in each gender category (see supplementary appendix 2, tables A2.2, A2.3), with lower proportions of women than men taking statins in each age category.
Table 2
Statin utilisation according to age and indication among TILDA participants (wave 1) aged over 50 years (n=5618)
Prevalence according to indication
Table 2 shows, for example, that of the 250 people who have had MI, 185 are taking statins. This means that 74% of those who have had MI take statins. As the proportion of people who have had MI is low in the population, this represents 10.9% of statin users. On the other hand, a smaller proportion of those with ‘high cholesterol’ take statins (44.1%), but as they represent a larger proportion of the population, this accounts for 24.5% of all statin users. The results clearly show high, although not universal, uptake rates of statins for those with established CVD (eg, 74.0% for MI and 73.7% for IHD), with lower, but still highly significant uptake rates for primary prevention (eg, 34.8% for hypertension and 44.1% for high cholesterol).
Those with established CVD (ie, MI, IHD, stroke and PAC) accounted for 34.9% of those taking statins, while those with diabetes accounted for 9.4% (table 2). Therefore, overall, those without established CVD or diabetes accounted for 55.7% of those taking statins. However, of all women taking statins, 64.7% did not have CVD or diabetes compared with 46.2% of men (see online supplementary appendix 2, tables A2.2, A2.3). Overall, 65.0% of statin users did not have a history of established CVD and were taking statins for primary prevention. The proportion of men taking statins without a history of CVD was 57.3%, while the corresponding proportion for women was 72.7%. These high proportions reflect, in part, the greater proportions of the cohort with no history of CVD.
Factors associated with statin utilisation
Table 3 presents the estimated ORs obtained for each variable included in the final multivariable logistic regression model, adjusting for all other variables in the model.
Table 3
Adjusted ORs of statin use from multivariable logistic regression model
Overall, those aged 65–74 years were more likely to be prescribed a statin than those aged 50–64 years (OR 1.38; 95% CI 1.16 to 1.65), as were those in the oldest age bracket, 75 and over (OR 1.33; 95% CI 1.04 to 1.69).
The number of times a person reported visiting a GP in the previous year was predictive of the likelihood of taking a statin relative to those who had not reported visiting a GP in the previous year (table 3). Polypharmacy, defined as taking five or more medications, was also strongly predictive of statin utilisation (OR 1.74; 95% CI 1.39 to 2.19). People who were living with a spouse or partner were more likely than those living alone to be taking a statin (OR 1.35; 95% CI 1.10 to 1.65). The odds of taking statins for those with a diagnosis of MI was, as expected, relatively high compared with those without MI. All indications were statistically significant except for the IHD category.
The ORs for socioeconomic variables such as income, social class and education level were not found to be statistically significant, nor were ORs for gender, health insurance status or whether the person lived in a rural or urban area.
SCORE analysis
SCORE risk was calculated in those without CVD or diabetes whose LDL and/or TC levels were above the recommended thresholds (n=3551). Eighteen per cent of those whose SCORE result was ≥5% were taking statins; 17% of those with a SCORE of <5% were taking statins (results not shown). However, it was not possible to interpret whether their SCORE risk level had been altered by statin utilisation nor could we ascertain what proportion in either risk group had potentially discontinued statins previously used.
In a separate multivariable model using the subsample of those without CVD or diabetes whose LDL and/or TC levels were above the recommended thresholds, the SCORE risk category was not found to be statistically significantly related to taking a statin (results not presented).
Discussion
Key results
We found that almost one-third of adults over 50 in this Irish cohort were taking statins. Almost two-thirds of these took statins for the primary prevention of CVD, but there was a notable difference between men and women. Almost three-quarters of women taking statins were doing so for primary prevention, compared with just over half of men. Prevalence of statin utilisation was found to increase with age.
Diagnostic indication was a predictor for increased likelihood of taking statins, with those with a history of MI, as expected, having the highest prevalence of statin utilisation. However, although the indication hierarchy used implied an ordering of indications corresponding to priorities for statin treatment, the likelihood of utilising a statin did not uniformly follow this order. Both the diagnoses ‘diabetes’ and ‘high cholesterol’ were found to have higher odds than warranted according to the hierarchy. However, it should be noted that this may be due to the numbers being small in some indication categories, leading to wide CIs, and thus the disparity in ordering should not be overinterpreted. Polypharmacy, frequency of GP visits and living arrangements were also significantly associated with the likelihood of taking a statin, while controlling for all other variables in the model.
The 2007 European Society of Cardiology clinical guidelines recommended that those with a SCORE of over 5% be considered for statin treatment.7 28 This study found that less than a quarter of those above this threshold were using statins, as were one-fifth of those below. This may indicate that GPs or some other doctors initiating statin therapy do not use SCORE to risk assess their patients, but due to the limitations of our data it is difficult to interpret if this is the case.32 A recent UK study of a primary care database found that most patients initiated on statins did not have a risk score recorded. While statins were initiated in 27.5% of clinical encounters and a risk score was recorded in 80% of all encounters, only 7.5% of encounters recorded both a risk score and subsequent statin initiation.33
Strengths and limitations
A strength of our analysis was that it was conducted on a large, nationally representative sample of community-dwelling adults, aged over 50 years in Ireland. Recording medication use directly from respondents with verification allows a closer examination of real-life usage compared with dispensing data that may not account for some elements of non-adherence. Survey weights were applied in the multivariable analysis to reduce potential bias from non-response in the TILDA data collection. This means that our findings are therefore more likely to be representative. These factors will allow for the generalisation of our findings to community living adults aged 50 years and over in Ireland. Our study will therefore be useful for cross-country comparisons of statin utilisation, as well as the patterns by which these drugs are prescribed. The breakdown of utilisation according to indication will inform the debate on the appropriateness of statin prescribing in subgroups of gender and age, diagnostic indications and those who fall into the primary and secondary prevention categories.
The study is limited in that it relies on self-reported doctor diagnoses and recall of the number of GP visits, which may be subject to recall bias. When constructing our indication hierarchy, the reported diagnosis of ‘any other heart trouble’ could not be used and so we may have underestimated the prevalence of those within the secondary prevention category. The diagnostic category ‘potential atherosclerotic conditions’ may include diagnoses that are not atherosclerotic in origin. Also, the diagnostic category ‘peripheral arterial disease’ could not be ascertained due to limitations of the data gathered in TILDA. We have no information on those who have declined or discontinued statins and it is known that poor adherence to statins is common.28 We could not distinguish those with type I and type II diabetes. This is relevant as the 2007 guidelines distinguish between these groups.23 However, numbers of people with type 1 diabetes are relatively small compared with those with type 2 in the age group over 50 years. Although diagnosis of familial hypercholesterolaemia was not clear in the data, we removed those whose LDL levels were >6 mmol/L from the sample. As this comprised 16 people this would not have affected results. Finally, it should be noted that given the cross-sectional nature of our data and the possibility of residual confounding, the results from our multivariable analysis should be considered as statistical associations rather than causal effects.
Interpretation
Primary and secondary prevention
While there is higher prescribing of statins for those with established CVD as would be expected, our finding that a large proportion of statins are used for the primary prevention of CVD is in line with international findings that the distribution of statin prescribing has shifted towards those at the lower end of the indication hierarchy.3 34
Previous Irish research, using a subsample of TILDA data (aged 50–64 years), found that despite clinical guidelines recommending the use of statins in those with CVD or diabetes, treatment prevalence was considered low in these groups, at 69% and 57%, respectively.9 In addition, this previous study found a low level of treatment prevalence in those without CVD and diabetes, but whose SCORE was ≥5%. Both findings are in line with the current study. However, by stratifying participants into the indication hierarchy, our study allowed those in the ‘primary prevention’ group to be analysed in greater detail.
Overall, 28.8% of women and 32.5% of men in our cohort were taking statins. We found that the majority (65.0%) of our cohort was utilising statins for primary prevention of CVD, with a notable difference between men (57.3%) and women (72.7%).
Age
Our study showed that the odds of statin usage were higher at older age groups compared with the base category aged 50–64 years. This was similar to findings in Denmark,18 New Zealand28 and the UK,10 14 except that a decrease in utilisation was found in these studies in the oldest age groups.
Socioeconomic factors
In line with a previous Irish study,9 we did not find education level, social class, income or whether the person had medical insurance or a medical card to be statistically significant predictors of statin usage. An exception was found in the previous study for those at high SCORE risk, who were twice as likely to be taking statins if eligible for a medical card.
Conflicting findings about statin utilisation and socioconomic factors have been reported in studies from other countries.4 10 11 20 27 28 These differences may be a result of differences in access and entitlements within health systems, as well as differing social, political and cultural contexts.35 Countries may vary in reimbursement regulation,1 27 28 type of insurance cover (such as Medicaid, Medicare and private insurance in the USA),11 clinical guideline recommendations,14 local medical and patient culture as well as differences in demand from patients in differing socioeconomic groups.1 28
Number of GP visits
Controlling for indication, a person was more likely to be using a statin if they had visited their GP in the previous year than if they had not. The estimated OR increased with number of GP visits until three to four visits and decreased thereafter, although there was considerable overlap in the 95% CIs for different frequencies of GP visits. In their study of factors influencing the prescribing of statins in the UK, Wu et al 10 found that statin prescribing increased with number of blood pressure measurements, a proxy for GP visits and perception of CVD risk. However, the highest number of GP visits described was four or more and their study may have shown a similar pattern to ours were the number of visits stratified in a similar manner.
Polypharmacy
Polypharmacy, commonly defined as the use of five or more regular medicines, was found to be a strong predictor of statin prescription. In other words, controlling for clinical indication, a person receiving five or more medicines (excluding statins) was more likely to be taking a statin. A recent Irish study found that the prevalence of polypharmacy in those over 65 years in 2012 was 60%,36 and that statins were the drug category prescribed to the highest number of individuals. Another study reported that lipid-modifying drugs were the most commonly reported medication class (69%), along with antithrombolytics, used by those reporting polypharmacy.37 Our finding raises questions as to why, controlling for diagnostic indication, someone receiving five or more medicines would be more likely to receive a statin. This could be based on differences in patient preferences as well as challenges to following clinical guidelines for patients with multimorbidity, which is closely linked with polypharmacy.38 Some studies have found an association between polypharmacy and increased likelihood of statin use29 30 and adherence to statins,39 40 while others found that people subject to polypharmacy were less likely to adhere to medicines, including statins.41 Further qualitative research is recommended to explore this finding.
Indication hierarchy
The indication hierarchy implied an ordering of indications6 corresponding to priorities described in European guidelines.23 However, our analysis showed that the likelihood of using a statin did not exactly follow this order of prescribing priority. Both ‘high cholesterol’ and ‘diabetes’ were found to have higher odds than warranted according to the hierarchy, although again we acknowledge the caveat that this may be due to small numbers for some indication categories. Those with high cholesterol were more likely to receive statins than those with PAC and hypertension, whereas those with SCOREs over the recommended risk threshold had low levels of statin utilisation. This could imply an overemphasis on high cholesterol, a single risk factor, as a reason to prescribe rather than prescribing based on overall risk assessment. This finding corresponds with those from the USA,14 Norway,27 the UK10 and Australia.42
In our study, 57.8% of people with diabetes were taking statins and they accounted for 9.4% of prevalent statin users. This finding was similar to previous Irish9 and Danish findings.22 Two US studies found that 48%10 of ‘eligible diabetics’ and 52%14 of people with both diabetes and hyperlipidaemia were taking statins. In those without a diagnosis of hyperlipidaemia, this fell to 12%.
Conclusion
This study describes statin utilisation in a representative sample of people aged over 50 years in Ireland. We show high, although not universal, uptake rates of statins for those with established CVD, with lower, but still highly significant uptake rates for primary prevention. Given the ongoing debate on the appropriateness of statin use in primary prevention,22 43 44 it is significant that such a large proportion of Irish users fall into this category, particularly women. In addition, the possible focus on hyperlipidaemia as a reason for prescribing instead of overall CVD risk may indicate an overemphasis on this single risk factor.14 42 Polypharmacy, controlling for indication, was strongly associated with statin use. This finding warrants further investigation.
Statins are widely prescribed and command a large share of drug expenditure in Ireland and other countries. An increasingly larger proportion of the population are using statins, and this is becoming very resource intensive and arguably unsustainable. The evidence base for statin use in various diagnostic categories varies19 22 and thus, the benefit-to-risk ratios for each also vary. There have been concerns about the medicalisation of risk factors such as mild hypercholesterolaemia.45 Various commentators have pointed out that the benefits of prescribing a medicine must outweigh the harms46 and that the budget impact of thresholds for treatment needs to be considered.47 However, uncertainties abound when deciding on cost-effective treatment thresholds.48 49 It would therefore seem appropriate to consider whether widespread use of statins in some of these diagnostic categories represents the best use of scarce resources, particularly in low-risk groups.50
The debate on the appropriate use of statins for primary prevention of CVD is ongoing and highly topical.17 43 51–54 At the heart of this debate is the question as to whether the benefits of taking statins outweigh the harms and costs for patients in the primary prevention category. The first step towards answering this question is to consider current utilisation and indication for use, as we have done, which provide important contextual information for the debate on statin use.
Acknowledgments
The authors would like to thank TILDA for providing access to the data, in particular Hugh Nolan and Neil O’Leary. In addition, although the data were not used in final analysis, the authors would like to thank Kathleen Bennett and the HSE-PCRS for access. Marie Therese Cooney wrote the code we used for SCORE risk calculation and Ronan Conroy from RCSI assisted in the use of this code. In addition, the authors would also like to thank Daniela Rohde, SPHeRE scholar, for her help.
References
1. 1.
2. 2.
3. 3.
4. 4.
5. 5.
6. 6.
7. 7.
8. 8.
9. 9.
10. 10.
11. 11.
12. 12.
13. 13.
14. 14.
15. 15.
16. 16.
17. 17.
18. 18.
19. 19.
20. 20.
21. 21.
22. 22.
23. 23.
24. 24.
25. 25.
26. 26.
27. 27.
28. 28.
29. 29.
30. 30.
31. 31.
32. 32.
33. 33.
34. 34.
35. 35.
36. 36.
37. 37.
38. 38.
39. 39.
40. 40.
41. 41.
42. 42.
43. 43.
44. 44.
45. 45.
46. 46.
47. 47.
48. 48.
49. 49.
50. 50.
51. 51.
52. 52.
53. 53.
54. 54.
View Abstract
Footnotes
• Contributors PB was the lead researcher and involved in the design, implementation and analysis and reporting of the study. JC, CM and SMS provided substantial contributions to the conception, design, analysis and reporting of the work. PB, JC, CM and SMS have all read and approved the final manuscript and agree to be accountable for all aspects of the work.
• Funding This study is part of PB’s PhD, which is funded by the SPHeRE HRB structured PhD programme. TILDA, the original study on which this is based, is funded by the Irish Department of Health, Irish Life and Atlantic Philanthropies. CM reports grants from the Health Research Board during the conduct of the study (grant no. HRB/ICE 2012/7).
• Competing interests None declared.
• Patient consent Obtained.
• Ethics approval Ethical approval for the TILDA study was received from the Trinity College Research Ethics Committee and all participants provided written informed consent. TILDA has both publicly available data, which can be accessed as described in the section ’Data sharing', as well as additional data that are available only for research purposes. These data can be accessed on application to and approval by TILDA, which was granted to PB for the purposes of this paper.
• Provenance and peer review Not commissioned; externally peer reviewed.
• Data sharing statement Researchers interested in using TILDA data may access the data for free from the following sites: Irish Social Science Data Archive (ISSDA) at University College Dublin http://www.ucd.ie/issda/data/tilda/; Interuniversity Consortium for Political and Social Research (ICPSR) at the University of Michigan: http://www.icpsr.umich.edu/icpsrweb/ICPSR/studies/34315
Request Permissions
If you wish to reuse any or all of this article please use the link below which will take you to the Copyright Clearance Center’s RightsLink service. You will be able to get a quick price and instant permission to reuse the content in many different ways.
|
__label__pos
| 0.560752 |
Yun-Peng He
Sun Yat-Sen University of Medical Sciences, Shengcheng, Guangdong, China
Are you Yun-Peng He?
Claim your profile
Publications (2)0 Total impact
• [Show abstract] [Hide abstract]
ABSTRACT: To observe the relationship between activity of peroxisome proliferator activated receptor γ (PPARγ) in nucleated cell and level of pro-inflammatory mediator interleukin-6 (IL-6) in plasma of rats with sepsis. According to the random number table, 90 male Sprague-Dawley (SD) rats were randomly divided into three groups, namely control group, sham operation group and sepsis group. Each group was further divided into three subgroups according to postoperative time points, i.e. 12, 24 and 48-hour subgroups. Each subgroup consisted of 10 rats. Sepsis was reproduced by cecal ligation and puncture (CLP). The PPARγ activity in nucleated cells and IL-6 level in plasma were detected by enzyme-linked immunosorbent assay (ELISA). The PPARγ activity in nucleated cells was significantly decreased at 12, 24 and 48 hours in sepsis group (A value: 0.279±0.004, 0.264±0.009, 0.245±0.012) compared with control group (0.292±0.007, 0.293±0.004, 0.293±0.005) and sham operation group (0.295±0.008, 0.295±0.006, 0.294±0.007), while the IL-6 level was significantly increased in sepsis group (ng/L: 365.25±15.53, 507.16±20.86, 437.89±25.09) compared with control group (43.54±11.10, 48.82±10.62, 42.96±9.52) and sham operation group (42.43±6.77, 40.32±6.48, 44.10±9.36, all P<0.05). When septic condition became worse, the PPARγ activity in nucleated cells of sepsis group lowered, and IL-6 level was gradually elevated after operation, reaching the peak at 24 hours, and then gradually lowered, and the difference of the value between any two time points was all statistically significant (all P<0.05). There was a negative correlation between the PPARγ activity in nucleated cells and IL-6 level in 12-hour subgroup of sepsis group (r=-0.703, P=0.023). In septic rats, the PPARγ activity in nucleated cells was lowered while the pro-inflammatory mediator IL-6 level in plasma elevated, and there was a negative correlation between PPARγ activity and IL-6 level.
Zhongguo wei zhong bing ji jiu yi xue = Chinese critical care medicine = Zhongguo weizhongbing jijiuyixue 05/2011; 23(5):302-4.
• [Show abstract] [Hide abstract]
ABSTRACT: To study changes in the levels of systematic and airway local oxidative stress in patients in different stages of chronic obstructive pulmonary diseases (COPD), and explore the association between oxidative stress and glucocorticoid receptor (GR) level in the peripheral blood leukocytes. The levels of malonaldehyde (MDA), glutathione (GSH), superoxide dismutase (SOD) and glutathione peroxidase (GSH-PX) in induced sputum and plasma, as well as GR levels in peripheral blood leukocytes and plasma levels of cortisol and adrenocorticotrophic hormone (ACTH), were examined in 33 patients with acute exacerbations of COPD (AECOPD, group A), 27 with stable COPD (group B), and 28 healthy volunteers (including 15 smokers as group C, and 15 nonsmokers as group D). MDA level in induced sputum and plasma decreased, whereas the levels of GSH, SOD and GSH-PX increased significantly in the order of groups A, B, C, and D (P<0.05). The activity of SOD in induced sputum and plasma were significantly lower in group C than in group D. No significant difference was noted in the other oxidative stress indices between groups C and D (P>0.05). The plasma levels of cortisol and ACTH showed no significant difference between the 4 groups, while the GR level in peripheral blood leukocytes increased significantly in the order of groups A, B, C and D (1565-/+719, 2069-/+488, 2739-/+926, and 4793 -/+1415 U, respectively, P<0.05). After controlling for the factor of smoking status, the plasma and sputum SOD activity were both positively correlated to GR, with the partial correlation coefficient of 0.512 and 0.564, respectively (P<0.001). Patients in different stages of COPD, especially those with AECOPD, may sustain systematic and local oxidation and anti-oxidation imbalance. Decreased SOD activity may contribute to GR level decrement in peripheral blood leukocytes in these patients.
Nan fang yi ke da xue xue bao = Journal of Southern Medical University 06/2008; 28(6):992-6.
|
__label__pos
| 0.540379 |
One ________ Equals About 768 Pages Of Text. – (FIND THE ANSWER)
One Megabyte Equals About 768 Pages Of Text
A megabyte is a unit of digital storage used to measure computer memory or storage capacity. It is usually referred to as MB, and it is usually used as a measure of a computer’s RAM capacity. Many people wonder exactly how many pages of text one megabyte is equal to. The answer is that one megabyte is equal to approximately 768 pages of text.
To understand how this works, you need to understand that a megabyte is equal to 1,024 kilobytes (KB). And each kilobyte is equal to 1,024 bytes. Each byte of computer data is the equivalent of one character of text. A page of text is usually around 1,500 characters. Therefore, it stands to reason that 1,500 characters will take up approximately 1 kilobyte of space. So, if you multiply 1,500 characters by 1,024 kilobytes, you get 1,536,000 characters, which is the same as 1 megabyte, or 768 pages of text.
This means that 1 megabyte is quite a lot of data. It is enough space to store hundreds of pages of text, thousands of pictures, or hundreds of songs. If you are looking for a way to store large amounts of information, then a megabyte is a great option.
The amount of pages of text that one megabyte can store will also depend on the type and size of the font used. For example, if you use larger fonts, then it will take up more space and therefore fewer pages of text can be stored in one megabyte. On the other hand, if you use smaller fonts, then more pages of text can be stored in one megabyte.
To summarize, one megabyte is equal to approximately 768 pages of text. This is a great way to store large amounts of information without having to worry about running out of space. Moreover, the exact number of pages of text stored in one megabyte will depend on the type and size of font used.
Leave a Comment
Your email address will not be published. Required fields are marked *
|
__label__pos
| 0.997086 |
原创
noip2016普及组 题解
版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/lrj124/article/details/69055886
GX蒟蒻第一次参加noip,考下来310分,请诸位神犇多包容
T1
大水题,不解释
上考场代码
#include <algorithm>
#include <cstdio>
using namespace std;
int main() {
freopen("pencil.in","r",stdin);
freopen("pencil.out","w",stdout);
int n,Min = 0x7fffffff;
scanf("%d",&n);
for (int i = 1;i <= 3;i++) {
int number,money,count;
scanf("%d%d",&number,&money);
count = n/number;
if (n%number) count++; //count为需要买的包数
Min = min(Min,count*money); //取最小的
}
printf("%d",Min);
return 0;
}
T2
简单的模拟,生成date1到date2的所有日期,判断是否回文
上考场代码
#include <cstdio>
int m[] = {0,31,28,31,30,31,30,31,31,30,31,30,31};
inline bool check(int date) { //判断是否回文
int t[9];
t[0] = 0;
while (date) {
t[++t[0]] = date%10;
date /= 10;
}
for (int i = 1;i <= 4;i++)
if (t[i] != t[8-i+1]) return false;
return true;
}
inline int next(int i) { //生成下一个日期
int year,month,day;
day = (i%10)+((i/10%10)*10); //取出日
i /= 100;
month = (i%10)+((i/10%10)*10); //取出月
i /= 100;
year = (i%10)+((i/10%10)*10)+((i/100%10)*100)+i/1000*1000; //取出年
if ((!(year%4) && year%100) || !(year%400)) m[2] = 29; //判断是否为闰年
day++; //下一天
if (day == m[month]+1) { //若到了月底,则变到下一月
day = 1;
month++;
}
if (month == 13) { //若到了年底,则变到下一年
month = 1;
year++;
}
return day+month*100+year*10000; //把年月日变成8位数字
}
int main() {
freopen("date.in","r",stdin);
freopen("date.out","w",stdout);
int date1,date2,ans = 0;
scanf("%d%d",&date1,&date2);
for (int i = date1;i <= date2;i = next(i)) //生成date1到date2的所有日期
if (check(i)) ans++; //判断是否回文
printf("%d",ans);
return 0;
}
T3
考场上写了个暴力模拟,70分......出来后发现还是可以做的,写个队列就行了,超出86400s的就出队
70分考场代码
#include <cstring>
#include <cstdio>
#include <map>
using namespace std;
int n,t[100001],k[100001];
bool tmp[100001];
map<int,int> x[100001];
int main() {
freopen("port.in","r",stdin);
freopen("port.out","w",stdout);
scanf("%d",&n);
for (int i = 1;i <= n;i++) {
scanf("%d%d",&t[i],&k[i]);
for (int j = 1;j <= k[i];j++) scanf("%d",&x[i][j]);
int L = 1,R = i,pos = i;
while (L <= R) {
int mid = (L+R)>>1;
if (t[mid] > t[i]-86400) {
pos = mid;
R = mid-1;
} else L = mid+1;
}
int ans = 0;
memset(tmp,false,sizeof(tmp));
for (int j = pos;j <= i;j++)
for (int l = 1;l <= k[j];l++)
if (!tmp[x[j][l]]) {
ans++;
tmp[x[j][l]] = true;
}
printf("%d\n",ans);
}
return 0;
}
100分代码
#include <cstdio>
#include <queue>
#include <map>
using namespace std;
int n,ans = 0,vis[100001];
struct Queue { int t,x; };
queue<Queue> Q;
inline int read(int &x) { //读入优化
char ch;
while ((ch = getchar()) < '0' || ch > '9');
x = ch-'0';
while ((ch = getchar()) >= '0' && ch <= '9') x = x*10+ch-'0';
}
int main() {
freopen("port.in","r",stdin);
freopen("port.out","w",stdout);
read(n);
for (int i = 1;i <= n;i++) {
int t,k;
read(t),read(k);
for (int i = 1,x;i <= k;i++) {
read(x);
if (!vis[x]) ans++; //若这个乘客是其他国籍,则统计
vis[x]++; //统计
Q.push((Queue){t,x}); //加入队列
}
while (true) { //把86400以外的排除
Queue head = Q.front();
if (t-86400+1 <= head.t && head.t <= t) break;
else {
vis[head.x]--;
if (!vis[head.x]) ans--;
Q.pop();
}
}
printf("%d\n",ans);
}
return 0;
}
T4
考场上想不出,于是打了个暴力,40分......
40分考场暴力代码
#include <cstdio>
int main() {
int n,m,x[40001],ans[40001][4];
scanf("%d%d",&n,&m);
for (int i = 1;i <= m;i++) scanf("%d",&x[i]);
for (int a = 1;a <= m;a++)
for (int b = 1;b <= m;b++)
if (a != b)
for (int c = 1;c <= m;c++)
if (c != a && c != b && (double)x[b]-(double)x[a] < (double)((double)x[c]-(double)x[b])/3.0)
for (int d = 1;d <= m;d++)
if (d != a && d != b && d != c && x[a] < x[b] && x[b] < x[c] && x[c] < x[d] && x[b]-x[a] == 2*(x[d]-x[c])) {
ans[a][0]++;
ans[b][1]++;
ans[c][2]++;
ans[d][3]++;
}
for (int i = 1;i <= m;i++) printf("%d %d %d %d\n",ans[i][0],ans[i][1],ans[i][2],ans[i][3]);
return 0;
}
4重循环是用不到n的,没有白给的条件,没有没用的数据!!!
我们可以把这4个数看作是个数轴上的点,根据题目给的条件,可知AB=2*CD,BC>6*CD,AD>9*CD
那么,我们只需要确定D,就可以确定C点,然后再找AB。我们也可以通过找C来确定ABD。
100分代码
#include <cstdio>
int n,m,x[40001],vis[15001],a[15001],b[15001],c[15001],d[15001];
int main() {
freopen("magic.in","r",stdin);
freopen("magic.out","w",stdout);
scanf("%d%d",&n,&m);
for (int i = 1;i <= m;i++) {
scanf("%d",&x[i]);
vis[x[i]]++; //把所有数记在数轴上
}
for (int i = 1;i <= n/9;i++) { //枚举CD的长度
int sum = 0;
for (int j = i*9+2;j <= n;j++) {
sum += vis[j-(9*i+1)]*vis[j-(9*i+1)+2*i];
d[j] += sum*vis[j-i];
c[j-i] += sum*vis[j];
}
sum = 0;
for (int j = n-(9*i+1);j >= 1;j--) { //枚举CD两点,确定AB的个数
sum += vis[j+(9*i+1)]*vis[j+(9*i+1)-i];
a[j] += sum*vis[j+2*i];
b[j+2*i] += sum*vis[j];
}
}
for (int i = 1;i <= m;i++) printf("%d %d %d %d\n",a[x[i]],b[x[i]],c[x[i]],d[x[i]]);
return 0;
}
文章最后发布于: 2017-04-04 10:53:00
展开阅读全文
0 个人打赏
没有更多推荐了,返回首页
©️2019 CSDN 皮肤主题: 编程工作室 设计师: CSDN官方博客
分享到微信朋友圈
×
扫一扫,手机浏览
|
__label__pos
| 0.990905 |
Skip to main content
Lowy & Sewell Eye Care is Open and seeing patients by appointment only
girl%20with%20blue%20eyes%20in%20black%20and%20white%20coat%20slide.png
contact-in-solution
Home »
Cataracts
3 Ways Diabetes Can Affect Your Vision and Eyes
Did you know that people with diabetes are 20 times more likely to get eye diseases than those without it? There are three major eye conditions that diabetics are at risk for developing: cataracts, glaucoma, and diabetic retinopathy. To prevent these sight-threatening diseases, it’s important to control your blood sugar level and have your eyes checked at least once a year by an eye doctor.
But First, What Is Diabetes?
Diabetes is a disease that is associated with high blood glucose levels. Insulin, a hormone produced by the pancreas, helps our cells get energy from the sugars we eat. Diabetes develops when the body doesn’t produce or respond to insulin effectively, leaving too much sugar in the blood stream instead. Over time, diabetes can lead to potentially irreversible ocular damage and poor eyesight. However, by taking care of your blood sugar levels and your eyes, you can prevent vision loss.
Annual eye exams are recommended for everyone, but routine screenings are even more important for diabetics. Eye doctors may send diabetic eye health reports to a patient’s primary care physician or internist to adjust medication as needed to prevent complications.
What’s the Link Between Vision and Diabetes?
Blurred vision or fluctuating eyesight clarity is often one of the first noticeable signs that diabetes has begun to affect your eyes. Sometimes, fluid leaking into the eye causes the lens to swell and change shape. This, in turn, makes it difficult for the eyes to focus, resulting in fuzzy vision. Such symptoms can indicate that an eye disease is developing, or may simply be due to imbalanced blood sugar levels which can be rectified by getting your blood sugar back to healthy levels.
If you start to notice blurry vision, make an appointment with Dr. Lowy as soon as possible.
The 3 Ways Diabetes Impacts Vision
Cataracts
While cataracts are extremely common and a part of the natural aging process, those with diabetes tend to develop cataracts earlier in life. Characterized by a clouding or fogging of the lens within the eye, cataracts impede light from entering the eye, causing blurred vision and glares. The best treatment is cataract surgery, which is very safe and effective.
Glaucoma
Glaucoma refers to a group of eye diseases characterized by optic nerve damage. Since it tends to impact peripheral vision first, glaucoma often goes unnoticed until significant damage has occurred. However, routine glaucoma screenings can detect warning signs; early treatment can prevent disease progression and vision loss.
Although there is no true cure for glaucoma, most glaucoma patients successfully manage it with special eye drops, medication, and on occasion, laser treatment or other surgery. The earlier glaucoma is diagnosed and managed, the better the outcome.
Diabetic Retinopathy
Diabetic retinopathy occurs when the small blood vessels on your retina (capillaries) become weakened and then balloon (microaneurysm) due to poorly controlled blood sugar levels. The resulting poor blood circulation in the back of the eye causes more abnormal blood vessels to grow, which also bleed or leak fluid, and can lead to scar tissue, retinal detachment and even blindness, over time.
Often there are no symptoms until the advanced stages of diabetic retinopathy, where patients may begin to see spots and missing patches in their vision. Retinopathy can be treated through surgery and eye injections, but the best way to prevent this disease from progressing is to regularly have your eyes screened.
The good news is that diabetic eye disease can often be prevented with early detection, proper management of your diabetes and regular diabetic eye exams. Contact Lowy & Sewell Eye Care in Concord to set up your eye doctor’s appointment today.
Does Obesity Impact Eye Health?
Nation-wide awareness about the vast dangers of obesity is at an all-time high, with TV shows like “The Biggest Loser” and health initiatives such as Michelle Obama’s “Let’s Move!” campaign shining a spotlight on the importance of fitness and good nutrition. However, despite the public’s knowledge of obesity’s effects on hypertension, stroke, and diabetes, many are not aware of how it damages eye health and vision.
Increasing evidence shows that people who are clinically obese have an elevated risk of developing serious eye diseases. It is widely known that expanding waistlines place people at a higher risk of getting diabetes, heart disease, and cancer — but researchers say the link between obesity and deteriorating vision is the “risk factor that no one talks about”. Professor Michael Belkin and Dr. Zohar Habot-Wilner, from the Goldschleger Eye Institute at the Sheba Medical Center, found a consistently strong correlation between obesity and the development of four major eye diseases that may cause blindness:
• Age-related macular degeneration (AMD)
• Cataracts
• Glaucoma
• Diabetic retinopathy
The researchers said that although the evidence was out there suggesting a link between obesity and these conditions, their study emphasizes the optometric risks of obesity which can help motivate people to shed those extra pounds.
How Obesity Contributes to Eye Disease
A Body Mass Index (BMI) of 25 is considered overweight and above 30 is regarded as obese. A high BMI is tied to several chronic systemic health conditions such as diabetes, cardiovascular disease, and stroke, among others. Recent research indicates that a handful of ocular diseases can now be added to that list.
Serious eye conditions such as diabetic retinopathy, glaucoma, and age-related macular degeneration are more common in individuals with obesity, as well as floppy eyelid syndrome, retinal vein occlusions, thyroid-related eye diseases, and stroke-related vision loss.
The connection between obesity and these eye diseases is likely due to the increased risk of peripheral artery disease. This occurs when the tiny blood vessels bringing oxygen to parts of your body like the feet, kidneys, and eyes become compromised.
Your eyes are particularly prone to damage from obesity because the blood vessels in the eyes (called arterioles) are easily blocked, since they’re extremely thin and small — as thin as ½ the width of a human hair!
Most people are not aware that obesity may increase the rate of developing cataracts, too. Cataracts result when the focusing lens in the eye becomes cloudy and requires surgery to be replaced. In addition to age, cataract development is associated with obesity, poor nutrition, gout, diabetes and high blood sugar levels, though the exact cause isn’t clear.
A Healthy Lifestyle Can Reduce Your Risk of Ocular Disease
Knowing about the risk of vision loss may give those with a high BMI the extra motivational boost they need to lose weight. The good news is that a few lifestyle changes can reduce the associated risks.
An active lifestyle and a balanced, nutritious diet lower obesity and improve overall physical and eye health. Give your body a boost by incorporating important nutrients, such as vitamins C and E, zeaxanthin, omega 3, zinc, and lutein, many of which are found in green leafy and dark orange vegetables, as they have been shown to reduce the onset, progression, and severity of certain eye diseases.
We Can Help Keep Your Eyes Healthy in Concord
While a healthy diet and regular exercise greatly increase your chances of living a disease-free long life, they alone are not enough to ensure long term healthy eyesight. Regular eye exams with Dr. Lowy can help prevent or detect the onset of ocular disease, and maintain vision that is clear and comfortable.
If you have any questions or concerns regarding your vision or eye health, don’t hesitate to call Lowy & Sewell Eye Care — we’re here for you.
Cataract Awareness Month
June is Cataract Awareness Month. During this important time, people living with cataracts (and their loved ones) are encouraged to talk about their personal experiences by giving each other helpful information and sharing their knowledge and advice. Use the hashtag #CataractAwarenessMonth on your social media channels to encourage and support others.
Did you know that over 24 million Americans have cataracts? More than 3.5 million Canadians are blind from cataracts, making it one of the most common – and serious – eye conditions today. Dr. Lowy treats cataract patients from all over Concord, Ontario with the newest and most effective methods of eye care.
With millions of people living with the condition, it’s now more important than ever to bring awareness to this serious condition.
What Are Cataracts?
So what exactly are cataracts?
The lens of the eye is normally clear, which allows you to see things clearly and in sharp detail. Over time, the lens can become cloudy, causing blurry vision. It’s as if you’re looking through a dirty window and can’t really see what’s outside. This clouding of the lens is called a cataract, and it can affect one or both of your eyes.
What Causes Cataracts?
Aging is the most common cause of cataracts. The lens of your eye contains water and proteins. As you age, these proteins can clump together, and when that happens, the normally clear lens becomes cloudy.
Did you know that certain types of major eye surgeries and infections can trigger cataracts? Other issues that can lead to cataracts include congenital birth defects, eye injury, diseases, and even various kinds of medications. If you’re already developing cataracts, be careful when going outside. UV rays from the sun can make cataracts develop faster.
How Can I Lower My Risk of Cataracts?
Certain risk factors increase your chance of developing cataracts. These typically include:
• Diabetes
• Excessive alcohol consumption
• Family and medical history
• Medications
• Obesity
• Smoking
• UV ray exposure
To lower your risk, consider reducing your alcohol intake, quit smoking, start an exercise program, eat foods rich in vitamin A and C, and wear 100% UV blocking sunglasses.
Common Symptoms of Cataracts
If you have cataracts, you may experience some common symptoms like:
• Blurry vision
• Colors that used to be bright now appear dim
• Double vision
• Glare from natural sunlight or from artificial light, like light bulbs and lamps
• Halos around lights
• Night vision problems
• Sensitivity to light
If you or a family member notice any of these signs, talk to Dr. Lowy right away. The sooner you seek treatment, the faster we can help you get back to clear vision.
Coping With Cataracts
If you’re experiencing vision problems from cataracts, there is hope. If you have a mild case, a combination of a different eyeglass prescription and better lighting in your home, office, or other environment can improve your vision. In more advanced cases, your optometrist will likely recommend cataract surgery to remove the cloudy lens and replace it with a clear one.
Do I Need Cataract Surgery?
Cataract surgery is one of the most common procedures today. In fact, the American Academy of Ophthalmology estimates that 2 million people undergo the procedure each year.
During the procedure, the doctor will gently remove the cataract from the eye and replace it with an artificial intraocular lens (known as an IOL). Because it’s a common procedure, cataract surgery is usually performed in an outpatient clinic or in your eye doctor’s office. There is no need to stay in a hospital and you can usually resume your normal activities in just a few days.
If you’ve exhausted every other solution and still suffer from blurry vision from cataracts, surgery may be an option. Schedule a consultation online or call 905-738-6680 to book an eye doctor’s appointment at Lowy & Sewell Eye Care and together, we’ll determine if cataract surgery is right for you.
During this Cataract Awareness Month, share your stories and successes, and give your loved ones hope for a healthy and high quality of life.
|
__label__pos
| 0.906707 |
Primary key, PL-SQL Programming
PRIMARY KEY:
PRIMARY KEY indicates that the table is subject to a key constraint, in this case declaring that no two rows in the table assigned to ENROLMENT can ever have the same combination of StudentId and CourseId fields (i.e., we cannot enrol the same student on the same course more than once, so to speak). We will learn more about SQL constraints in general and SQL's key constraints.
Posted Date: 1/11/2013 5:22:39 AM | Location : United States
Related Discussions:- Primary key, Assignment Help, Ask Question on Primary key, Get Answer, Expert's Help, Primary key Discussions
Write discussion on Primary key
Your posts are moderated
Related Questions
Literals A literal is an explicit numeric, string, character, or Boolean value not represented by an identifier. Numeric literal 147 and the Boolean literal FALSE are some of
Explicit Cursor Attributes The cursor variable or each cursor has four attributes: %FOUND, %ISOPEN, %ROWCOUNT, and %NOTFOUND. When appended to the cursor or cursor variable, th
Package STANDARD The package named STANDARD defines the PL/SQL atmosphere. The package specification globally declares the exceptions, types, and subprograms that are available
Using TRIM This process has two forms. The TRIM removes an element from the end of the collection. The TRIM(n) removes the n elements from the end of the collection. For e.g.
Majority of Differences among 9i, 10G, 11G :- These are some combine feature which has differences among others. Automatic Workload Repository (AWR) Drop database' s
Architecture The PL/SQL run-time system and compilation is a technology, not an independent product. Consider this technology as an engine that compiles and executes the PL/SQL
Assignment of Variable - Updating a Variable Syntax: SET SN = SID ('S2'); This can obviously be read as "set the variable SN to be equal in value to SID ( 'S2' )".
The SQL ‘CREATE TABLE' scripts for all the tables you have implemented. Note that your tables must correspond exactly to the ERD you have provided in 1. above, or you will lose ma
Procedures The procedure is a subprogram which can take parameters and be invoked. Normally, you can use a procedure to perform an action. The procedure has 2 sections: the spe
Updating Variables For assignment, SQL uses the key word SET, as in SET X = X + 1 (read as "set X equal to X+1") rather than X: = X + 1 as found in many computer languages.
|
__label__pos
| 0.647764 |
File Exchange
image thumbnail
Device Drivers
version 1.6.0.1 (1.88 MB) by Giampiero Campa
Developing Simulink Device Driver Blocks: Step-By-Step Guide and Examples
110 Downloads
Updated 01 Sep 2016
View License
Editor's Note: This file was selected as MATLAB Central Pick of the Week
This package contains a guide that explains, in a step-by-step fashion, how to develop device driver blocks (blocks that perform target-specific functions when executed on a target platform).
Example drivers for:
-) Arduino digital output
-) Arduino digital input
-) Arduino analog output
-) Arduino encoder read
are included.
While the examples are built using the Arduino as the hardware platform (specifically relying on the Simulink Support Package for Arduino), the method applies to any other supported target.
In this guide, the first method to develop device drivers is based on the S-Function Builder block. Following chapters also describe different methods based respectively on the Legacy Code tool, the MATLAB function block, and the System Object block. Advantages and disadvantages of each method are discussed in the guide.
Finally, note that for MATLAB 2013b you will need to apply a fix for the S-Function builder to develop blocks with no input. To do so, go to the following page: http://www.mathworks.com/support/bugreports/1006532 , scroll down to the bottom, and follow the instructions therein.
Cite As
Giampiero Campa (2020). Device Drivers (https://www.mathworks.com/matlabcentral/fileexchange/39354-device-drivers), MATLAB Central File Exchange. Retrieved .
Comments and Ratings (139)
Saipraveen
chengbo XU
tony tonx
Hello
i Need your Help:
i want to make device Driver for TFT Nextion. how can i do it?
many thanks.
Has anyone created a block for I2C communication for PX4 Autopilots? I need a light in what should be the best approach.
Perry, yes something similar should work provided you know which library to include and functions to call. For Simulink Real Time in general I would contact our Technical Support, and tell them exactly what you need to accomplish (with examples), they are in general better equipped to help you.
Perry
I am able to use the System Object block method to implement a driver for Raspberry Pi that links a static library. Will this method work with Simulink Realtime? One difference is compilation is done on the Pi whereas for Simulink Real Time, compilation is done on the host.
Amanda P
Hi,
I'm using the encoder S-Function and have modified it so that it'll only trigger on the rising edge of my reference signal to count pulses. I know this has less resolution, but I want to verify carry over functionality from my hand code, to the model I'm creating.
I'm finding that my output results in the same sign, no matter which direction the motor is turning.
Below is the modified code, if any one has thoughts as to why I'm getting the same sign, please share!
Modified "update" code:
if (xD[0]!=1) {
/* don't do anything for MEX-file generation */
# ifndef MATLAB_MEX_FILE
/* enc[0] is the encoder number and it can be 0,1 or 2 */
/* if other encoder blocks are present in the model */
/* up to a maximum of 3, they need to refer to a */
/* different encoder number */
/* store pinA and pinB in global encoder structure Enc */
/* they will be needed later by the interrupt routine */
/* that will not be able to access s-function parameters */
Enc[enc[0]].pinA=pinA[0]; /* set pin A */
Enc[enc[0]].pinB=pinB[0]; /* set pin B */
/* set encoder pins as inputs */
pinMode(Enc[enc[0]].pinA, INPUT);
pinMode(Enc[enc[0]].pinB, INPUT);
attachInterrupt(digitalPinToInterrupt(Enc[enc[0]].pinA), irsPinAEn0, RISING);
# endif
/* initialization done */
xD[0]=1;
}
Modified Library Code:
# ifndef MATLAB_MEX_FILE
# include <Arduino.h>
typedef struct { int pinA; int pinB; int pos; int del;} Encoder;
volatile Encoder Enc[3] = {{0,0,0,0}, {0,0,0,0}, {0,0,0,0}};
/* auxiliary debouncing function */
void debounce(int del) {
for (int k=0;k<del;k++) {
/* can't use delay in the ISR so need to waste some time
perfoming operations, this uses roughly 0.1ms on uno */
k = k +0.0 +0.0 -0.0 +3.0 -3.0;
}
}
/* Interrupt Service Routine: change on pin A for Encoder 0 */
void irsPinAEn0(){
/* read pin B right away */
int drB = digitalRead(Enc[0].pinB);
/* possibly wait before reading pin A, then read it */
//debounce(Enc[0].del);
int drA = digitalRead(Enc[0].pinA);
/* this updates the counter */
if (drB == HIGH) { /* check pin B */
Enc[0].pos++; /* going clockwise: increment */
} else {
Enc[0].pos--; /* going counterclockwise: decrement */
}
/* end counter update */
} /* end ISR pin A Encoder 0 */
#endif
Hi, any one, who can guide me how to creat custom block for my code. I am totally new to custom Blocks.
unsigned long lastTime;
double errsum, E;
int j=0;
int a;
void setup() {
Serial.begin(9600);
PORTB=0x00;
DDRB=0x06;
ICR1=199;
OCR1A=100;
OCR1B=100;
TCNT1=0;
TCCR1A=0x50;
TCCR1B=0x19;
}
void loop() {
int sensorValue = analogRead(A4);
float val = sensorValue* (4.7 / 1023.0);
if(val>= 2.5){
Serial.println("Low to High");
unsigned long now=millis();
double timeChange = (double)(now-lastTime);
int sensorValue = analogRead(A1);
float voltage = sensorValue* (4.9 / 1023.0);
float voltage2 = (9.2*voltage);
Serial.println(voltage2);
float vr = 25;
double E=vr-voltage2;
errsum +=(E*timeChange);
errsum=abs(errsum);
E=abs(E);
if (errsum>50){
errsum=50;
}
j =2.5*E+(0.5*errsum);
if(j>199) j=199;
lastTime= now;
//update ocr registers with the value
TCCR1B=0x18;
if((PINB&0x02)!=00) TCCR1C=0x80;
if((PINB&0x04)!=00) TCCR1C=0x40;
TCNT1=0;
OCR1B = j;
if(j==0) TCCR1C=0x40;
TCCR1B=0x19;
Serial.println(j);
}
else{
Serial.println("High to Low");
unsigned long now=millis();
double timeChange = (double)(now-lastTime);
int sensorValue = analogRead(A2);
float voltage = sensorValue* (4.9 / 1023.0);
// float voltage2 = (9.2*voltage);
float voltage2 = (10.3*voltage);
Serial.println(voltage2);
float vr = 5 ;
double E=vr-voltage2;
errsum +=(E*timeChange);
errsum=abs(errsum);
E=abs(E);
if (errsum>50){
errsum=50;
}
j =2.5*E+(0.5*errsum);
if(j>199) j=199;
lastTime= now;
//update ocr registers with the value
TCCR1B=0x18;
if((PINB&0x02)!=00) TCCR1C=0x80;
if((PINB&0x04)!=00) TCCR1C=0x40;
TCNT1=0;
OCR1A = j;
if(j==0) TCCR1C=0x40;
TCCR1B=0x19;
Serial.println(j);
}
}
I am trying to include an s function builder block to perform an I2c communication with a BMP280 sensor. When i perform the simulation in external mode everything goes well. My problem arises when i try to include this block in a more complicated system that perform an autopilot for an UAV. Arduino seems blocking and i don't understand why. All the autopilot is perfectely loaded and executed without this change . I really have no idea of what is the cause of the block. Thanks in advance
Luca Cirillo
@Chee Teck Tam: I took advantage of the rollover block explained in the following link, check it out:
http://ctms.engin.umich.edu/CTMS/index.php?aux=Activities_DCmotorA
@Murat Belge: Thanks for your help. After modified the enc_output() function in cpp and header file to returns a long. The encoder position now can exceed 2^15-1. Thanks a lot.
Murat Belge
@Chee Teck Tam: The enc_output() function returns an int. Change the function to return a long.
Hi Murat Belge, Thanks for your reply. I had tried to changed the variable type for Enc.pos in encoder_arduino.cpp to "long" and "volatile long" as well. However, the encoder position still overflow after 2^15-1. Below attached my code, not sure what is going wrong. Kindly advise. Appreciate your help. ( I am using Arduino Mega2560 in this implementation)
code:
#include <Arduino.h>
#include "encoder_arduino.h"
typedef struct
{
int pinA;
int pinB;
volatile long pos;
int del;
} Encoder;
volatile Encoder Enc[3] = {{0,0,0,0}, {0,0,0,0}, {0,0,0,0}};
// Auxiliary function to handle encoder attachment
static int getIntNum(int pin)
{
// Returns the interrupt number for a given interrupt pin
// See http://arduino.cc/it/Reference/AttachInterrupt
switch(pin) {
case 2:
return 0;
case 3:
return 1;
case 21:
return 2;
case 20:
return 3;
case 19:
return 4;
case 18:
return 5;
default:
return -1;
}
}
// Auxiliary debouncing function
static void debounce(int del)
{
long k;
for ( k = 0; k < del; k++) {
// can't use delay in the ISR so need to waste some time
// perfoming operations, this uses roughly 0.1ms on uno
k = k +0.0 +0.0 -0.0 +3.0 -3.0;
}
}
// Interrupt Service Routine: change on pin A for Encoder 0
static void irsPinAEn0(void)
{
// Read pin B right away
int drB = digitalRead(Enc[0].pinB);
// Possibly wait before reading pin A, then read it
debounce(Enc[0].del);
int drA = digitalRead(Enc[0].pinA);
// this updates the counter
if (drA == HIGH)
{
// low->high on A?
if (drB == LOW) { // check pin B
Enc[0].pos++; // going clockwise: increment
}
else {
Enc[0].pos--; // going counterclockwise: decrement
}
}
else {
// must be high to low on A
if (drB == HIGH) { // check pin B
Enc[0].pos++; // going clockwise: increment
}
else {
Enc[0].pos--; // going counterclockwise: decrement
}
} // end counter update
} // end ISR pin A Encoder 0
// Interrupt Service Routine: change on pin B for Encoder 0
static void isrPinBEn0(void)
{
// read pin A right away
int drA = digitalRead(Enc[0].pinA);
// possibly wait before reading pin B, then read it
debounce(Enc[0].del);
int drB = digitalRead(Enc[0].pinB);
// this updates the counter
if (drB == HIGH) { // low->high on B?
if (drA == HIGH) { // check pin A
Enc[0].pos++; // going clockwise: increment
} else {
Enc[0].pos--; // going counterclockwise: decrement
}
} else { // must be high to low on B
if (drA == LOW) { // check pin A
Enc[0].pos++; // going clockwise: increment
} else {
Enc[0].pos--; // going counterclockwise: decrement
}
} // end counter update
} // end ISR pin B Encoder 0
// Interrupt Service Routine: change on pin A for Encoder 1
static void irsPinAEn1(void)
{
// read pin B right away
int drB = digitalRead(Enc[1].pinB);
// possibly wait before reading pin A, then read it
debounce(Enc[1].del);
int drA = digitalRead(Enc[1].pinA);
// this updates the counter
if (drA == HIGH) { // low->high on A?
if (drB == LOW) { // check pin B
Enc[1].pos++; // going clockwise: increment
} else {
Enc[1].pos--; // going counterclockwise: decrement
}
} else { // must be high to low on A
if (drB == HIGH) { // check pin B
Enc[1].pos++; // going clockwise: increment
} else {
Enc[1].pos--; // going counterclockwise: decrement
}
} // end counter update
} // end ISR pin A Encoder 1
// Interrupt Service Routine: change on pin B for Encoder 1
static void isrPinBEn1(void)
{
// read pin A right away
int drA = digitalRead(Enc[1].pinA);
// possibly wait before reading pin B, then read it
debounce(Enc[1].del);
int drB = digitalRead(Enc[1].pinB);
// this updates the counter
if (drB == HIGH) { // low->high on B?
if (drA == HIGH) { // check pin A
Enc[1].pos++; // going clockwise: increment
} else {
Enc[1].pos--; // going counterclockwise: decrement
}
} else { // must be high to low on B
if (drA == LOW) { // check pin A
Enc[1].pos++; // going clockwise: increment
} else {
Enc[1].pos--; // going counterclockwise: decrement
}
} // end counter update
} // end ISR pin B Encoder 1
// Interrupt Service Routine: change on pin A for Encoder 2
static void irsPinAEn2(void)
{
// read pin B right away
int drB = digitalRead(Enc[2].pinB);
// possibly wait before reading pin A, then read it
debounce(Enc[2].del);
int drA = digitalRead(Enc[2].pinA);
// this updates the counter
if (drA == HIGH) { // low->high on A?
if (drB == LOW) { // check pin B
Enc[2].pos++; // going clockwise: increment
} else {
Enc[2].pos--; // going counterclockwise: decrement
}
}
else { // must be high to low on A
if (drB == HIGH) { // check pin B
Enc[2].pos++; // going clockwise: increment
} else {
Enc[2].pos--; // going counterclockwise: decrement
}
} // end counter update
} // end ISR pin A Encoder 2
// Interrupt Service Routine: change on pin B for Encoder 2
static void isrPinBEn2(void)
{
// read pin A right away
int drA = digitalRead(Enc[2].pinA);
// possibly wait before reading pin B, then read it
debounce(Enc[2].del);
int drB = digitalRead(Enc[2].pinB);
// this updates the counter
if (drB == HIGH) { // low->high on B?
if (drA == HIGH) { // check pin A
Enc[2].pos++; // going clockwise: increment
} else {
Enc[2].pos--; // going counterclockwise: decrement
}
}
else { // must be high to low on B
if (drA == LOW) { // check pin A
Enc[2].pos++; // going clockwise: increment
} else {
Enc[2].pos--; // going counterclockwise: decrement
}
} // end counter update
} // end ISR pin B Encoder 2
// Initialization function called by Encoder System object
extern "C" void enc_init(int enc, int pinA, int pinB)
{
// enc is the encoder number and it can be 0,1 or 2
// if other encoder blocks are present in the model
// up to a maximum of 3, they need to refer to a
// different encoder number
// store pinA and pinB in global encoder structure Enc
// they will be needed later by the interrupt routine
// that will not be able to access s-function parameters
Enc[enc].pinA=pinA; // set pin A
Enc[enc].pinB=pinB; // set pin B
// set encoder pins as inputs
pinMode(Enc[enc].pinA, INPUT);
pinMode(Enc[enc].pinB, INPUT);
// turn on pullup resistors
digitalWrite(Enc[enc].pinA, HIGH);
digitalWrite(Enc[enc].pinB, HIGH);
// attach interrupts
switch(enc) {
case 0:
attachInterrupt(getIntNum(Enc[0].pinA), irsPinAEn0, CHANGE);
attachInterrupt(getIntNum(Enc[0].pinB), isrPinBEn0, CHANGE);
break;
case 1:
attachInterrupt(getIntNum(Enc[1].pinA), irsPinAEn1, CHANGE);
attachInterrupt(getIntNum(Enc[1].pinB), isrPinBEn1, CHANGE);
break;
case 2:
attachInterrupt(getIntNum(Enc[2].pinA), irsPinAEn2, CHANGE);
attachInterrupt(getIntNum(Enc[2].pinB), isrPinBEn2, CHANGE);
break;
}
}
// Output function called by Encoder System object
extern "C" int enc_output(int enc)
{
return (volatile long)Enc[enc].pos;
}
// [EOF]
Murat Belge
@Chee Teck Tam: Try changing the variable type for Enc.pos in encoder_arduino.cpp to "long". Current data type is int which is 16-bits in some Arduino boards like Uno. Encoder position will overflow after 2^15-1 if int is 16-bits. Changing the variable type for encoder position to long makes overflow less frequent though it'll still occur after encoder position exceeds 2^32-1. You can also correct for overflow in your Simulink model by detecting and compensating for it.
Read the following from Arduino language reference pages for more info on the subject: https://www.arduino.cc/reference/en/language/variables/data-types/int/
Hi everyone,
I am using the encoder_arduino_test.slx tried to acquire the encoder count. However, the encoder count will reset every 32768 count and return to -32768 count. Any solution to make the encoder continuous counting ? Appreciate your advise.
@Sudeshna Bhattacharya
Hi Sudeshna - I am using an Arduino Mega 2560 and have included Arduino.h, which includes wiring_constants.h.
My Arduino needs to interface with more than one SPI sensor device. These will have common MISO, MOSI, and SCK signals, but different chip select signals so that they can each be selected in turn. I think that this is normal.
One of the devices has a different SPI Mode to the others. I was assuming that I could change this Mode selection as I select each device in turn.
Justin
can someone help my use this device drivers to develop sfunction for sim900
@Justin Mellor
The error for SPI System Object blocks show that BitOrder is not defined anywhere. Assuming that you are using either Due or MKR1000, BitOrder is declared in wiring_constants.h as:
enum BitOrder {
LSBFIRST = 0,
MSBFIRST = 1
};
You can try including "Arduino.h" (from sam for Due and samd for MKR1000) which includes wiring_constants.h.
I also want to understand your use case of having different SPI modes for different slaves. Can you elaborate the same?
Does anyone know of an SPI driver based on a System Object?
The SPI blocks that come with the Arduino Support Package work OK, but don't allow you to use two SPI devices with different Modes and Clock Frequencies.
Saket Adhau
Hello Giampiero Sir,
Thanks for your kind help. Can you please tell me one more thing please.
The encoder function works like butter but when i increase the speed of my motor, the encoder graph goes downwards and the simulation stops.
Hi Qais - I guess you have seen the Encoder Device Driver that Giampiero has provided. This outputs position, so the value can easily be converted into a rate using something like the Discrete Difference block, that just subtracts a previous frame value from the present value, and then dividing by the time step value... or by using the Continuous Derivative block.
Justin
Qais if you divide the output of the block by time it should do what you need.
Thanks for sharing this !! I have a question, if i have a 600 ppr encoder and i want to use this block function to measure velocity, how do i do that if you would know??
Thanks in advance :D
Hi Giampiero - the Arduino Device Driver block guidance that is here and in the Mathworks documentation is excellent - thank you! I have successfully created DIO drivers for my Arduino. However I cannot work out how to generate drivers that will communicate with sensors via the SPI protocol.
I have added #include <SPI.h> to the top of the .cpp file and added the following at the beginning of the .cpp _setup function:
SPI.begin();
SPI.beginTransaction(SPISettings(1000000, MSBFIRST, SPI_MODE3));
The SPI.beginTransaction has been added to the beginning of the _step function in the .cpp file as well.
The first error I encounter is as follows:
C:/AlphaLoop/APMdrivers/include/SPI.h:49:31: error: 'BitOrder' has not been declared
SPISettings(uint32_t clock, BitOrder bitOrder, uint8_t dataMode) {
I have MATLAB code that is correctly interfacing with the sensors using the MATLAB HW Support Package, and have also successfully used the SPI WriteRead block to communicate with them. Unfortunately, the provided SPI block will not allow me to communicate with multiple SPI devices that use different SPI modes. This is why I need to create a System Object based Device Driver.
If you could give me some guidance as to where to put these SPI configuration commands, that would be great! Alternatively, is there is an example you could point me to. Hopefully, in the future, the device driver examples could include SPI and I2C driver blocks.
Thanks in advance for your help - I hope to get this project flying in 2018! - Justin
and it worked perfectly for standard I/O System Object blocks. However I have tried to use this approach to sensor read data using SPI
Hi Saket, i thought i fixed that problem, anyhow, the solution is simple: move the "int k=0" part out of the loop, so that line looks like this:
int k;
for (k=0;k<del;k++) {
Saket Adhau
Hello Giampiero Campa,
I was working on arduino DUE controllerd motor and encoder setup for which i need RPM measurement and also the s_function is not working on adruino due.
The error is something like
"../sfcn_encoder_wrapper.c:48:3: error: 'for' loop initial declarations are only allowed in C99 mode
for (int k=0;k"
Can you please help ?
dgmcik
not clear with lots of bugs
@Morteza and @Mario
To include libraries in your device driver blocks,
1) Include the header file in your source file (C/C++). In this case, add #include <wiringpi.h>
2) If your library has a linker that needs to be used during code compilation, use the 'buildInfo.addLinkFlags('<name of the linker>') under the 'updateBuildInfo' function in your system object. In this case, the linker for the WiringPi library is '-lwiringPi'.
You can refer to the documentation help provided in the Simulink support package for Raspberry Pi to create a device driver block https://www.mathworks.com/help/supportpkg/raspberrypi/device-driver-blocks.html
Hi,i have same question like Mario Frischmann.
Anyone can help?
How can i add libraries which are stored on the raspberry Pi 3 like wiringPi.h?
#include </home/pi/wiringPi/wiringPi/wiringPi.h> does not work.
The path is correct.
Bruno Marin
any idea to get the temperature readings from DS18B20 in ARDUINO UNO using any of these files?
Thanks
I want to use the S function builder to get analogRead from arduino uno, however in my code generation report shown an error : cannot open source file "Arduino.h" for file: C:\MATLAB\SupportPackages\R2016a\toolbox\target\supportpackages\arduinotarget\scheduler\include\arduinoAVRScheduler.h
how can I add the source file "Arduino.h" in my model?
ali soltani
very very very good
Perry
Very nice guide that explains concepts well.....
I was trying to follow the Matlab System Object method for Raspberry Pi driver development. However, the example (digitalio_raspi_test.slx) failed to build with the error:
### Build procedure for model: 'digitalio_raspi_test' aborted due to an error.
Function TAR tried to add two files as "digitalio_raspi.h".
I am using 2016b and Raspberry Pi support package was downloaded about 1 month ago. I am interested in the System Object method since I will need to link several libraries.
Really helpful
Hi, anyone knows or have done a driver for the L3G gyroscope sensors from pololu?
Hi, anyone worked on encoder to read the speed in Raspberry Pi 3 using simulink blocks or SFunction?
Thanks.
@Murat Belge,
Works perfect! Thanks a lot :)
Murat Belge
@Mohamed: You can use a MATLAB function block to read temperature from a DS18B20. The MATLAB code is provided below. Note that it takes about 750ms for a single temperature conversion.
function temperature = readDS18B20()
%#codegen
persistent sensorPath;
if isempty(sensorPath)
path = '/sys/bus/w1/devices/28-031561e430ff';
fileSeperator = '/';
sensorPath = [path,fileSeperator,'w1_slave'];
end
% Open file, read, and close it
fid = fopen(sensorPath);
w1_slave = fread(fid,1024);
fclose(fid);
% Convert to text
w1_slave = char(w1_slave');
% Find raw temperature data in 1/1000th of a degree Celcius
stringToFind = 't=';
stringToFindLength = length(stringToFind);
temperatureIndices = strfind(w1_slave,stringToFind)+stringToFindLength;
temperatureIndexStart = temperatureIndices(end);
temperatureIndexEnd = temperatureIndexStart+5;
temperatureString = char(w1_slave(temperatureIndexStart:temperatureIndexEnd));
% Convert to Celcius
temperature = real(str2double(temperatureString))/1000;
any idea to get the temperature readings from DS18B20 in Raspberry Pi using any of these files?
Thanks
I can't download the file!
cjx1842
不错不错
zheng Hu
Why can I not downland?
Dzung
Hi, could anyone tell me how to develop my own hardware support packages? Thanks in advanced.
Hazem, maybe you forgot to build the S-Function, by clicking "Build" on the S-Function Builder ?
hazem saaad
I have a serious problem and I need help.When I run the simulink file,I get the following message "
Error in S-function 'encoder_slsp/Encoder': S-Function 'sfcn_encoder' does not exist".
olivier
Hello,
Thanks for the great job Giampiero! I've tried the samples on Uno with 2015a and it works perfectly.
Now I try to write a CAN driver for the CAN-BUS shield.
First, I'd like to make an init function to set the CAN speed with a Matlab system block. This block has no I/Os, but when I try to update the model, I get:
MATLAB System block 'can_test/MATLAB System' error occurred when invoking 'isOutputFixedSizeImpl' method of 'CANSetup'. The error was thrown from '
'C:\Program Files\MATLAB\R2015aSP1\toolbox\simulink\simulink\+SLStudio\ToolBars.p' at line 1175'.
Reported by CANSetup: Incorrect number of outputs for the isOutputFixedSize method; 1 were requested, but the method returns 0, as specified by the getNumOutputs method.
I don't understand, since I've put num = 0 for both getNumOutputsImpl and getNumInputsImpl functions.
Then I need to include the CAN and SPI libraries. How can I do that with the system block method?
Thank you.
Ok, great ! Thanks !
I'm going to try too then, at some point (maybe in a few weeks or so) just out of curiosity...
Thanks again.
G.
Marcell
Thanks for you response.
I tried it before I wrote the comment and it worked normally without the need to rebuild the S-Function every time the sample time or the parameters are changed.
However, just to make sure I checked it again right now but it works for me.
Hi Marcell, thanks for the feedback.
You can certainly place the S-Function Builder block in a subsystem and write a mask for it, and you can use it to pass "normal" parameters (the ones defined as such in the data properties pane). This will work as these parameters are read from the mask and passed down to the S-Function before each execution.
However, I'm pretty sure that both the Sample Time and the initial conditions, which are defined in the initialization pane, are hardcoded in the executable (and the TLC file) every time you press the "Build" button in the S-Function builder.
Therefore, if you encapsulate the S-Function Builder block in a subsystem, build a mask for it, and change the sample time in this mask, I am afraid that the change will NOT get propagated down until you rebuild the S-function (so you - or the user - have to look under the mask, double click the S-Function Builder block, and click on "Build".
I think that doing so is misleading for the user, who might think that the sample time gets propagated down without any problem every time it gets changed from the upper level mask.
Now, that being said, I haven't explicitly checked this in the last 2 or 3 years at least, so, just in case I'm wrong (which I don't think it's the case, but still), I invite you to try and double check for yourself, (and let me know).
Giampiero
Marcell
Wonderful package thank you it helped me a lot with my work.
I just wanted to point out, that one can actually use the S-function approach with user defined sample times from the mask. One just have to place the S-function block into a subsystem and define a sample time parameter in the subsystem’s mask. Then specify a parameter with the value of the name of the sample time parameter of the subsystem’s mask. Then write the parameter’s name in the sample time value field inside the initialization tab of the S-function.
This method also eliminates the need to right click the S-function in order to change the mask parameters.
lays25
I also tried using the method suggested earlier by Phil and MathWorks Classroom Resources Team (referencing to page 20 of the Guide) - adding "extern "C"" and renaming the wrapper file to .cpp but then I get another problem. The model is built and downloaded to my Arduino and... nothing happens. There is no communication, TX/RX diodes are off and I get the following error: Unable to connect to the 'Arduino Due' target for 'encoder_slsp'.
arman sani
The detail of the walk-through is exquisite. Thank you very very much.
Hi,
To start, excellent package, great info, lots of detail A+++.
I'm using R2013a, with Windows XP, Microsoft SDK 7.1, Arduino MEGA 2560.
I have been working on a LCD block using an S-function builder block. I spent a long time trying to get it to work but struggling due to an error. The start of the error is shown below. After trawling the internet searching and finding very little I tried changing the LiquidCrystal.h and .cpp files I had in my working directory to the ones from the MATLAB support package folder. This fixed the problem, briefly. On shut down, my computer did a Windows update. The day after, I had a go at adding more to the block, on opening the model file I got a load of warning messages about File I/O from "arduino.h" (I don't have the message to hand). Now my LCD block won't build and I get a java error to do with getting ports. So, started again, and it worked, added some inports to the S-function, and crash. I now get intermittent java errors when trying to build, or I get the realtime_make_rtw hook error shown below. Again.
This is extremely frustrating and I am running out of ideas. Any info/ help would be fantastic. Thanks in advance.
Rob
The call to realtime_make_rtw_hook, during the after_make hook generated the following error:
The build failed with the following message: "C:/MATLAB/SupportPackages/R2013a/arduino-1.0/hardware/tools/avr/bin/avr-gcc" -I"C:/ArduinoStuff/arduinoMEGA2560_LCD_02_rtt" -I"C:/ArduinoStuff" -I"C:/Program Files/MATLAB/R2013a/extern/include" -I"C:/Program Files/MATLAB/R2013a/simulink/include" -I"C:/Program Files/MATLAB/R2013a/rtw/c/src" -I"C:/Program Files/MATLAB/R2013a/rtw/c/src/ext_mode/common" -I"C:/Program Files/MATLAB/R2013a/rtw/c/ert" -I"C:/MATLAB/SupportPackages/R2013a/arduino-1.0/hardware/arduino/cores/arduino" -I"C:/MATLAB/SupportPackages/R2013a/arduino-1.0/hardware/arduino/variants/mega" -I"C:/MATLAB/SupportPackages/R2013a/arduino/include" -I"C:/MATLAB/SupportPackages/R2013a/arduino-1.0/libraries/Servo" -mmcu=atmega2560 -std=gnu99 -Wall -Wstrict-prototypes -g -Os -D"MODEL=arduinoMEGA2560_LCD_02" -D"NUMST=1" -D"NCSTATES=0" -D"HAVESTDIO=" -D"ONESTEPFCN=0" -D"TERMFCN=1" -D"MAT_FILE=0" -D"MULTI_INSTANCE_CODE=0" -D"INTEGER_CODE=0" -D"MT=0" -D"CLASSIC_INTERFACE=0" -D"TID01EQ=0" -D"F_CPU=16000000" -D"_RUNONTARGETHARDWARE_BUILD_=" -D"_ROTH_MEGA2560_=" -D"_RTT_NUMSERVOS_=0" -c -x none ./arduinoMEGA2560_LCD_02.c ./arduinoMEGA2560_LCD_02_data.c ./ert_main.c ./sfcn_LCD_wrapper.cpp ./HardwareSerial.cpp ./Print.cpp ./WInterrupts.c ./WMath.cpp ./WString.cpp ./new.cpp ./wiring.c ./wiring_analog.c ./wiring_digital.c ./io_wrappers.cpp
In file included from ./ert_main.c:18:
C:/MATLAB/SupportPackages/R2013a/arduino-1.0/hardware/arduino/cores/arduino/Arduino.h:24:1: warning: "true" redefined
In file included from ./arduinoMEGA2560_LCD_02.h:23,
from ./ert_main.c:17:
./rtwtypes.h:158:1: warning: this is the location of the previous definition
In file included from ./ert_main.c:18:
C:/MATLAB/SupportPackages/R2013a/arduino-1.0/hardware/arduino/cores/arduino/Arduino.h:25:1: warning: "false" redefined
In file included from ./arduinoMEGA2560_LCD_02.h:23,
from ./ert_main.c:17:
./rtwtypes.h:154:1: warning: this is the location of the previous definition
cc1plus.exe: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
cc1plus.exe: warning: command line option "-std=gnu99" is valid for C/ObjC but not for C++
In file included from ./sfcn_LCD_wrapper.cpp:40:
C:/ArduinoStuff/LiquidCrystal.cpp:6:22: error: WProgram.h: No such file or directory
In file included from ./sfcn_LCD_wrapper.cpp:39:
C:/ArduinoStuff/LiquidCrystal.h:82: error: conflicting return type specified for 'virtual void LiquidCrystal::write(uint8_t)'
C:/MATLAB/SupportPackages/R2013a/arduino-1.0/hardware/arduino/cores/arduino/Print.h:48: error: overriding 'virtual size_t Print::write(uint8_t)'
cc1plus.exe: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
cc1plus.exe: warning: command line option "-std=gnu99" is valid for C/ObjC but not for C++
cc1plus.exe: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
cc1plus.exe: warning: command line option "-std=gnu99" is valid for C/ObjC but not for C++
cc1plus.exe: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
cc1plus.exe: warning: command line option "-std=gnu99" is valid for C/ObjC but not for C++
cc1plus.exe: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
cc1plus.exe: warning: command line option "-std=gnu99" is valid for C/ObjC but not for C++
cc1plus.exe: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
cc1plus.exe: warning: command line option "-std=gnu99" is valid for C/ObjC but not for C++
cc1plus.exe: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
cc1plus.exe: warning: command line option "-std=gnu99" is valid for C/ObjC but not for C++
./io_wrappers.cpp: In function 'void Serial_read(int, int, uint8_t*, int*)':
./io_wrappers.cpp:40: warning: 'libFcnOutput' may be used uninitialized in this function
make: *** [arduinoMEGA2560_LCD_02.o] Error 1
The build process will terminate as a result.
Rusty Boyd
Hi,
I'm having a problem with the LCT method. In both the example, I have problems with the 'DNO_OP=//' directive in the instruction,
legacy_code('compile', def, '-DNO_OP=//')
In the dout example, it only generates a warning. In my code, it generates a fatal error (the two warnings make sense in context of the error):
Error using mex
/Users/BOYD/Documents/Atmel_Studio/6.2/sl_TC_varfvarduty/sl_dd_tc1/src/tc1_sfun.c:168:9:
error: expected expression
NO_OP();
^
/Users/BOYD/Documents/Atmel_Studio/6.2/sl_TC_varfvarduty/sl_dd_tc1/src/tc1_sfun.c:190:10:
warning: expression result unused [-Wunused-value]
NO_OP( *u1, *u2);
^~~
/Users/BOYD/Documents/Atmel_Studio/6.2/sl_TC_varfvarduty/sl_dd_tc1/src/tc1_sfun.c:190:15:
warning: expression result unused [-Wunused-value]
NO_OP( *u1, *u2);
^~~
Error in legacycode.LCT/compile (line 375)
Error in legacycode.LCT.legacyCodeImpl (line 84)
Error in legacy_code (line 87)
[varargout{1:nargout}] = legacycode.LCT.legacyCodeImpl(action, varargin{1:end});
In the dout example, it generates only 3 warnings.
I've tried bypassing LCT and using mex directly with the exact same results. I've tried both 2015a and 2015b - no diff. I'm using OS X 10.10.5 (14F27) and Xcode Version 6.4 (6E35b).
I hope someone can help.
-Rusty
A bit complicated for a novice programmer but the detail the go through is amazing. Thanks.
Barza Nisar
Excellent tutorial, thank you!
Suytry KY
Hi everyone,
I use the s-function encoder block in the model to read encoder pulses. If i use only one encoder, it is fine. But the simulink stop working when i use 2 or 3 encoder to read from my robot motors. Can anyone help me to solve this problem because i am supposed to use simulink with arduino to read encoder for my thesis project. NOTE: I do as external mode for real-time test.
Thanks in advance!
Hi,
I also tried this guide with my raspberrypi.
Is there also a librarie for the raspberry?
# ifndef MATLAB_MEX_FILE
# include <Arduino.h>
# endif
Does this instruction works with a raspberry?
Giampiero, very very helpful information, thank you. Question for Nancy can you publish your SD code? i would find this very useful.
Thanks
huan xia
so great!
I bumped into the following error message and found a solution:
The call to realtime_make_rtw_hook, during the after_make hook generated the following error:
The build failed with the following message: make: *** No rule to make target `../../../../../../../../../../../../MATLAB/SupportPackages/R2014a/arduino-1.0.5/hardware/arduino/cores/arduino/HardwareSerial.h', needed by `HardwareSerial.o'. Stop.
The issue was that I was building the model from a directory where the path was too long. i.e. C:/abcdefghijklmnopqrstuvwxyz/abcdefghijklmnopqrstuvxyz/
When I built the model in directory with a shorter path i.e. C:/Documents, I no longer experienced this error.
Sina
Also, I have done what you mentioned. But the main problem is to do with the C++ and C differences I suppose. I will email you the error description I get when building the simulink model on Arduino.
Thanks.
Sina
Sina
Thanks a lot Giampiero,
That helped a lot. How do I go about declaring global variables/ functions/ libraries? I know in the libraries pane there are 3 sections,
1. Library / Object / Source file
2. Includes
3. External Function Declarations
Can you make an example?
Alternatively, would you mind taking a quick look at my simple model? I can email it to you.
Cheers,
Sina
Hi Sina,
well, you can't just copy and paste all your code in the output pane, remember that the initialization and global variable and function definitions must go into the Library->Includes pane, the initialization code (that is the part contained in the "setup" function below) must go into the Discrete Update pane, and only the part contained into the "loop" function, which needs to be executed at every time step, must go into the Output pane.
I'd suggest you have another look at the guide, and start building up things gradually from a simple example that works.
Giampiero
Sina
Hi Giampiero and Everyone,
I have a question, I used this guide and built a block to be able to read some input numbers from simulink and pass the numbers to an arduino code so that using motor driver and encoder library it can run the motor. I have written this as my output:
/* wait until after initialization is done*/
if (xD[0]==1){
/*don't do anything for the Mex-file generation */
#ifndef MATLAB_MEX_FILE
/* MYCODE which is normally run on arduino and uses two libraries: Encoder and DualVNH5019MotorShield */
#include <Encoder.h>
#include <DualVNH5019MotorShield.h>
unsigned int DEBUG = 1;
unsigned int ms_delay = 200;
// setup pin variables
const int encoderChanA = 2; // pin2 for interrupt0 on timer2
const int encoderChanB = 3; // pin3 for interrupt1 on timer2
Encoder motorEncoder(encoderChanA,encoderChanB);
// setup pins for motor control and current sense
unsigned char INA1 = 8; // sets motor direction
unsigned char INB1 = 10; // sets motor direction
unsigned char EN1DIAGA = 5; // sets motor speed, pin5 for PWM on timer0 (to avoid problems with interrupts on timer2)
unsigned char CS1 = A1;
DualVNH5019MotorShield mdriver(INA1,INB1,EN1DIAGA,CS1,INA1,INB1,EN1DIAGA,CS1); // repeat arguments to simulate second driver (part of API but not actually used)
// setup global variables
float currentMotorSpeed = 0;
long currentEncoderPosition = 0;
int currentMotorCurrent = 0;
float desiredSpeed = 0;
int u = 0; // placeholder input variable 0-9
// Function declaration
void setup()
{
// setup code here
pinMode(encoderChanA, INPUT);
pinMode(encoderChanB, INPUT);
digitalWrite(encoderChanA, HIGH);
digitalWrite(encoderChanB, HIGH);
mdriver.init();
}
void loop()
{
// 2) read encoder position, and motor current
currentEncoderPosition = motorEncoder.read();
currentMotorCurrent = mdriver.getM1CurrentMilliamps();
// 3) Set speed for motor 1, speed is a number betwenn -400 and 400
mdriver.setM1Speed(in[0]);
}
#endif
}
This code uses functions that are declared in the included libraries. and I did include those in the supported libraries pane and added the libraries to current matlab folder.
It builds the block but the model cannot be built on my Arduino Uno. (there are some errors)
Would you please elaborate?
Thanks.
Sina
Carlos
Many thanks for your tutorial, now Simulink has become even more powerful to me. Is there a way to remove the tedious pasting the .cpp and .h at the current MATLAB directory for successful compilation?
Nebojsa
Does someone make a simulink block to use DS1302 real time clock?
I try it, but I did not succeed.
Please, help with some sugestions.
Simulink with arduino : data acquisition
--------------------------------------------
Hello all ,
i'm working on data acquisition from a sensor attached to the arduino : MPU6050 using a model in simulink , i have installed the hardware support in simulink but i don't know how to start building the model , the model must read the data from arduino by deploying it into the arduino
my connection arduino <=> MPU6050 is :
Arduino MPU 6050
3.3V VCC
GND GND
A5 SCL
A4 SDA
DIGITAL 2 INT
GND AD0
any help will be appreciated
thanks
Nancy
Solved! Thanks
Nancy
when I tried to deploy a simulink model that contains fuzzy logic controller block it didn't work :s . Is there a way to deploy it to Arduino Mega ?
amir
Great! after 1 month working on an encoder with 8400cpr to read the data by arduino mega2560 and NO answer, today I did it just using by this work.
Simon
Hi,
I built an own arduino Stepper library for arduino uno and now i want to embed it into simulink.
The problem i have is that i use:
main()
{
}
instead of the common:
setup(){}
loop(){}
structure, because the init() function in the common structure interferes my library functions.
I tried to use the s-function builder instruction with my library and i had the same issues as i had when writing functions of my library into the common(setup(),loop()) structure.
My question:
Is there a way to use the main() structure instead of the void(),loop() structure using the s-function builder {with arduino uno and the simulink support package of matlab}?
What i tried so far:
- deleting the init() function call in the main function of the s-function builder block created modelname_rtt folder.
- changing the init(){as a part of the wiring.c} so that it executes the setup for my library.
By the way thanks for your great tutorials.
Best Regards,
Simon
For Daniel and other interested, Nancy was able to solve the issue by doing 3 things:
1) Copying the utilities folder to the current directory In addition to copying its content in the same folder.
2) Including the SD.h in addition to the SD.cpp
3) Transfering the whole directory to a file path that has no spaces.
Note that #3 is always necessary to make things work due to the use of GCC. In this case i think #1 (and perhaps also #2) made the trick.
Minho,
i don't know how to make it work with external mode and i am sure is not easily doable with this method. It might be not even feasible. I'll let you know more if i find anything.
Also, if i don't know what error it is that you are finding, it's hard for me to have a clue :)
Minho
I have question. If i want sfcn_encoder bolck use external mode. How can I do?
I do wrapper.c -> wrapper.cpp and add extern "C".
But It has error.
I am having the same issue as Nancy.
Nancy
I'm trying to use the SD card library , I get this error when I build the model;
The call to realtime_make_rtw_hook, during the after_make hook generated the following error:
The build failed with the following message: make: *** No rule to make target `../../../../../../../../../../../../MATLAB/SupportPackages/R2014a/arduino-1.0.5/hardware/arduino/cores/arduino/HardwareSerial.h', needed by `HardwareSerial.o'. Stop.
Any help will be appreciated.
-Nancy
zhubo
1
MAMADOU
Hello i started with arduino (uno) and matlab by modeling a blinking model. But i have a problem to run the model with my arduino uno card. I go to the tools menu for 1st time for to Prepare to Run the model and at the 2nd time, i don't see the option : Run. That is my problem. Is someone can help me. Thanks
German
Nice work, very helpful
JimC
This is a great help to get started. I've been able to tweak the encoder block for speeds.
I can't seem to create a driver block that uses the serial comms commands though. I tried including the HardwareSerial.h and .cpp files in the library pane and ran renc2cpp.
Any trick needed?
EDUARDO
phil
Has anybody been able to make an interrupt block?
uavc
In case anyone wanted to compare the Output Driver S-Function Block to Arduino code, here is the arduino code:
#include <Arduino.h>
int xD[0];
int pin[] = {12};
int in[0];
void setup()
{
//xD[0]=0;
if (xD[0]!=1) {
/* don't do anything for MEX-file generation */
pinMode(pin[0],OUTPUT);
/* initialization done */
xD[0]=1;
}
}
void loop()
{
/* wait until after initialization is done */
if (xD[0]==1) {
/* don't do anything for mex file generation */
digitalWrite(pin[0],in[0]);
}
}
Mehmet
Hi,
I wonder,how overruns on Arduino Hardware affect software . Because all example drivers give ovverruns error without input and output drivers.
Regards
Mehmet
Neil
Hello thank you for the reply. I have finally got it working with much success. I'm still not sure where the "inlined" error came from but now it's gone.
I have a question for you. I'm trying to use global variables throughout the simulink model. It works if I call the variable within the same s-function as your guide said. However, if I call that variable in another S-function it gives me an error " error: <variable> undeclared (first use in this function)" pertaining to the wrapper file. I find this strange since all my calls to functions within the "#includes" headers work.
For example, my includes section looks as shown below:
# ifndef MATLAB_MEX_FILE
#include <unistd.h>
#include <fcntl.h>
#include <termios.h>
int uart0_filestream = -1;
# endif
I can call all functions within the first 3 headers, however, if I call uart0_filestream in another block I get the error.
Neil
Neil
I have not been able to get this to work at all. I'm using MATLAB 2013a Student version. I generate C code using the steps provided. However, when I try to download it to the Arduino, it gives me an error that the function is not in-lined and therefore cannot be downloaded to the target. It tells me to go into the configurations->Simulink Coder and turn in-lining off but since I'm using the student version I don't see this option. Has anyone gotten this error before? I see no where in the documentation
phil
phil
has anybody been able to get the Arduino Ethernet library to work>? i keep getting errors which seems to be related to the IP adress class
C:/MATLAB/Targets/R2012b/arduino-1.0/hardware/arduino/cores/arduino/IPAddress.h:33: undefined reference to `vtable for IPAddress'
the code in this file:
class IPAddress : public Printable {
private:
uint8_t _address[4]; // IPv4 address
// Access the raw byte array containing the address. Because this returns a pointer
// to the internal structure rather than a copy of the address this function should only
// be used when you know that the usage of the returned uint8_t* will be transient and not
// stored.
uint8_t* raw_address() { return _address; };
i havent even called any functions. at this point i am simply trying to include the ethernet library.
IMPORTANT UPDATE: For MATLAB 2013b you will need to apply a fix for the S-Function builder (otherwise an incorrect argument list will be generated for a block that has no inputs).
Go to the following page: http://www.mathworks.com/support/bugreports/1006532
scroll down to the bottom, and follow the instructions therein (it basically
comes down to saving the zip file, opening winzip as administrator, and
unzipping the file in the MATLAB folder (e.g. C:\Program Files\MATLAB\2013b).
Also note that another issue in MATLAB 2013b causes high memory usage on the
Arduino side, and thus prevents the upload of models that have many blocks
and/or high memory requirements. This might sometimes be a problem for boards
with smaller memory footprint like the Uno or Nano.
uavc
uavc
found the problem. the libraries I had to include in the simulink s-function builder was
# ifndef MATLAB_MEX_FILE
# include <Arduino.h>
# endif
in that order. I accidentally put the second line first as I thought these were just regular includes, without recognizing that the include was running an if loop (ifndef.... end if) to check:
#ifndef
The #ifndef operator checks whether something has not been defined using the #define keyword. It must be followed by#endif.
Problem solved. XD
uavc
SITUATION:
I'm trying to build the output block according to the tutorial. I'm sure this is a basic question but I couldn't quite build the S-function.
EXACT ERROR:
sfcn_exout_slsp_wrapper.c
c:\docs\avr/io.h(330) : fatal error C1021: invalid preprocessor command 'warning'
C:\PROGRA~1\MATLAB\R2013A\BIN\MEX.PL: Error: Compile of 'sfcn_exout_slsp_wrapper.c' failed.
EXPLANATION IN DETAIL:
I had earlier problems that the s-function builder wasn't compiling because it couldn't find Arduino.h, inttypes.h avr/io.h, avr/pgmspace.h, avr/sfr_defs
Arduino.h is the only .h file that is called directly from the s-function builder library so I guess the other files are being called by Arduino.h etc. I included the entire path of the Arduino library on the stock c:\program files(x86) directory but it didn't compile still. Hence, I just copied the whole folder into my working directory, still wouldn't work. What made it work was that I had to copy every single .h file (mentioned above) into the working directory (the answer to MATLAB command "pwd") before it would compile and then it led to this error above. I think it's an include error, so how do I ask the s-function builder to look everywhere within my working directory (which is especially important for the avr/xxx.h files.
any idea how to solve it? thanks!
Great introduction to learn how to build custom driver blocks. Congrats!
Joshua Hurst
Hi Christian,
If you were looking specifically for I2C, MPU6050, or other I2C devices/hardware I posted a simple C-based I2C solution using WirnigPiI2C and you can find this here:
http://www.mathworks.com/matlabcentral/fileexchange/43383-raspberry-pi-mpu6050-sfunction-with-i2c-communication-using-wiringpii2c
Let me know if this helps you!
Josh
Dan
amzaing one that works. Thanks.
Christian
Hi,
I have the same problem as Glen but with Arduino Mega and Support Package for Arduino. When i run the Target Hardware it does not include the wrapper .cpp in the _rtt folder, are there any solutions already?
thank you
Christian
Christian
Glen,
send me the files with the exact procedure that you are following and the error you are getting, i'll see if i can do anything.
Glen
Hi,
I have tried a number of different things to try and get the wrapper.cpp file included into the source_files listed in the .mk (make) file, rather than it being skipped. This has included editing the rtwmakecfg and trying to find the toolchain that is used to compile the .mk file. Editing the rtwmakecfg was unsuccessful. I did edit a Linux tool chain located in the "coder" directory. But I don't think it is the one that is used. The toolchain that is listed in the .mk file I cannot find - gmake, LinuxRemoteBuild.
Glen
Hi,
I have been trying again to get the MPU6050/HMC5883L model to build on the RPi. In the make file (.mk) which is included in the (_rtt) folder, when I rename the _wrapper.cpp file it is listed as a "SKIPPED_FILE". When I do not rename the wrapper.c is included in the "SOURCE_FILES". I have tried to get it included by editing the SFB.mat file but still no luck.
Joshua Hurst
Hi Glen,
I have a student working on the mpu6050 code for RasPi right now - getting it work in C and Python first. Then I will be porting it to Simulink most likely next week.
Feel free to send me an email directly and I can try to look at your files when I start start porting my students code: [email protected]
In general for the Rpi you have to make sure the c-code compiles and on its own. If you look at the RPi examples I posted you have to make sure the #includes reference the local directory structure on the RPi - not your box. Just look at the Quadrature Encoder example for the RPi and you will see I had use: #include </home/pi/wiringPi/wiringPi/wiringPiI2C.h>. Which is where the files are on the RPi, not my actual computer. And don't forget to include the actual C files as well:
#include </home/pi/wiringPi/wiringPi/wiringPi.h>
#include </home/pi/wiringPi/wiringPi/wiringPi.c>
Let me know if this helps!
Josh
Glen
Hi Giampiero,
Many thanks for your reply. I should explain more. I am trying to incorporate the libraries for the MPU6050 and HMC5883L. The code I have previously compiled on the PI. I used the Arduino MPU6050 S-Function Builder Example from Joshua Hurst as a Starting point and replaced the Arduino Libraries with the Libraries I have for the PI - including the I2Cdev. The S-function builds successfully. I then change the _wrapper from .c to .cpp and apply the extern "C" changes. However, when I run on target hardware - using the MATLAB Pi Support Package - it does not include the wrapper .cpp or any .cpp file in the folder (_rtt) it downloads to the PI to compile and run. If I leave the wrapper.c unchanged it does get incorporated into the _rtt folder but then I have unreferenced .cpp files not included.
I can send you my work so far if it helps.
Many thanks for your support.
Best Wishes
Glen
Hi Glen, there are several RasPi drivers, i believe with external libraries too, linked in the Acknowledgement section of this page.
I (Giampiero) would suggest trying them first to see if you can make them work, if so, start from them to see if you can build your driver. That being said i'll investigate further this case to see if anyone has any idea.
Glen
Hi Giampiero,
I am trying build a model incorporating an S-Function Builder for my RaspPi. Because it includes C++ files I change the wrapper file extension to .cpp and at extern "C" infront of the Outputs and Update wrapper. However, when I run the model a further file is built with the extension _rtt and it does not include my wrapper file and other .cpp files within the file that gets downloaded to the RaspPi, hence I get undefined references.
I have tried a number of things but starting to go around in circles.
Any help would be appreciated.
Best Wishes
Glen
Mark,
you need to scroll up to see the upper part of the text. Maximizing the window might also help a little.
Mark
Within the "afmotor_slsp" model, there is a block containing instructions titled "Double Click for Explanations". When I double-click, the instructions start with step 3...what are the first two steps???
Hi,
Thank you for your step by step explanation. I have tried to create my own servo and I am getting the following error when I have changed the name of the wrapper file generated to .cpp from .c
The call to realtime_make_rtw_hook, during the after_make hook generated the following error:
The specified file "servornd_wrapper.c" does not exist on the IDE and MATLAB paths.
Could you help me resolve this error.
Thanks in advance.
Perfect!
helped me a lot
thank you for that tutorial
I'm glad that's working, Nathan.
Thanks Phil, that's great!
@Classroom Resources,
That was the trick. I can now use any library I wish in the S-Function builder. Thank you very much
@phil,
I added this line to my Library/Object/Source files pane in the s-function builder. It seems to take care of the path issue.
INC_PATH C:\arduino-1.0.3\libraries\Time
Nathan, if you include a .cpp file then you should rename the generated wrapper function from .c to .cpp, and also open it and write: ' extern "C" ' before the two function calls.
Please have a look at page 20 of the guide, which explains how to do this, and let me know if it works.
phil
@ Nathan...
did you put the included files in the current matlab folder?
Hello,
I tried to follow your example and it worked great for interfaces that are in Arduino.h such as digital and analog IO. I ran into problems when trying to include other Arduino Libraries.
I noticed that you had included "AFMotor.cpp" and "AFMotor.h" in your examples, which I guess is similar what I am attempting with "DS1307RTC.h" and "DS1307RTC.cpp" which are libraries for keeping time.
I can build the sfunction with the sfunction builder when it is structured like you have it in your examples. When I go to build the applicaiton, however, I run into an issue that seems to be related to cpp code when the compiler is expecting c code. I am using the Arduino integration package found here http://www.mathworks.com/matlabcentral/fileexchange/30277-embedded-coder-support-package-for-arduino
The compiler message I get when it attempts to build the header file with a class definition is this:
C:/ARDUIN~1.3/hardware/tools/avr/bin//avr-gcc -c -mmcu=atmega2560 -I. -DF_CPU=16000000 -Os -Wall -Wstrict-prototypes -std=gnu99 -I. -I.. -IC:/PROGRA~1/MATLAB/R2011a/rtw/c/ert -IC:/PROGRA~1/MATLAB/R2011a/extern/include -IC:/PROGRA~1/MATLAB/R2011a/simulink/include -IC:/PROGRA~1/MATLAB/R2011a/rtw/c/src -IC:/PROGRA~1/MATLAB/R2011a/rtw/c/src/ext_mode/common -Ic:/OU_SYSTEMS_ENG/GH/gh-dev/Simulink_Models/Drivers/GH_TopLevel_Test_arduino -Ic:/OU_SYSTEMS_ENG/GH/gh-dev/Simulink_Models/Drivers -Ic:/OU_SYSTEMS_ENG/GH/gh-dev/Simulink_Models -Ic:/OU_SYSTEMS_ENG/GH/gh-dev/Simulink_Models/Custom_Includes -Ic:/OU_SYSTEMS_ENG/GH/gh-dev/Simulink_Models/ArduinoML/blocks -IC:/arduino-1.0.3/hardware/arduino/variants/mega2560 -IC:/arduino-1.0.3/hardware/arduino/cores/arduino -IC:/arduino-1.0.3/libraries/Time -IC:/arduino-1.0.3/libraries/DS1307RTC -Ireferenced_model_includes -I../slprj/arduino/_sharedutils -IC:/ARDUIN~1.3/hardware/arduino/cores/arduino ../sfun_systime_get_wrapper.c -o sfun_systime_get_wrapper.o
In file included from ../sfun_systime_get_wrapper.c:39:
C:/arduino-1.0.3/libraries/DS1307RTC/DS1307RTC.h:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'DS1307RTC'
../sfun_systime_get_wrapper.c:40: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'sysTime'
Please let me know if you have any thoughts. I am wondering if this is still an issue with the newer Arduino support in later versions of ML/Simulink.
Joshua Hurst
Phil, i think the variable "lcd" needs to be defined as a global. Try to define it in the libraries pane, after all the includes, see page 16 of the guide.
phil
./io_wrappers.cpp: In function 'void Serial_read(int, int, uint8_t*, int*)':
./io_wrappers.cpp:40: warning: 'libFcnOutput' may be used uninitialized in this function
cc1plus.exe: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
cc1plus.exe: warning: command line option "-std=gnu99" is valid for C/ObjC but not for C++
./DDvers1_wrapper.cpp: In function 'void DDvers1_Outputs_wrapper(const boolean_T*, const real_T*, const real_T*, int_T)':
./DDvers1_wrapper.cpp:73: error: 'lcd' was not declared in this scope
./DDvers1_wrapper.cpp:77: error: 'lcd' was not declared in this scope
In file included from ./ert_main.c:18:
C:/MATLAB/Targets/R2012b/arduino-1.0/hardware/arduino/cores/arduino/Arduino.h:24:1: warning: "true" redefined
In file included from ./DisplayDriverv1.h:23,
from ./ert_main.c:17:
./rtwtypes.h:158:1: warning: this is the location of the previous definition
In file included from ./ert_main.c:18:
C:/MATLAB/Targets/R2012b/arduino-1.0/hardware/arduino/cores/arduino/Arduino.h:25:1: warning: "false" redefined
In file included from ./DisplayDriverv1.h:23,
from ./ert_main.c:17:
./rtwtypes.h:154:1: warning: this is the location of the previous definition
Roni Peer
Great walk through for newbies!
phil
just what i was looking for!
it would be great if you guys could share your driver blocks!
i am currently writing one for an LCD display...quite a challenge.
NOTE: If you are working with external libraries and you get an “undefined reference” error that means that your code references objects defined elsewhere (in other files) and, at linking time, the linker cannot find where they are.
In this case you need to make sure that all the .c and .cpp files of the library you are using are in the current MATLAB folder and that they are all included in the "Includes" field of the "Libraries" pane of the S-Function Builder (include the .c and .cpp files directly not the .h files).
Also, make sure that you read the last section (i.e. the last 2 pages) of the driver guide, entitled: "Working with external libraries".
Arkadi
Great tutorial, Thank you.
This is exactly what I was searching for. A Step-by-Step guide to develop new and custom Simulink blocks for Arduino targets.
Thank you !
This is a good introduction to making all the device code I need inside blocks so that I can just drag and drop blocks and get all the processor-specific code. Say I need to add a new encoder. Copy and paste the block and change the pin numbers. Done. Thanks, Giampiero!
Updates
1.6.0.1
Updated license
1.6.0.0
Minor modification to documentation (e.g. updated copyrights).
1.6.0.0
Added System Object and Legacy Code Tool approach, examples, and documentation.
1.6.0.0
Documented masking S-Function Builder blocks and the MATLAB Function approach.
Also removed the motor shields -related files since updated versions can be found in the "motor shields" file exchange entry.
1.5.0.0
Included drivers for AF Motor Shield V2, and Embedded MATLAB-based examples.
1.4.0.0
Fixed small typos, updated copyright, and added troubleshooting section to the guide.
1.2.0.0
Fixed a few typos and added a troubleshoot page at the end of the guide.
1.1.0.0
The PDF document was slightly refined.
MATLAB Release Compatibility
Created with R2012b
Compatible with any release
Platform Compatibility
Windows macOS Linux
|
__label__pos
| 0.805811 |
arw4help.dll
Process name: Microsoft AutoRoute Express
Application using this process: Microsoft AutoRoute Express
Recommended: Check your system for invalid registry entries.
arw4help.dll
Process name: Microsoft AutoRoute Express
Application using this process: Microsoft AutoRoute Express
Recommended: Check your system for invalid registry entries.
arw4help.dll
Process name: Microsoft AutoRoute Express
Application using this process: Microsoft AutoRoute Express
Recommended: Check your system for invalid registry entries.
What is arw4help.dll doing on my computer?
AutoRoute Help Macros This process is still being reviewed. If you have some information about it feel free to send us an email at pl[at]uniblue[dot]com
Non-system processes like arw4help.dll originate from software you installed on your system. Since most applications store data in your system's registry, it is likely that over time your registry suffers fragmentation and accumulates invalid entries which can affect your PC's performance. It is recommended that you check your registry to identify slowdown issues.
arw4help.dll
In order to ensure your files and data are not lost, be sure to back up your files online. Using a cloud backup service will allow you to safely secure all your digital files. This will also enable you to access any of your files, at any time, on any device.
Is arw4help.dll harmful?
arw4help.dll has not been assigned a security rating yet.
arw4help.dll is unrated
Can I stop or remove arw4help.dll?
Most non-system processes that are running can be stopped because they are not involved in running your operating system. Scan your system now to identify unused processes that are using up valuable resources. arw4help.dll is used by 'Microsoft AutoRoute Express'.This is an application created by 'Microsoft Corporation'. To stop arw4help.dll permanently uninstall 'Microsoft AutoRoute Express' from your system. Uninstalling applications can leave invalid registry entries, accumulating over time.
Is arw4help.dll CPU intensive?
This process is not considered CPU intensive. However, running too many processes on your system may affect your PC’s performance. To reduce system overload, you can use the Microsoft System Configuration Utility to manually find and disable processes that launch upon start-up.
Why is arw4help.dll giving me errors?
Process related issues are usually related to problems encountered by the application that runs it. A safe way to stop these errors is to uninstall the application and run a system scan to automatically identify any PC issues.
Process Library is the unique and indispensable process listing database since 2004 Now counting 140,000 processes and 55,000 DLLs. Join and subscribe now!
Toolbox
ProcessQuicklink
|
__label__pos
| 0.89186 |
Quality vs. Quantity, Tue Jun 15th
Shoulder press:
5 @ 40%
5 @ 50%
5 @ 55%
5 @ 60%
Rest
Execute the following blocks in any order. Rest 2-3 minutes in the transition between blocks
3 sets of:
20 V-ups, rest 20 seconds
AMRAP Ring Dips, rest 1 minute
3 sets of:
20 Hip Extensions (level 1: 15 reps) rest 20 seconds
20 GHD situps (level 1: 10 reps or 20 ABMAT situps) rest 90 seconds
3 sets of:
10 pushups (3 seconds down, explode up and clap hands if able) rest 20 seconds
10 Tire Low Pull Throughs (use tire hooked to chain..step forward after each pull to get rope to full length)
==========================
Q: How do you convince the people out there who believe that, at the end of the day, it’s calories in and calories out that make optimal nutrition?
A: It would take me an entire day to explain why food quality is more important than food quantity. There are plenty of people who are overweight because of some aspect of the metabolic syndrome. They’re in the gym every day, restricting calories and burning out with hours on the elliptical machine and they’re still fat and out of shape at the end of it. Experts say it’s their own fault, but what if it’s not? What if the recommendations they’re getting are ineffective, or dare I say, inappropriate? The concept of calories in/calories out completely ignores endocrinology. Human beings are not bomb calorimeters (an object used to measure the calories in a particular food), we’re driven by hormones. What happens in the human body is so much more complex than a simple calorie count and the outcome depends on the individual’s metabolic state. I’m not saying that caloric intake is irrelevant. But I am saying that metabolic derangement should first be addressed by improvements in food quality and lifestyle. -Mat Lalonde, PhD.
Leave A Reply
|
__label__pos
| 0.954975 |
PT - JOURNAL ARTICLE AU - Madan, Ivan AU - Buh, Jože AU - Baranov, Vladimir V. AU - Kabanov, Viktor V. AU - Mrzel, Aleš AU - Mihailovic, Dragan TI - Nonequilibrium optical control of dynamical states in superconducting nanowire circuits AID - 10.1126/sciadv.aao0043 DP - 2018 Mar 01 TA - Science Advances PG - eaao0043 VI - 4 IP - 3 4099 - http://advances.sciencemag.org/content/4/3/eaao0043.short 4100 - http://advances.sciencemag.org/content/4/3/eaao0043.full SO - Sci Adv2018 Mar 01; 4 AB - Optical control of states exhibiting macroscopic phase coherence in condensed matter systems opens intriguing possibilities for materials and device engineering, including optically controlled qubits and photoinduced superconductivity. Metastable states, which in bulk materials are often associated with the formation of topological defects, are of more practical interest. Scaling to nanosize leads to reduced dimensionality, fundamentally changing the system’s properties. In one-dimensional superconducting nanowires, vortices that are present in three-dimensional systems are replaced by fluctuating topological defects of the phase. These drastically change the dynamical behavior of the superconductor and introduce dynamical periodic long-range ordered states when the current is driven through the wire. We report the control and manipulation of transitions between different dynamically stable states in superconducting δ3-MoN nanowire circuits by ultrashort laser pulses. Not only can the transitions between different dynamically stable states be precisely controlled by light, but we also discovered new photoinduced hidden states that cannot be reached under near-equilibrium conditions, created while laser photoexcited quasi-particles are outside the equilibrium condition. The observed switching behavior can be understood in terms of dynamical stabilization of various spatiotemporal periodic trajectories of the order parameter in the superconductor nanowire, providing means for the optical control of the superconducting phase with subpicosecond control of timing.
|
__label__pos
| 0.650417 |
Goto Github
WinBox.js: HTML5 Window Manager for the Web.
WinBox is a modern HTML5 window manager for the web. Lightweight, outstanding performance, no dependencies, fully customizable, free and open source!
Show Example
Load Library (Bundle)
<head>
<script src="dist/winbox.bundle.js"></script>
</head>
Load Library (Non-Bundle)
<head>
<link rel="stylesheet" href="dist/css/winbox.min.css">
<script src="dist/js/winbox.min.js"></script>
</head>
Class Constructor
WinBox(title, options<key: value>)
You can open the browser dev tools and copy and paste the js-code blocks into the console and play with them.
Basic Window
new WinBox("Basic Window");
Run Code
Custom Root
new WinBox("Custom Root", {
root: document.body
});
Run Code
Custom Border
new WinBox("Custom Border", {
border: "0.3em"
});
Run Code
Custom Color
new WinBox({
title: "Custom Color",
background: "#ff005d",
border: 4
});
Run Code
Limit Viewport
new WinBox("Limit Viewport", {
top: 50,
right: 50,
bottom: 0,
left: 50
});
Run Code
Splitscreen
new WinBox("Splitscreen (Left)", {
right: "50%",
max: true
});
new WinBox("Splitscreen (Right)", {
x: "100%",
left: "50%",
max: true
});
Run Code
Custom Position / Size
new WinBox({
title: "Custom Position / Size",
x: "center",
y: "center",
width: "50%",
height: "50%"
});
Run Code
Modal Window
new WinBox("Modal Window", {
modal: true
});
Run Code
Set innerHTML
new WinBox({
title: "Set innerHTML",
html: "<h1>Lorem Ipsum</h1>"
});
Run Code
Mount DOM (Cloned)
<div id="backstore" style="display: none">
<div id="content">
<h1>Lorem Ipsum</h1>
<p>Lorem ipsum [...]</p>
<p>Duis autem vel [...]</p>
<p>Ut wisi enim [...]</p>
</div>
</div>
new WinBox("Mount DOM", {
mount: document.getElementById("content")
.cloneNode(true)
});
Run Code
Mount DOM (Singleton) + Auto-Unmount
new WinBox("Mount DOM", {
mount: document.getElementById("content")
});
Run Code
Open URI / URL
new WinBox("WinBox.js", {
url: "https://nextapps-de.github.io/winbox/"
});
Run Code
All Options
new WinBox({
id: "my-window",
class: ["no-full", "my-theme"],
root: document.body,
title: "All Options",
background: "#fff",
border: 4,
width: 200,
height: 200,
x: "center",
y: "center",
max: false,
splitscreen: true,
top: 50,
right: 50,
bottom: 0,
left: 50,
html: "width: 200, height: 200",
onfocus: function(){
this.setBackground("#fff");
},
onblur: function(){
this.setBackground("#999");
},
onresize: function(width, height){
this.body.textContent = (
"width: " + width + ", " +
"height: " + height
);
},
onmove: function(x, y){
this.body.textContent = (
"x: " + x + ", " +
"y: " + y
);
},
onclose: function(force){
return !confirm("Close window?");
}
});
Run Code
Control Programmatically
<div id="controls">
<button onclick="buttons.minimize()">Minimize (Toggle)</button>
<button onclick="buttons.maximize()">Maximize (Toggle)</button>
<button onclick="buttons.fullscreen()">Fullscreen (Toggle)</button>
<button onclick="buttons.move()">Move (Center, Center)</button>
<button onclick="buttons.resize()">Resize (50%, 50%)</button>
<button onclick="buttons.title()">Set Title</button>
<button onclick="buttons.color()">Set Color</button>
<button onclick="buttons.close()">Close</button>
</div>
var winbox = new WinBox("Controls", {
mount: document.getElementById("controls"),
border: 4,
onclose: function(force){
return !force && !confirm("Close window?");
}
});
window.buttons = {
minimize: function(){
winbox.minimize();
},
maximize: function(){
winbox.maximize();
},
fullscreen: function(){
winbox.fullscreen();
},
move: function(){
winbox.move("center", "center");
},
resize: function(){
winbox.resize("50%", "50%");
},
title: function(){
winbox.setTitle("Title-" + Math.random());
},
color: function(){
winbox.setBackground(
"rgb(" + (Math.random() * 255 | 0) + "," +
(Math.random() * 255 | 0) + "," +
(Math.random() * 255 | 0) + ")"
);
},
modal: function(){
winbox.body.parentNode.classList.toggle("modal");
},
close: function(){
winbox.close();
},
force_close: function(){
winbox.close(true);
}
};
Run Code
Window Boilerplate
WinBox Boilerplate
Custom Styles (Global)
.winbox {
background: linear-gradient(90deg, #ff00f0, #0050ff);
border-radius: 12px 12px 0 0;
box-shadow: none;
}
.winbox.min {
border-radius: 0;
}
.wb-body {
/* the width of window border: */
margin: 4px;
color: #fff;
background: #131820;
}
.wb-title {
font-size: 13px;
text-transform: uppercase;
font-weight: 600;
}
Custom Icons
.wb-icon * {
opacity: 0.65;
}
.wb-icon *:hover {
opacity: 1;
}
.wb-min {
background-image: url(src/img/min.svg);
background-size: 15px center;
}
.wb-max {
background-image: url(src/img/max.svg);
}
.wb-close {
background-image: url(src/img/close.svg);
}
.wb-full {
display: none;
}
Custom Scrollbars
.wb-body::-webkit-scrollbar {
width: 12px;
}
.wb-body::-webkit-scrollbar-track {
background: transparent;
}
.wb-body::-webkit-scrollbar-thumb {
border-radius: 10px;
background: #263040;
}
.wb-body::-webkit-scrollbar-thumb:window-inactive {
background: #181f2a;
}
.wb-body::-webkit-scrollbar-corner {
background: transparent;
}
new WinBox("Custom CSS", {
mount: document.getElementById("content")
.cloneNode(true)
});
Run Code
Custom Styles By Classname
.winbox.my-theme{
background: #fff;
}
.winbox.my-theme .wb-body {
color: #fff;
background: #131820;
}
.winbox.my-theme .wb-title {
color: #000;
}
.winbox.my-theme .wb-icon {
filter: invert(1);
}
new WinBox("Custom CSS (Class)", {
class: "my-theme",
mount: document.getElementById("content")
.cloneNode(true)
});
Run Code
Use Theme
<head>
<link rel="stylesheet" href="dist/css/winbox.min.css">
<link rel="stylesheet" href="dist/css/themes/modern.min.css">
<script src="dist/js/winbox.min.js"></script>
</head>
new WinBox("Theme", {
class: "modern",
mount: document.getElementById("content")
.cloneNode(true)
});
Run Code
|
__label__pos
| 0.957311 |
j3d.org Code
org.j3d.util.interpolator
Class ScalarInterpolator
java.lang.Object
extended by org.j3d.util.interpolator.Interpolator
extended by org.j3d.util.interpolator.ScalarInterpolator
public class ScalarInterpolator
extends Interpolator
An interpolator that works with scalar values.
The interpolation routine is either a stepwise or simple linear interpolation between each of the points. The interpolator may take arbitrarily spaced keyframes and compute correct values.
Version:
$Revision: 1.3 $
Author:
Justin Couch
Field Summary
Fields inherited from class org.j3d.util.interpolator.Interpolator
allocatedSize, ARRAY_INCREMENT, currentSize, DEFAULT_SIZE, interpolationType, keys, LINEAR, STEP
Constructor Summary
ScalarInterpolator()
Create a new linear interpolator instance with the default size for the number of key values.
ScalarInterpolator(int size)
Create a linear interpolator with the given basic size.
ScalarInterpolator(int size, int type)
Create a interpolator with the given basic size using the interpolation type.
Method Summary
void addKeyFrame(float key, float value)
Add a key frame set of values at the given key point.
float floatValue(float key)
Get the interpolated value of the point at the given key value.
java.lang.String toString()
Create a string representation of this interpolator's values
Methods inherited from class org.j3d.util.interpolator.Interpolator
clear, findKeyIndex
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Constructor Detail
ScalarInterpolator
public ScalarInterpolator()
Create a new linear interpolator instance with the default size for the number of key values.
ScalarInterpolator
public ScalarInterpolator(int size)
Create a linear interpolator with the given basic size.
Parameters:
size - The starting number of items in interpolator
ScalarInterpolator
public ScalarInterpolator(int size,
int type)
Create a interpolator with the given basic size using the interpolation type.
Parameters:
size - The starting number of items in interpolator
type - The type of interpolation scheme to use
Method Detail
addKeyFrame
public void addKeyFrame(float key,
float value)
Add a key frame set of values at the given key point. This will insert the values at the correct position within the array for the given key. If two keys have the same value, the new key is inserted before the old one.
Parameters:
key - The value of the key to use
value - The scalar value at this key
floatValue
public float floatValue(float key)
Get the interpolated value of the point at the given key value. If the key lies outside the range of the values defined, it will be clamped to the end point value. For speed reasons, this will return a reusable float array. Do not modify the values or keep a reference to this as it will change values between calls.
Parameters:
key - The key value to get the position for
Returns:
An array of the values at that position [x, y, z]
toString
public java.lang.String toString()
Create a string representation of this interpolator's values
Overrides:
toString in class java.lang.Object
Returns:
A nicely formatted string representation
j3d.org Code
Latest Info from http://code.j3d.org/
Copyright © 2001 - j3d.org
|
__label__pos
| 0.900433 |
%0 Journal Article %T The Most Efficient Sealing Factors with Attention to the Effective Factors in Classified Earth Dams %A Alireza Salehi %A Mehdi Aghdari Moghadam %A Gholamreza Azizian %A Gholamhossein Akbar %J specialty journal of architecture and construction %@ 2412-740X %D 2018 %V 4 %N 3 %P 27-33 %X Water molecules flow through the porous soil environment due to potential energy. Leaking is always one of the important topics in dam design. Due to the presence of cavities among the soil grain solids, it is possible to move water in the soil mass that may endanger the stability of the dam, so the effects of this movement should be considered. In this research, which uses a nonlinear permeability function, the water escaping dimming elements include a seal wall in the core axis; a seal wall in heel; a seal wall in heel and paw; a clay blanket with variable thickness and length; the combination of two seal walls, one on the axis and the other on the heel, the combination of clay blanket with variable thickness and length along with a seal wall in the core axis, which is compared to the non-sealing state due to the most important effective factors in leaking, including Debi, velocity, and gradient in Bashar's zoned dam. The Geo-Studio software is used and hydraulic tilt changes are also considered at the core of the dam. %U https://sciarena.com/en/article/the-most-efficient-sealing-factors-with-attention-to-the-effective-factors-in-classified-earth-dams
|
__label__pos
| 0.6775 |
UPDATED 4:35 afternoon ET Feb. 15, 2021 released 3:29 afternoon ET Jan. 19, 2021 published 3:29 pm EST Jan. 19, 2021
TAMPA, Fla. — A weather vane is one instrument provided to display the direction the wind is punch from. It is among the easiest weather instruments created and also it has been supplied since ancient times.
You are watching: How does a wind vane work
The weather vane is consisted of of a tail and also arrow. The tail fin captures the wind and the arrow points toward the direction the wind is blowing FROM.
If the arrow on the weather vane is pointing north climate it way there is a phibìc wind. In various other words, the wind is blow from phibìc to south.
Knowing the direction the wind is blow from can be really useful for a range of reasons specifically for farmers, pilots and meteorologists.
Meteorologists usage wind direction to gain a feeling of what kind of weather is coming. Generally speaking, cold waiting is situated to the north and also warmer wait is located more south.
If the weather vane reflects wind blowing from the north, one have the right to say colder air is moving in. This is particularly true if the wind direction recently adjusted to the north, commonly a authorize that a cold front simply passed by.
Pilots use one more tool the works much like a weather vane dubbed a wind sock. It speak pilots what direction the wind is punch from so they understand which runway to usage for a safe flight.
Weather vanes are frequently accompanied by an additional weather instrument referred to as an anemometer. One anemometer steps the wind speed. It uses tiny cups that turn in a circle and also the quicker the cup spin, the solid the wind.
Weather vanes space widely offered as decorative pieces too. A for sure bet to uncover one is on the roof of one older farm building.
Let’s get started and make our own weather vane! If you live on the coast, you deserve to use the weather vane to view if the wind is blowing toward or far from the coast. You have the right to use the understanding to view if the sea breeze moved through!
Experiment: creating a Weather Vane
Purpose: Build a weather tool that can tell united state the wind direction
What you need:
- 2 paper plates
- 1 poster board or thick construction paper
- 1 plastic straw
- Scissors
- Modeling clay
- glue or tape
- Compass
- mite or colored pencils
- Ruler
- directly Pin
- Pencil with brand-new eraser
Procedure:
1. Cut 2 slits in ~ the end of the plastic straw. This will be offered to location the tail fin and arrow in later.
2. Draw the end the tail fin and also arrow on the poster paper. Use the ruler to make straight lines. The arrow will it is in in the form of a triangle and also the tail fin will look similar. Refer to the video for an ext details.
3. Stick the arrowhead and also tail fin right into the slits located on each end of the straw.
4. With one adult, take it the right pin and also puncture it through the center of the straw.
5. Stick the pin into the optimal of the pencils eraser. Make certain there is enough room between the eraser, straw and also the peak of the pin so the weather vane spins freely. Do adjustments together necessary.
6. Grab a document plate and place it upside down. Use the leader to measure wherein the facility of the plate is located and also mark it.
7. Use the ruler to draw perpendicular present intersecting in the center. This will certainly be offered for wind directions (north, south, east, west).
8. Decorate the document plate together you wish.
9. Take the pencil and puncture a hole in the center of the plate.
10. Use the second record plate and lay the in front of you through the suitable side up.
11. Take a grasp of modeling clay and place that on peak of the plate. This is going to be your weight to organize the weather vane up.
12. Stick the pencil through the modeling clay
13. Push the decorated plate down and also you have the right to use glue or tape come stick the 2 plates together.
14. The weather vane should have the ability to stand openly at this point.
15. Place the weather vane outside and also use the compass to complement the north side of the record plate v magnetic north.
16. Observe findings. If the wind arrow is pointing east then the wind is coming FROM the east.
Results: A functioning weather vane that have the right to be provided to tell the direction in i beg your pardon the wind is blowing from.
See more: How Many Calories In Malibu Rum Nutrition Information, Malibu Rum Calories, Carbs & Nutrition Facts
Conclusion: The weather vane is just one of the oldest tools ever created dating earlier to the start of man-kind. The straightforward technology is offered to tell what direction the wind is blowing from. A sudden adjust in wind direction could be a sign that a cold prior or sea breeze boundary moved through.
|
__label__pos
| 0.945114 |
A Detailed Account of Palm Frond Types
Types Of Palm Tree Leaves
Whether you use them as indoor plants or grow them out in your garden or backyard, palm trees can add a classy, tropical touch to any space. Palm is a wide category that includes thousands of species.
One of the most common ways to differentiate between different palm varieties is on the basis of palm leaves types.
Jump To
Here is all you need to know about different kinds of palm leaves, their significance, and their uses.
What Are Palm Fronds?
The quintessential postcard image that strikes our minds as soon as we hear ‘palm tree’ is that of a thick, texture trunk topped by a cluster of large, majestic foliage. These palm tree leaves, that grow at the top of the palm stem, are called fronds.
Palm has over 3,000 different species, all of which share a few common anatomical characteristics. Out of these features, one of the major ones is the palm fronds. Different types of palm leaves also act as identifying devices for the variety of palms outdoors & indoors.
A Palm Tree Frond Typically Consists of The Following Parts:
• Leaflets: These are the different sections of a palm frond that are attached to the rachis.
• Petiole: Petiole or leaf stalk connects the palm leaves to the palm trunk.
• Rachis: Ranchis is part of the leaf stalk, which extends from the petiole’s end to the tip of the leaves.
• Leaf-sheath: Leaf-sheath or frond midrib refers to the base of a palm frond. The fronds attach to the main stem here.
• Palm spines: Thorns or prickles found along the petiole are known as palm spines.
Types of Palm Leaves and Their Distinguishing Features
Types of Palm Leaves and Their Distinguishing Features
Mainly, there are 4 kinds of palm leaves. Out of these, the first two categories mentioned below are the most common ones.
1. Pinnate Leaves
This is perhaps the most common among the palm leaves types. The pinnate foliage appears to be feather-like.
Pinnate leaves feature a thick, central rib and leaflets that are attached to the rachis perpendicularly but are entirely separated from each other.
The size of the pinnate palm leaf varieties differs widely. While some varieties have only foot-long leaves, others come with leaves as long as 70 feet.
Varieties like coconutqueen palm, and date palm have pinnate palm leaves.
2. Palmate Leaves
While pinnate palm fronds look like a feather, palmate leaves resemble a fan. This is why the varieties featuring this type of leaves are known as fan palms.
Here, the adjacent leaflets (or segments) are joined laterally, forming a circle. These segments appear from a point located at the tip of the petiole and radiate outward.
Palmate leaves can be as small as the size of your palm and as large as 5 meters.
Mexican fan palm, sugar palm, and windmill palm are a few common varieties that feature palmate palm frond types.
3. Bipinnate or Costapalmate Fronds
These unusual and rare palm leaves types are akin to a fishtail! The leaf structure looks quite similar to pinnate leaves but bipinnate leaves are divided into 2 sections.
The overall leaf blade varies from oval to round in shape. Some or most part of the leaflets’ length is joined together. These leaflets are further attached along a costa (an extension of the petiole).
These can be as long as 4 meters and as wide as 3 meters. Sabal palm species feature bipinnate types of palm tree leaves.
4. Entire Leaves
Lastly, on our list of different types of palm leaves, we have this rare palm leaf structure, which looks quite similar to pinnate leaves.
However, while pinnate leaves are divided into individual leaf sections, the entire leaf does not divide into separate sections. Out of 3,000 palm species, only 5 varieties feature entire leaves.
The Significance of Palm Fronds
Palm leaves hold a lot of significance across various cultures and religions. These are known to symbolize noble things like a victory with integrity, peace, triumph, and eternal life.
Mesopotamian religions considered palm leaves to be sacred while in ancient Egypt, they stood as a symbol of immortality.
Palm fronds were the symbol of the winged goddess of victory, Nike, in ancient Greek mythology.
In ancient times, the branches of the palm were considered to be tokens of joy and triumph. They were used to welcome back kings and conquerors and on other festive occasions.
Palm branches also have significance in Christian history and Jewish tradition. In Christianity, palm branches are important during Palm Sunday and signify the victory of Christ over death.
Uses of Palm Leaf Varieties
One of the most useful byproducts of the versatile palm tree is the different kinds of palm leaves. From building material to clothing fiber, palm leaves have an impressive list of uses.
Sturdy types of palm tree leaves are used for the following:
• Roof thatch and garden fencing.
• For making hats, woven baskets, and other woven craft items.
• Fuel for the fire.
• Making long-wearing mulch for garden beds.
• As nutritional feed for livestock.
• Spines from palm leaves can also be used as garden stakes.
Related: Brown Spots on Palm Leaves
FAQs About Palm Leaves Types
Q. What is the difference between a leaf and a frond?
A. To put it simply, frond refers to the leaf of a fern or palm. On the other hand, a leaf is a green, flat organ you see in most vegetative plants. A palm mainly has 4 palm frond types – pinnate, palmate, bipinnate and entire.
Q. What is the leaf arrangement for a palm tree?
A. In palm trees, the foliage is found in clusters at the top of a long trunk. Palm leaves and fruits are produced at the meristem, which is located at the top of the palm stem (trunk). Based on the arrangement, listed below are the various kinds of palm leaves:
• Pinnate leaves that resemble a feather
• Palmate leaves that resemble a fan
• Bipinnate leaves are like pinnate leaves but are divided into 2 sections.
• Entire leaves that are not divided into different sections.
Q. What is the margin of the leaf?
A.The boundary area of a leaf, that extends along its edge is known as the margin. There are different kinds of palm leaves with different margins and knowing about them can aid in plant identification.
Q. Is a palm leaf a simple or compound leaf?
A. That depends on the different types of palm leaves. Most palm varieties come with either palmate or pinnate compound leaves.
Bipinnate palm leaf varieties are also considered to be compound leaves. However, entire palm leaves are undivided and are categorized as simple.
Q. What is the Venation of palm leaf?
A. Palm leaves usually have parallel venation.
Q. How long is a palm tree leaf?
A. The length of a palm tree leaf depends on its variety and can range anywhere from less than a few inches to over 70 feet. For instance, the fronds of the Coontie palm are usually between 2 to 3 feet whereas those of Raffia palms can grow up to be over 80 feet long.
Q. Do all palm trees have heart of palm?
A . No. Heart of palm can only be obtained from certain palm varieties. Coconut, peach palm, acai palm, jucara palm, and palmetto, are the few main varieties that have the heart of palm.
|
__label__pos
| 0.95773 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.